Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp

Issue 1399273003: fpdfsdk/ differences with XFA (for didactic purposes only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Regenerate after taking juns patch Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index f6e6d754d53962b4f8ab7b72626c7db7beeadb32..9c9c623e28cb89fd50e25772e435fb07492a9eb5 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -471,6 +471,13 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) {
if (bPopup) {
if (m_pFillerNotify) {
+#ifdef PDF_ENABLE_XFA
+ FX_BOOL bExit = FALSE;
+ m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, 0);
+ if (bExit)
+ return;
+
+#endif
int32_t nWhere = 0;
FX_FLOAT fPopupRet = 0.0f;
FX_FLOAT fPopupMin = 0.0f;
@@ -498,6 +505,13 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) {
m_nPopupWhere = nWhere;
Move(rcWindow, TRUE, TRUE);
+#ifdef PDF_ENABLE_XFA
+
+ bExit = FALSE;
+ m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, 0);
+ if (bExit)
+ return;
+#endif
}
}
} else {
@@ -518,6 +532,18 @@ FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
case FWL_VKEY_Up:
if (m_pList->GetCurSel() > 0) {
FX_BOOL bExit = FALSE;
+#ifdef PDF_ENABLE_XFA
+
+ if (m_pFillerNotify) {
+ m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, nFlag);
+ if (bExit)
+ return FALSE;
+ bExit = FALSE;
+ m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, nFlag);
+ if (bExit)
+ return FALSE;
+ }
+#endif
if (m_pList->OnKeyDownWithExit(nChar, bExit, nFlag)) {
if (bExit)
return FALSE;
@@ -528,6 +554,18 @@ FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
case FWL_VKEY_Down:
if (m_pList->GetCurSel() < m_pList->GetCount() - 1) {
FX_BOOL bExit = FALSE;
+#ifdef PDF_ENABLE_XFA
+
+ if (m_pFillerNotify) {
+ m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, nFlag);
+ if (bExit)
+ return FALSE;
+ bExit = FALSE;
+ m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, nFlag);
+ if (bExit)
+ return FALSE;
+ }
+#endif
if (m_pList->OnKeyDownWithExit(nChar, bExit, nFlag)) {
if (bExit)
return FALSE;
@@ -555,6 +593,17 @@ FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
return m_pEdit->OnChar(nChar, nFlag);
FX_BOOL bExit = FALSE;
+#ifdef PDF_ENABLE_XFA
+ if (m_pFillerNotify) {
+ m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, nFlag);
+ if (bExit)
+ return FALSE;
+
+ m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, nFlag);
+ if (bExit)
+ return FALSE;
+ }
+#endif
return m_pList->OnCharWithExit(nChar, bExit, nFlag) ? bExit : FALSE;
}
« no previous file with comments | « fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698