From 9dc89e761da4d282992f00cbe8aa214d5f60242d Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 18 Apr 2017 22:35:05 +0200 Subject: [PATCH] Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert MozReview-Commit-ID: 1rRcC76jWxN --- layout/generic/nsContainerFrame.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index be579c802189..54a9ebbcfdb0 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -866,8 +866,8 @@ nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext, 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, @@ -880,6 +880,9 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame, 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)) {