Bug 1859446 Part 2 - Remove TableRowGroupReflowInput::tableFrame. r=layout-reviewers,jfkthame

`tableFrame` is seldom used, and all the functions that need the table frame
have already got it via `GetTableFrame()` helper.

Differential Revision: https://phabricator.services.mozilla.com/D191152
This commit is contained in:
Ting-Yu Lin
2023-10-17 17:30:01 +00:00
parent f609a78727
commit c1e9dcd8c9

View File

@@ -34,18 +34,14 @@ namespace mozilla {
struct TableRowGroupReflowInput {
const ReflowInput& reflowInput; // Our reflow input
nsTableFrame* tableFrame;
// The available size (computed from the parent)
mozilla::LogicalSize availSize;
// Running block-offset
nscoord bCoord;
TableRowGroupReflowInput(const ReflowInput& aReflowInput,
nsTableFrame* aTableFrame)
explicit TableRowGroupReflowInput(const ReflowInput& aReflowInput)
: reflowInput(aReflowInput),
tableFrame(aTableFrame),
availSize(aReflowInput.AvailableSize()),
bCoord(0) {}
@@ -401,12 +397,12 @@ void nsTableRowGroupFrame::ReflowChildren(
aReflowInput.bCoord += cellSpacingB;
if (!reflowAllKids) {
if (IsSimpleRowFrame(aReflowInput.tableFrame, kidFrame)) {
if (IsSimpleRowFrame(tableFrame, kidFrame)) {
// Inform the row of its new bsize.
kidFrame->DidResize();
// the overflow area may have changed inflate the overflow area
const nsStylePosition* stylePos = StylePosition();
if (aReflowInput.tableFrame->IsAutoBSize(wm) &&
if (tableFrame->IsAutoBSize(wm) &&
!stylePos->BSize(wm).ConvertsToLength()) {
// Because other cells in the row may need to be aligned
// differently, repaint the entire row
@@ -1345,7 +1341,7 @@ void nsTableRowGroupFrame::Reflow(nsPresContext* aPresContext,
nsTableFrame::CheckRequestSpecialBSizeReflow(aReflowInput);
nsTableFrame* tableFrame = GetTableFrame();
TableRowGroupReflowInput state(aReflowInput, tableFrame);
TableRowGroupReflowInput state(aReflowInput);
const nsStyleVisibility* groupVis = StyleVisibility();
bool collapseGroup = StyleVisibility::Collapse == groupVis->mVisible;
if (collapseGroup) {