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

Side by Side Diff: fpdfsdk/src/fsdk_mgr.cpp

Issue 1758553003: Trigger page view event when re-layout is finished (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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/fpdfxfa/fpdfxfa_doc.cpp ('k') | public/fpdf_formfill.h » ('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 <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "fpdfsdk/include/fsdk_mgr.h" 10 #include "fpdfsdk/include/fsdk_mgr.h"
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 847
848 FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) { 848 FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
849 #ifdef PDF_ENABLE_XFA 849 #ifdef PDF_ENABLE_XFA
850 if (!pAnnot) 850 if (!pAnnot)
851 return FALSE; 851 return FALSE;
852 CPDFXFA_Page* pPage = pAnnot->GetPDFXFAPage(); 852 CPDFXFA_Page* pPage = pAnnot->GetPDFXFAPage();
853 if (!pPage || (pPage->GetDocument()->GetDocType() != DOCTYPE_STATIC_XFA && 853 if (!pPage || (pPage->GetDocument()->GetDocType() != DOCTYPE_STATIC_XFA &&
854 pPage->GetDocument()->GetDocType() != DOCTYPE_DYNAMIC_XFA)) 854 pPage->GetDocument()->GetDocType() != DOCTYPE_DYNAMIC_XFA))
855 return FALSE; 855 return FALSE;
856 856
857 if (GetFocusAnnot() == pAnnot)
858 KillFocusAnnot();
859 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
860 CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
861 if (pAnnotHandler)
862 pAnnotHandler->ReleaseAnnot(pAnnot);
863
857 auto it = std::find(m_fxAnnotArray.begin(), m_fxAnnotArray.end(), pAnnot); 864 auto it = std::find(m_fxAnnotArray.begin(), m_fxAnnotArray.end(), pAnnot);
858 if (it != m_fxAnnotArray.end()) 865 if (it != m_fxAnnotArray.end())
859 m_fxAnnotArray.erase(it); 866 m_fxAnnotArray.erase(it);
860 if (m_CaptureWidget == pAnnot) 867 if (m_CaptureWidget == pAnnot)
861 m_CaptureWidget = nullptr; 868 m_CaptureWidget = nullptr;
862 869
863 return TRUE; 870 return TRUE;
864 #else // PDF_ENABLE_XFA 871 #else // PDF_ENABLE_XFA
865 return FALSE; 872 return FALSE;
866 #endif // PDF_ENABLE_XFA 873 #endif // PDF_ENABLE_XFA
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); 1196 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot();
1190 if (!pFocusAnnot) 1197 if (!pFocusAnnot)
1191 return nullptr; 1198 return nullptr;
1192 1199
1193 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { 1200 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) {
1194 if (pAnnot == pFocusAnnot) 1201 if (pAnnot == pFocusAnnot)
1195 return pAnnot; 1202 return pAnnot;
1196 } 1203 }
1197 return nullptr; 1204 return nullptr;
1198 } 1205 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp ('k') | public/fpdf_formfill.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698