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

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_Wnd.cpp

Issue 1569663002: Invalidate IPWL_FocusHandler and IPWL_Provider on destruction. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/fpdfview_embeddertest.cpp ('k') | testing/resources/bug_572871.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "fpdfsdk/include/pdfwindow/PWL_ScrollBar.h" 9 #include "fpdfsdk/include/pdfwindow/PWL_ScrollBar.h"
10 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" 10 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 m_bCreated = TRUE; 230 m_bCreated = TRUE;
231 } 231 }
232 } 232 }
233 233
234 void CPWL_Wnd::OnCreate(PWL_CREATEPARAM& cp) {} 234 void CPWL_Wnd::OnCreate(PWL_CREATEPARAM& cp) {}
235 235
236 void CPWL_Wnd::OnCreated() {} 236 void CPWL_Wnd::OnCreated() {}
237 237
238 void CPWL_Wnd::OnDestroy() {} 238 void CPWL_Wnd::OnDestroy() {}
239 239
240 void CPWL_Wnd::InvalidateFocusHandler(IPWL_FocusHandler* handler) {
241 if (m_sPrivateParam.pFocusHandler == handler)
242 m_sPrivateParam.pFocusHandler = nullptr;
243 }
244
245 void CPWL_Wnd::InvalidateProvider(IPWL_Provider* provider) {
246 if (m_sPrivateParam.pProvider == provider)
247 m_sPrivateParam.pProvider = nullptr;
248 }
249
240 void CPWL_Wnd::Destroy() { 250 void CPWL_Wnd::Destroy() {
241 KillFocus(); 251 KillFocus();
242 252
243 OnDestroy(); 253 OnDestroy();
244 254
245 if (m_bCreated) { 255 if (m_bCreated) {
246 for (int32_t i = m_aChildren.GetSize() - 1; i >= 0; i--) { 256 for (int32_t i = m_aChildren.GetSize() - 1; i >= 0; i--) {
247 if (CPWL_Wnd* pChild = m_aChildren[i]) { 257 if (CPWL_Wnd* pChild = m_aChildren[i]) {
248 pChild->Destroy(); 258 pChild->Destroy();
249 delete pChild; 259 delete pChild;
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 return FALSE; 1064 return FALSE;
1055 } 1065 }
1056 1066
1057 FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const { 1067 FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const {
1058 if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) { 1068 if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) {
1059 return pSystemHandler->IsINSERTKeyDown(nFlag); 1069 return pSystemHandler->IsINSERTKeyDown(nFlag);
1060 } 1070 }
1061 1071
1062 return FALSE; 1072 return FALSE;
1063 } 1073 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview_embeddertest.cpp ('k') | testing/resources/bug_572871.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698