Bug 1861562 Part 5 - Don't set table frame's desired inline size repeatedly. r=layout-reviewers,jfkthame

We set `aDesiredSize.ISize(wm)` again after calling `ReflowTable()`. Since no
other variable depending on the desired inline-size, there's no point set it
near the beginning of `Reflow()` and in `ReflowTable()`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D192052
This commit is contained in:
Ting-Yu Lin 2023-10-27 18:38:08 +00:00
parent da5d082209
commit d63958c5d6

View File

@ -1652,8 +1652,6 @@ void nsTableFrame::Reflow(nsPresContext* aPresContext,
CalcBCBorders();
}
aDesiredSize.ISize(wm) = aReflowInput.AvailableISize();
// Check for an overflow list, and append any row group frames being pushed
MoveOverflowToChildList();
@ -1934,11 +1932,12 @@ void nsTableFrame::ReflowTable(ReflowOutput& aDesiredSize,
// flow). and our reflow bsize to our avail bsize minus border, padding,
// cellspacing
WritingMode wm = aReflowInput.GetWritingMode();
aDesiredSize.ISize(wm) =
LogicalSize availSize(
wm,
aReflowInput.ComputedISize() +
aReflowInput.ComputedLogicalBorderPadding(wm).IStartEnd(wm);
TableReflowInput reflowInput(
aReflowInput, LogicalSize(wm, aDesiredSize.ISize(wm), aAvailBSize));
aReflowInput.ComputedLogicalBorderPadding(wm).IStartEnd(wm),
aAvailBSize);
TableReflowInput reflowInput(aReflowInput, availSize);
ReflowChildren(reflowInput, aStatus, aLastChildReflowed,
aDesiredSize.mOverflowAreas);