WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
142734
:not(:link) and :not(:visited) don't match <a name="foo">
https://bugs.webkit.org/show_bug.cgi?id=142734
Summary
:not(:link) and :not(:visited) don't match <a name="foo">
Adam Roben (:aroben)
Reported
2015-03-16 10:52:19 PDT
1. Go to data:text/html,<style>a { color: red } a:not(:link) { color: green }</style><a name="foo">should be green</a> In Chrome and Firefox, the text is green. In Safari 8.0.3 on Yosemite, it is red. (I haven't tested other versions/OSes.)
Attachments
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2015-03-16 11:02:18 PDT
Looks like :not(:visited) also does not match <a name="foo">. Try with this URL: data:text/html,<style>a { color: red } a:not(:visited) { color: green }</style><a name="foo">should be green</a>
Benjamin Poulain
Comment 2
2015-03-16 11:14:22 PDT
We removed support for :link and :visited inside :not() when we extended :not() to Level 4.
Benjamin Poulain
Comment 3
2015-03-16 11:18:42 PDT
I should probably explain why a bit :) Previously, we could find out statically if a selector applies to :link or :visited. Since we added support for nested selector lists, it is no longer possible to know the "link-state" of a selector until it is matched. Because of the privacy risks involved with dynamic resolution, we decided against it. If you have good use cases for it, we can look into adding support back. But that's gonna be weeks of work.
Adam Roben (:aroben)
Comment 4
2015-03-16 11:22:55 PDT
I don't have a use case for this at the moment. I just noticed it while working on filing
bug 142737
. I'd be OK with closing this.
Benjamin Poulain
Comment 5
2015-03-16 11:34:27 PDT
(In reply to
comment #4
)
> I don't have a use case for this at the moment. I just noticed it while > working on filing
bug 142737
. I'd be OK with closing this.
Let's keep the bug report open, it is a valid bug, just not very high priority right now.
Ahmad Saleem
Comment 6
2022-07-24 10:43:53 PDT
I changed the test cases into below:
Comment 0
- JSFiddle -
https://jsfiddle.net/hbm41689/show
Comment 1
- JSFiddle -
https://jsfiddle.net/v7z84sp3/show
In both above, all browsers (Chrome Canary 106, Firefox Nightly 104 and Safari 15.6 on macOS 12.5 show the text as "GREEN". Since all browsers are matching each other, I think this can be marked as "RESOLVED WONTFIX" or "RESOLVED CONFIGURATION CHANGED" etc., if I am testing incorrectly or web-spec dictates something else then please retest accordingly. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug