Bug 259063

Summary: `currentColor` in `color-mix()` ignores selectors with `:visited` pseudo-class
Product: WebKit Reporter: Niklas Ljunglöf <slipped-gazette.0w>
Component: CSSAssignee: Matthieu Dubet <m_dubet>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, heycam, koivisto, m_dubet, simon.fraser, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/41707
Attachments:
Description Flags
Testcase
none
Testcase none

Description Niklas Ljunglöf 2023-07-10 11:57:43 PDT
How to reproduce:

```
a {
  background-color: white;

  &:link { color: navy };
  &:visited { color: firebrick };

  &:hover {
    background-color: color-mix(in srgb, currentColor, white 75%);
  };
}
```

Currently with this code, `currentColor` inherits `navy` instead of the expected `firebrick`. I know these pseudo-classes come with several restrictions due to privacy concerns, however I don't think they are relevant here since `currentColor` works as expected when not using `color-mix()`. Furthermore this issue does not seem to occur in Chrome or Firefox.
Comment 1 Radar WebKit Bug Importer 2023-07-17 11:58:18 PDT
<rdar://problem/112419198>
Comment 2 Tim Nguyen (:ntim) 2023-08-21 09:11:02 PDT
Created attachment 467368 [details]
Testcase
Comment 3 Tim Nguyen (:ntim) 2023-08-21 09:12:37 PDT
Created attachment 467369 [details]
Testcase
Comment 4 Matthieu Dubet 2023-08-22 07:03:42 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16928
Comment 5 EWS 2023-08-25 02:24:10 PDT
Committed 267271@main (7b938d011b0e): <https://commits.webkit.org/267271@main>

Reviewed commits have been landed. Closing PR #16928 and removing active labels.