From c1df5d4375027aa9d0b88f456f95177c016e8cad Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 18 Jul 2016 06:36:51 -0700 Subject: Pass element hash and name into CXFA_Object constructor. Providing the element hash and name in the constructor allows us to remove the calls to XFA_GetElementByID in the get methods. Review-Url: https://codereview.chromium.org/2101403002 --- xfa/fxfa/parser/xfa_object.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/xfa_object.h') diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index 268d5c4c79..08eedeeab5 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -48,7 +48,8 @@ class CXFA_Object : public CFXJSE_HostObject { public: CXFA_Object(CXFA_Document* pDocument, XFA_ObjectType objectType, - XFA_Element eType); + XFA_Element eType, + const CFX_WideStringC& elementName); ~CXFA_Object() override; CXFA_Document* GetDocument() const { return m_pDocument; } @@ -95,6 +96,9 @@ class CXFA_Object : public CFXJSE_HostObject { CXFA_Document* const m_pDocument; const XFA_ObjectType m_objectType; const XFA_Element m_elementType; + + const uint32_t m_elementNameHash; + const CFX_WideStringC m_elementName; }; using CXFA_ObjArray = CFX_ArrayTemplate; @@ -619,7 +623,8 @@ class CXFA_Node : public CXFA_Object { CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ObjectType oType, - XFA_Element eType); + XFA_Element eType, + const CFX_WideStringC& elementName); ~CXFA_Node() override; bool HasFlag(XFA_NodeFlag dwFlag) const; -- cgit v1.2.3