[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:13:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 26de9f77a7da1be4e9899db6c86fa3cd7a62e48c
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 5 17:03:12 2010 +0000

    2010-10-05  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] Interior scrollbars do not draw their background properly
            https://bugs.webkit.org/show_bug.cgi?id=47096
    
            Correct the method that the GTK+ theme drawing code uses to
            draw scrolled window backgrounds. Now it uses gtk_paint_shadow,
            the same as the actual code from GTK+.
    
            No new tests as this is very hard to write tests for. The bug only
            manifests on some GTK+ themes and we have no test harness mechanism
            for testing rendering with non-default GTK+ themes.
    
            * platform/gtk/ScrollbarThemeGtk.cpp:
            (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): No longer
            initialize the widget state, as it's unused by the callee.
            (WebCore::ScrollbarThemeGtk::paint): Remove an inaccurate comment.
            * platform/gtk/gtk2drawing.c:
            (moz_gtk_scrolled_window_paint): Paint scrolled window backgrounds
            with gtk_paint_shadow instead of gtk_paint_box.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69119 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6f7d619..6d465a1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-10-05  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Interior scrollbars do not draw their background properly
+        https://bugs.webkit.org/show_bug.cgi?id=47096
+
+        Correct the method that the GTK+ theme drawing code uses to
+        draw scrolled window backgrounds. Now it uses gtk_paint_shadow,
+        the same as the actual code from GTK+.
+
+        No new tests as this is very hard to write tests for. The bug only
+        manifests on some GTK+ themes and we have no test harness mechanism
+        for testing rendering with non-default GTK+ themes.
+
+        * platform/gtk/ScrollbarThemeGtk.cpp:
+        (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): No longer
+        initialize the widget state, as it's unused by the callee.
+        (WebCore::ScrollbarThemeGtk::paint): Remove an inaccurate comment.
+        * platform/gtk/gtk2drawing.c:
+        (moz_gtk_scrolled_window_paint): Paint scrolled window backgrounds
+        with gtk_paint_shadow instead of gtk_paint_box.
+
 2010-10-05  Kwang Yul Seo  <skyul at company100.net>
 
         Reviewed by Kent Tamura.
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
index 2e942fe..19b897c 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
@@ -221,14 +221,8 @@ void ScrollbarThemeGtk::paintTrackBackground(GraphicsContext* context, Scrollbar
 
 void ScrollbarThemeGtk::paintScrollbarBackground(GraphicsContext* context, Scrollbar* scrollbar)
 {
+    // This is unused by the moz_gtk_scrollecd_window_paint.
     GtkWidgetState state;
-    state.focused = FALSE;
-    state.isDefault = FALSE;
-    state.canDefault = FALSE;
-    state.disabled = FALSE;
-    state.active = TRUE;
-    state.inHover = FALSE;
-
     IntRect fullScrollbarRect = IntRect(scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
     static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->paintMozillaGtkWidget(MOZ_GTK_SCROLLED_WINDOW, context, fullScrollbarRect, &state, 0);
 }
@@ -303,7 +297,6 @@ bool ScrollbarThemeGtk::paint(Scrollbar* scrollbar, GraphicsContext* graphicsCon
             scrollMask |= ThumbPart;
     }
 
-    // Paint the scrollbar background (only used by custom CSS scrollbars).
     paintScrollbarBackground(graphicsContext, scrollbar);
 
     if (scrollMask & TrackBGPart)
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index fd770d2..dfc5924 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -1098,8 +1098,6 @@ 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;
@@ -1116,9 +1114,9 @@ moz_gtk_scrolled_window_paint(GdkDrawable* drawable, GdkRectangle* rect,
 
     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);
+    gtk_paint_shadow(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
+                     cliprect, gParts->scrolledWindowWidget, "scrolled_window",
+                     rect->x, rect->y, rect->width, rect->height);
     return MOZ_GTK_SUCCESS;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list