Open Bug 559612 Opened 10 years ago Updated 10 years ago

:visited doesn't work on first-letter styles unless unvisited links also specify the first-letter style

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set

Tracking

()

People

(Reporter: hyatt, Unassigned)

References

Details

(Keywords: regression, testcase)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.21.11 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
Build Identifier: 

:visited on first-letter styles fails to be honored if there isn't a first-letter style also in effect for the unvisited link.


Reproducible: Always

Steps to Reproduce:
Test case:

<style>
span { display: block }
a { display:block }

:visited > span:first-letter {
  color:orange
}
</style>
<body>
<p>The H in the word hello below should be orange for a visited link.</p>

<a href=""><span>Hello</span></a>
This is a regression from David Baron's fix for the history privacy leak.
Blocks: 147777
Keywords: regression, testcase
Status: UNCONFIRMED → NEW
Ever confirmed: true
Actually this first regressed when we made visited checks async (bug 461199) because we don't handle dynamically applied first-letter styles (bug 8253). The history privacy leak fix would still prevent this from working with the patch in bug 8253.
Broken in WebKit too.  Here's the corresponding bug:

https://bugs.webkit.org/show_bug.cgi?id=37669
Depends on: 8253
I would consider this expected behavior following the privacy fix; whether or not a pseudo-element is present should not change as a result of whether a link is in history, since whether a pseudo-element is present is likely detectable through various mechanisms.  I suppose I should make this clearer in http://dbaron.org/mozilla/visited-privacy
You need to log in before you can comment on or make changes to this bug.