From 9bf1a5efde45cd99be11c530232df349c3eb5295 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 13 Feb 2018 22:04:23 +0000 Subject: Add last_child to CFX_XMLNode This CL adds the list_child_ member into CFX_XMLNode to keep it consistent with other tree's in the system. Change-Id: I2e64f11fb9c7df40dd3467edcce177fc492d2cd2 Reviewed-on: https://pdfium-review.googlesource.com/26670 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_simple_parser.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'xfa/fxfa/parser') diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp index eee5cb3d83..42498695e9 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.cpp +++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp @@ -101,8 +101,7 @@ const PacketInfo* GetPacketByName(const WideStringView& wsName) { return nullptr; } -CFX_XMLNode* GetDocumentNode(CFX_XMLDoc* pXMLDoc, - bool bVerifyWellFormness = false) { +CFX_XMLNode* GetDocumentNode(CFX_XMLDoc* pXMLDoc) { if (!pXMLDoc) return nullptr; @@ -111,14 +110,6 @@ CFX_XMLNode* GetDocumentNode(CFX_XMLDoc* pXMLDoc, if (pXMLNode->GetType() != FX_XMLNODE_Element) continue; - if (!bVerifyWellFormness) - return pXMLNode; - - for (CFX_XMLNode* pNextNode = pXMLNode->GetNextSibling(); pNextNode; - pNextNode = pNextNode->GetNextSibling()) { - if (pNextNode->GetType() == FX_XMLNODE_Element) - return nullptr; - } return pXMLNode; } return nullptr; -- cgit v1.2.3