Use the appropriate color based on visitedness for '-moz-column-rule-color'. (Bug 557580) r=roc

This commit is contained in:
L. David Baron 2010-04-06 19:03:12 -07:00
parent 34a3f166a8
commit 44fc00f5f0
5 changed files with 37 additions and 5 deletions

View File

@ -245,11 +245,8 @@ nsColumnSetFrame::PaintColumnRule(nsIRenderingContext* aCtx,
if (!ruleWidth)
return;
nscolor ruleColor;
if (colStyle->mColumnRuleColorIsForeground)
ruleColor = GetStyleColor()->mColor;
else
ruleColor = colStyle->mColumnRuleColor;
nscolor ruleColor =
GetVisitedDependentColor(eCSSProperty__moz_column_rule_color);
// In order to re-use a large amount of code, we treat the column rule as a border.
// We create a new border style object and fill in all the details of the column rule as

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<title>Test for privacy restrictions on :visited (Bug 147777)</title>
<style type="text/css">
div { margin: 8px; -moz-column-count: 2; }
#link { -moz-column-rule: medium dotted blue; }
#visited { -moz-column-rule: medium dotted black; }
</style>
<div id="link">unvisited<br>link</div>
<div id="visited">visited<br>link</div>

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<title>Test for privacy restrictions on :visited (Bug 147777)</title>
<style type="text/css">
div { margin: 8px; -moz-column-count: 2; }
#link { -moz-column-rule: medium dotted blue; }
#visited { -moz-column-rule: medium dotted silver; }
</style>
<div id="link">unvisited<br>link</div>
<div id="visited">visited<br>link</div>

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<title>Test for privacy restrictions on :visited (Bug 147777)</title>
<style type="text/css">
a { text-decoration: none; color: -moz-initial; display: block; margin: 8px; -moz-column-count: 2; }
:link { -moz-column-rule: medium dotted blue; }
:visited { -moz-column-rule: thick dashed silver; }
</style>
<a href="unvisited-page.html">unvisited<br>link</a>
<a href="visited-page.html">visited<br>link</a>

View File

@ -59,6 +59,8 @@ var gTests = [
// the asynchronous restyle-from-history arrives.
//"== border-collapse-1.html border-collapse-1-ref.html",
"== outline-1.html outline-1-ref.html",
"== column-rule-1.html column-rule-1-ref.html",
"!= column-rule-1.html column-rule-1-notref.html",
"== color-choice-1.html color-choice-1-ref.html",
"== selector-descendant-1.html selector-descendant-1-ref.html",
"== selector-descendant-2.xhtml selector-descendant-2-ref.xhtml",