summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r--fxjs/cfxjse_engine.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index f0c522f018..ff2bcc4618 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -325,6 +325,19 @@ void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
if (pScriptObject) {
bRet = lpScriptContext->QueryVariableValue(ToNode(pScriptObject),
szPropName, pReturnValue, true);
+
+ if (!bRet) {
+ WideString wsPropName = WideString::FromUTF8(szPropName);
+ const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
+ XFA_GetScriptAttributeByName(pObject->GetElementType(),
+ wsPropName.AsStringView());
+ if (lpAttributeInfo) {
+ CJX_Object* jsObject = pObject->JSObject();
+ (jsObject->*(lpAttributeInfo->callback))(pReturnValue, false,
+ lpAttributeInfo->attribute);
+ return;
+ }
+ }
}
if (!bRet)
pReturnValue->SetUndefined();
@@ -510,6 +523,7 @@ bool CFXJSE_Engine::QueryVariableValue(CXFA_Node* pScriptNode,
pObject->SetObjectOwnProperty(szPropName, pValue);
return true;
}
+
if (pObject->HasObjectOwnProperty(szPropName, false)) {
pObject->GetObjectProperty(szPropName, hVariableValue.get());
if (hVariableValue->IsFunction())