summaryrefslogtreecommitdiff
path: root/fxjs/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa')
-rw-r--r--fxjs/xfa/cjx_node.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp
index a8a88c9627..06a812e2eb 100644
--- a/fxjs/xfa/cjx_node.cpp
+++ b/fxjs/xfa/cjx_node.cpp
@@ -247,13 +247,7 @@ CJS_Return CJX_Node::loadXML(CFX_V8* runtime,
}
if (bIgnoreRoot) {
- CFX_XMLNode* pXMLChild = pXMLNode->GetFirstChild();
- while (pXMLChild) {
- CFX_XMLNode* pXMLSibling = pXMLChild->GetNextSibling();
- pXMLNode->RemoveChildNode(pXMLChild);
- pFakeXMLRoot->AppendChild(pdfium::WrapUnique<CFX_XMLNode>(pXMLChild));
- pXMLChild = pXMLSibling;
- }
+ pXMLNode->MoveChildrenTo(pFakeXMLRoot.get());
} else {
CFX_XMLNode* pXMLParent = pXMLNode->GetParent();
if (pXMLParent)