diff options
Diffstat (limited to 'fxjs')
33 files changed, 188 insertions, 189 deletions
diff --git a/fxjs/CJX_Define.h b/fxjs/CJX_Define.h index 4a26fd4d23..bff624fe00 100644 --- a/fxjs/CJX_Define.h +++ b/fxjs/CJX_Define.h @@ -9,26 +9,26 @@ #include <vector> +#include "fxjs/cfx_v8.h" #include "fxjs/cjs_return.h" -#include "fxjs/cjs_v8.h" template <class C, - CJS_Return (C::*M)(CJS_V8* runtime, + CJS_Return (C::*M)(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params)> CJS_Return JSMethod(C* node, - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return (node->*M)(runtime, params); } #define JS_METHOD(method_name, class_name) \ static CJS_Return method_name##_static( \ - CJX_Object* node, CJS_V8* runtime, \ + CJX_Object* node, CFX_V8* runtime, \ const std::vector<v8::Local<v8::Value>>& params) { \ return JSMethod<class_name, &class_name::method_name>( \ static_cast<class_name*>(node), runtime, params); \ } \ - CJS_Return method_name(CJS_V8* runtime, \ + CJS_Return method_name(CFX_V8* runtime, \ const std::vector<v8::Local<v8::Value>>& params) #define JS_PROP(prop_name) \ diff --git a/fxjs/cjs_v8.cpp b/fxjs/cfx_v8.cpp index e6948a37cf..80b9eda47c 100644 --- a/fxjs/cjs_v8.cpp +++ b/fxjs/cfx_v8.cpp @@ -4,13 +4,13 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "fxjs/cjs_v8.h" +#include "fxjs/cfx_v8.h" -CJS_V8::CJS_V8(v8::Isolate* isolate) : m_isolate(isolate) {} +CFX_V8::CFX_V8(v8::Isolate* isolate) : m_isolate(isolate) {} -CJS_V8::~CJS_V8() = default; +CFX_V8::~CFX_V8() = default; -v8::Local<v8::Value> CJS_V8::GetObjectProperty( +v8::Local<v8::Value> CFX_V8::GetObjectProperty( v8::Local<v8::Object> pObj, const WideString& wsPropertyName) { if (pObj.IsEmpty()) @@ -23,7 +23,7 @@ v8::Local<v8::Value> CJS_V8::GetObjectProperty( return val; } -std::vector<WideString> CJS_V8::GetObjectPropertyNames( +std::vector<WideString> CFX_V8::GetObjectPropertyNames( v8::Local<v8::Object> pObj) { if (pObj.IsEmpty()) return std::vector<WideString>(); @@ -41,7 +41,7 @@ std::vector<WideString> CJS_V8::GetObjectPropertyNames( return result; } -void CJS_V8::PutObjectProperty(v8::Local<v8::Object> pObj, +void CFX_V8::PutObjectProperty(v8::Local<v8::Object> pObj, const WideString& wsPropertyName, v8::Local<v8::Value> pPut) { if (pObj.IsEmpty()) @@ -51,15 +51,15 @@ void CJS_V8::PutObjectProperty(v8::Local<v8::Object> pObj, .FromJust(); } -v8::Local<v8::Array> CJS_V8::NewArray() { +v8::Local<v8::Array> CFX_V8::NewArray() { return v8::Array::New(m_isolate); } -v8::Local<v8::Object> CJS_V8::NewObject() { +v8::Local<v8::Object> CFX_V8::NewObject() { return v8::Object::New(m_isolate); } -unsigned CJS_V8::PutArrayElement(v8::Local<v8::Array> pArray, +unsigned CFX_V8::PutArrayElement(v8::Local<v8::Array> pArray, unsigned index, v8::Local<v8::Value> pValue) { if (pArray.IsEmpty()) @@ -69,7 +69,7 @@ unsigned CJS_V8::PutArrayElement(v8::Local<v8::Array> pArray, return 1; } -v8::Local<v8::Value> CJS_V8::GetArrayElement(v8::Local<v8::Array> pArray, +v8::Local<v8::Value> CFX_V8::GetArrayElement(v8::Local<v8::Array> pArray, unsigned index) { if (pArray.IsEmpty()) return v8::Local<v8::Value>(); @@ -79,57 +79,57 @@ v8::Local<v8::Value> CJS_V8::GetArrayElement(v8::Local<v8::Array> pArray, return val; } -unsigned CJS_V8::GetArrayLength(v8::Local<v8::Array> pArray) { +unsigned CFX_V8::GetArrayLength(v8::Local<v8::Array> pArray) { if (pArray.IsEmpty()) return 0; return pArray->Length(); } -v8::Local<v8::Number> CJS_V8::NewNumber(int number) { +v8::Local<v8::Number> CFX_V8::NewNumber(int number) { return v8::Int32::New(m_isolate, number); } -v8::Local<v8::Number> CJS_V8::NewNumber(double number) { +v8::Local<v8::Number> CFX_V8::NewNumber(double number) { return v8::Number::New(m_isolate, number); } -v8::Local<v8::Number> CJS_V8::NewNumber(float number) { +v8::Local<v8::Number> CFX_V8::NewNumber(float number) { return v8::Number::New(m_isolate, (float)number); } -v8::Local<v8::Boolean> CJS_V8::NewBoolean(bool b) { +v8::Local<v8::Boolean> CFX_V8::NewBoolean(bool b) { return v8::Boolean::New(m_isolate, b); } -v8::Local<v8::String> CJS_V8::NewString(const ByteStringView& str) { +v8::Local<v8::String> CFX_V8::NewString(const ByteStringView& str) { v8::Isolate* pIsolate = m_isolate ? m_isolate : v8::Isolate::GetCurrent(); return v8::String::NewFromUtf8(pIsolate, str.unterminated_c_str(), v8::NewStringType::kNormal, str.GetLength()) .ToLocalChecked(); } -v8::Local<v8::String> CJS_V8::NewString(const WideStringView& str) { +v8::Local<v8::String> CFX_V8::NewString(const WideStringView& str) { // Conversion from pdfium's wchar_t wide-strings to v8's uint16_t // wide-strings isn't handled by v8, so use UTF8 as a common // intermediate format. return NewString(FX_UTF8Encode(str).AsStringView()); } -v8::Local<v8::Value> CJS_V8::NewNull() { +v8::Local<v8::Value> CFX_V8::NewNull() { return v8::Null(m_isolate); } -v8::Local<v8::Value> CJS_V8::NewUndefined() { +v8::Local<v8::Value> CFX_V8::NewUndefined() { return v8::Undefined(m_isolate); } -v8::Local<v8::Date> CJS_V8::NewDate(double d) { +v8::Local<v8::Date> CFX_V8::NewDate(double d) { return v8::Date::New(m_isolate->GetCurrentContext(), d) .ToLocalChecked() .As<v8::Date>(); } -int CJS_V8::ToInt32(v8::Local<v8::Value> pValue) { +int CFX_V8::ToInt32(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty()) return 0; v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); @@ -139,7 +139,7 @@ int CJS_V8::ToInt32(v8::Local<v8::Value> pValue) { return maybe_int32.ToLocalChecked()->Value(); } -bool CJS_V8::ToBoolean(v8::Local<v8::Value> pValue) { +bool CFX_V8::ToBoolean(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty()) return false; v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); @@ -149,7 +149,7 @@ bool CJS_V8::ToBoolean(v8::Local<v8::Value> pValue) { return maybe_boolean.ToLocalChecked()->Value(); } -double CJS_V8::ToDouble(v8::Local<v8::Value> pValue) { +double CFX_V8::ToDouble(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty()) return 0.0; v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); @@ -159,7 +159,7 @@ double CJS_V8::ToDouble(v8::Local<v8::Value> pValue) { return maybe_number.ToLocalChecked()->Value(); } -WideString CJS_V8::ToWideString(v8::Local<v8::Value> pValue) { +WideString CFX_V8::ToWideString(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty()) return WideString(); v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); @@ -170,7 +170,7 @@ WideString CJS_V8::ToWideString(v8::Local<v8::Value> pValue) { return WideString::FromUTF8(ByteStringView(*s, s.length())); } -ByteString CJS_V8::ToByteString(v8::Local<v8::Value> pValue) { +ByteString CFX_V8::ToByteString(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty()) return ByteString(); v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); @@ -181,14 +181,14 @@ ByteString CJS_V8::ToByteString(v8::Local<v8::Value> pValue) { return ByteString(*s); } -v8::Local<v8::Object> CJS_V8::ToObject(v8::Local<v8::Value> pValue) { +v8::Local<v8::Object> CFX_V8::ToObject(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty() || !pValue->IsObject()) return v8::Local<v8::Object>(); v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); return pValue->ToObject(context).ToLocalChecked(); } -v8::Local<v8::Array> CJS_V8::ToArray(v8::Local<v8::Value> pValue) { +v8::Local<v8::Array> CFX_V8::ToArray(v8::Local<v8::Value> pValue) { if (pValue.IsEmpty() || !pValue->IsArray()) return v8::Local<v8::Array>(); v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); diff --git a/fxjs/cjs_v8.h b/fxjs/cfx_v8.h index 4599da3e36..2f9794c243 100644 --- a/fxjs/cjs_v8.h +++ b/fxjs/cfx_v8.h @@ -4,22 +4,21 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef FXJS_CJS_V8_H_ -#define FXJS_CJS_V8_H_ +#ifndef FXJS_CFX_V8_H_ +#define FXJS_CFX_V8_H_ #include <map> #include <vector> -#include "core/fxcrt/bytestring.h" #include "core/fxcrt/fx_string.h" -#include "core/fxcrt/widestring.h" +#include "core/fxcrt/unowned_ptr.h" #include "v8/include/v8-util.h" #include "v8/include/v8.h" -class CJS_V8 { +class CFX_V8 { public: - explicit CJS_V8(v8::Isolate* pIsolate); - virtual ~CJS_V8(); + explicit CFX_V8(v8::Isolate* pIsolate); + virtual ~CFX_V8(); v8::Isolate* GetIsolate() const { return m_isolate; } @@ -66,4 +65,4 @@ class CJS_V8 { v8::Isolate* m_isolate; }; -#endif // FXJS_CJS_V8_H_ +#endif // FXJS_CFX_V8_H_ diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index 1c07a949b0..d5a1511a54 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -94,7 +94,7 @@ CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_Value* pValue, CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument, CFXJS_Engine* fxjs_engine) - : CJS_V8(fxjs_engine->GetIsolate()), + : CFX_V8(fxjs_engine->GetIsolate()), m_pDocument(pDocument), m_JsContext(CFXJSE_Context::Create(fxjs_engine->GetIsolate(), fxjs_engine, diff --git a/fxjs/cfxjse_engine.h b/fxjs/cfxjse_engine.h index 2e44decd8f..ca5f3ee098 100644 --- a/fxjs/cfxjse_engine.h +++ b/fxjs/cfxjse_engine.h @@ -11,8 +11,8 @@ #include <memory> #include <vector> +#include "fxjs/cfx_v8.h" #include "fxjs/cfxjse_formcalc_context.h" -#include "fxjs/cjs_v8.h" #include "v8/include/v8.h" #include "xfa/fxfa/cxfa_eventparam.h" #include "xfa/fxfa/parser/cxfa_document.h" @@ -25,7 +25,7 @@ class CFXJSE_ResolveProcessor; class CFXJS_Engine; class CXFA_List; -class CFXJSE_Engine : public CJS_V8 { +class CFXJSE_Engine : public CFX_V8 { public: static CXFA_Object* ToObject(const v8::FunctionCallbackInfo<v8::Value>& info); static CXFA_Object* ToObject(CFXJSE_Value* pValue, CFXJSE_Class* pClass); diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index 3d82848a6e..0e87024387 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -257,9 +257,9 @@ FXJS_PerIsolateData* FXJS_PerIsolateData::Get(v8::Isolate* pIsolate) { FXJS_PerIsolateData::FXJS_PerIsolateData(v8::Isolate* pIsolate) : m_pDynamicObjsMap(new V8TemplateMap(pIsolate)) {} -CFXJS_Engine::CFXJS_Engine() : CJS_V8(nullptr) {} +CFXJS_Engine::CFXJS_Engine() : CFX_V8(nullptr) {} -CFXJS_Engine::CFXJS_Engine(v8::Isolate* pIsolate) : CJS_V8(pIsolate) {} +CFXJS_Engine::CFXJS_Engine(v8::Isolate* pIsolate) : CFX_V8(pIsolate) {} CFXJS_Engine::~CFXJS_Engine() = default; diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h index 2c53b65d3a..831f839fcc 100644 --- a/fxjs/fxjs_v8.h +++ b/fxjs/fxjs_v8.h @@ -20,7 +20,7 @@ #include <vector> #include "core/fxcrt/fx_string.h" -#include "fxjs/cjs_v8.h" +#include "fxjs/cfx_v8.h" #include "v8/include/v8-util.h" #include "v8/include/v8.h" @@ -127,7 +127,7 @@ bool FXJS_GetIsolate(v8::Isolate** pResultIsolate); // Get the global isolate's ref count. size_t FXJS_GlobalIsolateRefCount(); -class CFXJS_Engine : public CJS_V8 { +class CFXJS_Engine : public CFX_V8 { public: explicit CFXJS_Engine(v8::Isolate* pIsolate); ~CFXJS_Engine() override; diff --git a/fxjs/xfa/cjx_container.cpp b/fxjs/xfa/cjx_container.cpp index b7577da204..e5dbfe8258 100644 --- a/fxjs/xfa/cjx_container.cpp +++ b/fxjs/xfa/cjx_container.cpp @@ -25,13 +25,13 @@ CJX_Container::CJX_Container(CXFA_Node* node) : CJX_Node(node) { CJX_Container::~CJX_Container() {} CJS_Return CJX_Container::getDelta( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_Container::getDeltas( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_ArrayNodeList* pFormNodes = new CXFA_ArrayNodeList(GetDocument()); return CJS_Return(static_cast<CFXJSE_Engine*>(runtime)->NewXFAObject( diff --git a/fxjs/xfa/cjx_datawindow.cpp b/fxjs/xfa/cjx_datawindow.cpp index 5209cb47e6..cdb6aab207 100644 --- a/fxjs/xfa/cjx_datawindow.cpp +++ b/fxjs/xfa/cjx_datawindow.cpp @@ -25,25 +25,25 @@ CJX_DataWindow::CJX_DataWindow(CScript_DataWindow* window) CJX_DataWindow::~CJX_DataWindow() {} CJS_Return CJX_DataWindow::moveCurrentRecord( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_DataWindow::record( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_DataWindow::gotoRecord( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_DataWindow::isRecordGroup( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } diff --git a/fxjs/xfa/cjx_delta.cpp b/fxjs/xfa/cjx_delta.cpp index 6d8cbd52f3..1da5953ea1 100644 --- a/fxjs/xfa/cjx_delta.cpp +++ b/fxjs/xfa/cjx_delta.cpp @@ -20,7 +20,7 @@ CJX_Delta::CJX_Delta(CXFA_Delta* delta) : CJX_Object(delta) { CJX_Delta::~CJX_Delta() {} -CJS_Return CJX_Delta::restore(CJS_V8* runtime, +CJS_Return CJX_Delta::restore(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_desc.cpp b/fxjs/xfa/cjx_desc.cpp index a49ae63323..ae125c2d36 100644 --- a/fxjs/xfa/cjx_desc.cpp +++ b/fxjs/xfa/cjx_desc.cpp @@ -20,7 +20,7 @@ CJX_Desc::CJX_Desc(CXFA_Desc* desc) : CJX_Node(desc) { CJX_Desc::~CJX_Desc() {} -CJS_Return CJX_Desc::metadata(CJS_V8* runtime, +CJS_Return CJX_Desc::metadata(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 0 && params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_eventpseudomodel.cpp b/fxjs/xfa/cjx_eventpseudomodel.cpp index 1362a326ec..db5c14ac14 100644 --- a/fxjs/xfa/cjx_eventpseudomodel.cpp +++ b/fxjs/xfa/cjx_eventpseudomodel.cpp @@ -151,7 +151,7 @@ void CJX_EventPseudoModel::target(CFXJSE_Value* pValue, } CJS_Return CJX_EventPseudoModel::emit( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext(); if (!pScriptContext) @@ -174,7 +174,7 @@ CJS_Return CJX_EventPseudoModel::emit( } CJS_Return CJX_EventPseudoModel::reset( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext(); if (!pScriptContext) diff --git a/fxjs/xfa/cjx_exclgroup.cpp b/fxjs/xfa/cjx_exclgroup.cpp index 85a6697442..2b66484073 100644 --- a/fxjs/xfa/cjx_exclgroup.cpp +++ b/fxjs/xfa/cjx_exclgroup.cpp @@ -31,7 +31,7 @@ CJX_ExclGroup::CJX_ExclGroup(CXFA_ExclGroup* group) : CJX_Node(group) { CJX_ExclGroup::~CJX_ExclGroup() {} CJS_Return CJX_ExclGroup::execEvent( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -42,7 +42,7 @@ CJS_Return CJX_ExclGroup::execEvent( } CJS_Return CJX_ExclGroup::execInitialize( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -55,7 +55,7 @@ CJS_Return CJX_ExclGroup::execInitialize( } CJS_Return CJX_ExclGroup::execCalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -68,7 +68,7 @@ CJS_Return CJX_ExclGroup::execCalculate( } CJS_Return CJX_ExclGroup::execValidate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -83,7 +83,7 @@ CJS_Return CJX_ExclGroup::execValidate( } CJS_Return CJX_ExclGroup::selectedMember( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_field.cpp b/fxjs/xfa/cjx_field.cpp index 2b755b7d53..d3f0280d3f 100644 --- a/fxjs/xfa/cjx_field.cpp +++ b/fxjs/xfa/cjx_field.cpp @@ -39,7 +39,7 @@ CJX_Field::CJX_Field(CXFA_Field* field) : CJX_Container(field) { CJX_Field::~CJX_Field() {} CJS_Return CJX_Field::clearItems( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_Node* node = GetXFANode(); if (node->IsWidgetReady()) @@ -48,7 +48,7 @@ CJS_Return CJX_Field::clearItems( } CJS_Return CJX_Field::execEvent( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -63,7 +63,7 @@ CJS_Return CJX_Field::execEvent( } CJS_Return CJX_Field::execInitialize( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -77,7 +77,7 @@ CJS_Return CJX_Field::execInitialize( } CJS_Return CJX_Field::deleteItem( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -91,7 +91,7 @@ CJS_Return CJX_Field::deleteItem( } CJS_Return CJX_Field::getSaveItem( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -112,7 +112,7 @@ CJS_Return CJX_Field::getSaveItem( } CJS_Return CJX_Field::boundItem( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -127,7 +127,7 @@ CJS_Return CJX_Field::boundItem( } CJS_Return CJX_Field::getItemState( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -141,7 +141,7 @@ CJS_Return CJX_Field::getItemState( } CJS_Return CJX_Field::execCalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -155,7 +155,7 @@ CJS_Return CJX_Field::execCalculate( } CJS_Return CJX_Field::getDisplayItem( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -176,7 +176,7 @@ CJS_Return CJX_Field::getDisplayItem( } CJS_Return CJX_Field::setItemState( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -196,7 +196,7 @@ CJS_Return CJX_Field::setItemState( return CJS_Return(true); } -CJS_Return CJX_Field::addItem(CJS_V8* runtime, +CJS_Return CJX_Field::addItem(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1 && params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -218,7 +218,7 @@ CJS_Return CJX_Field::addItem(CJS_V8* runtime, } CJS_Return CJX_Field::execValidate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_form.cpp b/fxjs/xfa/cjx_form.cpp index 32de9f5902..fa244b3af6 100644 --- a/fxjs/xfa/cjx_form.cpp +++ b/fxjs/xfa/cjx_form.cpp @@ -32,7 +32,7 @@ CJX_Form::CJX_Form(CXFA_Form* form) : CJX_Model(form) { CJX_Form::~CJX_Form() {} CJS_Return CJX_Form::formNodes( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -53,7 +53,7 @@ CJS_Return CJX_Form::formNodes( return CJS_Return(value->DirectGetValue().Get(runtime->GetIsolate())); } -CJS_Return CJX_Form::remerge(CJS_V8* runtime, +CJS_Return CJX_Form::remerge(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -63,7 +63,7 @@ CJS_Return CJX_Form::remerge(CJS_V8* runtime, } CJS_Return CJX_Form::execInitialize( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -76,7 +76,7 @@ CJS_Return CJX_Form::execInitialize( } CJS_Return CJX_Form::recalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_EventParam* pEventParam = GetDocument()->GetScriptContext()->GetEventParam(); @@ -98,7 +98,7 @@ CJS_Return CJX_Form::recalculate( } CJS_Return CJX_Form::execCalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -111,7 +111,7 @@ CJS_Return CJX_Form::execCalculate( } CJS_Return CJX_Form::execValidate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 0) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_hostpseudomodel.cpp b/fxjs/xfa/cjx_hostpseudomodel.cpp index fd570990bc..5c63fc8986 100644 --- a/fxjs/xfa/cjx_hostpseudomodel.cpp +++ b/fxjs/xfa/cjx_hostpseudomodel.cpp @@ -246,7 +246,7 @@ void CJX_HostPseudoModel::name(CFXJSE_Value* pValue, } CJS_Return CJX_HostPseudoModel::gotoURL( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!GetDocument()->GetScriptContext()->IsRunAtClient()) return CJS_Return(true); @@ -265,7 +265,7 @@ CJS_Return CJX_HostPseudoModel::gotoURL( } CJS_Return CJX_HostPseudoModel::openList( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!GetDocument()->GetScriptContext()->IsRunAtClient()) return CJS_Return(true); @@ -317,7 +317,7 @@ CJS_Return CJX_HostPseudoModel::openList( } CJS_Return CJX_HostPseudoModel::response( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 4) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -348,13 +348,13 @@ CJS_Return CJX_HostPseudoModel::response( } CJS_Return CJX_HostPseudoModel::documentInBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(runtime->NewNumber(0)); } CJS_Return CJX_HostPseudoModel::resetData( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() > 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -404,7 +404,7 @@ CJS_Return CJX_HostPseudoModel::resetData( } CJS_Return CJX_HostPseudoModel::beep( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!GetDocument()->GetScriptContext()->IsRunAtClient()) return CJS_Return(true); @@ -425,7 +425,7 @@ CJS_Return CJX_HostPseudoModel::beep( } CJS_Return CJX_HostPseudoModel::setFocus( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!GetDocument()->GetScriptContext()->IsRunAtClient()) return CJS_Return(true); @@ -468,7 +468,7 @@ CJS_Return CJX_HostPseudoModel::setFocus( } CJS_Return CJX_HostPseudoModel::getFocus( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (!pNotify) @@ -487,7 +487,7 @@ CJS_Return CJX_HostPseudoModel::getFocus( } CJS_Return CJX_HostPseudoModel::messageBox( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!GetDocument()->GetScriptContext()->IsRunAtClient()) return CJS_Return(true); @@ -527,13 +527,13 @@ CJS_Return CJX_HostPseudoModel::messageBox( } CJS_Return CJX_HostPseudoModel::documentCountInBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(runtime->NewNumber(0)); } CJS_Return CJX_HostPseudoModel::print( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!GetDocument()->GetScriptContext()->IsRunAtClient()) return CJS_Return(true); @@ -568,7 +568,7 @@ CJS_Return CJX_HostPseudoModel::print( } CJS_Return CJX_HostPseudoModel::importData( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -577,7 +577,7 @@ CJS_Return CJX_HostPseudoModel::importData( } CJS_Return CJX_HostPseudoModel::exportData( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -599,7 +599,7 @@ CJS_Return CJX_HostPseudoModel::exportData( } CJS_Return CJX_HostPseudoModel::pageUp( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (!pNotify) @@ -617,7 +617,7 @@ CJS_Return CJX_HostPseudoModel::pageUp( } CJS_Return CJX_HostPseudoModel::pageDown( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (!pNotify) diff --git a/fxjs/xfa/cjx_instancemanager.cpp b/fxjs/xfa/cjx_instancemanager.cpp index 830541ed7c..081b685efa 100644 --- a/fxjs/xfa/cjx_instancemanager.cpp +++ b/fxjs/xfa/cjx_instancemanager.cpp @@ -133,7 +133,7 @@ int32_t CJX_InstanceManager::MoveInstance(int32_t iTo, int32_t iFrom) { } CJS_Return CJX_InstanceManager::moveInstance( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -160,7 +160,7 @@ CJS_Return CJX_InstanceManager::moveInstance( } CJS_Return CJX_InstanceManager::removeInstance( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -200,7 +200,7 @@ CJS_Return CJX_InstanceManager::removeInstance( } CJS_Return CJX_InstanceManager::setInstances( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -210,7 +210,7 @@ CJS_Return CJX_InstanceManager::setInstances( } CJS_Return CJX_InstanceManager::addInstance( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty() && params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -251,7 +251,7 @@ CJS_Return CJX_InstanceManager::addInstance( } CJS_Return CJX_InstanceManager::insertInstance( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1 && params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_layoutpseudomodel.cpp b/fxjs/xfa/cjx_layoutpseudomodel.cpp index ba17ed8b8b..fd8c8804f8 100644 --- a/fxjs/xfa/cjx_layoutpseudomodel.cpp +++ b/fxjs/xfa/cjx_layoutpseudomodel.cpp @@ -69,7 +69,7 @@ void CJX_LayoutPseudoModel::ready(CFXJSE_Value* pValue, } CJS_Return CJX_LayoutPseudoModel::HWXY( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params, XFA_LAYOUTMODEL_HWXY layoutModel) { if (params.empty() || params.size() > 3) @@ -127,30 +127,30 @@ CJS_Return CJX_LayoutPseudoModel::HWXY( } CJS_Return CJX_LayoutPseudoModel::h( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return HWXY(runtime, params, XFA_LAYOUTMODEL_H); } CJS_Return CJX_LayoutPseudoModel::w( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return HWXY(runtime, params, XFA_LAYOUTMODEL_W); } CJS_Return CJX_LayoutPseudoModel::x( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return HWXY(runtime, params, XFA_LAYOUTMODEL_X); } CJS_Return CJX_LayoutPseudoModel::y( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return HWXY(runtime, params, XFA_LAYOUTMODEL_Y); } -CJS_Return CJX_LayoutPseudoModel::NumberedPageCount(CJS_V8* runtime, +CJS_Return CJX_LayoutPseudoModel::NumberedPageCount(CFX_V8* runtime, bool bNumbered) { CXFA_LayoutProcessor* pDocLayout = GetDocument()->GetDocLayout(); if (!pDocLayout) @@ -175,13 +175,13 @@ CJS_Return CJX_LayoutPseudoModel::NumberedPageCount(CJS_V8* runtime, } CJS_Return CJX_LayoutPseudoModel::pageCount( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return NumberedPageCount(runtime, true); } CJS_Return CJX_LayoutPseudoModel::pageSpan( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -206,7 +206,7 @@ CJS_Return CJX_LayoutPseudoModel::pageSpan( } CJS_Return CJX_LayoutPseudoModel::page( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return PageInternals(runtime, params, false); } @@ -346,7 +346,7 @@ std::vector<CXFA_Node*> CJX_LayoutPseudoModel::GetObjArray( } CJS_Return CJX_LayoutPseudoModel::pageContent( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 3) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -382,25 +382,25 @@ CJS_Return CJX_LayoutPseudoModel::pageContent( } CJS_Return CJX_LayoutPseudoModel::absPageCount( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return NumberedPageCount(runtime, false); } CJS_Return CJX_LayoutPseudoModel::absPageCountInBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(runtime->NewNumber(0)); } CJS_Return CJX_LayoutPseudoModel::sheetCountInBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(runtime->NewNumber(0)); } CJS_Return CJX_LayoutPseudoModel::relayout( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { CXFA_Node* pRootNode = GetDocument()->GetRoot(); CXFA_Form* pFormRoot = @@ -415,13 +415,13 @@ CJS_Return CJX_LayoutPseudoModel::relayout( } CJS_Return CJX_LayoutPseudoModel::absPageSpan( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return pageSpan(runtime, params); } CJS_Return CJX_LayoutPseudoModel::absPageInBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -429,7 +429,7 @@ CJS_Return CJX_LayoutPseudoModel::absPageInBatch( } CJS_Return CJX_LayoutPseudoModel::sheetInBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -437,31 +437,31 @@ CJS_Return CJX_LayoutPseudoModel::sheetInBatch( } CJS_Return CJX_LayoutPseudoModel::sheet( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return PageInternals(runtime, params, true); } CJS_Return CJX_LayoutPseudoModel::relayoutPageArea( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_LayoutPseudoModel::sheetCount( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return NumberedPageCount(runtime, false); } CJS_Return CJX_LayoutPseudoModel::absPage( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return PageInternals(runtime, params, true); } CJS_Return CJX_LayoutPseudoModel::PageInternals( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params, bool bAbsPage) { if (params.size() != 1) diff --git a/fxjs/xfa/cjx_layoutpseudomodel.h b/fxjs/xfa/cjx_layoutpseudomodel.h index 6dbef6038a..ecacdd1e83 100644 --- a/fxjs/xfa/cjx_layoutpseudomodel.h +++ b/fxjs/xfa/cjx_layoutpseudomodel.h @@ -52,15 +52,15 @@ class CJX_LayoutPseudoModel : public CJX_Object { JS_PROP(ready); private: - CJS_Return NumberedPageCount(CJS_V8* runtime, bool bNumbered); - CJS_Return HWXY(CJS_V8* runtime, + CJS_Return NumberedPageCount(CFX_V8* runtime, bool bNumbered); + CJS_Return HWXY(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params, XFA_LAYOUTMODEL_HWXY layoutModel); std::vector<CXFA_Node*> GetObjArray(CXFA_LayoutProcessor* pDocLayout, int32_t iPageNo, const WideString& wsType, bool bOnPageArea); - CJS_Return PageInternals(CJS_V8* runtime, + CJS_Return PageInternals(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params, bool bAbsPage); diff --git a/fxjs/xfa/cjx_list.cpp b/fxjs/xfa/cjx_list.cpp index 27a4315d5f..4340e3b089 100644 --- a/fxjs/xfa/cjx_list.cpp +++ b/fxjs/xfa/cjx_list.cpp @@ -31,7 +31,7 @@ CXFA_List* CJX_List::GetXFAList() { return static_cast<CXFA_List*>(GetXFAObject()); } -CJS_Return CJX_List::append(CJS_V8* runtime, +CJS_Return CJX_List::append(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -45,7 +45,7 @@ CJS_Return CJX_List::append(CJS_V8* runtime, return CJS_Return(true); } -CJS_Return CJX_List::insert(CJS_V8* runtime, +CJS_Return CJX_List::insert(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -61,7 +61,7 @@ CJS_Return CJX_List::insert(CJS_V8* runtime, return CJS_Return(true); } -CJS_Return CJX_List::remove(CJS_V8* runtime, +CJS_Return CJX_List::remove(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -75,7 +75,7 @@ CJS_Return CJX_List::remove(CJS_V8* runtime, return CJS_Return(true); } -CJS_Return CJX_List::item(CJS_V8* runtime, +CJS_Return CJX_List::item(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_logpseudomodel.cpp b/fxjs/xfa/cjx_logpseudomodel.cpp index 810ddfa008..446c937fc3 100644 --- a/fxjs/xfa/cjx_logpseudomodel.cpp +++ b/fxjs/xfa/cjx_logpseudomodel.cpp @@ -26,31 +26,31 @@ CJX_LogPseudoModel::CJX_LogPseudoModel(CScript_LogPseudoModel* model) CJX_LogPseudoModel::~CJX_LogPseudoModel() {} CJS_Return CJX_LogPseudoModel::message( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_LogPseudoModel::traceEnabled( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_LogPseudoModel::traceActivate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_LogPseudoModel::traceDeactivate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_LogPseudoModel::trace( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } diff --git a/fxjs/xfa/cjx_manifest.cpp b/fxjs/xfa/cjx_manifest.cpp index 86e2926ba6..642f4ca59a 100644 --- a/fxjs/xfa/cjx_manifest.cpp +++ b/fxjs/xfa/cjx_manifest.cpp @@ -22,7 +22,7 @@ CJX_Manifest::CJX_Manifest(CXFA_Manifest* manifest) : CJX_Node(manifest) { CJX_Manifest::~CJX_Manifest() {} CJS_Return CJX_Manifest::evaluate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_model.cpp b/fxjs/xfa/cjx_model.cpp index aa5d6b21fa..857d6a4b01 100644 --- a/fxjs/xfa/cjx_model.cpp +++ b/fxjs/xfa/cjx_model.cpp @@ -26,13 +26,13 @@ CJX_Model::CJX_Model(CXFA_Node* node) : CJX_Node(node) { CJX_Model::~CJX_Model() {} CJS_Return CJX_Model::clearErrorList( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { return CJS_Return(true); } CJS_Return CJX_Model::createNode( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 3) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -70,7 +70,7 @@ CJS_Return CJX_Model::createNode( } CJS_Return CJX_Model::isCompatibleNS( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp index 8c49b6f1e4..b1749d6025 100644 --- a/fxjs/xfa/cjx_node.cpp +++ b/fxjs/xfa/cjx_node.cpp @@ -109,7 +109,7 @@ const CXFA_Node* CJX_Node::GetXFANode() const { return static_cast<const CXFA_Node*>(GetXFAObject()); } -CJS_Return CJX_Node::applyXSL(CJS_V8* runtime, +CJS_Return CJX_Node::applyXSL(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -119,7 +119,7 @@ CJS_Return CJX_Node::applyXSL(CJS_V8* runtime, } CJS_Return CJX_Node::assignNode( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 3) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -128,7 +128,7 @@ CJS_Return CJX_Node::assignNode( return CJS_Return(true); } -CJS_Return CJX_Node::clone(CJS_V8* runtime, +CJS_Return CJX_Node::clone(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -142,7 +142,7 @@ CJS_Return CJX_Node::clone(CJS_V8* runtime, } CJS_Return CJX_Node::getAttribute( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -153,7 +153,7 @@ CJS_Return CJX_Node::getAttribute( } CJS_Return CJX_Node::getElement( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -174,7 +174,7 @@ CJS_Return CJX_Node::getElement( } CJS_Return CJX_Node::isPropertySpecified( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 3) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -197,7 +197,7 @@ CJS_Return CJX_Node::isPropertySpecified( return CJS_Return(runtime->NewBoolean(bHas)); } -CJS_Return CJX_Node::loadXML(CJS_V8* runtime, +CJS_Return CJX_Node::loadXML(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 3) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -318,13 +318,13 @@ CJS_Return CJX_Node::loadXML(CJS_V8* runtime, } CJS_Return CJX_Node::saveFilteredXML( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { // TODO(weili): Check whether we need to implement this, pdfium:501. return CJS_Return(true); } -CJS_Return CJX_Node::saveXML(CJS_V8* runtime, +CJS_Return CJX_Node::saveXML(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() > 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -366,7 +366,7 @@ CJS_Return CJX_Node::saveXML(CJS_V8* runtime, } CJS_Return CJX_Node::setAttribute( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -378,7 +378,7 @@ CJS_Return CJX_Node::setAttribute( } CJS_Return CJX_Node::setElement( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1 && params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h index deedebc8e5..e21a3ef3f5 100644 --- a/fxjs/xfa/cjx_object.h +++ b/fxjs/xfa/cjx_object.h @@ -20,7 +20,7 @@ #include "xfa/fxfa/fxfa_basic.h" class CFXJSE_Value; -class CJS_V8; +class CFX_V8; class CXFA_CalcData; class CXFA_Document; class CXFA_LayoutItem; @@ -30,7 +30,7 @@ struct XFA_MAPMODULEDATA; typedef CJS_Return (*CJX_MethodCall)( CJX_Object* obj, - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params); struct CJX_MethodSpec { const char* pName; diff --git a/fxjs/xfa/cjx_packet.cpp b/fxjs/xfa/cjx_packet.cpp index fdebe626ab..80b391c87b 100644 --- a/fxjs/xfa/cjx_packet.cpp +++ b/fxjs/xfa/cjx_packet.cpp @@ -24,7 +24,7 @@ CJX_Packet::CJX_Packet(CXFA_Packet* packet) : CJX_Node(packet) { CJX_Packet::~CJX_Packet() {} CJS_Return CJX_Packet::getAttribute( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -40,7 +40,7 @@ CJS_Return CJX_Packet::getAttribute( } CJS_Return CJX_Packet::setAttribute( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -54,7 +54,7 @@ CJS_Return CJX_Packet::setAttribute( } CJS_Return CJX_Packet::removeAttribute( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_signaturepseudomodel.cpp b/fxjs/xfa/cjx_signaturepseudomodel.cpp index 202532c6ca..304177884b 100644 --- a/fxjs/xfa/cjx_signaturepseudomodel.cpp +++ b/fxjs/xfa/cjx_signaturepseudomodel.cpp @@ -27,7 +27,7 @@ CJX_SignaturePseudoModel::CJX_SignaturePseudoModel( CJX_SignaturePseudoModel::~CJX_SignaturePseudoModel() {} CJS_Return CJX_SignaturePseudoModel::verifySignature( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 4) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -35,7 +35,7 @@ CJS_Return CJX_SignaturePseudoModel::verifySignature( } CJS_Return CJX_SignaturePseudoModel::sign( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() < 3 || params.size() > 7) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -43,7 +43,7 @@ CJS_Return CJX_SignaturePseudoModel::sign( } CJS_Return CJX_SignaturePseudoModel::enumerate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -51,7 +51,7 @@ CJS_Return CJX_SignaturePseudoModel::enumerate( } CJS_Return CJX_SignaturePseudoModel::clear( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.empty() || params.size() > 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_source.cpp b/fxjs/xfa/cjx_source.cpp index 399a6c3664..7576e7718d 100644 --- a/fxjs/xfa/cjx_source.cpp +++ b/fxjs/xfa/cjx_source.cpp @@ -37,7 +37,7 @@ CJX_Source::CJX_Source(CXFA_Source* src) : CJX_Node(src) { CJX_Source::~CJX_Source() {} -CJS_Return CJX_Source::next(CJS_V8* runtime, +CJS_Return CJX_Source::next(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -45,14 +45,14 @@ CJS_Return CJX_Source::next(CJS_V8* runtime, } CJS_Return CJX_Source::cancelBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::first(CJS_V8* runtime, +CJS_Return CJX_Source::first(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -60,7 +60,7 @@ CJS_Return CJX_Source::first(CJS_V8* runtime, } CJS_Return CJX_Source::updateBatch( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -68,42 +68,42 @@ CJS_Return CJX_Source::updateBatch( } CJS_Return CJX_Source::previous( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::isBOF(CJS_V8* runtime, +CJS_Return CJX_Source::isBOF(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::isEOF(CJS_V8* runtime, +CJS_Return CJX_Source::isEOF(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::cancel(CJS_V8* runtime, +CJS_Return CJX_Source::cancel(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::update(CJS_V8* runtime, +CJS_Return CJX_Source::update(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::open(CJS_V8* runtime, +CJS_Return CJX_Source::open(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -111,14 +111,14 @@ CJS_Return CJX_Source::open(CJS_V8* runtime, } CJS_Return CJX_Source::deleteItem( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::addNew(CJS_V8* runtime, +CJS_Return CJX_Source::addNew(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -126,28 +126,28 @@ CJS_Return CJX_Source::addNew(CJS_V8* runtime, } CJS_Return CJX_Source::requery( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::resync(CJS_V8* runtime, +CJS_Return CJX_Source::resync(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::close(CJS_V8* runtime, +CJS_Return CJX_Source::close(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); return CJS_Return(true); } -CJS_Return CJX_Source::last(CJS_V8* runtime, +CJS_Return CJX_Source::last(CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -155,7 +155,7 @@ CJS_Return CJX_Source::last(CJS_V8* runtime, } CJS_Return CJX_Source::hasDataChanged( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_subform.cpp b/fxjs/xfa/cjx_subform.cpp index f153fa2ba0..52f08655ca 100644 --- a/fxjs/xfa/cjx_subform.cpp +++ b/fxjs/xfa/cjx_subform.cpp @@ -29,7 +29,7 @@ CJX_Subform::CJX_Subform(CXFA_Node* node) : CJX_Container(node) { CJX_Subform::~CJX_Subform() {} CJS_Return CJX_Subform::execEvent( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -40,7 +40,7 @@ CJS_Return CJX_Subform::execEvent( } CJS_Return CJX_Subform::execInitialize( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -53,7 +53,7 @@ CJS_Return CJX_Subform::execInitialize( } CJS_Return CJX_Subform::execCalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -66,7 +66,7 @@ CJS_Return CJX_Subform::execCalculate( } CJS_Return CJX_Subform::execValidate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_template.cpp b/fxjs/xfa/cjx_template.cpp index d909567c51..6612a7c5c2 100644 --- a/fxjs/xfa/cjx_template.cpp +++ b/fxjs/xfa/cjx_template.cpp @@ -28,7 +28,7 @@ CJX_Template::CJX_Template(CXFA_Template* tmpl) : CJX_Model(tmpl) { CJX_Template::~CJX_Template() {} CJS_Return CJX_Template::formNodes( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -36,7 +36,7 @@ CJS_Return CJX_Template::formNodes( } CJS_Return CJX_Template::remerge( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -46,7 +46,7 @@ CJS_Return CJX_Template::remerge( } CJS_Return CJX_Template::execInitialize( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -54,7 +54,7 @@ CJS_Return CJX_Template::execInitialize( } CJS_Return CJX_Template::recalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -62,7 +62,7 @@ CJS_Return CJX_Template::recalculate( } CJS_Return CJX_Template::execCalculate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -70,7 +70,7 @@ CJS_Return CJX_Template::execCalculate( } CJS_Return CJX_Template::execValidate( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_tree.cpp b/fxjs/xfa/cjx_tree.cpp index c11d77b125..219953d1d4 100644 --- a/fxjs/xfa/cjx_tree.cpp +++ b/fxjs/xfa/cjx_tree.cpp @@ -30,7 +30,7 @@ CJX_Tree::CJX_Tree(CXFA_Object* obj) : CJX_Object(obj) { CJX_Tree::~CJX_Tree() {} CJS_Return CJX_Tree::resolveNode( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); @@ -79,7 +79,7 @@ CJS_Return CJX_Tree::resolveNode( } CJS_Return CJX_Tree::resolveNodes( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_treelist.cpp b/fxjs/xfa/cjx_treelist.cpp index b91a0b7541..904e09370f 100644 --- a/fxjs/xfa/cjx_treelist.cpp +++ b/fxjs/xfa/cjx_treelist.cpp @@ -29,7 +29,7 @@ CXFA_TreeList* CJX_TreeList::GetXFATreeList() { } CJS_Return CJX_TreeList::namedItem( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); diff --git a/fxjs/xfa/cjx_wsdlconnection.cpp b/fxjs/xfa/cjx_wsdlconnection.cpp index 4c6ca46dd9..1f9ae59fdb 100644 --- a/fxjs/xfa/cjx_wsdlconnection.cpp +++ b/fxjs/xfa/cjx_wsdlconnection.cpp @@ -23,7 +23,7 @@ CJX_WsdlConnection::CJX_WsdlConnection(CXFA_WsdlConnection* connection) CJX_WsdlConnection::~CJX_WsdlConnection() {} CJS_Return CJX_WsdlConnection::execute( - CJS_V8* runtime, + CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty() && params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); |