From a85e5ca5f2dfadcf9f3812a8ef039d1f206833a4 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 1 Nov 2017 16:06:07 +0000 Subject: 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 Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_node.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_node.h') 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(JSObject()); } + const CJX_Node* JSNode() const { + return static_cast(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_ -- cgit v1.2.3