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

Unified Diff: xfa/src/fxfa/src/app/xfa_ffdocview.cpp

Issue 1668813002: Fix an assertion failure in CXFA_DefFontMgr::GetDefaultFont() (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 side-by-side diff with in-line comments
Download patch
Index: xfa/src/fxfa/src/app/xfa_ffdocview.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
index 5232d19417bb0ceed04974c33cb319c219d75562..982d7bbd2587f7c49568bd7e143e8cd026706796 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
@@ -180,7 +180,6 @@ void CXFA_FFDocView::UpdateDocView() {
this->RunCalculateWidgets();
this->RunValidate();
ShowNullTestMsg();
- m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Next;
if (RunLayout() && m_bLayoutEvent) {
RunEventLayoutReady();
}
@@ -396,7 +395,7 @@ void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) {
pWidgetAcc ? pWidgetAcc->GetNextWidget(NULL) : NULL;
if (SetFocus(pNewFocus)) {
m_pFocusAcc = pWidgetAcc;
- if (m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End) {
+ if (m_iStatus == XFA_DOCVIEW_LAYOUTSTATUS_End) {
m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);
}
}
@@ -535,20 +534,15 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
void CXFA_FFDocView::OnPageEvent(IXFA_LayoutPage* pSender,
XFA_PAGEEVENT eEvent,
int32_t iPageIndex) {
- FX_BOOL bNofify = m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End;
CXFA_FFPageView* pFFPageView = static_cast<CXFA_FFPageView*>(pSender);
if (eEvent == XFA_PAGEEVENT_PageRemoved) {
- if (bNofify) {
m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
XFA_PAGEVIEWEVENT_PostRemoved);
- }
- } else if (eEvent == XFA_PAGEEVENT_PageAdded) {
- if (bNofify) {
- m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
- XFA_PAGEVIEWEVENT_PostAdded);
- pFFPageView->LoadPageView();
- }
+ return;
}
+ m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
+ XFA_PAGEVIEWEVENT_PostAdded);
+ pFFPageView->LoadPageView();
}
void CXFA_FFDocView::LockUpdate() {
m_iLock++;

Powered by Google App Engine
This is Rietveld 408576698