Bug 921716 - Don't paint column rules when element is visibility:hidden. r=sjohnson

This commit is contained in:
Cameron McCormack 2013-10-01 11:30:06 +10:00
parent 12cddaaa9d
commit 98a16ed07e
4 changed files with 33 additions and 2 deletions

View File

@ -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);

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<style>
div {
-moz-column-count: 3;
-moz-column-gap: 8px;
width: 300px;
}
</style>
<div>
<span>This is some content that is still shown within the columns.</span>
</div>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<style>
div {
-moz-column-count: 3;
-moz-column-gap: 8px;
-moz-column-rule: thick solid red;
visibility: hidden;
width: 300px;
background-color: #fcc;
}
span {
visibility: visible;
}
</style>
<div>
<span>This is some content that is still shown within the columns.</span>
</div>

View File

@ -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