diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-31 19:54:25 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-31 19:54:25 +0000 |
commit | 990c09373b733346a06b03167ca43252cb93e986 (patch) | |
tree | d737288e1d7aaee4dfe0519b5db2906e1573538d /xfa/fxfa/parser/cxfa_layoutpagemgr.cpp | |
parent | 8a9f2e13d13f996c1138b0a0e890bdfffb0633c9 (diff) | |
download | pdfium-990c09373b733346a06b03167ca43252cb93e986.tar.xz |
Create CXFA_Node::PresenceRequiresSpace
This CL replaces XFA_ItemLayoutProcessor_IsTakingSpace with a
PresenceRequiresSpace call on CXFA_Node.
Change-Id: Ibf570f25eeb3404d72e87cb62e06a7ad70f0916f
Reviewed-on: https://pdfium-review.googlesource.com/24850
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutpagemgr.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutpagemgr.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp index 123cafb1e9..f921d8014f 100644 --- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp +++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp @@ -398,8 +398,7 @@ bool CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) { bProBreakBefore = true; pRootSubform = pRootSubform->GetFirstChildByClass<CXFA_Subform>(XFA_Element::Subform); - while (pRootSubform && - !XFA_ItemLayoutProcessor_IsTakingSpace(pRootSubform)) { + while (pRootSubform && !pRootSubform->PresenceRequiresSpace()) { pRootSubform = pRootSubform->GetNextSameClassSibling<CXFA_Subform>( XFA_Element::Subform); } @@ -885,7 +884,7 @@ bool CXFA_LayoutPageMgr::ProcessBreakBeforeOrAfter( CXFA_Node* pLeaderTemplate = nullptr; CXFA_Node* pTrailerTemplate = nullptr; CXFA_Node* pFormNode = pBreakNode->GetContainerParent(); - if (XFA_ItemLayoutProcessor_IsTakingSpace(pFormNode)) { + if (pFormNode->PresenceRequiresSpace()) { bCreatePage = ExecuteBreakBeforeOrAfter(pBreakNode, bBefore, pLeaderTemplate, pTrailerTemplate); CXFA_Document* pDocument = pBreakNode->GetDocument(); @@ -1760,8 +1759,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { pFormLayout = pFormLayout->m_pFirstChild; if (iLevel == 2) { while (pFormLayout && - !XFA_ItemLayoutProcessor_IsTakingSpace( - pFormLayout->m_pFormNode)) { + !pFormLayout->m_pFormNode->PresenceRequiresSpace()) { pFormLayout = pFormLayout->m_pNextSibling; } } |