mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1409787. Guard against empty column groups when building a display list for a table. r=mats
MozReview-Commit-ID: E31B1wqNbSu
This commit is contained in:
parent
94111c6b58
commit
e26873e5cf
@ -1557,15 +1557,18 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
||||
colIdx.AppendElement(col->GetColIndex());
|
||||
}
|
||||
|
||||
nsTableFrame* table = colGroup->GetTableFrame();
|
||||
RowGroupArray rowGroups;
|
||||
table->OrderRowGroups(rowGroups);
|
||||
for (nsTableRowGroupFrame* rowGroup : rowGroups) {
|
||||
auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition();
|
||||
if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
|
||||
continue;
|
||||
if (!colIdx.IsEmpty()) {
|
||||
// We have some actual cells that live inside this rowgroup.
|
||||
nsTableFrame* table = colGroup->GetTableFrame();
|
||||
RowGroupArray rowGroups;
|
||||
table->OrderRowGroups(rowGroups);
|
||||
for (nsTableRowGroupFrame* rowGroup : rowGroups) {
|
||||
auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition();
|
||||
if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
|
||||
continue;
|
||||
}
|
||||
PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
|
||||
}
|
||||
PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
|
||||
}
|
||||
} else if (aFrame->IsTableColFrame()) {
|
||||
// Compute background rect by iterating all cell frame.
|
||||
|
Loading…
Reference in New Issue
Block a user