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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp ('k') | public/fpdf_formfill.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_mgr.cpp
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 933f45153875b73e4ea75b4c4fdbe667027a2bdc..5b9ee00cb5fd0a2db835b703962aa776f8397414 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -854,6 +854,13 @@ FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
pPage->GetDocument()->GetDocType() != DOCTYPE_DYNAMIC_XFA))
return FALSE;
+ if (GetFocusAnnot() == pAnnot)
+ KillFocusAnnot();
+ CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
+ if (pAnnotHandler)
+ pAnnotHandler->ReleaseAnnot(pAnnot);
+
auto it = std::find(m_fxAnnotArray.begin(), m_fxAnnotArray.end(), pAnnot);
if (it != m_fxAnnotArray.end())
m_fxAnnotArray.erase(it);
« 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