Issue #2693 - Don't reflow children if they have 0 width.

This seems to be the main reason for the reflow storm.
This commit is contained in:
Moonchild 2025-02-18 11:17:06 +01:00 committed by roytam1
commit cb233feea0

View file

@ -3793,10 +3793,25 @@ MeasuringReflow(nsIFrame* aChild,
nsIFrame::ReflowChildFlags::NoMoveFrame |
nsIFrame::ReflowChildFlags::NoSizeView |
nsIFrame::ReflowChildFlags::NoDeleteNextInFlowChild;
parent->ReflowChild(aChild, pc, childSize, childRI, wm,
LogicalPoint(wm), nsSize(), flags, childStatus);
parent->FinishReflowChild(aChild, pc, childSize, &childRI, wm,
LogicalPoint(wm), nsSize(), flags);
if (childSize.mBoundingMetrics.width != 0) {
parent->ReflowChild(aChild,
pc,
childSize,
childRI,
wm,
LogicalPoint(wm),
nsSize(),
flags,
childStatus);
parent->FinishReflowChild(aChild,
pc,
childSize,
&childRI,
wm,
LogicalPoint(wm),
nsSize(),
flags);
}
#ifdef DEBUG
parent->DeleteProperty(nsContainerFrame::DebugReflowingWithInfiniteISize());
#endif