2009-02-02 Dmitry Titov <dimich@chromium.org>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Feb 2009 04:23:16 +0000 (04:23 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Feb 2009 04:23:16 +0000 (04:23 +0000)
        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=23661
        Fix Chromium build.

        * history/HistoryItem.h: need to include <wtf/OwnPtr.h>

        * rendering/RenderThemeChromiumMac.mm:
        (WebCore::RenderThemeChromiumMac::adjustMenuListStyle): isEnabled() is now on FormControlElement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/history/HistoryItem.h
WebCore/rendering/RenderThemeChromiumMac.mm

index 3db7acc56bf8c770baf0db1dbb5854cc9852a2af..f3d17db8dbb0a23247f44154964fa903d9e2230a 100644 (file)
@@ -1,3 +1,15 @@
+2009-02-02  Dmitry Titov  <dimich@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=23661
+        Fix Chromium build.
+
+        * history/HistoryItem.h: need to include <wtf/OwnPtr.h>
+
+        * rendering/RenderThemeChromiumMac.mm:
+        (WebCore::RenderThemeChromiumMac::adjustMenuListStyle): isEnabled() is now on FormControlElement.
+
 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
 
         Build fix.
index c87c021b2ca3f2aa960ba1eba3cb13fcb2cb623a..3e89102e539c844da8d7e5e241cc48992af9cec7 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "IntPoint.h"
 #include "PlatformString.h"
+#include <wtf/OwnPtr.h>
 
 #if PLATFORM(MAC)
 #import <wtf/RetainPtr.h>
index 17c1e1d13b7f42daf6a8358934babeae4fdfcc9d..3bb7d87f69590719e43ee125c89efc90b148add1 100644 (file)
@@ -1316,7 +1316,11 @@ void RenderThemeChromiumMac::adjustMenuListStyle(CSSStyleSelector* selector, Ren
 
     // Set the foreground color to black or gray when we have the aqua look.
     // Cast to RGB32 is to work around a compiler bug.
-    style->setColor(e->isEnabled() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
+    bool isEnabled = true;
+    if (FormControlElement* formControlElement = toFormControlElement(e))
+        isEnabled = formControlElement->isEnabled();
+
+    style->setColor(isEnabled ? static_cast<RGBA32>(Color::black) : Color::darkGray);
 
     // Set the button's vertical size.
     setSizeFromFont(style, menuListButtonSizes());