summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_engine.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 16:30:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 16:30:56 +0000
commit18a6069f5ce332b2bab97bf3a6d8ea9528d69791 (patch)
tree3ff25aea65bc9691b05919cec0dc74a6a506d156 /fxjs/cfxjse_engine.cpp
parent640d8ffad8536c789103892c7a4e69e5d30172c8 (diff)
downloadpdfium-18a6069f5ce332b2bab97bf3a6d8ea9528d69791.tar.xz
Remove CXFA_Node::GetNodeItem
This CL removes the generic CXFA_Node::GetNodeItem(type) method for specific calls to get the parent, child or siblings. Change-Id: Ief68284ac7b954aaa4ed7120dd82a39f8b52656a Reviewed-on: https://pdfium-review.googlesource.com/22650 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r--fxjs/cfxjse_engine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index 535ec41160..325895f566 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -454,7 +454,7 @@ bool CFXJSE_Engine::RunVariablesScript(CXFA_Node* pScriptNode) {
if (pScriptNode->GetElementType() != XFA_Element::Script)
return true;
- CXFA_Node* pParent = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent);
+ CXFA_Node* pParent = pScriptNode->GetParent();
if (!pParent || pParent->GetElementType() != XFA_Element::Variables)
return false;
@@ -462,7 +462,7 @@ bool CFXJSE_Engine::RunVariablesScript(CXFA_Node* pScriptNode) {
if (it != m_mapVariableToContext.end() && it->second)
return true;
- CXFA_Node* pTextNode = pScriptNode->GetNodeItem(XFA_NODEITEM_FirstChild);
+ CXFA_Node* pTextNode = pScriptNode->GetFirstChild();
if (!pTextNode)
return false;
@@ -473,7 +473,7 @@ bool CFXJSE_Engine::RunVariablesScript(CXFA_Node* pScriptNode) {
ByteString btScript = wsScript->UTF8Encode();
auto hRetValue = pdfium::MakeUnique<CFXJSE_Value>(GetIsolate());
- CXFA_Node* pThisObject = pParent->GetNodeItem(XFA_NODEITEM_Parent);
+ CXFA_Node* pThisObject = pParent->GetParent();
CFXJSE_Context* pVariablesContext =
CreateVariablesContext(pScriptNode, pThisObject);
AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject);
@@ -488,7 +488,7 @@ bool CFXJSE_Engine::QueryVariableValue(CXFA_Node* pScriptNode,
if (!pScriptNode || pScriptNode->GetElementType() != XFA_Element::Script)
return false;
- CXFA_Node* variablesNode = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent);
+ CXFA_Node* variablesNode = pScriptNode->GetParent();
if (!variablesNode ||
variablesNode->GetElementType() != XFA_Element::Variables)
return false;