From 18a6069f5ce332b2bab97bf3a6d8ea9528d69791 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Jan 2018 16:30:56 +0000 Subject: 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 Commit-Queue: dsinclair --- fxjs/cfxjse_engine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fxjs/cfxjse_engine.cpp') 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(GetIsolate()); - CXFA_Node* pThisObject = pParent->GetNodeItem(XFA_NODEITEM_Parent); + CXFA_Node* pThisObject = pParent->GetParent(); CFXJSE_Context* pVariablesContext = CreateVariablesContext(pScriptNode, pThisObject); AutoRestorer 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; -- cgit v1.2.3