Bug 23760 - CSS2 System Colors are not correct in WebKit
Summary: CSS2 System Colors are not correct in WebKit
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://www.gixx-web.eu/system.html
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 06:23 PST by Gabor Ivan
Modified: 2023-11-02 14:59 PDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Ivan 2009-02-05 06:23:43 PST
Hello,

I develop a desktop application in Adobe AIR which uses WebKit engine for displaying HTML content. My problem is that the WebKit seems to use predefined, fix values for CSS2 System Colors instead of truly looking for the OS's system colors.

From more information on the CSS2 System Colors, please visit: http://www.w3.org/TR/css3-color/#css2-system

However it is deprecated, and the CSS3 appearance property should be used instead, but until that CSS3 property (http://www.w3.org/TR/2003/WD-css3-ui-20030703/#appearance) is supported, it would be great if the System Colors were handled correctly.

I've checked this "bug" not just with Adobe AIR applications but also with the latest WebKit nightly build, as well as Safari (both PC and MacOSX versions) and Google Chrome. 

IE (6+), Firefox and Opera return with the correct results. 

I've made a "See it yourself" test page to demonstrate the problem, and also made a report page with screenshots of different desktop theme behave (linked on the test page): http://www.gixx-web.eu/system.html

I'm looking forward your answer.


Yours sincerely,
Gabor Ivan
from Hungary
Comment 1 Mark Rowe (bdash) 2009-02-05 07:21:22 PST
This appears to behave closer to what is expected in Safari on Mac.  The incorrect behaviour on Windows is probably due to RenderThemeSafari not overriding the default hard-coded list of system colors that RenderTheme provides.  It should be querying the system for color information.
Comment 2 Peter Kasting 2009-09-22 14:09:54 PDT
Note that RenderThemeWin.cpp has some override code.  Not sure who uses that but it could probably at least be copied into RenderThemeSafari.
Comment 4 George Weilenmann 2022-02-15 21:07:49 PST
CSS2 System Colors were officially deprecated in the CSS Color Module Level 3 Candidate Recommendation on 14 May 2003 as these are deprecated and there are properties that are defined in CSS UI Level 3 and some System Colors are redefined or added in the CSS Color Module Level 4 Working Draft 5 November 2019.

IMO, this issue can either be closed as it pertains to a deprecated feature from CSS2 or it can be addressed after CSS Color Module Level 4 becomes a Candidate Recommendation. 

The previous link showing the issue is now a dead link.
Comment 5 Ahmad Saleem 2023-10-28 16:18:49 PDT
@Vitaly - after your recent work to get rid of deprecated colors, is this still applicable?
Comment 6 Vitaly Dyackhov 2023-11-02 05:20:18 PDT
While CSS Color Module Level 3 deprecates the system colors completely https://www.w3.org/TR/css-color-3/#css-system, CSS Color Module Level 4 returns this concept back https://drafts.csswg.org/css-color-4/#css-system-colors and only deprecates old color values https://drafts.csswg.org/css-color-4/#deprecated-system-colors.

It's important to note that the standard doesn't enforce any particular values that system colors must be resolved to. It's up to the browser to decide. So, the system colors could be not what someone expects but saying that they are "incorrect" is wrong.
Comment 7 Aditya Keerthi 2023-11-02 14:59:48 PDT
I'm going to close this bug since it's up to the UA to decide what values to expose for system colors. Additionally, the URL provided no longer works.

This bug is about Windows, but to take Mac as an example, we already restrict some colors to hardcoded values to avoid adding a fingerprinting vector. Also note that since this bug has been filed, many new system colors have been exposed.

If there are issues or questions about specific system colors, those should be filed as separate bugs.