From 1d7c011e9b25a845c76fbac7306ac556cc085fb4 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Mon, 20 May 2019 23:15:19 +0000 Subject: [PATCH] Bug 1409114 - Part 5: Skip box-shadow for table column and column groups. r=dbaron This is a behaviour change, but I believe it matches the quoted spec text, and neither blink nor WebKit render these. Differential Revision: https://phabricator.services.mozilla.com/D29276 --HG-- extra : moz-landing-system : lando --- layout/tables/nsTableColFrame.cpp | 13 +++++-------- layout/tables/nsTableColGroupFrame.cpp | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index f1436a3842d4..47004f0c21ea 100644 --- a/layout/tables/nsTableColFrame.cpp +++ b/layout/tables/nsTableColFrame.cpp @@ -114,7 +114,11 @@ void nsTableColFrame::Reflow(nsPresContext* aPresContext, void nsTableColFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) { - DisplayOutsetBoxShadow(aBuilder, aLists.BorderBackground()); + // Per https://drafts.csswg.org/css-tables-3/#global-style-overrides: + // "All css properties of table-column and table-column-group boxes are + // ignored, except when explicitly specified by this specification." + // CSS outlines and box-shadows fall into this category, so we skip them + // on these boxes. // Compute background rect by iterating all cell frame. AutoTArray colIdx; @@ -134,13 +138,6 @@ void nsTableColFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, offset); } - DisplayInsetBoxShadow(aBuilder, aLists.BorderBackground()); - - // Per https://drafts.csswg.org/css-tables-3/#global-style-overrides: - // "All css properties of table-column and table-column-group boxes are - // ignored, except when explicitly specified by this specification." - // CSS outlines fall into this category, so we skip them on these boxes. - for (nsIFrame* kid : PrincipalChildList()) { BuildDisplayListForChild(aBuilder, kid, aLists); } diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 8009d9caa38d..74336abcb2d4 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -352,7 +352,11 @@ void nsTableColGroupFrame::Reflow(nsPresContext* aPresContext, void nsTableColGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) { - DisplayOutsetBoxShadow(aBuilder, aLists.BorderBackground()); + // Per https://drafts.csswg.org/css-tables-3/#global-style-overrides: + // "All css properties of table-column and table-column-group boxes are + // ignored, except when explicitly specified by this specification." + // CSS outlines and box-shadows fall into this category, so we skip them + // on these boxes. // Collecting column index. AutoTArray colIdx; @@ -378,13 +382,6 @@ void nsTableColGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } } - DisplayInsetBoxShadow(aBuilder, aLists.BorderBackground()); - - // Per https://drafts.csswg.org/css-tables-3/#global-style-overrides: - // "All css properties of table-column and table-column-group boxes are - // ignored, except when explicitly specified by this specification." - // CSS outlines fall into this category, so we skip them on these boxes. - for (nsIFrame* kid : PrincipalChildList()) { BuildDisplayListForChild(aBuilder, kid, aLists); }