diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-02 23:07:40 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-02 23:10:06 +0100 |
commit | 0de40040f006c493feeff7d688c169b904b8a22e (patch) | |
tree | 2a2e856ce590fcea6523f029644d5010da151a47 /layout/tables/nsTableRowFrame.cpp | |
parent | 145527207538b6ee1018cb77e6705912c29f8a9f (diff) | |
download | UXP-0de40040f006c493feeff7d688c169b904b8a22e.tar UXP-0de40040f006c493feeff7d688c169b904b8a22e.tar.gz UXP-0de40040f006c493feeff7d688c169b904b8a22e.tar.lz UXP-0de40040f006c493feeff7d688c169b904b8a22e.tar.xz UXP-0de40040f006c493feeff7d688c169b904b8a22e.zip |
Issue #146 - Part 2: Remove custom table painting component.
Since we're now putting table borders and backgrounds properly in the
display lists, we no longer need this custom component to do this work
for us.
Diffstat (limited to 'layout/tables/nsTableRowFrame.cpp')
-rw-r--r-- | layout/tables/nsTableRowFrame.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index dc053c991..05b9deee9 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -561,45 +561,6 @@ nsTableRowFrame::CalcBSize(const ReflowInput& aReflowInput) return GetInitialBSize(); } -/** - * We need a custom display item for table row backgrounds. This is only used - * when the table row is the root of a stacking context (e.g., has 'opacity'). - * Table row backgrounds can extend beyond the row frame bounds, when - * the row contains row-spanning cells. - */ -class nsDisplayTableRowBackground : public nsDisplayTableItem { -public: - nsDisplayTableRowBackground(nsDisplayListBuilder* aBuilder, - nsTableRowFrame* aFrame) : - nsDisplayTableItem(aBuilder, aFrame) { - MOZ_COUNT_CTOR(nsDisplayTableRowBackground); - } -#ifdef NS_BUILD_REFCNT_LOGGING - virtual ~nsDisplayTableRowBackground() { - MOZ_COUNT_DTOR(nsDisplayTableRowBackground); - } -#endif - - virtual void Paint(nsDisplayListBuilder* aBuilder, - nsRenderingContext* aCtx) override; - NS_DISPLAY_DECL_NAME("TableRowBackground", TYPE_TABLE_ROW_BACKGROUND) -}; - -void -nsDisplayTableRowBackground::Paint(nsDisplayListBuilder* aBuilder, - nsRenderingContext* aCtx) -{ - auto rowFrame = static_cast<nsTableRowFrame*>(mFrame); - TableBackgroundPainter painter(rowFrame->GetTableFrame(), - TableBackgroundPainter::eOrigin_TableRow, - mFrame->PresContext(), *aCtx, - mVisibleRect, ToReferenceFrame(), - aBuilder->GetBackgroundPaintFlags()); - - DrawResult result = painter.PaintRow(rowFrame); - nsDisplayTableItemGeometry::UpdateDrawResult(this, result); -} - void nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, |