From a1cef70c08a16e2b9d7ec14987a8b20660d83534 Mon Sep 17 00:00:00 2001 From: jinming_wang Date: Fri, 18 Mar 2016 16:35:40 +0800 Subject: Trigger page view event when re-layout is finished BUG=pdfium:401 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1758553003 . --- xfa/fxfa/app/xfa_ffdocview.cpp | 4 ++++ xfa/include/fxfa/fxfa.h | 1 + 2 files changed, 5 insertions(+) (limited to 'xfa') diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index 082ca2bbaa..64d4b2375e 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -599,9 +599,13 @@ FX_BOOL CXFA_FFDocView::RunLayout() { m_pXFADocLayout->DoLayout(); UnlockUpdate(); m_bInLayoutStatus = FALSE; + m_pDoc->GetDocProvider()->PageViewEvent(nullptr, + XFA_PAGEVIEWEVENT_StopLayout); return TRUE; } m_bInLayoutStatus = FALSE; + m_pDoc->GetDocProvider()->PageViewEvent(nullptr, + XFA_PAGEVIEWEVENT_StopLayout); UnlockUpdate(); return FALSE; } diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h index 191056cd82..5e9dd0dde8 100644 --- a/xfa/include/fxfa/fxfa.h +++ b/xfa/include/fxfa/fxfa.h @@ -354,6 +354,7 @@ class IXFA_MenuHandler { #define XFA_PRINTOPT_PrintAnnot 0x00000020 #define XFA_PAGEVIEWEVENT_PostAdded 1 #define XFA_PAGEVIEWEVENT_PostRemoved 3 +#define XFA_PAGEVIEWEVENT_StopLayout 4 #define XFA_WIDGETEVENT_PostAdded 2 #define XFA_WIDGETEVENT_PreRemoved 3 #define XFA_WIDGETEVENT_PostContentChanged 6 -- cgit v1.2.3