Commit a8304c03 authored by pkasting@chromium.org's avatar pkasting@chromium.org

2008-10-23 Peter Kasting <pkasting@google.com>

        Reviewed by David Hyatt.

        https://bugs.webkit.org/show_bug.cgi?id=21844
        Remove setFocusRingColorChangeFunction.

        * page/Page.cpp:
        (WebCore::Page::Page):
        * platform/graphics/Color.h:
        * platform/graphics/mac/ColorMac.mm:
        (WebCore::focusRingColor):
        * platform/graphics/qt/GraphicsContextQt.cpp:
        * platform/graphics/win/ColorSafari.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 853ea9f4
2008-10-23 Peter Kasting <pkasting@google.com>
Reviewed by David Hyatt.
https://bugs.webkit.org/show_bug.cgi?id=21844
Remove setFocusRingColorChangeFunction.
* page/Page.cpp:
(WebCore::Page::Page):
* platform/graphics/Color.h:
* platform/graphics/mac/ColorMac.mm:
(WebCore::focusRingColor):
* platform/graphics/qt/GraphicsContextQt.cpp:
* platform/graphics/win/ColorSafari.cpp:
2008-10-24 David Kilzer <ddkilzer@apple.com>
Build fix for Qt.
......
......@@ -130,7 +130,6 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
{
if (!allPages) {
allPages = new HashSet<Page*>;
setFocusRingColorChangeFunction(setNeedsReapplyStyles);
networkStateNotifier().setNetworkStateChangedFunction(networkStateChanged);
}
......
......@@ -142,7 +142,6 @@ inline bool operator!=(const Color& a, const Color& b)
}
Color focusRingColor();
void setFocusRingColorChangeFunction(void (*)());
#if PLATFORM(CG)
CGColorRef cgColor(const Color&);
......
......@@ -39,8 +39,6 @@ namespace WebCore {
// NSColor calls don't throw, so no need to block Cocoa exceptions in this file
static RGBA32 oldAquaFocusRingColor = 0xFF7DADD9;
static bool tintIsKnown;
static void (*tintChangeFunction)();
static RGBA32 systemFocusRingColor;
static bool useOldAquaFocusRingColor;
......@@ -126,29 +124,17 @@ CGColorRef cgColor(const Color& c)
return CGColorFromNSColor(nsColor(c));
}
static void observeTint()
{
ASSERT(!tintIsKnown);
[[NSNotificationCenter defaultCenter] addObserver:[WebCoreControlTintObserver class]
selector:@selector(controlTintDidChange)
name:NSControlTintDidChangeNotification
object:NSApp];
[WebCoreControlTintObserver controlTintDidChange];
tintIsKnown = true;
}
void setFocusRingColorChangeFunction(void (*function)())
{
ASSERT(!tintChangeFunction);
tintChangeFunction = function;
if (!tintIsKnown)
observeTint();
}
Color focusRingColor()
{
if (!tintIsKnown)
observeTint();
static bool tintIsKnown = false;
if (!tintIsKnown) {
[[NSNotificationCenter defaultCenter] addObserver:[WebCoreControlTintObserver class]
selector:@selector(controlTintDidChange)
name:NSControlTintDidChangeNotification
object:NSApp];
[WebCoreControlTintObserver controlTintDidChange];
tintIsKnown = true;
}
if (usesTestModeFocusRingColor())
return oldAquaFocusRingColor;
......
......@@ -650,7 +650,6 @@ void GraphicsContext::clip(const FloatRect& rect)
* RenderTheme handles drawing focus on widgets which
* need it.
*/
void setFocusRingColorChangeFunction(void (*)()) { }
Color focusRingColor() { return Color(0, 0, 0); }
void GraphicsContext::drawFocusRing(const Color& color)
{
......
......@@ -68,9 +68,4 @@ Color focusRingColor()
return focusRingColor;
}
void setFocusRingColorChangeFunction(void (*)())
{
notImplemented();
}
} // namespace WebCore
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment