summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_node.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-29 19:52:07 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-29 19:52:07 +0000
commit5e332f1275dd6f4b6d487d313f4db8497df339ab (patch)
treef15dbf8d89ed59808c7ff21ef8685ea8d1e65797 /fxjs/xfa/cjx_node.cpp
parentd6e92bd6e874a4709144effc79163ef3c13d4b2e (diff)
downloadpdfium-5e332f1275dd6f4b6d487d313f4db8497df339ab.tar.xz
Cleanup the FFWidget determination code.
This CL converts the UIType to an XFA_FFWidgetType instead of reusing the XFA_Element type. The creation code is cleaned up to make it clearer what's happening. Change-Id: I5d3e4967d5c8b8a50dbb25e574b0d31fe0cf407a Reviewed-on: https://pdfium-review.googlesource.com/24390 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_node.cpp')
-rw-r--r--fxjs/xfa/cjx_node.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp
index 1d6e022060..0508651932 100644
--- a/fxjs/xfa/cjx_node.cpp
+++ b/fxjs/xfa/cjx_node.cpp
@@ -505,21 +505,18 @@ int32_t CJX_Node::execSingleEventByName(const WideStringView& wsEventName,
case EventAppliesToo::kSignature: {
if (!GetXFANode()->IsWidgetReady())
return XFA_EVENTERROR_NotExist;
-
- CXFA_Node* pUINode = GetXFANode()->GetUIChild();
- if (pUINode->GetElementType() != XFA_Element::Signature)
+ if (GetXFANode()->GetUIChildNode()->GetElementType() !=
+ XFA_Element::Signature) {
return XFA_EVENTERROR_NotExist;
-
+ }
return pNotify->ExecEventByDeepFirst(
GetXFANode(), eventParaInfo->m_eventType, false, false);
}
case EventAppliesToo::kChoiceList: {
if (!GetXFANode()->IsWidgetReady())
return XFA_EVENTERROR_NotExist;
-
- CXFA_Node* pUINode = GetXFANode()->GetUIChild();
- if (pUINode->GetElementType() != XFA_Element::ChoiceList ||
- GetXFANode()->IsListBox()) {
+ if (GetXFANode()->GetUIChildNode()->GetElementType() !=
+ XFA_Element::ChoiceList) {
return XFA_EVENTERROR_NotExist;
}
return pNotify->ExecEventByDeepFirst(