Changeset 69448 in webkit


Ignore:
Timestamp:
Oct 9, 2010 8:24:13 AM (14 years ago)
Author:
Martin Robinson
Message:

2010-10-09 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[Gtk] Non-rectangular buttons have a square background behind them
https://bugs.webkit.org/show_bug.cgi?id=23569

Remove some code which was clearing pieces of the GdkDrawable if it was
currently mapped to a window. In our case it is unnecessary, because the
platform-independent parts of the render have already cleared this section
if it is needed.

Mozilla must not trip this code path, which means they are probably rendering
most often to a non-mapped GdkPixmap.

No new tests as some themed rendering is covered by existing tests that
render buttons. This particular bug is very hard to test as it only appears
with certain GTK+ themes and we currently have no mechanism to test different
themes in DRT.

  • platform/gtk/gtk2drawing.c: (moz_gtk_button_paint): Remove unnecessary code.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69447 r69448  
     12010-10-09  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [Gtk] Non-rectangular buttons have a square background behind them
     6        https://bugs.webkit.org/show_bug.cgi?id=23569
     7
     8        Remove some code which was clearing pieces of the GdkDrawable if it was
     9        currently mapped to a window. In our case it is unnecessary, because the
     10        platform-independent parts of the render have already cleared this section
     11        if it is needed.
     12
     13        Mozilla must not trip this code path, which means they are probably rendering
     14        most often to a non-mapped GdkPixmap.
     15
     16        No new tests as some themed rendering is covered by existing tests that
     17        render buttons. This particular bug is very hard to test as it only appears
     18        with certain GTK+ themes and we currently have no mechanism to test different
     19        themes in DRT.
     20
     21        * platform/gtk/gtk2drawing.c:
     22        (moz_gtk_button_paint): Remove unnecessary code.
     23
    1242010-10-09  Martin Robinson  <mrobinson@igalia.com>
    225
  • trunk/WebCore/platform/gtk/gtk2drawing.c

    r69381 r69448  
    5555#define XTHICKNESS(style) (style->xthickness)
    5656#define YTHICKNESS(style) (style->ythickness)
    57 #define WINDOW_IS_MAPPED(window) ((window) && GDK_IS_WINDOW(window) && gdk_window_is_visible(window))
    5857
    5958static GtkThemeParts *gParts = NULL;
     
    384383    moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad);
    385384
    386     if (WINDOW_IS_MAPPED(drawable)) {
    387         gdk_window_set_back_pixmap(drawable, NULL, TRUE);
    388         gdk_window_clear_area(drawable, cliprect->x, cliprect->y,
    389                               cliprect->width, cliprect->height);
    390     }
    391 
    392385    gtk_widget_set_state(widget, button_state);
    393386    gtk_widget_set_direction(widget, direction);
Note: See TracChangeset for help on using the changeset viewer.