From 98a16ed07eb009082861381a3b90b58538a43e90 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 1 Oct 2013 11:30:06 +1000 Subject: [PATCH] Bug 921716 - Don't paint column rules when element is visibility:hidden. r=sjohnson --- layout/generic/nsColumnSetFrame.cpp | 6 ++++-- layout/reftests/bugs/921716-1-ref.html | 11 +++++++++++ layout/reftests/bugs/921716-1.html | 17 +++++++++++++++++ layout/reftests/bugs/reftest.list | 1 + 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 layout/reftests/bugs/921716-1-ref.html create mode 100644 layout/reftests/bugs/921716-1.html diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index a4422666460..9bb059e56b2 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -1039,10 +1039,12 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) { DisplayBorderBackgroundOutline(aBuilder, aLists); - aLists.BorderBackground()->AppendNewToTop(new (aBuilder) + if (IsVisibleForPainting(aBuilder)) { + aLists.BorderBackground()->AppendNewToTop(new (aBuilder) nsDisplayGenericOverflow(aBuilder, this, ::PaintColumnRule, "ColumnRule", nsDisplayItem::TYPE_COLUMN_RULE)); - + } + // Our children won't have backgrounds so it doesn't matter where we put them. for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) { BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists); diff --git a/layout/reftests/bugs/921716-1-ref.html b/layout/reftests/bugs/921716-1-ref.html new file mode 100644 index 00000000000..8d0aae80bf6 --- /dev/null +++ b/layout/reftests/bugs/921716-1-ref.html @@ -0,0 +1,11 @@ + + +
+ This is some content that is still shown within the columns. +
diff --git a/layout/reftests/bugs/921716-1.html b/layout/reftests/bugs/921716-1.html new file mode 100644 index 00000000000..6dbef08bcd2 --- /dev/null +++ b/layout/reftests/bugs/921716-1.html @@ -0,0 +1,17 @@ + + +
+ This is some content that is still shown within the columns. +
diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index fb9a266030e..ea6f4a632bd 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1776,3 +1776,4 @@ test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html == 897491-2.html 897491-2-ref.html fuzzy(1,10000) fuzzy-if(Android&&AndroidVersion>=15,5,10000) == 902330-1.html 902330-1-ref.html fuzzy-if(Android,8,400) == 906199-1.html 906199-1-ref.html +== 921716-1.html 921716-1-ref.html