Bug 1144096 part 22 - [css-grid] Check NS_INLINE_IS_BREAK_BEFORE before checking other completion status. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Fri, 11 Mar 2016 17:39:27 +0100
changeset 288314 04b6926cb2f31a68ff93c63da594729326e2d602
parent 288313 e8b769cce0f101f39284954ec6a826c0cd6343cf
child 288315 5b9834eee771d07a39bb5a254e3ccb6e1698f3a0
push id30079
push userryanvm@gmail.com
push dateSat, 12 Mar 2016 20:24:19 +0000
treeherdermozilla-central@d1d47ba19ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1144096
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1144096 part 22 - [css-grid] Check NS_INLINE_IS_BREAK_BEFORE before checking other completion status. r=dholbert
layout/generic/nsContainerFrame.cpp
layout/generic/nsGridContainerFrame.cpp
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1025,17 +1025,18 @@ nsContainerFrame::ReflowChild(nsIFrame* 
     PositionFrameView(aKidFrame);
   }
 
   // Reflow the child frame
   aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
 
   // If the child frame is complete, delete any next-in-flows,
   // but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
-  if (NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
+  if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
+      NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
       !(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
     nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
     if (kidNextInFlow) {
       // Remove all of the childs next-in-flows. Make sure that we ask
       // the right parent to do the removal (it's possible that the
       // parent is not this because we are executing pullup code)
       nsOverflowContinuationTracker::AutoFinish fini(aTracker, aKidFrame);
       kidNextInFlow->GetParent()->DeleteNextInFlowChild(kidNextInFlow, true);
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -4523,17 +4523,18 @@ nsGridContainerFrame::ReflowRowsInFragme
     // restart the loop.  We also restart the loop with |aEndRow = row|
     // (but without growing any row) for a BREAK_BEFORE child if it spans
     // beyond the last row in this fragment.  This is to avoid fragmenting it.
     // We only restart the loop once.
     aFragmentainer.mIsTopOfPage = isRowTopOfPage && !rowCanGrow;
     nsReflowStatus childStatus;
     ReflowInFlowChild(child, info, aContainerSize, &aFragmentainer,
                       aState, aContentArea, aDesiredSize, childStatus);
-    MOZ_ASSERT(!NS_FRAME_IS_FULLY_COMPLETE(childStatus) ||
+    MOZ_ASSERT(NS_INLINE_IS_BREAK_BEFORE(childStatus) ||
+               !NS_FRAME_IS_FULLY_COMPLETE(childStatus) ||
                !child->GetNextInFlow(),
                "fully-complete reflow should destroy any NIFs");
 
     if (NS_INLINE_IS_BREAK_BEFORE(childStatus)) {
       MOZ_ASSERT(!child->GetPrevInFlow(),
                  "continuations should never report BREAK_BEFORE status");
       MOZ_ASSERT(!aFragmentainer.mIsTopOfPage,
                  "got NS_INLINE_IS_BREAK_BEFORE at top of page");