Changeset 69526 in webkit


Ignore:
Timestamp:
Oct 11, 2010 2:20:52 PM (13 years ago)
Author:
Martin Robinson
Message:

2010-10-11 Martin Robinson <mrobinson@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):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69523 r69526  
     12010-10-11  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Gustavo Noronha Silva.
     4
     5        [GTK] Buttons activated with the keyboard should be painted as clicked
     6        https://bugs.webkit.org/show_bug.cgi?id=18364
     7
     8        When a button is pressed, force it into the hovered state as far as the
     9        Mozilla theme drawing code is concerned. This bug also seems to be an
     10        issue for Firefox. When we switch away from the Mozilla theme drawing
     11        code this work-around should no longer be necessary.
     12
     13        No new tests. I was not able to generate a pixel test for this issue. It
     14        seems that our DRT does not have the necessary infrastructure to generate a
     15        pixel dump while a button is in the pressed state.
     16
     17        * platform/gtk/RenderThemeGtk.cpp:
     18        (WebCore::RenderThemeGtk::paintRenderObject):
     19
    1202010-10-11  Jian Li  <jianli@chromium.org>
    221
  • trunk/WebCore/platform/gtk/RenderThemeGtk.cpp

    r69495 r69526  
    362362    widgetState.active = isPressed(renderObject);
    363363    widgetState.focused = isFocused(renderObject);
    364     widgetState.inHover = isHovered(renderObject);
     364
     365    // https://bugs.webkit.org/show_bug.cgi?id=18364
     366    // The Mozilla theme drawing code, only paints a button as pressed when it's pressed
     367    // while hovered. Until we move away from the Mozila code, work-around the issue by
     368    // forcing a pressed button into the hovered state. This ensures that buttons activated
     369    // via the keyboard have the proper rendering.
     370    widgetState.inHover = isHovered(renderObject) || (type == MOZ_GTK_BUTTON && isPressed(renderObject));
    365371
    366372    // FIXME: Disabled does not always give the correct appearance for ReadOnly
Note: See TracChangeset for help on using the changeset viewer.