Bug 19973 - 'Highlight' color keyword does not honor user specified color
Summary: 'Highlight' color keyword does not honor user specified color
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-10 11:33 PDT by Keith Anderson
Modified: 2011-10-20 17:24 PDT (History)
2 users (show)

See Also:


Attachments
HTML Test Case (557 bytes, text/html)
2008-07-10 11:34 PDT, Keith Anderson
no flags Details
Rendering Example (13.15 KB, image/png)
2008-07-10 11:35 PDT, Keith Anderson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Anderson 2008-07-10 11:33:32 PDT
Using the 'Highlight' keyword as a color value in a CSS style uses the system default highlight color instead of the user specified highlight color.
Comment 1 Keith Anderson 2008-07-10 11:34:25 PDT
Created attachment 22201 [details]
HTML Test Case

Source case showing Highlight color keyword used in a style rule.
Comment 2 Keith Anderson 2008-07-10 11:35:19 PDT
Created attachment 22202 [details]
Rendering Example

Rendering of Test Case showing that the highlight color does not match the user specified color.
Comment 3 mitz 2008-07-10 12:12:41 PDT
See also bug 17311.
Comment 4 Greg Harewood 2008-07-10 13:11:48 PDT
As I explained in bug 17311, "HighLightText" on "HighLight" was equally intended in MicroSoft's original definition to be used for the current menu item in focus - i.e. white on blue, in both MacOS and in Windows 95 (which was current at the time).  Windows IE still defines these as light on dark.  WebKit should use the most similar concept in the Mac's GUI, which is the menu highlight color pair.  This is because web pages often do not correctly pair "HighlightText" and "Highlight", so it is important to follow the light on dark concept to preserve contrast.  They should of course be the Mac's particular shades.
Comment 5 Greg Harewood 2008-07-10 13:31:17 PDT
See attachment

    https://bugs.webkit.org/attachment.cgi?id=19078

for the colors used in IE7 - white on blue.  See also...

    https://bugs.webkit.org/attachment.cgi?id=19077

...for the source HTML.

While we're here, I notice that ...

- MenuText is rendering white, when it should contrast with Menu DOH!!
- Menu is currently mirroring the light blue highlight color, when it should really be a light gray
- CaptionText on ActiveCaption should be black on mid gray.  Currently black on black. DOH!!!!
- InactiveCaptionText on InctiveCaption should be black on light gray.  Currently black on white. Sigh.


AGAIN FOR GOD'S SAKE LOOK AT https://bugs.webkit.org/attachment.cgi?id=19077
I WROTE THAT PAGE FOR A REASON.  IT SHOWS A WHOLE WINDOW, CONTAINING MENUS AND BUTTONS RENDERED TO LOOK NATIVE WITH THE NATIVE COLORS IN EXACTLY THE WAY MICROSOFT INTENDED. IT NEEDS TO LOOK LIKE A MAC OR A PC OR SOME SENSIBLE COMBO.  NOT A STUPID LOOKING UNREADABLE MISHMASH

I don't mean to get upset.  You guys are doing a great job with WebKit.  But you need to UNDERSTAND how these colors are supposed to be used before you make the next change.  You can't just keep changing stuff to make one website or another correct with the two colors ffrom the palette that it uses.  You have to correct the whole pallete to be consistent.

I'm not asking for much here, just colors.  If you wanted to be CLEVER, you could use these colors as hints to render a window drag bar for Caption, or render a popup as a menu rather than an input if it is colored *Menu.
Comment 6 Keith Anderson 2008-07-10 14:11:45 PDT
It surely doesn't help that Apple tends to do their own thing with these highlight colors in their own apps. After researching this further, it appears that there are two user configurable system color settings you can make: 

Appearance (which is limited to 'Blue' and 'Graphite') is described as being 'For the overall look of buttons, menus and windows'. This is intended to be the 'system tint' color.

Highlight Color (which has some predefined colors but also lets the user specify using the picker) is described as 'For selected text'.

However, it appears that table selection highlighting (at least in what appear to be standard NSTableViews) uses a derivative of the Highlight Color (specifically [NSColor alternateSelectedControlColor]) instead of the Appearance tint. I notice when looking at the system colors available through NSColor that changing the Highlight color in the Appearance preference pane will actually modify alternateSelectedControlColor, selectedControlColor and selectedTextBackgroundColor. Menu selections, buttons, focus outlines, scroll bars and almost everything else drawn by the system, on the other hand, all honor the system tint color.

It appears that Firefox is following this lead in their implementation of the Highlight system color keyword and is perhaps specifically using [NSColor alternateSelectedControlColor].  WebKit is apparently hard-coding this value to something that 'looks decent' as long as you don't look too hard at it (and don't run Windows).
Comment 7 Tab Atkins 2011-10-20 17:24:26 PDT
The System Colors have been deprecated in CSS for some time <http://www.w3.org/TR/2008/WD-css3-color-20080721/#css-system>.

As such, I'm marking this as WONTFIX, because we shouldn't be expending any effort on making deprecated things "better".