summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-22 12:52:50 -0700
committerWei Li <weili@chromium.org>2016-03-22 12:52:50 -0700
commit42d1c1cca78f9cd2f64136dcf99fad207c9f4099 (patch)
tree4609912e5d5c3633247eb71d37b915defe1db754
parentd074e9787fe5f21d49269a504969cfcf4eec016b (diff)
downloadpdfium-42d1c1cca78f9cd2f64136dcf99fad207c9f4099.tar.xz
Fix CPDFSDK_Widget::OnXFAAAction()
Fix a couple issues with OnXFAAAction(): -- radio button widget should not call ProcessEvent() twice; -- UpdateDocView should be called before returning; R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1809073004 .
-rw-r--r--fpdfsdk/fsdk_baseform.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index bfdcb2dbca..4124ebfbce 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -237,25 +237,20 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget()) {
CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget);
param.m_pTarget = pAcc;
- pXFAWidgetHandler->ProcessEvent(pAcc, &param);
- }
-
- {
- CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
- param.m_pTarget = pAcc;
- int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
- return nRet == XFA_EVENTERROR_Success;
+ if (pXFAWidgetHandler->ProcessEvent(pAcc, &param) !=
+ XFA_EVENTERROR_Success) {
+ return FALSE;
+ }
}
- } else {
- CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
- param.m_pTarget = pAcc;
- int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
- return nRet == XFA_EVENTERROR_Success;
}
+ CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
+ param.m_pTarget = pAcc;
+ int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
if (IXFA_DocView* pDocView = pDoc->GetXFADocView()) {
pDocView->UpdateDocView();
}
+ return nRet == XFA_EVENTERROR_Success;
}
}
}