Bug 254691 - [CSS4 Color] [CSS4 Pseudo] getSelection() color and background color should match system color highlights
Summary: [CSS4 Color] [CSS4 Pseudo] getSelection() color and background color should m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://www.gtalbot.org/BrowserBugsSec...
Keywords: BrowserCompat, HasReduction, InRadar, W3CTest
Depends on:
Blocks:
 
Reported: 2023-03-29 14:30 PDT by Gérard Talbot (no longer involved)
Modified: 2023-08-14 08:06 PDT (History)
6 users (show)

See Also:


Attachments
rendering in safari, firefox, chrome (257.46 KB, image/png)
2023-03-29 19:09 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot (no longer involved) 2023-03-29 14:30:53 PDT
Test:
http://www.gtalbot.org/BrowserBugsSection/CSS4Color/system-color-hightlights-vs-getSelection-001.html

Reference file:
http://www.gtalbot.org/BrowserBugsSection/CSS4Color/reference/system-color-hightlights-vs-getSelection-001-ref.html


CSS4 Color specification states:

  Highlight
      Background of item(s) selected in a control.
  https://www.w3.org/TR/css-color-4/#valdef-system-color-highlight

  HighlightText
      Text of item(s) selected in a control.
  https://www.w3.org/TR/css-color-4/#valdef-system-color-highlighttext

Firefox 102.9.0 ESR passes this test.

Epiphany 3.38.2 using WebKitGTK 2.38.5 fails this test.

Right now, there is no WPT test checking specifically this.

Chromium (Blink) equivalent bug report:
https://bugs.chromium.org/p/chromium/issues/detail?id=1429019
Comment 1 Karl Dubost 2023-03-29 19:09:05 PDT
Created attachment 465671 [details]
rendering in safari, firefox, chrome

Rendering with the reference and test in 3 browsers.
Comment 2 Gérard Talbot (no longer involved) 2023-03-30 05:06:41 PDT
Karl,

Your screenshot is very useful and interesting. I can see many differences; some are small but nevertheless there are differences.

Firefox under Linux (I can upload a screenshot if needed, if requested) renders the test quite differently from Firefox under Mac; it's not just colors but also line spacing (white areas) and height of background painting.  

Chrome under Mac and Chrome under Linux will select the <br> element; Safari and Firefox under Linux and Mac do not do that.
Comment 3 Radar WebKit Bug Importer 2023-04-05 14:31:15 PDT
<rdar://problem/107678370>
Comment 4 Gérard Talbot (no longer involved) 2023-04-12 15:54:38 PDT
WPT test result:
https://wpt.fyi/results/css/css-color/system-color-hightlights-vs-getSelection-001.html
Comment 5 Gérard Talbot (no longer involved) 2023-08-14 08:06:08 PDT
The original test has been split into 2 separate, distinct tests. Apparently, Safari 175 Technological Preview on macOS 13.5 passes both tests:

https://wpt.fyi/results/css/css-color/system-color-hightlights-vs-getSelection-001.html?label=experimental&label=master&aligned

https://wpt.fyi/results/css/css-color/system-color-hightlights-vs-getSelection-002.html?label=experimental&label=master&aligned

Therefore

Resolving as FIXED