From d7396f6886d9bfdb8df1fd36accab2ea76518113 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Thu, 13 Feb 2025 21:02:55 +0800 Subject: [PATCH] import from mozilla: Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert a=gchang (5763b4d39e4) --- 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 be750a4c7a..4501deafec 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -1030,8 +1030,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, @@ -1044,6 +1044,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 (ReflowChildFlags::NoMoveFrame !=