Bug 16905 - REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
Summary: REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Minor
Assignee: Nobody
URL: http://community.livejournal.com/lj_m...
Keywords: InRadar, Regression
: 16943 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-17 05:59 PST by Greg Harewood
Modified: 2008-02-11 12:46 PST (History)
5 users (show)

See Also:


Attachments
Use HITheme to get the color from the menu item background pattern (3.49 KB, patch)
2008-01-22 19:50 PST, mitz
adele: review+
Details | Formatted Diff | Diff
Demo of system colors used in menus, buttons and input fields, per Microsoft original intent (2.55 KB, text/html)
2008-02-11 10:19 PST, Greg Harewood
no flags Details
System colors rendered by IE7 on XP (47.14 KB, image/png)
2008-02-11 10:38 PST, Greg Harewood
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Harewood 2008-01-17 05:59:55 PST
The pseudocolor "menu" has been defined as rgb(14, 55, 231), i.e. the blue background highlight of MacOS menus.  Whilst a useful color in its own right, this does not duplicate typical usage of "menu" on other systems.  "menu" is normally used for unselected items, and so should be a neutral gray - or, if you can insert a background image instead of a color - it might usefully be the same gradient or transparency that is used in menus.  In any case, it should not be the menu-selected color.

See URL example from LiveJournal of how "menu" is typically used in the field; note the menu bar across the top.
Comment 1 Mark Rowe (bdash) 2008-01-17 06:30:27 PST
<rdar://problem/5692407>
Comment 2 Mark Rowe (bdash) 2008-01-17 06:44:27 PST
The colour looks roughly correct, a darkish grey, in Safari 3.0.4.  In TOT it's a bright blue, which definitely doesn't look right in this context.
Comment 3 mitz 2008-01-19 18:41:58 PST
*** Bug 16943 has been marked as a duplicate of this bug. ***
Comment 4 Mark Rowe (bdash) 2008-01-19 18:46:40 PST
RenderThemeMac maps the menu pseudocolor to [NSColor selectedMenuItemColor], which explains the blue appearance.  Looking over the methods on NSColor I can't see which method should be used in its place though.
Comment 5 mitz 2008-01-19 22:04:01 PST
(In reply to comment #4)
> RenderThemeMac maps the menu pseudocolor to [NSColor selectedMenuItemColor],
> which explains the blue appearance.  Looking over the methods on NSColor I
> can't see which method should be used in its place though.

Looks like HIThemeDrawMenuBackground() can be used to draw the pattern into a graphics context, then a pixel can be sampled, the way the NSColor-based patterns are handled.
Comment 6 mitz 2008-01-22 19:50:16 PST
Created attachment 18615 [details]
Use HITheme to get the color from the menu item background pattern
Comment 7 mitz 2008-01-22 20:02:48 PST
Fixed in <http://trac.webkit.org/projects/webkit/changeset/29728>.
Comment 8 Greg Harewood 2008-02-11 10:17:48 PST
Oh no, dude.  You turned "menu" PINK!

You're getting a flat menu color from the HITheme bitmap, right?  I think you've chosen an unrepresentative pixel - or maybe worse, the pink was meant to be hidden by the alpha channel in the bitmap.  Try going for a central pixel?

This is on 3.0.4 (5523.10.6) - nightly from 10th Feb 2008. 

I think perhaps a better plan might be to pick colors by hand.  This is not an exact science.  The problem is that the list of colors map to the variables in a Windows 95 (or maybe 2000)  theme, which is very crude by todays standards. It is probably more important that they are self-consistent, than that they are drawn from a pixel of the current Mac theme-du-jour.

Here is the list of oddities in the current color selection:

- MenuText on Menu is black on pink.  It should probably be black on light gray.

- HighlightText on HighLight is black on lilac for me - i.e. themed text selection color.  This does not appear to be Microsoft's original intent.  HighlightText on HighLight is the combo that they use for highlighting selected menu items.  It should, therefore, on Leopard, be white on blue.  The present choice might equally represent what it has been used for in the field... but the general consensus is at least light on dark - and this will give better odds when web designers mix and match colors.

- CaptionText on ActiveCaption is black on black.  This is unreadable.  It is the combo originally intended to be for title bars on windows, and is white on dark blue under IE7.

- InactiveCaptionText on InactiveCaption should follow the same theme but be paler.

One of the most useful references to MS's original intent is their own page...

http://msdn2.microsoft.com/en-us/library/aa358804(VS.85).aspx

...showing the anticipated "System Color Combinations".

I will add some attachments.

Comment 9 Greg Harewood 2008-02-11 10:19:33 PST
Created attachment 19068 [details]
Demo of system colors used in menus, buttons and input fields, per Microsoft original intent
Comment 10 Greg Harewood 2008-02-11 10:38:06 PST
Created attachment 19069 [details]
System colors rendered by IE7 on XP
Comment 11 Greg Harewood 2008-02-11 12:44:50 PST
I updated again. Sorry - I have no idea which nightly gave me pink.  We are back to a more sensible gray now.

Comments about other pseudocolors remain valid - though this is therefore now not strictly the same, originally reported bug.  Severity reassigned as minor, reflecting limited use in the field of other pseudocolors.  (They are used mostly by intranet apps.)
Comment 12 mitz 2008-02-11 12:46:46 PST
(In reply to comment #11)
> Comments about other pseudocolors remain valid - though this is therefore now
> not strictly the same, originally reported bug.

Please file a separate bug on those. Thanks!