2006-12-05 Kirby White <KWhiteRight@gmail.com>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Dec 2006 12:31:52 +0000 (12:31 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Dec 2006 12:31:52 +0000 (12:31 +0000)
        Reviewed, tweaked and landed by Alexey.

        <http://bugs.webkit.org/show_bug.cgi?id=11639> Form buttons don't look different when clicked

        * rendering/RenderThemeWin.cpp:
        (WebCore::RenderThemeWin::determineState): Moved test for active
        state before test for hover state, since active should override hover
        when both are true.

        * platform/gdk/RenderThemeGdk.cpp:
        (WebCore::RenderThemeGdk::determineState): Same fix.

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

WebCore/ChangeLog
WebCore/platform/gdk/RenderThemeGdk.cpp
WebCore/rendering/RenderThemeWin.cpp

index c3612bc211fc7936bb44d6905ef0fd7b08eb7ef2..f187cf68d24dd25ecea36f4ccb86ce203d8a05df 100644 (file)
@@ -1,3 +1,17 @@
+2006-12-05  Kirby White  <KWhiteRight@gmail.com>
+
+        Reviewed, tweaked and landed by Alexey.
+
+        <http://bugs.webkit.org/show_bug.cgi?id=11639> Form buttons don't look different when clicked
+
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::determineState): Moved test for active 
+        state before test for hover state, since active should override hover 
+        when both are true.
+
+        * platform/gdk/RenderThemeGdk.cpp: 
+        (WebCore::RenderThemeGdk::determineState): Same fix.
+
 2006-12-05  Kirby White  <KWhiteRight@gmail.com>
 
         Reviewed and landed by Alexey.
index 4bdb7f24a0a9c1b0fb06ad8c6b9073af5a8ebeb3..0d3a4c3bc8f036dab35d093c8c44be84e12ac31b 100644 (file)
@@ -109,10 +109,10 @@ unsigned RenderThemeGdk::determineState(RenderObject* o)
         result = TFS_READONLY; // Readonly is supported on textfields.
     else if (supportsFocus(o->style()->appearance()) && isFocused(o))
         result = TS_FOCUSED;
-    else if (isHovered(o))
-        result = TS_HOVER;
     else if (isPressed(o))
         result = TS_ACTIVE;
+    else if (isHovered(o))
+        result = TS_HOVER;
     if (isChecked(o))
         result += 4; // 4 unchecked states, 4 checked states.
     return result;
index 6861b2de48eef26a64261707e8b73c9ed29d5024..fd723a1e4149d4c578de9c814e6425128555d724 100644 (file)
@@ -170,10 +170,10 @@ unsigned RenderThemeWin::determineState(RenderObject* o)
         result = TFS_READONLY; // Readonly is supported on textfields.
     else if (supportsFocus(o->style()->appearance()) && isFocused(o))
         result = TS_FOCUSED;
+    else if (isPressed(o)) // Active overrides hover.
+        result = TS_ACTIVE;
     else if (isHovered(o))
         result = TS_HOVER;
-    else if (isPressed(o))
-        result = TS_ACTIVE;
     if (isChecked(o))
         result += 4; // 4 unchecked states, 4 checked states.
     return result;