diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-04 08:41:04 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-04 08:41:48 +0100 |
commit | bbc2206a0fda053a6f5071b457bd209dab9ed268 (patch) | |
tree | 8dae72f2c725e512dfcfca5ba4f4062dd98d1cdd /layout/tables/nsTableRowGroupFrame.cpp | |
parent | 22b410f31b0fc61a0a99522fe2aea1a31823bd99 (diff) | |
parent | ee8c5d3878456b4e194dc3724616d194907ed466 (diff) | |
download | UXP-bbc2206a0fda053a6f5071b457bd209dab9ed268.tar UXP-bbc2206a0fda053a6f5071b457bd209dab9ed268.tar.gz UXP-bbc2206a0fda053a6f5071b457bd209dab9ed268.tar.lz UXP-bbc2206a0fda053a6f5071b457bd209dab9ed268.tar.xz UXP-bbc2206a0fda053a6f5071b457bd209dab9ed268.zip |
Merge branch 'table-sticky-work'
This resolves #146.
Diffstat (limited to 'layout/tables/nsTableRowGroupFrame.cpp')
-rw-r--r-- | layout/tables/nsTableRowGroupFrame.cpp | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 8f014b204..3e4f60f62 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -154,46 +154,6 @@ nsTableRowGroupFrame::InitRepeatedFrame(nsTableRowGroupFrame* aHeaderFooterFrame return NS_OK; } -/** - * 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 nsDisplayTableRowGroupBackground : public nsDisplayTableItem { -public: - nsDisplayTableRowGroupBackground(nsDisplayListBuilder* aBuilder, - nsTableRowGroupFrame* aFrame) : - nsDisplayTableItem(aBuilder, aFrame) { - MOZ_COUNT_CTOR(nsDisplayTableRowGroupBackground); - } -#ifdef NS_BUILD_REFCNT_LOGGING - virtual ~nsDisplayTableRowGroupBackground() { - MOZ_COUNT_DTOR(nsDisplayTableRowGroupBackground); - } -#endif - - virtual void Paint(nsDisplayListBuilder* aBuilder, - nsRenderingContext* aCtx) override; - - NS_DISPLAY_DECL_NAME("TableRowGroupBackground", TYPE_TABLE_ROW_GROUP_BACKGROUND) -}; - -void -nsDisplayTableRowGroupBackground::Paint(nsDisplayListBuilder* aBuilder, - nsRenderingContext* aCtx) -{ - auto rgFrame = static_cast<nsTableRowGroupFrame*>(mFrame); - TableBackgroundPainter painter(rgFrame->GetTableFrame(), - TableBackgroundPainter::eOrigin_TableRowGroup, - mFrame->PresContext(), *aCtx, - mVisibleRect, ToReferenceFrame(), - aBuilder->GetBackgroundPaintFlags()); - - DrawResult result = painter.PaintRowGroup(rgFrame); - nsDisplayTableItemGeometry::UpdateDrawResult(this, result); -} - // Handle the child-traversal part of DisplayGenericTablePart static void DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame, @@ -249,19 +209,8 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { - nsDisplayTableItem* item = nullptr; - if (IsVisibleInSelection(aBuilder)) { - bool isRoot = aBuilder->IsAtRootOfPseudoStackingContext(); - if (isRoot) { - // This background is created regardless of whether this frame is - // visible or not. Visibility decisions are delegated to the - // table background painter. - item = new (aBuilder) nsDisplayTableRowGroupBackground(aBuilder, this); - aLists.BorderBackground()->AppendNewToTop(item); - } - } nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, - aLists, item, DisplayRows); + aLists, DisplayRows); } nsIFrame::LogicalSides |