Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert a=gchang
authorMats Palmgren <mats@mozilla.com>
Tue, 18 Apr 2017 22:35:05 +0200
changeset 395973 5763b4d39e44d47a4e37b01cde5c8637b0a19751
parent 395972 8c70d11ecd10e4c26e058990848fd6464083d80a
child 395974 9fc3f176a12e614ca6f28ebdd03783396aa0aab4
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, gchang
bugs1350925
milestone54.0
Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert a=gchang MozReview-Commit-ID: 1rRcC76jWxN
layout/generic/nsContainerFrame.cpp
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -994,30 +994,33 @@ nsContainerFrame::ComputeAutoSize(nsRend
     }
   }
   return result;
 }
 
 void
 nsContainerFrame::ReflowChild(nsIFrame*                aKidFrame,
                               nsPresContext*           aPresContext,
-                              ReflowOutput&     aDesiredSize,
-                              const ReflowInput& aReflowInput,
+                              ReflowOutput&            aDesiredSize,
+                              const ReflowInput&       aReflowInput,
                               const WritingMode&       aWM,
                               const LogicalPoint&      aPos,
                               const nsSize&            aContainerSize,
                               uint32_t                 aFlags,
                               nsReflowStatus&          aStatus,
                               nsOverflowContinuationTracker* aTracker)
 {
   NS_PRECONDITION(aReflowInput.mFrame == aKidFrame, "bad reflow state");
   if (aWM.IsVerticalRL() || (!aWM.IsVertical() && !aWM.IsBidiLTR())) {
     NS_ASSERTION(aContainerSize.width != NS_UNCONSTRAINEDSIZE,
                  "ReflowChild with unconstrained container width!");
   }
+  MOZ_ASSERT(aDesiredSize.VisualOverflow() == nsRect(0,0,0,0) &&
+             aDesiredSize.ScrollableOverflow() == nsRect(0,0,0,0),
+             "please reset the overflow areas before calling ReflowChild");
 
   // Position the child frame and its view if requested.
   if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
     aKidFrame->SetPosition(aWM, aPos, aContainerSize);
   }
 
   if (0 == (aFlags & NS_FRAME_NO_MOVE_VIEW)) {
     PositionFrameView(aKidFrame);