From 20eb52e66c565d36a78dc1399f04f7485ccf8fe6 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 13 Feb 2018 21:09:32 +0000 Subject: Cleanup CFX_XMLNode and friends This CL removes unused methods from CFX_XMLNode, adds an AppendChild to handle the case of a -1 index to InsertChildNode, removes the InsertChildNode return value which is unused and cleans up various other things. Change-Id: I3a022e4dc2afffa6893ad11014034dd7ed301f13 Reviewed-on: https://pdfium-review.googlesource.com/26510 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- fxjs/xfa/cjx_node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fxjs/xfa') diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp index b1749d6025..e5396b7c90 100644 --- a/fxjs/xfa/cjx_node.cpp +++ b/fxjs/xfa/cjx_node.cpp @@ -251,7 +251,7 @@ CJS_Return CJX_Node::loadXML(CFX_V8* runtime, CFX_XMLNode* pXMLSibling = pXMLChild->GetNodeItem(CFX_XMLNode::NextSibling); pXMLNode->RemoveChildNode(pXMLChild); - pFakeXMLRoot->InsertChildNode(pXMLChild); + pFakeXMLRoot->AppendChild(pXMLChild); pXMLChild = pXMLSibling; } } else { @@ -259,7 +259,7 @@ CJS_Return CJX_Node::loadXML(CFX_V8* runtime, if (pXMLParent) pXMLParent->RemoveChildNode(pXMLNode); - pFakeXMLRoot->InsertChildNode(pXMLNode); + pFakeXMLRoot->AppendChild(pXMLNode); } pParser->ConstructXFANode(pFakeRoot, pFakeXMLRoot.get()); -- cgit v1.2.3