Issue #146 - Part 3: Create nsDisplayTableFixedPosition to avoid display

list collisions when processing the background image of a table.
This commit is contained in:
wolfbeast 2019-11-03 15:12:34 +01:00 committed by Roy Tam
commit c8aaad0428
3 changed files with 108 additions and 8 deletions

View file

@ -1194,13 +1194,14 @@ PaintRowBackground(nsTableRowFrame* aRow,
const nsDisplayListSet& aLists,
const nsPoint& aOffset = nsPoint())
{
// Compute background rect by iterating all cell frame.
// Compute background rect by iterating over all cell frames.
for (nsTableCellFrame* cell = aRow->GetFirstCell(); cell; cell = cell->GetNextCell()) {
auto cellRect = cell->GetRectRelativeToSelf() + cell->GetNormalPosition() + aOffset;
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect,
aLists.BorderBackground(),
true, nullptr,
aFrame->GetRectRelativeToSelf());
aFrame->GetRectRelativeToSelf(),
cell);
}
}
@ -1232,7 +1233,8 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup,
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect,
aLists.BorderBackground(),
true, nullptr,
aFrame->GetRectRelativeToSelf());
aFrame->GetRectRelativeToSelf(),
cell);
}
}
}