summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_object.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-07-18 06:36:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-18 06:36:51 -0700
commitc1df5d4375027aa9d0b88f456f95177c016e8cad (patch)
treea06026f0df134604b4cc8082b15a1875ddcc00a0 /xfa/fxfa/parser/xfa_object.h
parente8a80664a888526ca4f0d08b4e6b290eb0aa0d76 (diff)
downloadpdfium-c1df5d4375027aa9d0b88f456f95177c016e8cad.tar.xz
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
Diffstat (limited to 'xfa/fxfa/parser/xfa_object.h')
-rw-r--r--xfa/fxfa/parser/xfa_object.h9
1 files changed, 7 insertions, 2 deletions
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<CXFA_Object*>;
@@ -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;