OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ |
8 #define XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ | 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 30 matching lines...) Expand all Loading... |
41 CXFA_Object* GetThisObject() const { return m_pThisObject; } | 41 CXFA_Object* GetThisObject() const { return m_pThisObject; } |
42 v8::Isolate* GetRuntime() const { return m_pIsolate; } | 42 v8::Isolate* GetRuntime() const { return m_pIsolate; } |
43 | 43 |
44 int32_t GetIndexByName(CXFA_Node* refNode); | 44 int32_t GetIndexByName(CXFA_Node* refNode); |
45 int32_t GetIndexByClassName(CXFA_Node* refNode); | 45 int32_t GetIndexByClassName(CXFA_Node* refNode); |
46 void GetSomExpression(CXFA_Node* refNode, CFX_WideString& wsExpression); | 46 void GetSomExpression(CXFA_Node* refNode, CFX_WideString& wsExpression); |
47 | 47 |
48 void SetNodesOfRunScript(CXFA_NodeArray* pArray); | 48 void SetNodesOfRunScript(CXFA_NodeArray* pArray); |
49 void AddNodesOfRunScript(const CXFA_NodeArray& nodes); | 49 void AddNodesOfRunScript(const CXFA_NodeArray& nodes); |
50 void AddNodesOfRunScript(CXFA_Node* pNode); | 50 void AddNodesOfRunScript(CXFA_Node* pNode); |
51 FXJSE_HCLASS GetJseNormalClass(); | 51 CFXJSE_Class* GetJseNormalClass(); |
52 | 52 |
53 void SetRunAtType(XFA_ATTRIBUTEENUM eRunAt) { m_eRunAtType = eRunAt; } | 53 void SetRunAtType(XFA_ATTRIBUTEENUM eRunAt) { m_eRunAtType = eRunAt; } |
54 FX_BOOL IsRunAtClient() { return m_eRunAtType != XFA_ATTRIBUTEENUM_Server; } | 54 FX_BOOL IsRunAtClient() { return m_eRunAtType != XFA_ATTRIBUTEENUM_Server; } |
55 FX_BOOL QueryNodeByFlag(CXFA_Node* refNode, | 55 FX_BOOL QueryNodeByFlag(CXFA_Node* refNode, |
56 const CFX_WideStringC& propname, | 56 const CFX_WideStringC& propname, |
57 FXJSE_HVALUE hValue, | 57 FXJSE_HVALUE hValue, |
58 uint32_t dwFlag, | 58 uint32_t dwFlag, |
59 FX_BOOL bSetting); | 59 FX_BOOL bSetting); |
60 FX_BOOL QueryVariableHValue(CXFA_Node* pScriptNode, | 60 FX_BOOL QueryVariableHValue(CXFA_Node* pScriptNode, |
61 const CFX_ByteStringC& szPropName, | 61 const CFX_ByteStringC& szPropName, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 private: | 96 private: |
97 void DefineJsContext(); | 97 void DefineJsContext(); |
98 CFXJSE_Context* CreateVariablesContext(CXFA_Node* pScriptNode, | 98 CFXJSE_Context* CreateVariablesContext(CXFA_Node* pScriptNode, |
99 CXFA_Node* pSubform); | 99 CXFA_Node* pSubform); |
100 void DefineJsClass(); | 100 void DefineJsClass(); |
101 void RemoveBuiltInObjs(CFXJSE_Context* pContext) const; | 101 void RemoveBuiltInObjs(CFXJSE_Context* pContext) const; |
102 | 102 |
103 CXFA_Document* m_pDocument; | 103 CXFA_Document* m_pDocument; |
104 CFXJSE_Context* m_pJsContext; | 104 CFXJSE_Context* m_pJsContext; |
105 v8::Isolate* m_pIsolate; | 105 v8::Isolate* m_pIsolate; |
106 FXJSE_HCLASS m_hJsClass; | 106 CFXJSE_Class* m_pJsClass; |
107 XFA_SCRIPTLANGTYPE m_eScriptType; | 107 XFA_SCRIPTLANGTYPE m_eScriptType; |
108 FXJSE_CLASS m_JsGlobalClass; | 108 FXJSE_CLASS m_JsGlobalClass; |
109 FXJSE_CLASS m_JsNormalClass; | 109 FXJSE_CLASS m_JsNormalClass; |
110 CFX_MapPtrTemplate<CXFA_Object*, FXJSE_HVALUE> m_mapXFAToHValue; | 110 CFX_MapPtrTemplate<CXFA_Object*, FXJSE_HVALUE> m_mapXFAToHValue; |
111 FXJSE_CLASS m_JsGlobalVariablesClass; | 111 FXJSE_CLASS m_JsGlobalVariablesClass; |
112 CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Context*> m_mapVariableToContext; | 112 CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Context*> m_mapVariableToContext; |
113 CXFA_EventParam m_eventParam; | 113 CXFA_EventParam m_eventParam; |
114 CXFA_NodeArray m_upObjectArray; | 114 CXFA_NodeArray m_upObjectArray; |
115 CFX_ArrayTemplate<CXFA_NodeList*> m_CacheListArray; | 115 CFX_ArrayTemplate<CXFA_NodeList*> m_CacheListArray; |
116 CXFA_NodeArray* m_pScriptNodeArray; | 116 CXFA_NodeArray* m_pScriptNodeArray; |
117 CXFA_ResolveProcessor* m_pResolveProcessor; | 117 CXFA_ResolveProcessor* m_pResolveProcessor; |
118 XFA_HFM2JSCONTEXT m_hFM2JSContext; | 118 XFA_HFM2JSCONTEXT m_hFM2JSContext; |
119 CXFA_Object* m_pThisObject; | 119 CXFA_Object* m_pThisObject; |
120 uint32_t m_dwBuiltInInFlags; | 120 uint32_t m_dwBuiltInInFlags; |
121 XFA_ATTRIBUTEENUM m_eRunAtType; | 121 XFA_ATTRIBUTEENUM m_eRunAtType; |
122 }; | 122 }; |
123 | 123 |
124 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ | 124 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ |
OLD | NEW |