diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-10 16:30:56 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-10 16:30:56 +0000 |
commit | 18a6069f5ce332b2bab97bf3a6d8ea9528d69791 (patch) | |
tree | 3ff25aea65bc9691b05919cec0dc74a6a506d156 /fxjs/xfa/cjx_node.cpp | |
parent | 640d8ffad8536c789103892c7a4e69e5d30172c8 (diff) | |
download | pdfium-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/xfa/cjx_node.cpp')
-rw-r--r-- | fxjs/xfa/cjx_node.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp index 581d3281ef..e8fa44eb17 100644 --- a/fxjs/xfa/cjx_node.cpp +++ b/fxjs/xfa/cjx_node.cpp @@ -267,11 +267,11 @@ CJS_Return CJX_Node::loadXML(CJS_V8* runtime, return CJS_Return(true); if (bOverwrite) { - CXFA_Node* pChild = GetXFANode()->GetNodeItem(XFA_NODEITEM_FirstChild); - CXFA_Node* pNewChild = pFakeRoot->GetNodeItem(XFA_NODEITEM_FirstChild); + CXFA_Node* pChild = GetXFANode()->GetFirstChild(); + CXFA_Node* pNewChild = pFakeRoot->GetFirstChild(); int32_t index = 0; while (pNewChild) { - CXFA_Node* pItem = pNewChild->GetNodeItem(XFA_NODEITEM_NextSibling); + CXFA_Node* pItem = pNewChild->GetNextSibling(); pFakeRoot->RemoveChild(pNewChild, true); GetXFANode()->InsertChild(index++, pNewChild); pNewChild->SetFlag(XFA_NodeFlag_Initialized, true); @@ -279,7 +279,7 @@ CJS_Return CJX_Node::loadXML(CJS_V8* runtime, } while (pChild) { - CXFA_Node* pItem = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); + CXFA_Node* pItem = pChild->GetNextSibling(); GetXFANode()->RemoveChild(pChild, true); pFakeRoot->InsertChild(pChild, nullptr); pChild = pItem; @@ -297,9 +297,9 @@ CJS_Return CJX_Node::loadXML(CJS_V8* runtime, } MoveBufferMapData(pFakeRoot, GetXFANode()); } else { - CXFA_Node* pChild = pFakeRoot->GetNodeItem(XFA_NODEITEM_FirstChild); + CXFA_Node* pChild = pFakeRoot->GetFirstChild(); while (pChild) { - CXFA_Node* pItem = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); + CXFA_Node* pItem = pChild->GetNextSibling(); pFakeRoot->RemoveChild(pChild, true); GetXFANode()->InsertChild(pChild, nullptr); pChild->SetFlag(XFA_NodeFlag_Initialized, true); @@ -483,7 +483,7 @@ int32_t CJX_Node::execSingleEventByName(const WideStringView& wsEventName, if (eType != XFA_Element::ExclGroup && eType != XFA_Element::Field) return XFA_EVENTERROR_NotExist; - CXFA_Node* pParentNode = GetXFANode()->GetNodeItem(XFA_NODEITEM_Parent); + CXFA_Node* pParentNode = GetXFANode()->GetParent(); if (pParentNode && pParentNode->GetElementType() == XFA_Element::ExclGroup) { // TODO(dsinclair): This seems like a bug, we do the same work twice? |