[Qt] Fix rendering of <button> elements on Mac OS X
authorvestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 May 2010 14:10:11 +0000 (14:10 +0000)
committervestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 May 2010 14:10:11 +0000 (14:10 +0000)
Reviewed by Simon Hausmann.

The <button> element has ButtonPart appearance, not PushButton part,
so we have to include ButtonPart when we decide if we should draw the
button as raised on Mac OS X.

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

WebCore/ChangeLog
WebCore/platform/qt/RenderThemeQt.cpp

index a431589..235efe8 100644 (file)
@@ -1,3 +1,18 @@
+2010-05-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Fix rendering of <button> elements on Mac OS X
+
+        The <button> element has ButtonPart appearance, not PushButton part,
+        so we have to include ButtonPart when we decide if we should draw the
+        button as raised on Mac OS X.
+
+        https://bugs.webkit.org/show_bug.cgi?id=38458
+
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
+
 2010-04-30  Philippe Normand  <pnormand@igalia.com>
 
         Reviewed by Eric Seidel.
index bf49c92..762b9fd 100644 (file)
@@ -968,7 +968,7 @@ ControlPart RenderThemeQt::initializeCommonQStyleOptions(QStyleOption& option, R
     case SearchFieldCancelButtonPart: {
         if (isPressed(o))
             option.state |= QStyle::State_Sunken;
-        else if (result == PushButtonPart)
+        else if (result == PushButtonPart || result == ButtonPart)
             option.state |= QStyle::State_Raised;
         break;
     }