[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 12:27:19 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 80515596519624677a9b48b4d0949a34e9a00ea8
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 24 01:25:37 2010 +0000

    2010-08-23  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] The Mozilla theme drawing code incorrectly renders scrollbar backgrounds
            https://bugs.webkit.org/show_bug.cgi?id=44388
    
            No new tests as this functionality is currently unused. When the
            the new scrollbar theme code lands for GTK+, this will be tested
            by scrollbar pixel tests.
    
            * platform/gtk/gtk2drawing.c: Expose a method to paint scrolled window
            backgrounds and disable incorrect rendering of scrollbar trough backgrounds.
            (moz_gtk_scrolled_window_paint): Added.
            (moz_gtk_scrollbar_trough_paint): Disable incorrect background render.
            * platform/gtk/gtkdrawing.h: Add scrolled window widget type in the enum.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65851 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b67923b..364a414 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,23 @@
 
         Reviewed by Gustavo Noronha Silva.
 
+        [GTK] The Mozilla theme drawing code incorrectly renders scrollbar backgrounds
+        https://bugs.webkit.org/show_bug.cgi?id=44388
+
+        No new tests as this functionality is currently unused. When the
+        the new scrollbar theme code lands for GTK+, this will be tested
+        by scrollbar pixel tests.
+
+        * platform/gtk/gtk2drawing.c: Expose a method to paint scrolled window
+        backgrounds and disable incorrect rendering of scrollbar trough backgrounds.
+        (moz_gtk_scrolled_window_paint): Added.
+        (moz_gtk_scrollbar_trough_paint): Disable incorrect background render.
+        * platform/gtk/gtkdrawing.h: Add scrolled window widget type in the enum.
+
+2010-08-23  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Gustavo Noronha Silva.
+
         [GTK] The Mozilla theme drawing API should expose extra information about scrollbar geometry
         https://bugs.webkit.org/show_bug.cgi?id=44385
 
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index 9087917..306afb4 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -1094,6 +1094,34 @@ calculate_arrow_rect(GtkWidget* arrow, GdkRectangle* rect,
 }
 
 static gint
+moz_gtk_scrolled_window_paint(GdkDrawable* drawable, GdkRectangle* rect,
+                              GdkRectangle* cliprect, GtkWidgetState* state)
+{
+    GtkStateType state_type = ConvertGtkState(state);
+    GtkShadowType shadow_type = (state->active) ?  GTK_SHADOW_IN : GTK_SHADOW_OUT;
+    GtkStyle* style;
+    GtkAllocation allocation;
+    GtkWidget* widget;
+
+    ensure_scrolled_window_widget();
+    widget = gParts->scrolledWindowWidget;
+
+    gtk_widget_get_allocation(widget, &allocation);
+    allocation.x = rect->x;
+    allocation.y = rect->y;
+    allocation.width = rect->width;
+    allocation.height = rect->height;
+    gtk_widget_set_allocation(widget, &allocation);
+
+    style = gtk_widget_get_style(widget);
+    TSOffsetStyleGCs(style, rect->x - 1, rect->y - 1);
+    gtk_paint_box(style, drawable, state_type, shadow_type, cliprect,
+                  widget, "scrolled_window", rect->x - 1, rect->y - 1,
+                  rect->width + 2, rect->height + 2);
+    return MOZ_GTK_SUCCESS;
+}
+
+static gint
 moz_gtk_scrollbar_button_paint(GdkDrawable* drawable, GdkRectangle* rect,
                                GdkRectangle* cliprect, GtkWidgetState* state,
                                GtkScrollbarButtonFlags flags,
@@ -1211,10 +1239,6 @@ moz_gtk_scrollbar_trough_paint(GtkThemeWidgetType widget,
     style = gtk_widget_get_style(GTK_WIDGET(scrollbar));
 
     TSOffsetStyleGCs(style, rect->x, rect->y);
-    gtk_style_apply_default_background(style, drawable, TRUE, GTK_STATE_ACTIVE,
-                                       cliprect, rect->x, rect->y,
-                                       rect->width, rect->height);
-
     gtk_paint_box(style, drawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN, cliprect,
                   GTK_WIDGET(scrollbar), "trough", rect->x, rect->y,
                   rect->width, rect->height);
@@ -3107,6 +3131,9 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
         return moz_gtk_scrollbar_thumb_paint(widget, drawable, rect,
                                              cliprect, state, direction);
         break;
+    case MOZ_GTK_SCROLLED_WINDOW:
+        return moz_gtk_scrolled_window_paint(drawable, rect, cliprect, state);
+        break;
     case MOZ_GTK_SCALE_HORIZONTAL:
     case MOZ_GTK_SCALE_VERTICAL:
         return moz_gtk_scale_paint(drawable, rect, cliprect, state,
diff --git a/WebCore/platform/gtk/gtkdrawing.h b/WebCore/platform/gtk/gtkdrawing.h
index 735cc8e..9d06d5d 100644
--- a/WebCore/platform/gtk/gtkdrawing.h
+++ b/WebCore/platform/gtk/gtkdrawing.h
@@ -181,6 +181,8 @@ typedef enum {
   /* Paints the slider (thumb) of a GtkScrollbar. */
   MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL,
   MOZ_GTK_SCROLLBAR_THUMB_VERTICAL,
+  /* Paints the background of a scrolled window */
+  MOZ_GTK_SCROLLED_WINDOW,
   /* Paints a GtkScale. */
   MOZ_GTK_SCALE_HORIZONTAL,
   MOZ_GTK_SCALE_VERTICAL,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list