Bug 1431232 - Treat break-before status as Incomplete for abs.pos. frames for now. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Tue, 23 Jan 2018 00:00:04 +0100
changeset 723405 9a0a943fd35d07a935d7ac027f3d33aa16f7cd29
parent 723404 54c8e64328ce77d5c2e4bd9702f22a49477764ee
child 723406 0bb77622a6887b1c9873578c801425cb52149ea2
push id96421
push userbmo:gps@mozilla.com
push dateTue, 23 Jan 2018 05:59:40 +0000
reviewersdholbert
bugs1431232
milestone60.0a1
Bug 1431232 - Treat break-before status as Incomplete for abs.pos. frames for now. r=dholbert
layout/generic/nsAbsoluteContainingBlock.cpp
--- a/layout/generic/nsAbsoluteContainingBlock.cpp
+++ b/layout/generic/nsAbsoluteContainingBlock.cpp
@@ -162,18 +162,26 @@ nsAbsoluteContainingBlock::Reflow(nsCont
       }
     }
     if (kidNeedsReflow && !aPresContext->HasPendingInterrupt()) {
       // Reflow the frame
       nsReflowStatus kidStatus;
       ReflowAbsoluteFrame(aDelegatingFrame, aPresContext, aReflowInput, cb,
                           aFlags, kidFrame, kidStatus, aOverflowAreas);
       nsIFrame* nextFrame = kidFrame->GetNextInFlow();
-      if (!kidStatus.IsFullyComplete() &&
+      if ((kidStatus.IsInlineBreakBefore() ||
+           !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 =
             aPresContext->PresShell()->FrameConstructor()->
               CreateContinuingFrame(aPresContext, kidFrame, aDelegatingFrame);
         }
         // Add it as an overflow container.
         //XXXfr This is a hack to fix some of our printing dataloss.