summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_template.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-12 18:54:48 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-12 18:54:48 +0000
commitebcbb85ea364605baf8e382ad66793bf1b4db029 (patch)
tree2c546368c63f65d7786a1ab9c818cb07b80d599c /fxjs/xfa/cjx_template.cpp
parent4b004930490e416a2a404deee5de4b97e649a1c1 (diff)
downloadpdfium-ebcbb85ea364605baf8e382ad66793bf1b4db029.tar.xz
Move Script_Som_Border{Width|Color} to CJX_Object
The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_Border{Width|Color} from CJX_Node to CJX_Object. Change-Id: I07ba9ef2af675993c9f4d14cb74f48252a907569 Reviewed-on: https://pdfium-review.googlesource.com/20990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_template.cpp')
-rw-r--r--fxjs/xfa/cjx_template.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/fxjs/xfa/cjx_template.cpp b/fxjs/xfa/cjx_template.cpp
index 8ba2bcab9e..d55fd66452 100644
--- a/fxjs/xfa/cjx_template.cpp
+++ b/fxjs/xfa/cjx_template.cpp
@@ -50,9 +50,7 @@ CJS_Return CJX_Template::execInitialize(
const std::vector<v8::Local<v8::Value>>& params) {
if (!params.empty())
return CJS_Return(JSGetStringFromID(JSMessage::kParamError));
-
- CXFA_WidgetData* pWidgetData = GetXFANode()->GetWidgetData();
- return CJS_Return(runtime->NewBoolean(!!pWidgetData));
+ return CJS_Return(runtime->NewBoolean(!!GetWidgetData()));
}
CJS_Return CJX_Template::recalculate(
@@ -68,9 +66,7 @@ CJS_Return CJX_Template::execCalculate(
const std::vector<v8::Local<v8::Value>>& params) {
if (!params.empty())
return CJS_Return(JSGetStringFromID(JSMessage::kParamError));
-
- CXFA_WidgetData* pWidgetData = GetXFANode()->GetWidgetData();
- return CJS_Return(runtime->NewBoolean(!!pWidgetData));
+ return CJS_Return(runtime->NewBoolean(!!GetWidgetData()));
}
CJS_Return CJX_Template::execValidate(
@@ -78,5 +74,5 @@ CJS_Return CJX_Template::execValidate(
const std::vector<v8::Local<v8::Value>>& params) {
if (!params.empty())
return CJS_Return(JSGetStringFromID(JSMessage::kParamError));
- return CJS_Return(runtime->NewBoolean(!!GetXFANode()->GetWidgetData()));
+ return CJS_Return(runtime->NewBoolean(!!GetWidgetData()));
}