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 /fxjs/cjx_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 'fxjs/cjx_node.h')
-rw-r--r-- | fxjs/cjx_node.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h index 235eca144f..a70cec3ce7 100644 --- a/fxjs/cjx_node.h +++ b/fxjs/cjx_node.h @@ -10,6 +10,7 @@ #include <map> #include "core/fxcrt/unowned_ptr.h" +#include "fxjs/cjx_object.h" #include "xfa/fxfa/fxfa_basic.h" typedef void (*PD_CALLBACK_FREEDATA)(void* pData); @@ -43,10 +44,13 @@ enum XFA_SOM_MESSAGETYPE { class CFXJSE_Arguments; class CXFA_Node; -class CJX_Node { +class CJX_Node : public CJX_Object { public: explicit CJX_Node(CXFA_Node* node); - ~CJX_Node(); + ~CJX_Node() override; + + CXFA_Node* GetXFANode(); + const CXFA_Node* GetXFANode() const; bool HasAttribute(XFA_ATTRIBUTE eAttr, bool bCanInherit = false); bool SetAttribute(XFA_ATTRIBUTE eAttr, @@ -165,6 +169,14 @@ class CJX_Node { void MergeAllData(void* pDstModule); + void ThrowMissingPropertyException(const WideString& obj, + const WideString& prop) const; + void ThrowTooManyOccurancesException(const WideString& obj) const; + + int32_t Subform_and_SubformSet_InstanceIndex(); + int32_t InstanceManager_SetInstances(int32_t iDesired); + int32_t InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom); + void Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments); void Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments); void Script_Som_ResolveNodeList(CFXJSE_Value* pValue, @@ -489,7 +501,6 @@ class CJX_Node { int32_t execSingleEventByName(const WideStringView& wsEventName, XFA_Element eType); - UnownedPtr<CXFA_Node> node_; XFA_MAPMODULEDATA* map_module_data_; }; |