diff options
Diffstat (limited to 'layout/tables/nsTableFrame.cpp')
-rw-r--r-- | layout/tables/nsTableFrame.cpp | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 648fa7ddf..99838f217 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1165,7 +1165,7 @@ nsDisplayTableBorderCollapse::Paint(nsDisplayListBuilder* aBuilder, /* static */ void nsTableFrame::GenericTraversal(nsDisplayListBuilder* aBuilder, nsFrame* aFrame, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) + const nsDisplayListSet& aLists) { // This is similar to what nsContainerFrame::BuildDisplayListForNonBlockChildren // does, except that we allow the children's background and borders to go @@ -1176,11 +1176,11 @@ nsTableFrame::GenericTraversal(nsDisplayListBuilder* aBuilder, nsFrame* aFrame, // BorderBackground list anyway. It does affect cell borders though; this // lets us get cell borders into the nsTableFrame's BorderBackground list. for (nsIFrame* kid : aFrame->GetChildList(kColGroupList)) { - aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists); + aFrame->BuildDisplayListForChild(aBuilder, kid, aLists); } for (nsIFrame* kid : aFrame->PrincipalChildList()) { - aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists); + aFrame->BuildDisplayListForChild(aBuilder, kid, aLists); } } @@ -1189,7 +1189,6 @@ PaintRowBackground(nsTableRowFrame* aRow, nsIFrame* aFrame, nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists, - const nsRect& aDirtyRect, const nsPoint& aOffset = nsPoint()) { // Compute background rect by iterating over all cell frames. @@ -1199,7 +1198,7 @@ PaintRowBackground(nsTableRowFrame* aRow, } auto cellRect = cell->GetRectRelativeToSelf() + cell->GetNormalPosition() + aOffset; - if (!aDirtyRect.Intersects(cellRect)) { + if (!aBuilder->GetDirtyRect().Intersects(cellRect)) { continue; } nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect, @@ -1214,14 +1213,14 @@ static void PaintRowGroupBackground(nsTableRowGroupFrame* aRowGroup, nsIFrame* aFrame, nsDisplayListBuilder* aBuilder, - const nsDisplayListSet& aLists, - const nsRect& aDirtyRect) + const nsDisplayListSet& aLists) { for (nsTableRowFrame* row = aRowGroup->GetFirstRow(); row; row = row->GetNextRow()) { - if (!aDirtyRect.Intersects(nsRect(row->GetNormalPosition(), row->GetSize()))) { + if (!aBuilder->GetDirtyRect().Intersects(nsRect(row->GetNormalPosition(), + row->GetSize()))) { continue; } - PaintRowBackground(row, aFrame, aBuilder, aLists, aDirtyRect, row->GetNormalPosition()); + PaintRowBackground(row, aFrame, aBuilder, aLists, row->GetNormalPosition()); } } @@ -1230,7 +1229,6 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup, nsIFrame* aFrame, nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists, - const nsRect& aDirtyRect, const nsTArray<uint32_t>& aColIdx, const nsPoint& aOffset) { @@ -1238,7 +1236,7 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup, "Must be painting backgrounds for something"); for (nsTableRowFrame* row = aRowGroup->GetFirstRow(); row; row = row->GetNextRow()) { auto rowPos = row->GetNormalPosition() + aOffset; - if (!aDirtyRect.Intersects(nsRect(rowPos, row->GetSize()))) { + if (!aBuilder->GetDirtyRect().Intersects(nsRect(rowPos, row->GetSize()))) { continue; } for (nsTableCellFrame* cell = row->GetFirstCell(); cell; cell = cell->GetNextCell()) { @@ -1258,7 +1256,7 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup, auto cellPos = cell->GetNormalPosition() + rowPos; auto cellRect = nsRect(cellPos, cell->GetSize()); - if (!aDirtyRect.Intersects(cellRect)) { + if (!aBuilder->GetDirtyRect().Intersects(cellRect)) { continue; } nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect, @@ -1341,7 +1339,6 @@ void nsTableFrame::CalcHasBCBorders() /* static */ void nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder, nsFrame* aFrame, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists, DisplayGenericTablePartTraversal aTraversal) { @@ -1374,10 +1371,10 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder, // See spec at https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds if (aFrame->GetType() == nsGkAtoms::tableRowGroupFrame) { nsTableRowGroupFrame* rowGroup = static_cast<nsTableRowGroupFrame*>(aFrame); - PaintRowGroupBackground(rowGroup, aFrame, aBuilder, aLists, aDirtyRect); + PaintRowGroupBackground(rowGroup, aFrame, aBuilder, aLists); } else if (aFrame->GetType() == nsGkAtoms::tableRowFrame) { nsTableRowFrame* row = static_cast<nsTableRowFrame*>(aFrame); - PaintRowBackground(row, aFrame, aBuilder, aLists, aDirtyRect); + PaintRowBackground(row, aFrame, aBuilder, aLists); } else if (aFrame->GetType() == nsGkAtoms::tableColGroupFrame) { // Compute background rect by iterating all cell frame. nsTableColGroupFrame* colGroup = static_cast<nsTableColGroupFrame*>(aFrame); @@ -1396,10 +1393,10 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder, table->OrderRowGroups(rowGroups); for (nsTableRowGroupFrame* rowGroup : rowGroups) { auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition(); - if (!aDirtyRect.Intersects(nsRect(offset, rowGroup->GetSize()))) { + if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) { continue; } - PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, aDirtyRect, colIdx, offset); + PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset); } } } else if (aFrame->GetType() == nsGkAtoms::tableColFrame) { @@ -1415,10 +1412,10 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder, auto offset = rowGroup->GetNormalPosition() - col->GetNormalPosition() - col->GetTableColGroupFrame()->GetNormalPosition(); - if (!aDirtyRect.Intersects(nsRect(offset, rowGroup->GetSize()))) { + if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) { continue; } - PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, aDirtyRect, colIdx, offset); + PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset); } } else if (isVisible) { nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, @@ -1438,7 +1435,7 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder, } } - aTraversal(aBuilder, aFrame, aDirtyRect, aLists); + aTraversal(aBuilder, aFrame, aLists); if (isVisible) { if (isTable) { @@ -1466,12 +1463,11 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder, // SEC: TODO: adjust the rect for captions void nsTableFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { DO_GLOBAL_REFLOW_COUNT_DSP_COLOR("nsTableFrame", NS_RGB(255,128,255)); - DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists); + DisplayGenericTablePart(aBuilder, this, aLists); } nsMargin |