summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjse_engine.cpp16
-rw-r--r--fxjs/cfxjse_engine.h6
-rw-r--r--fxjs/cfxjse_resolveprocessor.cpp6
-rw-r--r--fxjs/cjx_hostpseudomodel.cpp2
4 files changed, 15 insertions, 15 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index 799c3bb032..633966173a 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -130,7 +130,7 @@ CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument, v8::Isolate* pIsolate)
pDocument->GetRoot())),
m_pIsolate(pIsolate),
m_pJsClass(nullptr),
- m_eScriptType(XFA_SCRIPTLANGTYPE_Unkown),
+ m_eScriptType(XFA_ScriptDataType::Unknown),
m_pScriptNodeArray(nullptr),
m_ResolveProcessor(pdfium::MakeUnique<CFXJSE_ResolveProcessor>()),
m_pThisObject(nullptr),
@@ -150,14 +150,14 @@ CFXJSE_Engine::~CFXJSE_Engine() {
delete ToThisProxy(pair.second->GetGlobalObject().get(), nullptr);
}
-bool CFXJSE_Engine::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
+bool CFXJSE_Engine::RunScript(XFA_ScriptDataType eScriptType,
const WideStringView& wsScript,
CFXJSE_Value* hRetValue,
CXFA_Object* pThisObject) {
ByteString btScript;
- AutoRestorer<XFA_SCRIPTLANGTYPE> typeRestorer(&m_eScriptType);
+ AutoRestorer<XFA_ScriptDataType> typeRestorer(&m_eScriptType);
m_eScriptType = eScriptType;
- if (eScriptType == XFA_SCRIPTLANGTYPE_Formcalc) {
+ if (eScriptType == XFA_ScriptDataType::Formcalc) {
if (!m_FM2JSContext) {
m_FM2JSContext = pdfium::MakeUnique<CFXJSE_FormCalcContext>(
m_pIsolate, m_JsContext.get(), m_pDocument.Get());
@@ -243,7 +243,7 @@ void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject,
CFXJSE_Engine* lpScriptContext = pDoc->GetScriptContext();
CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOriginalObject);
WideString wsPropName = WideString::FromUTF8(szPropName);
- if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) {
+ if (lpScriptContext->GetType() == XFA_ScriptDataType::Formcalc) {
if (szPropName == kFormCalcRuntime) {
lpScriptContext->m_FM2JSContext->GlobalPropertyGetter(pValue);
return;
@@ -319,7 +319,7 @@ void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
return;
if (pObject == lpScriptContext->GetThisObject() ||
- (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Javascript &&
+ (lpScriptContext->GetType() == XFA_ScriptDataType::Javascript &&
!lpScriptContext->IsStrictScopeInJavaScript())) {
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
bRet = lpScriptContext->QueryNodeByFlag(ToNode(pObject),
@@ -454,7 +454,7 @@ bool CFXJSE_Engine::IsStrictScopeInJavaScript() {
return m_pDocument->HasFlag(XFA_DOCFLAG_StrictScoping);
}
-XFA_SCRIPTLANGTYPE CFXJSE_Engine::GetType() {
+XFA_ScriptDataType CFXJSE_Engine::GetType() {
return m_eScriptType;
}
@@ -573,7 +573,7 @@ int32_t CFXJSE_Engine::ResolveObjects(CXFA_Object* refObject,
if (wsExpression.IsEmpty())
return 0;
- if (m_eScriptType != XFA_SCRIPTLANGTYPE_Formcalc ||
+ if (m_eScriptType != XFA_ScriptDataType::Formcalc ||
(dwStyles & (XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings))) {
m_upObjectArray.clear();
}
diff --git a/fxjs/cfxjse_engine.h b/fxjs/cfxjse_engine.h
index bfc2cc1fd9..b049eecf56 100644
--- a/fxjs/cfxjse_engine.h
+++ b/fxjs/cfxjse_engine.h
@@ -28,7 +28,7 @@ class CFXJSE_Engine {
void SetEventParam(CXFA_EventParam param) { m_eventParam = param; }
CXFA_EventParam* GetEventParam() { return &m_eventParam; }
- bool RunScript(XFA_SCRIPTLANGTYPE eScriptType,
+ bool RunScript(XFA_ScriptDataType eScriptType,
const WideStringView& wsScript,
CFXJSE_Value* pRetValue,
CXFA_Object* pThisObject);
@@ -89,7 +89,7 @@ class CFXJSE_Engine {
bool RunVariablesScript(CXFA_Node* pScriptNode);
CXFA_Object* GetVariablesThis(CXFA_Object* pObject, bool bScriptNode = false);
bool IsStrictScopeInJavaScript();
- XFA_SCRIPTLANGTYPE GetType();
+ XFA_ScriptDataType GetType();
std::vector<CXFA_Node*>* GetUpObjectArray() { return &m_upObjectArray; }
CXFA_Document* GetDocument() const { return m_pDocument.Get(); }
@@ -104,7 +104,7 @@ class CFXJSE_Engine {
std::unique_ptr<CFXJSE_Context> m_JsContext;
v8::Isolate* m_pIsolate;
CFXJSE_Class* m_pJsClass;
- XFA_SCRIPTLANGTYPE m_eScriptType;
+ XFA_ScriptDataType m_eScriptType;
std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Value>> m_mapObjectToValue;
std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Context>>
m_mapVariableToContext;
diff --git a/fxjs/cfxjse_resolveprocessor.cpp b/fxjs/cfxjse_resolveprocessor.cpp
index 2ca3a44525..7802957c7c 100644
--- a/fxjs/cfxjse_resolveprocessor.cpp
+++ b/fxjs/cfxjse_resolveprocessor.cpp
@@ -663,11 +663,11 @@ void CFXJSE_ResolveProcessor::DoPredicateFilter(int32_t iCurIndex,
CFXJSE_ResolveNodeData& rnd) {
ASSERT(iFoundCount == pdfium::CollectionSize<int32_t>(rnd.m_Objects));
WideString wsExpression;
- XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown;
+ XFA_ScriptDataType eLangType = XFA_ScriptDataType::Unknown;
if (wsCondition.Left(2) == L".[" && wsCondition.Last() == L']') {
- eLangType = XFA_SCRIPTLANGTYPE_Formcalc;
+ eLangType = XFA_ScriptDataType::Formcalc;
} else if (wsCondition.Left(2) == L".(" && wsCondition.Last() == L')') {
- eLangType = XFA_SCRIPTLANGTYPE_Javascript;
+ eLangType = XFA_ScriptDataType::Javascript;
} else {
return;
}
diff --git a/fxjs/cjx_hostpseudomodel.cpp b/fxjs/cjx_hostpseudomodel.cpp
index 0671f5ecf9..090f23f7cd 100644
--- a/fxjs/cjx_hostpseudomodel.cpp
+++ b/fxjs/cjx_hostpseudomodel.cpp
@@ -529,7 +529,7 @@ bool CJX_HostPseudoModel::ValidateArgsForMsg(CFXJSE_Arguments* pArguments,
bool bIsJsType = false;
if (GetDocument()->GetScriptContext()->GetType() ==
- XFA_SCRIPTLANGTYPE_Javascript) {
+ XFA_ScriptDataType::Javascript) {
bIsJsType = true;
}