RESOLVED FIXED23440
RenderThemeWin cleanup (selection colors and focus rings)
https://bugs.webkit.org/show_bug.cgi?id=23440
Summary RenderThemeWin cleanup (selection colors and focus rings)
Dave Hyatt
Reported 2009-01-20 14:55:47 PST
Clean up RenderThemeWin.
Attachments
Patch (16.51 KB, patch)
2009-01-20 14:56 PST, Dave Hyatt
aroben: review+
Dave Hyatt
Comment 1 2009-01-20 14:56:25 PST
Adam Roben (:aroben)
Comment 2 2009-01-20 15:05:59 PST
Comment on attachment 26872 [details] Patch > +Color RenderTheme::activeSelectionForegroundColor() const > +{ > + if (supportsForegroundSelectionColors() && !m_activeSelectionForegroundColor.isValid()) It would be slightly more efficient to reverse the two sides of this && (ditto elsewhere). > -Color RenderTheme::platformInactiveSelectionBackgroundColor() const > +Color RenderTheme::platformActiveSelectionForegroundColor() const > { > - // Use a grey color by default if the platform theme doesn't define anything. > - return Color(128, 128, 128); > + // Use a white color by default if the platform theme doesn't define anything. > + return Color(255, 255, 255); > } > > -Color RenderTheme::platformActiveSelectionForegroundColor() const > +Color RenderTheme::platformInactiveSelectionBackgroundColor() const > { > - return Color(); > + // Use a grey color by default if the platform theme doesn't define anything. > + return Color(176, 176, 176); Why the change from 128 to 176? > Color RenderTheme::platformInactiveSelectionForegroundColor() const > { > - return Color(); > + // Use a black color by default. > + return Color(0, 0, 0); > } I think it would be better to use Color::white, Color::black, and Color::gray instead of hand-coding the values in this file. > Color RenderThemeWin::platformInactiveSelectionBackgroundColor() const > { > - COLORREF color = GetSysColor(COLOR_GRAYTEXT); > - return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255); > + return Color(176, 176, 176, 255); > } Again, I think Color::gray would be better. I don't think the fourth parameter is required. r=me
David Levin
Comment 3 2009-03-24 12:44:28 PDT
Committed as r40074. Resolving since it was committed (to move this out of the commit queue).
Note You need to log in before you can comment on or make changes to this bug.