diff options
author | Wei Li <weili@chromium.org> | 2016-03-22 12:52:50 -0700 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-03-22 12:52:50 -0700 |
commit | 42d1c1cca78f9cd2f64136dcf99fad207c9f4099 (patch) | |
tree | 4609912e5d5c3633247eb71d37b915defe1db754 /fpdfsdk | |
parent | d074e9787fe5f21d49269a504969cfcf4eec016b (diff) | |
download | pdfium-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 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fsdk_baseform.cpp | 21 |
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, ¶m); - } - - { - CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget); - param.m_pTarget = pAcc; - int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, ¶m); - return nRet == XFA_EVENTERROR_Success; + if (pXFAWidgetHandler->ProcessEvent(pAcc, ¶m) != + XFA_EVENTERROR_Success) { + return FALSE; + } } - } else { - CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget); - param.m_pTarget = pAcc; - int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, ¶m); - return nRet == XFA_EVENTERROR_Success; } + CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget); + param.m_pTarget = pAcc; + int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, ¶m); if (IXFA_DocView* pDocView = pDoc->GetXFADocView()) { pDocView->UpdateDocView(); } + return nRet == XFA_EVENTERROR_Success; } } } |