Mac-themed pop-ups that are disabled use black text for the selected item instead of gray.
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
(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.
(In reply to comment #2) > Weird. Did you try adding parenthesis? Yeah, forgot to mention it.
Mitz, Is there a reason that this is not marked for a review? Also, could you please use static_cast.
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
I realized that it's not really a compiler bug, so I retitled that internal bug report.
Committed revision 19020.
Committed r56503: <http://trac.webkit.org/changeset/56503>
Committed r56508: <http://trac.webkit.org/changeset/56508>