diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-12-13 18:29:02 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-13 18:29:02 +0000 |
commit | 2614250d4f11ed02033a7da095a1694ece12ab78 (patch) | |
tree | cc41c5770c17ea47537856991fa44cd1e2acfeb8 /xfa/fxfa/cxfa_ffdocview.cpp | |
parent | 14768f3264a4cff8ca0096a27e41f1861b2c422b (diff) | |
download | pdfium-2614250d4f11ed02033a7da095a1694ece12ab78.tar.xz |
Methods are on CJX_Object not CJX_Node now
This CL converts all of the JSNode() to JSObject() calls as all of the
original CJX_Node methods have been moved to CJX_Object. This fixes
potential bad casts from things like CJX_Content which do not inhert
from CJX_Node.
Bug: pdfium:793372
Change-Id: I6c7f63a78f3d47bb6bad74faed3fd8c535bf095e
Reviewed-on: https://pdfium-review.googlesource.com/21090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffdocview.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffdocview.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp index f1ae2af3c0..5b1dc82223 100644 --- a/xfa/fxfa/cxfa_ffdocview.cpp +++ b/xfa/fxfa/cxfa_ffdocview.cpp @@ -279,7 +279,7 @@ int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, : nullptr; } if (pValidateNode) - wsValidateStr = pValidateNode->JSNode()->GetContent(false); + wsValidateStr = pValidateNode->JSObject()->GetContent(false); } if (!wsValidateStr.Contains(L"preSubmit")) @@ -615,7 +615,7 @@ void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) { } void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange) { - CXFA_CalcData* pGlobalData = pNodeChange->JSNode()->GetCalcData(); + CXFA_CalcData* pGlobalData = pNodeChange->JSObject()->GetCalcData(); if (!pGlobalData) return; @@ -629,8 +629,9 @@ size_t CXFA_FFDocView::RunCalculateRecursive(size_t index) { while (index < m_CalculateAccs.size()) { CXFA_WidgetAcc* pCurAcc = m_CalculateAccs[index]; AddCalculateNodeNotify(pCurAcc->GetNode()); - size_t recurse = pCurAcc->GetNode()->JSNode()->GetCalcRecursionCount() + 1; - pCurAcc->GetNode()->JSNode()->SetCalcRecursionCount(recurse); + size_t recurse = + pCurAcc->GetNode()->JSObject()->GetCalcRecursionCount() + 1; + pCurAcc->GetNode()->JSObject()->SetCalcRecursionCount(recurse); if (recurse > 11) break; if (pCurAcc->ProcessCalculate() == XFA_EVENTERROR_Success) @@ -648,7 +649,7 @@ int32_t CXFA_FFDocView::RunCalculateWidgets() { RunCalculateRecursive(0); for (CXFA_WidgetAcc* pCurAcc : m_CalculateAccs) - pCurAcc->GetNode()->JSNode()->SetCalcRecursionCount(0); + pCurAcc->GetNode()->JSObject()->SetCalcRecursionCount(0); m_CalculateAccs.clear(); return XFA_EVENTERROR_Success; @@ -736,21 +737,21 @@ void CXFA_FFDocView::RunBindItems() { continue; if (bValueUseContent) { - wsValue = refNode->JSNode()->GetContent(false); + wsValue = refNode->JSObject()->GetContent(false); } else { CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash); - wsValue = nodeValue ? nodeValue->JSNode()->GetContent(false) - : refNode->JSNode()->GetContent(false); + wsValue = nodeValue ? nodeValue->JSObject()->GetContent(false) + : refNode->JSObject()->GetContent(false); } if (!bUseValue) { if (bLabelUseContent) { - wsLabel = refNode->JSNode()->GetContent(false); + wsLabel = refNode->JSObject()->GetContent(false); } else { CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef.AsStringView()); if (nodeLabel) - wsLabel = nodeLabel->JSNode()->GetContent(false); + wsLabel = nodeLabel->JSObject()->GetContent(false); } } else { wsLabel = wsValue; |