OSDN Git Service

Fix RenderThemeAndroid following the changes in http://trac.webkit.org/changeset...
authorAndrei Popescu <andreip@google.com>
Mon, 17 Aug 2009 11:07:12 +0000 (12:07 +0100)
committerAndrei Popescu <andreip@google.com>
Mon, 17 Aug 2009 11:09:43 +0000 (12:09 +0100)
WebCore/platform/android/RenderThemeAndroid.cpp

index a1e8bf6..b81d377 100644 (file)
@@ -27,7 +27,7 @@
 #include "RenderThemeAndroid.h"
 
 #include "Color.h"
-#include "FormControlElement.h"
+#include "Element.h"
 #include "GraphicsContext.h"
 #include "PlatformGraphicsContext.h"
 #include "RenderSkinAndroid.h"
@@ -181,8 +181,8 @@ bool RenderThemeAndroid::paintButton(RenderObject* obj, const RenderObject::Pain
 {
     // If it is a disabled button, simply paint it to the master picture.
     Node* node = obj->node();
-    FormControlElement* formControlElement = toFormControlElement(static_cast<Element*>(node));
-    if (formControlElement && !formControlElement->isEnabled())
+    Element* formControlElement = static_cast<Element*>(node);
+    if (formControlElement && !formControlElement->isEnabledFormControl())
         RenderSkinButton::Draw(getCanvasFromInfo(info), rect, RenderSkinAndroid::kDisabled);
     else
         // Store all the important information in the platform context.
@@ -256,8 +256,8 @@ static void adjustMenuListStyleCommon(RenderStyle* style, Element* e)
     // Code copied from RenderThemeMac.mm
     // Makes sure that the text shows up on our treatment
     bool isEnabled = true;
-    if (FormControlElement* formControlElement = toFormControlElement(e))
-        isEnabled = formControlElement->isEnabled();
+    if (e)
+        isEnabled = e->isEnabledFormControl();
     style->setColor(isEnabled ? Color::black : Color::darkGray);
 }