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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 FX_BOOL bQueryIn); | 86 FX_BOOL bQueryIn); |
87 FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode); | 87 FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode); |
88 CXFA_Object* GetVariablesThis(CXFA_Object* pObject, | 88 CXFA_Object* GetVariablesThis(CXFA_Object* pObject, |
89 FX_BOOL bScriptNode = FALSE); | 89 FX_BOOL bScriptNode = FALSE); |
90 void ReleaseVariablesMap(); | 90 void ReleaseVariablesMap(); |
91 FX_BOOL IsStrictScopeInJavaScript(); | 91 FX_BOOL IsStrictScopeInJavaScript(); |
92 XFA_SCRIPTLANGTYPE GetType(); | 92 XFA_SCRIPTLANGTYPE GetType(); |
93 CXFA_NodeArray& GetUpObjectArray() { return m_upObjectArray; } | 93 CXFA_NodeArray& GetUpObjectArray() { return m_upObjectArray; } |
94 CXFA_Document* GetDocument() const { return m_pDocument; } | 94 CXFA_Document* GetDocument() const { return m_pDocument; } |
95 | 95 |
96 protected: | 96 private: |
97 void DefineJsContext(); | 97 void DefineJsContext(); |
98 FXJSE_HCONTEXT 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(FXJSE_HCONTEXT jsContext) const; | 101 void RemoveBuiltInObjs(CFXJSE_Context* pContext) const; |
102 | 102 |
103 CXFA_Document* m_pDocument; | 103 CXFA_Document* m_pDocument; |
104 FXJSE_HCONTEXT m_hJsContext; | 104 CFXJSE_Context* m_pJsContext; |
105 v8::Isolate* m_pIsolate; | 105 v8::Isolate* m_pIsolate; |
106 FXJSE_HCLASS m_hJsClass; | 106 FXJSE_HCLASS m_hJsClass; |
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*, FXJSE_HCONTEXT> m_mapVariableToHValue; | 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 |