[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mrobinson at webkit.org mrobinson at webkit.org
Wed Dec 22 14:29:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 99dfd44ce354d5a93472ed092aaab73f49fb21e8
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 11 21:20:52 2010 +0000

    2010-10-11  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] Buttons activated with the keyboard should be painted as clicked
            https://bugs.webkit.org/show_bug.cgi?id=18364
    
            When a button is pressed, force it into the hovered state as far as the
            Mozilla theme drawing code is concerned. This bug also seems to be an
            issue for Firefox. When we switch away from the Mozilla theme drawing
            code this work-around should no longer be necessary.
    
            No new tests. I was not able to generate a pixel test for this issue. It
            seems that our DRT does not have the necessary infrastructure to generate a
            pixel dump while a button is in the pressed state.
    
            * platform/gtk/RenderThemeGtk.cpp:
            (WebCore::RenderThemeGtk::paintRenderObject):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6a687d8..6e2c2d6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-11  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Gustavo Noronha Silva.
+
+        [GTK] Buttons activated with the keyboard should be painted as clicked
+        https://bugs.webkit.org/show_bug.cgi?id=18364
+
+        When a button is pressed, force it into the hovered state as far as the
+        Mozilla theme drawing code is concerned. This bug also seems to be an
+        issue for Firefox. When we switch away from the Mozilla theme drawing
+        code this work-around should no longer be necessary.
+
+        No new tests. I was not able to generate a pixel test for this issue. It
+        seems that our DRT does not have the necessary infrastructure to generate a
+        pixel dump while a button is in the pressed state.
+
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::paintRenderObject):
+
 2010-10-11  Jian Li  <jianli at chromium.org>
 
         Unreviewed. Build fix.
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index e49b0b8..7877f28 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -361,7 +361,13 @@ bool RenderThemeGtk::paintRenderObject(GtkThemeWidgetType type, RenderObject* re
     GtkWidgetState widgetState;
     widgetState.active = isPressed(renderObject);
     widgetState.focused = isFocused(renderObject);
-    widgetState.inHover = isHovered(renderObject);
+
+    // https://bugs.webkit.org/show_bug.cgi?id=18364
+    // The Mozilla theme drawing code, only paints a button as pressed when it's pressed 
+    // while hovered. Until we move away from the Mozila code, work-around the issue by
+    // forcing a pressed button into the hovered state. This ensures that buttons activated
+    // via the keyboard have the proper rendering.
+    widgetState.inHover = isHovered(renderObject) || (type == MOZ_GTK_BUTTON && isPressed(renderObject));
 
     // FIXME: Disabled does not always give the correct appearance for ReadOnly
     widgetState.disabled = !isEnabled(renderObject) || isReadOnlyControl(renderObject);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list