import from mozilla: Bug 1350925 part 2 - Assert that we're given clean ReflowOutput overflow areas in ReflowChild. rs=dholbert a=gchang (5763b4d39e4)

This commit is contained in:
roytam1 2025-02-13 21:02:55 +08:00
commit d7396f6886

View file

@ -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 !=