:visited selector always matches when used inside ::slotted
Reported by
tomalec...@gmail.com,
Feb 2 2018
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Example URL: http://jsbin.com/wizodax/2/edit?html,output Steps to reproduce the problem: 1. Create a shadow host, and `<a>` element inside, make `<a>` point to location never visited before 2. Attach Shadow Root to host element, 3. Add style to shadow root, with a rule `::slotted(a:visited){color: red;}` http://jsbin.com/wizodax/2/edit?html,output What is the expected behavior? link should be in default color. What went wrong? link is red, as `:visited` matches even though page was never visited before. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? N/A Chrome version: 63.0.3239.132 Channel: stable OS Version: 10.0 Flash Version:
,
Feb 5 2018
Firefox (Nightly, 60.0a1 (2018-02-04), with Shadow DOM flag enabled) supports this case as expected - http://jsbin.com/wizodax/4/edit?html,output
,
Feb 5 2018
,
Feb 5 2018
,
Feb 6 2018
,
Feb 6 2018
,
Feb 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6046b2ee9ada67bd73ec1dd619a2f5a134c4c6af commit 6046b2ee9ada67bd73ec1dd619a2f5a134c4c6af Author: Rune Lillesveen <futhark@chromium.org> Date: Tue Feb 13 10:48:37 2018 Handle ::slotted in ComputeLinkMatchType. We skipped the selector list for ::slotted looking for :visited and :link pseudo classes and ended up applying such rules with both :visited and :link style. Bug: 808392 Change-Id: I85956902f3ca9cea01c96ef5c56ccf7f0ee23671 Reviewed-on: https://chromium-review.googlesource.com/904903 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#536328} [add] https://crrev.com/6046b2ee9ada67bd73ec1dd619a2f5a134c4c6af/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-link.html [modify] https://crrev.com/6046b2ee9ada67bd73ec1dd619a2f5a134c4c6af/third_party/WebKit/Source/core/css/CSSSelector.cpp [modify] https://crrev.com/6046b2ee9ada67bd73ec1dd619a2f5a134c4c6af/third_party/WebKit/Source/core/css/CSSSelector.h [modify] https://crrev.com/6046b2ee9ada67bd73ec1dd619a2f5a134c4c6af/third_party/WebKit/Source/core/css/RuleSet.cpp
,
Feb 13 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by krajshree@chromium.org
, Feb 4 2018