summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller
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/formfiller
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/formfiller')
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_FormFiller.cpp3
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index b2c32f38fc..3d78d37894 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -21,6 +21,8 @@ CFFL_ComboBox::CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
}
CFFL_ComboBox::~CFFL_ComboBox() {
+ for (const auto& it : m_Maps)
+ it.second->InvalidateFocusHandler(this);
delete m_pFontMap;
}
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index 975385fb29..61807ee93f 100644
--- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
@@ -24,9 +24,10 @@ CFFL_FormFiller::CFFL_FormFiller(CPDFDoc_Environment* pApp,
}
CFFL_FormFiller::~CFFL_FormFiller() {
- for (auto& it : m_Maps) {
+ for (const auto& it : m_Maps) {
CPWL_Wnd* pWnd = it.second;
CFFL_PrivateData* pData = (CFFL_PrivateData*)pWnd->GetAttachedData();
+ pWnd->InvalidateProvider(this);
pWnd->Destroy();
delete pWnd;
delete pData;
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index 4d5f72d883..1141b66e99 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -16,6 +16,8 @@ CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
}
CFFL_TextField::~CFFL_TextField() {
+ for (const auto& it : m_Maps)
+ it.second->InvalidateFocusHandler(this);
delete m_pFontMap;
}