Bug 1811548 Part 1 - Don't evaluate physical available size when aContainerSize is provided. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D170034
This commit is contained in:
Ting-Yu Lin 2023-02-22 01:34:07 +00:00
parent a20de61ba5
commit d9b85a4a49

View File

@ -1141,8 +1141,9 @@ void nsContainerFrame::ReflowOverflowContainerChildren(
frame->HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER),
"overflow container frame must have overflow container bit set");
WritingMode wm = frame->GetWritingMode();
nsSize containerSize = aContainerSize.valueOr(
aReflowInput.AvailableSize(wm).GetPhysicalSize(wm));
nsSize containerSize =
aContainerSize ? *aContainerSize
: aReflowInput.AvailableSize(wm).GetPhysicalSize(wm);
LogicalRect prevRect = prevInFlow->GetLogicalRect(wm, containerSize);
// Initialize reflow params