Skip to content

Commit

Permalink
[text-decorations] Add & enable flag to disable text-decoration override
Browse files Browse the repository at this point in the history
This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
  • Loading branch information
bfgeek authored and chromium-wpt-export-bot committed Dec 1, 2022
1 parent b763d6d commit f8379e0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<link rel=match href=001-ref.html>
<title>The font element text decoration color quirk, 001, almost standards mode</title>
<style>[id] > * { color:fuchsia }</style>
<div>Quirk should apply:</div>
<div>Quirks should not apply:</div>
<div><u>foo <font style="color:fuchsia">style</font> bar</u></div>
<div><u>foo <font color="fuchsia">color</font> bar</u></div>
<div><u>foo <font color="fuchsia" style="color:fuchsia">color and style</font> bar</u></div>
Expand All @@ -12,7 +12,6 @@
<div><u>foo <font style="display:block; color:fuchsia">block</font> bar</u></div>
<div><s>foo <font color="fuchsia">line-through</font> bar</s></div>
<div><u style="text-decoration:overline">foo <font color="fuchsia">overline</font> bar</u></div>
<div>Quirks should not apply:</div>
<div><u>foo <span style="color:fuchsia">span</span> bar</u></div>
<div><u id="no-namespace">FAIL (script didn't run)</u></div>
<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<link rel=match href=001-ref.html>
<title>The font element text decoration color quirk, 001, quirks mode</title>
<style>[id] > * { color:fuchsia }</style>
<div>Quirk should apply:</div>
<div>Quirks should not apply:</div>
<div><u>foo <font style="color:fuchsia">style</font> bar</u></div>
<div><u>foo <font color="fuchsia">color</font> bar</u></div>
<div><u>foo <font color="fuchsia" style="color:fuchsia">color and style</font> bar</u></div>
Expand All @@ -11,7 +11,6 @@
<div><u>foo <font style="display:block; color:fuchsia">block</font> bar</u></div>
<div><s>foo <font color="fuchsia">line-through</font> bar</s></div>
<div><u style="text-decoration:overline">foo <font color="fuchsia">overline</font> bar</u></div>
<div>Quirks should not apply:</div>
<div><u>foo <span style="color:fuchsia">span</span> bar</u></div>
<div><u id="no-namespace">FAIL (script didn't run)</u></div>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
.over { text-decoration:overline }
.strike { text-decoration:line-through }
</style>
<div>Quirk should apply:</div>
<div><u>foo </u><span class="under">style</span><u> bar</u></div>
<div><u>foo </u><span class="under">color</span><u> bar</u></div>
<div><u>foo </u><span class="under">color and style</span><u> bar</u></div>
<div><u>foo </u><span class="under">color=x and style</span><u> bar</u></div>
<div><u>foo </u><span class="under">color=transparent and style</span><u> bar</u></div>
<div><u>foo </u><span class="under">color="" and style</span><u> bar</u></div>
<div><u>foo</u><div class="under">block</div><u>bar</u></div>
<div><s>foo </s><span class="strike">line-through</span><s> bar</s></div>
<div><u class="over">foo </u><span class="over">overline</span><u class="over"> bar</u></div>
<div>Quirks should not apply:</div>
<div><u>foo <span>span</span> bar</u></div>
<div><u>foo <span>no-namespace font element</span> bar</u></div>
<div><u>foo <span>uppercase FONT element</span> bar</u></div>
<div class="under">foo <span>style</span> bar</div>
<div class="under">foo <span>color</span> bar</div>
<div class="under">foo <span>color and style</span> bar</div>
<div class="under">foo <span>color=x and style</span> bar</div>
<div class="under">foo <span>color=transparent and style</span> bar</div>
<div class="under">foo <span>color="" and style</span> bar</div>
<div class="under">foo<div>block</div>bar</div>
<div class="strike">foo <span>line-through</span> bar</div>
<div class="over">foo <span>overline</span> bar</div>
<div class="under">foo <span>span</span> bar</div>
<div class="under">foo <span>no-namespace font element</span> bar</div>
<div class="under">foo <span>uppercase FONT element</span> bar</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<link rel=match href=001-ref.html>
<title>The font element text decoration color quirk, 001, standards mode</title>
<style>[id] > * { color:fuchsia }</style>
<div>Quirk should apply:</div>
<div>Quirks should not apply:</div>
<div><u>foo <font style="color:fuchsia">style</font> bar</u></div>
<div><u>foo <font color="fuchsia">color</font> bar</u></div>
<div><u>foo <font color="fuchsia" style="color:fuchsia">color and style</font> bar</u></div>
Expand All @@ -12,7 +12,6 @@
<div><u>foo <font style="display:block; color:fuchsia">block</font> bar</u></div>
<div><s>foo <font color="fuchsia">line-through</font> bar</s></div>
<div><u style="text-decoration:overline">foo <font color="fuchsia">overline</font> bar</u></div>
<div>Quirks should not apply:</div>
<div><u>foo <span style="color:fuchsia">span</span> bar</u></div>
<div><u id="no-namespace">FAIL (script didn't run)</u></div>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style>[id] > * { color:fuchsia }</style>
</head>
<body>
<div>Quirk should apply:</div>
<div>Quirks should not apply:</div>
<div><u>foo <font style="color:fuchsia">style</font> bar</u></div>
<div><u>foo <font color="fuchsia">color</font> bar</u></div>
<div><u>foo <font color="fuchsia" style="color:fuchsia">color and style</font> bar</u></div>
Expand All @@ -15,7 +15,6 @@
<div><u>foo <font style="display:block; color:fuchsia">block</font> bar</u></div>
<div><s>foo <font color="fuchsia">line-through</font> bar</s></div>
<div><u style="text-decoration:overline">foo <font color="fuchsia">overline</font> bar</u></div>
<div>Quirks should not apply:</div>
<div><u>foo <span style="color:fuchsia">span</span> bar</u></div>
<div><u id="no-namespace">foo <font xmlns="">no-namespace font element</font> bar</u></div>
<div><u id="uppercase">foo <FONT>uppercase FONT element</FONT> bar</u></div>
Expand Down

0 comments on commit f8379e0

Please sign in to comment.