diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-01 16:06:07 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-01 16:06:07 +0000 |
commit | a85e5ca5f2dfadcf9f3812a8ef039d1f206833a4 (patch) | |
tree | 5d44e797d038158cdc19b14ac6951435eb85c912 /xfa/fxfa/parser/cxfa_node.h | |
parent | e5434b5531f2c081c1d69f67125b6665070ea969 (diff) | |
download | pdfium-a85e5ca5f2dfadcf9f3812a8ef039d1f206833a4.tar.xz |
Split JS methods out of CXFA_Object
This CL moves the javascript code from CXFA_Object to CJX_Object. The
Script_* methods are proxied to CJX_Object.
The ownership of the CJX_ object was removed from CXFA_Node and moved up
to CXFA_Object.
Change-Id: I58d286e6bb0151aa88d4f673bc7729987417bde6
Reviewed-on: https://pdfium-review.googlesource.com/17310
Reviewed-by: Tom Sepez <tsepez@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.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h index 6151d738a2..02326d933a 100644 --- a/xfa/fxfa/parser/cxfa_node.h +++ b/xfa/fxfa/parser/cxfa_node.h @@ -53,8 +53,10 @@ class CXFA_Node : public CXFA_Object { void SetFlag(uint32_t dwFlag, bool bNotify); void ClearFlag(uint32_t dwFlag); - CJX_Node* JSNode() { return &m_JSNode; } - const CJX_Node* JSNode() const { return &m_JSNode; } + CJX_Node* JSNode() { return static_cast<CJX_Node*>(JSObject()); } + const CJX_Node* JSNode() const { + return static_cast<const CJX_Node*>(JSObject()); + } CXFA_Node* GetParent() { return m_pParent; } CXFA_Node* GetChildNode() { return m_pChild; } @@ -141,10 +143,6 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* GetOccurNode(); - int32_t Subform_and_SubformSet_InstanceIndex(); - int32_t InstanceManager_SetInstances(int32_t iCount); - int32_t InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom); - void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, bool bScriptModify); void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify); @@ -429,10 +427,6 @@ class CXFA_Node : public CXFA_Object { bool bSetting, XFA_ATTRIBUTE eAttribute); - void ThrowMissingPropertyException(const WideString& obj, - const WideString& prop) const; - void ThrowTooManyOccurancesException(const WideString& obj) const; - private: friend class CXFA_Document; @@ -456,7 +450,6 @@ class CXFA_Node : public CXFA_Object { uint16_t m_uNodeFlags; uint32_t m_dwNameHash; CXFA_Node* m_pAuxNode; - CJX_Node m_JSNode; }; #endif // XFA_FXFA_PARSER_CXFA_NODE_H_ |