Bug 1867252 - Remove no-longer-used ns[BC]TableCellFrame::PaintBackground method. r=layout-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D194977
This commit is contained in:
Jonathan Kew
2023-11-29 12:47:26 +00:00
parent 380077385c
commit 3e50d5d818
2 changed files with 0 additions and 44 deletions

View File

@@ -311,16 +311,6 @@ void nsTableCellFrame::DecorateForSelection(DrawTarget* aDrawTarget,
}
}
ImgDrawResult nsTableCellFrame::PaintBackground(gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
nsPoint aPt, uint32_t aFlags) {
nsRect rect(aPt, GetSize());
nsCSSRendering::PaintBGParams params =
nsCSSRendering::PaintBGParams::ForAllLayers(*PresContext(), aDirtyRect,
rect, this, aFlags);
return nsCSSRendering::PaintStyleImageLayer(params, aRenderingContext);
}
void nsTableCellFrame::ProcessBorders(nsTableFrame* aFrame,
nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) {
@@ -976,32 +966,6 @@ nsMargin nsBCTableCellFrame::GetBorderOverflow() {
return halfBorder.GetPhysicalMargin(wm);
}
ImgDrawResult nsBCTableCellFrame::PaintBackground(gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
nsPoint aPt,
uint32_t aFlags) {
// make border-width reflect the half of the border-collapse
// assigned border that's inside the cell
WritingMode wm = GetWritingMode();
nsMargin borderWidth = GetBorderWidth(wm).GetPhysicalMargin(wm);
nsStyleBorder myBorder(*StyleBorder());
const auto a2d = PresContext()->AppUnitsPerDevPixel();
for (const auto side : mozilla::AllPhysicalSides()) {
myBorder.SetBorderWidth(side, borderWidth.Side(side), a2d);
}
// bypassing nsCSSRendering::PaintBackground is safe because this kind
// of frame cannot be used for the root element
nsRect rect(aPt, GetSize());
nsCSSRendering::PaintBGParams params =
nsCSSRendering::PaintBGParams::ForAllLayers(*PresContext(), aDirtyRect,
rect, this, aFlags);
return nsCSSRendering::PaintStyleImageLayerWithSC(params, aRenderingContext,
Style(), myBorder);
}
namespace mozilla {
class nsDisplayTableCellSelection final : public nsPaintedDisplayItem {