| OLD | NEW |
| 1 // Copyright 2016 The PDFium Authors. All rights reserved. | 1 // Copyright 2016 The PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cstddef> | 5 #include <cstddef> |
| 6 #include <cstdint> | 6 #include <cstdint> |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "core/fxcrt/fx_basic.h" | 10 #include "core/fxcrt/fx_basic.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 for (CFDE_XMLNode* pXMLNode = | 25 for (CFDE_XMLNode* pXMLNode = |
| 26 pXMLFakeRoot->GetNodeItem(CFDE_XMLNode::FirstChild); | 26 pXMLFakeRoot->GetNodeItem(CFDE_XMLNode::FirstChild); |
| 27 pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) { | 27 pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) { |
| 28 if (pXMLNode->GetType() == FDE_XMLNODE_Element) { | 28 if (pXMLNode->GetType() == FDE_XMLNODE_Element) { |
| 29 if (bVerifyWellFormness) { | 29 if (bVerifyWellFormness) { |
| 30 for (CFDE_XMLNode* pNextNode = | 30 for (CFDE_XMLNode* pNextNode = |
| 31 pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling); | 31 pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling); |
| 32 pNextNode; | 32 pNextNode; |
| 33 pNextNode = pNextNode->GetNodeItem(CFDE_XMLNode::NextSibling)) { | 33 pNextNode = pNextNode->GetNodeItem(CFDE_XMLNode::NextSibling)) { |
| 34 if (pNextNode->GetType() == FDE_XMLNODE_Element) { | 34 if (pNextNode->GetType() == FDE_XMLNODE_Element) { |
| 35 return FALSE; | 35 return nullptr; |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 return pXMLNode; | 39 return pXMLNode; |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 return nullptr; | 42 return nullptr; |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| (...skipping 16 matching lines...) Expand all Loading... |
| 62 if (!doc->LoadXML(parser.release())) | 62 if (!doc->LoadXML(parser.release())) |
| 63 return 0; | 63 return 0; |
| 64 | 64 |
| 65 int32_t load_result = doc->DoLoad(nullptr); | 65 int32_t load_result = doc->DoLoad(nullptr); |
| 66 if (load_result < 100) | 66 if (load_result < 100) |
| 67 return 0; | 67 return 0; |
| 68 | 68 |
| 69 (void)XFA_FDEExtension_GetDocumentNode(doc.get()); | 69 (void)XFA_FDEExtension_GetDocumentNode(doc.get()); |
| 70 return 0; | 70 return 0; |
| 71 } | 71 } |
| OLD | NEW |