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

Unified Diff: fpdfsdk/formfiller/cffl_formfiller.cpp

Issue 2179163004: Reland of Remove pageview from map immediately (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: FX_BOOL to bool Created 4 years, 5 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/formfiller/cffl_formfiller.h ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cffl_formfiller.cpp
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index d7bc9586a4a49a9fb4bb23424e549c54787a0674..479a1bc1691ea77080f17083acb8c9cf9756b562 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -220,7 +220,7 @@ FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot,
FX_UINT nKeyCode,
FX_UINT nFlags) {
if (IsValid()) {
- CPDFSDK_PageView* pPageView = GetCurPageView();
+ CPDFSDK_PageView* pPageView = GetCurPageView(true);
ASSERT(pPageView);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
@@ -235,7 +235,7 @@ FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot,
FX_UINT nChar,
FX_UINT nFlags) {
if (IsValid()) {
- CPDFSDK_PageView* pPageView = GetCurPageView();
+ CPDFSDK_PageView* pPageView = GetCurPageView(true);
ASSERT(pPageView);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
@@ -250,7 +250,7 @@ void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();
CPDFSDK_Document* pDoc = m_pApp->GetSDKDocument();
- CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage);
+ CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage, true);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
pWnd->SetFocus();
@@ -263,7 +263,7 @@ void CFFL_FormFiller::KillFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
if (!IsValid())
return;
- CPDFSDK_PageView* pPageView = GetCurPageView();
+ CPDFSDK_PageView* pPageView = GetCurPageView(false);
if (!pPageView)
return;
@@ -456,10 +456,10 @@ CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const {
return CFX_FloatRect(0, 0, fWidth, fHeight);
}
-CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView() {
+CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) {
UnderlyingPageType* pPage = m_pAnnot->GetUnderlyingPage();
CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument();
- return pSDKDoc ? pSDKDoc->GetPageView(pPage) : nullptr;
+ return pSDKDoc ? pSDKDoc->GetPageView(pPage, renew) : nullptr;
}
CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
« no previous file with comments | « fpdfsdk/formfiller/cffl_formfiller.h ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698