Bug 12345

Summary: REGRESSION: Disabled pop-up text is not grayed out
Product: WebKit Reporter: mitz
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ddkilzer
Priority: P1 Keywords: Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: data:text/html,%3Cselect%20disabled%3E%3Coption%3EThis%20text%20should%20be%20gray%3C/option%3E%3C/select%3E
Attachments:
Description Flags
Use gray for disabled pop-ups none

Description mitz 2007-01-20 05:08:43 PST
Mac-themed pop-ups that are disabled use black text for the selected item instead of gray.
Comment 1 mitz 2007-01-20 07:33:50 PST
Created attachment 12572 [details]
Use gray for disabled pop-ups

I added the casts to RGBA32 to appease the compiler, which otherwise regarded the colors as external symbols, leading to a link error. I couldn't figure out what the problem was. The following worked:
e->isEnabled() ? Color::black : 0
e->isEnabled() ? 0 : Color::darkGray
but this didn't work:
e->isEnabled() ? Color::black : Color::darkGray
Comment 2 David Kilzer (:ddkilzer) 2007-01-20 16:16:31 PST
(In reply to comment #1)
> I added the casts to RGBA32 to appease the compiler, which otherwise regarded
> the colors as external symbols, leading to a link error. I couldn't figure out
> what the problem was. The following worked:
> e->isEnabled() ? Color::black : 0
> e->isEnabled() ? 0 : Color::darkGray
> but this didn't work:
> e->isEnabled() ? Color::black : Color::darkGray

Weird.  Did you try adding parenthesis?  Sounds like a toolchain bug.
Comment 3 mitz 2007-01-20 22:31:47 PST
(In reply to comment #2)
> Weird.  Did you try adding parenthesis?

Yeah, forgot to mention it.
Comment 4 Sam Weinig 2007-01-21 15:57:05 PST
Mitz,

Is there a reason that this is not marked for a review?  Also, could you please use static_cast.
Comment 5 Darin Adler 2007-01-21 17:42:24 PST
I filed an internal Apple gcc bug report with a reduced test case:

<rdar://problem/4944665> can't compile example using initialized static const and ternary operator
Comment 6 Darin Adler 2007-01-21 17:49:30 PST
I realized that it's not really a compiler bug, so I retitled that internal bug report.
Comment 7 Darin Adler 2007-01-21 17:51:22 PST
Committed revision 19020.
Comment 8 Adam Barth 2010-03-25 00:09:36 PDT
Committed r56503: <http://trac.webkit.org/changeset/56503>
Comment 9 Adam Barth 2010-03-25 00:52:27 PDT
Committed r56508: <http://trac.webkit.org/changeset/56508>