summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-08 17:49:41 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-08 17:49:41 +0000
commitf0e386de64e030f6d692acfa27e2bc0a50018710 (patch)
treea7d21522b73749a9c5398be06bb2d25430b0d8b9 /xfa/fxfa/parser/cxfa_node.h
parent75c81710b1d193b59d5b38142bb926959346f7ea (diff)
downloadpdfium-f0e386de64e030f6d692acfa27e2bc0a50018710.tar.xz
Convert CXFA_Node to store a vector of children
This CL changes CXFA_Node to use a vector of nodes as children instead of a singly linked list of siblings and child pointers. Change-Id: Ica8219f63d783a07d90b9541ae62a35c49166e44 Reviewed-on: https://pdfium-review.googlesource.com/26030 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.h')
-rw-r--r--xfa/fxfa/parser/cxfa_node.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h
index c3b2fd1b84..c849b19248 100644
--- a/xfa/fxfa/parser/cxfa_node.h
+++ b/xfa/fxfa/parser/cxfa_node.h
@@ -178,9 +178,9 @@ class CXFA_Node : public CXFA_Object {
CXFA_Node* Clone(bool bRecursive);
- CXFA_Node* GetNextSibling() const { return m_pNext; }
+ CXFA_Node* GetNextSibling() const;
CXFA_Node* GetPrevSibling() const;
- CXFA_Node* GetFirstChild() const { return m_pChild; }
+ CXFA_Node* GetFirstChild() const;
CXFA_Node* GetParent() const { return parent_.Get(); }
CXFA_Node* GetNextContainerSibling() const;
@@ -420,7 +420,6 @@ class CXFA_Node : public CXFA_Object {
WideString GetValidateMessage(bool bError, bool bVersionFlag);
bool HasFlag(XFA_NodeFlag dwFlag) const;
- CXFA_Node* Deprecated_GetPrevSibling();
const PropertyData* GetPropertyData(XFA_Element property) const;
const AttributeData* GetAttributeData(XFA_Attribute attr) const;
Optional<XFA_Element> GetFirstPropertyWithFlag(uint8_t flag);
@@ -489,12 +488,15 @@ class CXFA_Node : public CXFA_Object {
CXFA_Event* event,
CXFA_EventParam* pEventParam);
+ CXFA_Node* GetNodeBefore(const CXFA_Node* node) const;
+ CXFA_Node* GetNodeAfter(const CXFA_Node* node) const;
+ CXFA_Node* GetContainerBefore(const CXFA_Node* node) const;
+ CXFA_Node* GetContainerAfter(const CXFA_Node* node) const;
+
const PropertyData* const m_Properties;
const AttributeData* const m_Attributes;
const uint32_t m_ValidPackets;
- CXFA_Node* m_pNext;
- CXFA_Node* m_pChild;
- CXFA_Node* m_pLastChild;
+ std::vector<CXFA_Node*> children_;
UnownedPtr<CXFA_Node> parent_;
CFX_XMLNode* m_pXMLNode;
const XFA_PacketType m_ePacket;