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
Родитель 9f93650251
Коммит f5c9e52253
5 изменённых файлов: 37 добавлений и 5 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -59,6 +59,8 @@ var gTests = [
// the asynchronous restyle-from-history arrives. // the asynchronous restyle-from-history arrives.
//"== border-collapse-1.html border-collapse-1-ref.html", //"== border-collapse-1.html border-collapse-1-ref.html",
"== outline-1.html outline-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", "== color-choice-1.html color-choice-1-ref.html",
"== selector-descendant-1.html selector-descendant-1-ref.html", "== selector-descendant-1.html selector-descendant-1-ref.html",
"== selector-descendant-2.xhtml selector-descendant-2-ref.xhtml", "== selector-descendant-2.xhtml selector-descendant-2-ref.xhtml",