summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-06 14:42:49 -0800
committerLei Zhang <thestig@chromium.org>2016-01-06 14:42:49 -0800
commitdcac57bc8b64fdc870d79d11a498ae7021cf8ae7 (patch)
treeead222392904fc522669bfeaa27e90b53f4675fa /fpdfsdk/src/pdfwindow
parentaa326bd6b169dc1b5b9b83048c71799799ab34c6 (diff)
downloadpdfium-dcac57bc8b64fdc870d79d11a498ae7021cf8ae7.tar.xz
Invalidate IPWL_FocusHandler and IPWL_Provider on destruction.
BUG=572871 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1564773003 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index 9c4e21713b..5bedad127a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -237,6 +237,16 @@ void CPWL_Wnd::OnCreated() {}
void CPWL_Wnd::OnDestroy() {}
+void CPWL_Wnd::InvalidateFocusHandler(IPWL_FocusHandler* handler) {
+ if (m_sPrivateParam.pFocusHandler == handler)
+ m_sPrivateParam.pFocusHandler = nullptr;
+}
+
+void CPWL_Wnd::InvalidateProvider(IPWL_Provider* provider) {
+ if (m_sPrivateParam.pProvider == provider)
+ m_sPrivateParam.pProvider = nullptr;
+}
+
void CPWL_Wnd::Destroy() {
KillFocus();