Changeset 45569 in webkit
- Timestamp:
- Jul 6, 2009 3:11:40 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r45568 r45569 1 2009-07-06 Alice Liu <alice.liu@apple.com> 2 3 Reviewed by Darin Adler. 4 5 REGRESSION(r45285): focus rings are black on windows safari 6 https://bugs.webkit.org/show_bug.cgi?id=26821 7 <rdar://problem/7018252> 8 9 Add a mechanism for setting a custom focus ring color, and relocate the 10 determination of focus ring color to base class RenderTheme. 11 12 No new tests. Already-existing tests run in pixel mode would have caught this regression 13 14 * css/CSSStyleSelector.cpp: 15 (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Move the responsibility 16 of determining focus color to base class RenderTheme. 17 * rendering/RenderTheme.cpp: 18 (WebCore::customFocusRingColor): Added static local. 19 (WebCore::RenderTheme::setCustomFocusRingColor): Added 20 (WebCore::RenderTheme::focusRingColor): Use custom color over platform color. 21 * rendering/RenderTheme.h: 22 (WebCore::RenderTheme::platformFocusRingColor): default implementation, black color 23 * rendering/RenderThemeSafari.cpp: 24 (WebCore::RenderTheme::themeForPage): Circumstances that lead to returning the RenderThemeWin 25 are the same under which we want to use the focus ring color from SafariTheme. 26 (WebCore::RenderThemeSafari::platformFocusRingColor): Renamed from focusRingColor 27 * rendering/RenderThemeSafari.h: 28 29 Renaming focusRingColor to platformFocusRingColor in these files: 30 * rendering/RenderThemeChromiumMac.h: 31 * rendering/RenderThemeChromiumMac.mm: 32 (WebCore::RenderThemeChromiumMac::platformFocusRingColor): 33 * rendering/RenderThemeChromiumSkia.cpp: 34 (WebCore::RenderThemeChromiumSkia::platformFocusRingColor): 35 * rendering/RenderThemeChromiumSkia.h: 36 * rendering/RenderThemeMac.h: 37 * rendering/RenderThemeMac.mm: 38 (WebCore::RenderThemeMac::platformFocusRingColor): 39 40 Cleanup leftover from removal of WebCore::Color in r45285 in these files: 41 * WebCore.order: 42 * platform/graphics/Color.h: 43 1 44 2009-07-06 Shinichiro Hamaji <hamaji@chromium.org> 2 45 -
trunk/WebCore/WebCore.order
r44151 r45569 3794 3794 __ZN7WebCore13ContainerNode8setFocusEb 3795 3795 __ZN7WebCore4Node8setFocusEb 3796 __ZN7WebCore14focusRingColorEv3797 3796 +[WebCoreControlTintObserver controlTintDidChange] 3798 3797 __ZN7WebCore26usesTestModeFocusRingColorEv -
trunk/WebCore/css/CSSStyleSelector.cpp
r45474 r45569 5744 5744 col = m_element->document()->activeLinkColor(); 5745 5745 else if (ident == CSSValueWebkitFocusRingColor) 5746 col = RenderTheme:: defaultTheme()->focusRingColor();5746 col = RenderTheme::focusRingColor(); 5747 5747 else if (ident == CSSValueCurrentcolor) 5748 5748 col = m_style->color(); -
trunk/WebCore/platform/graphics/Color.h
r44503 r45569 146 146 } 147 147 148 Color focusRingColor();149 148 Color colorFromPremultipliedARGB(unsigned); 150 149 unsigned premultipliedARGBFromColor(const Color&); -
trunk/WebCore/rendering/RenderTheme.cpp
r45474 r45569 42 42 43 43 using namespace HTMLNames; 44 45 static Color& customFocusRingColor() 46 { 47 DEFINE_STATIC_LOCAL(Color, color, ()); 48 return color; 49 } 44 50 45 51 RenderTheme::RenderTheme() … … 854 860 } 855 861 856 Color RenderTheme::focusRingColor() const 857 { 858 return Color(0, 0, 0); // Black. 862 void RenderTheme::setCustomFocusRingColor(const Color& c) 863 { 864 customFocusRingColor() = c; 865 } 866 867 Color RenderTheme::focusRingColor() 868 { 869 return customFocusRingColor().isValid() ? customFocusRingColor() : defaultTheme()->platformFocusRingColor(); 859 870 } 860 871 -
trunk/WebCore/rendering/RenderTheme.h
r45474 r45569 138 138 virtual Color platformInactiveTextSearchHighlightColor() const; 139 139 140 virtual Color focusRingColor() const; 140 static Color focusRingColor(); 141 virtual Color platformFocusRingColor() const { return Color(0, 0, 0); } 142 static void setCustomFocusRingColor(const Color&); 141 143 142 144 virtual void platformColorsDidChange(); -
trunk/WebCore/rendering/RenderThemeChromiumMac.h
r45285 r45569 65 65 virtual Color activeListBoxSelectionBackgroundColor() const; 66 66 67 virtual Color focusRingColor() const;67 virtual Color platformFocusRingColor() const; 68 68 69 69 virtual void platformColorsDidChange(); -
trunk/WebCore/rendering/RenderThemeChromiumMac.mm
r45285 r45569 173 173 } 174 174 175 Color RenderThemeChromiumMac:: focusRingColor() const175 Color RenderThemeChromiumMac::platformFocusRingColor() const 176 176 { 177 177 if (ChromiumBridge::layoutTestMode()) -
trunk/WebCore/rendering/RenderThemeChromiumSkia.cpp
r45285 r45569 163 163 } 164 164 165 Color RenderThemeChromiumSkia:: focusRingColor() const165 Color RenderThemeChromiumSkia::platformFocusRingColor() const 166 166 { 167 167 static Color focusRingColor(229, 151, 0, 255); -
trunk/WebCore/rendering/RenderThemeChromiumSkia.h
r45285 r45569 55 55 virtual Color platformActiveSelectionForegroundColor() const; 56 56 virtual Color platformInactiveSelectionForegroundColor() const; 57 virtual Color focusRingColor() const;57 virtual Color platformFocusRingColor() const; 58 58 59 59 // To change the blink interval, override caretBlinkIntervalInternal instead of this one so that we may share layout test code an intercepts. -
trunk/WebCore/rendering/RenderThemeMac.h
r45529 r45569 59 59 virtual Color platformInactiveListBoxSelectionBackgroundColor() const; 60 60 virtual Color platformInactiveListBoxSelectionForegroundColor() const; 61 virtual Color focusRingColor() const;61 virtual Color platformFocusRingColor() const; 62 62 63 63 virtual ScrollbarControlSize scrollbarControlSizeForPart(ControlPart) { return SmallScrollbar; } -
trunk/WebCore/rendering/RenderThemeMac.mm
r45529 r45569 158 158 } 159 159 160 Color RenderThemeMac:: focusRingColor() const160 Color RenderThemeMac::platformFocusRingColor() const 161 161 { 162 162 if (usesTestModeFocusRingColor()) -
trunk/WebCore/rendering/RenderThemeSafari.cpp
r45285 r45569 80 80 // potentially wrong answer the very first time it's called (see 81 81 // <https://bugs.webkit.org/show_bug.cgi?id=26493>). 82 if (Settings::shouldPaintNativeControls()) 82 if (Settings::shouldPaintNativeControls()) { 83 RenderTheme::setCustomFocusRingColor(safariTheme->platformFocusRingColor()); 83 84 return windowsTheme; // keep the reference of one. 85 } 84 86 return safariTheme; // keep the reference of one. 85 87 } … … 161 163 } 162 164 163 Color RenderThemeSafari:: focusRingColor() const165 Color RenderThemeSafari::platformFocusRingColor() const 164 166 { 165 167 static Color focusRingColor; -
trunk/WebCore/rendering/RenderThemeSafari.h
r45285 r45569 70 70 virtual Color activeListBoxSelectionBackgroundColor() const; 71 71 72 virtual Color focusRingColor() const;72 virtual Color platformFocusRingColor() const; 73 73 74 74 // System fonts.
Note: See TracChangeset
for help on using the changeset viewer.