mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1432853 - Disable 'page-break-inside:avoid' on abs.pos. frames for now. r=dholbert
This commit is contained in:
parent
7d4ce72d01
commit
c7688ac21f
@ -167,17 +167,11 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame,
|
||||
nsReflowStatus kidStatus;
|
||||
ReflowAbsoluteFrame(aDelegatingFrame, aPresContext, aReflowInput, cb,
|
||||
aFlags, kidFrame, kidStatus, aOverflowAreas);
|
||||
MOZ_ASSERT(!kidStatus.IsInlineBreakBefore(),
|
||||
"ShouldAvoidBreakInside should prevent this from happening");
|
||||
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
||||
if ((kidStatus.IsInlineBreakBefore() ||
|
||||
!kidStatus.IsFullyComplete()) &&
|
||||
if (!kidStatus.IsFullyComplete() &&
|
||||
aDelegatingFrame->IsFrameOfType(nsIFrame::eCanContainOverflowContainers)) {
|
||||
// XXX it's unclear how we should handle 'page-break-inside:avoid' on
|
||||
// abs.pos. boxes -- ignore it for now by setting the status to
|
||||
// Incomplete (which will probably fragment it).
|
||||
if (kidStatus.IsInlineBreakBefore()) {
|
||||
kidStatus.Reset();
|
||||
kidStatus.SetIncomplete();
|
||||
}
|
||||
// Need a continuation
|
||||
if (!nextFrame) {
|
||||
nextFrame =
|
||||
|
@ -9704,6 +9704,16 @@ nsFrame::ConsiderChildOverflow(nsOverflowAreas& aOverflowAreas,
|
||||
aChildFrame->GetPosition());
|
||||
}
|
||||
|
||||
bool
|
||||
nsFrame::ShouldAvoidBreakInside(const ReflowInput& aReflowInput) const
|
||||
{
|
||||
const auto* disp = StyleDisplay();
|
||||
return !aReflowInput.mFlags.mIsTopOfPage &&
|
||||
NS_STYLE_PAGE_BREAK_AVOID == disp->mBreakInside &&
|
||||
!(HasAnyStateBits(NS_FRAME_OUT_OF_FLOW) && IsAbsolutelyPositioned(disp)) &&
|
||||
!GetPrevInFlow();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function takes a frame that is part of a block-in-inline split,
|
||||
* and _if_ that frame is an anonymous block created by an ib split it
|
||||
|
@ -473,11 +473,7 @@ public:
|
||||
/**
|
||||
* @return true if we should avoid a page/column break in this frame.
|
||||
*/
|
||||
bool ShouldAvoidBreakInside(const ReflowInput& aReflowInput) const {
|
||||
return !aReflowInput.mFlags.mIsTopOfPage &&
|
||||
NS_STYLE_PAGE_BREAK_AVOID == StyleDisplay()->mBreakInside &&
|
||||
!GetPrevInFlow();
|
||||
}
|
||||
bool ShouldAvoidBreakInside(const ReflowInput& aReflowInput) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user