[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:44:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ac79b715963ffbb26b77d619d3edf650f0cf5240
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 28 00:44:48 2010 +0000

    2010-08-27  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] ScrollbarThemeGtk should account for the trough_under_steppers property
            https://bugs.webkit.org/show_bug.cgi?id=44742
    
            No new tests until this code is activated, at which point pixel tests will
            test the scrollbar rendering.
    
            * platform/gtk/ScrollbarThemeGtk.cpp:
            (WebCore::ScrollbarThemeGtk::paintTrackBackground): Only inflate the track background
            if the style specifies trough_under_steppers.
            (WebCore::ScrollbarThemeGtk::paint): If the theme specifies trough_under_steppers,
            a dirty stepper also triggers a repaint of the trough region.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66285 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 30476d3..8f4052f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-27  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] ScrollbarThemeGtk should account for the trough_under_steppers property
+        https://bugs.webkit.org/show_bug.cgi?id=44742
+
+        No new tests until this code is activated, at which point pixel tests will
+        test the scrollbar rendering.
+
+        * platform/gtk/ScrollbarThemeGtk.cpp:
+        (WebCore::ScrollbarThemeGtk::paintTrackBackground): Only inflate the track background
+        if the style specifies trough_under_steppers.
+        (WebCore::ScrollbarThemeGtk::paint): If the theme specifies trough_under_steppers,
+        a dirty stepper also triggers a repaint of the trough region.
+
 2010-08-27  Joseph Pecoraro  <joepeck at webkit.org>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
index ab100a9..ee6fb38 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
@@ -122,7 +122,16 @@ void ScrollbarThemeGtk::paintTrackBackground(GraphicsContext* context, Scrollbar
     state.active = FALSE;
     state.inHover = FALSE;
 
-    IntRect fullScrollbarRect(scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
+    // Paint the track background. If the trough-under-steppers property is true, this
+    // should be the full size of the scrollbar, but if is false, it should only be the
+    // track rect.
+    MozGtkScrollbarMetrics metrics;
+    moz_gtk_get_scrollbar_metrics(&metrics);
+
+    IntRect fullScrollbarRect = rect;
+    if (metrics.trough_under_steppers)
+        fullScrollbarRect = IntRect(scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
+
     GtkThemeWidgetType type = scrollbar->orientation() == VerticalScrollbar ? MOZ_GTK_SCROLLBAR_TRACK_VERTICAL : MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL;
     static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->paintMozillaGtkWidget(type, context, fullScrollbarRect, &state, 0);
 }
@@ -200,6 +209,15 @@ bool ScrollbarThemeGtk::paint(Scrollbar* scrollbar, GraphicsContext* graphicsCon
     if (damageRect.intersects(trackPaintRect))
         scrollMask |= TrackBGPart;
 
+    MozGtkScrollbarMetrics metrics;
+    moz_gtk_get_scrollbar_metrics(&metrics);
+    if (metrics.trough_under_steppers
+            && (scrollMask & BackButtonStartPart
+            || scrollMask & BackButtonEndPart
+            || scrollMask & ForwardButtonStartPart
+            || scrollMask & ForwardButtonEndPart))
+        scrollMask |= TrackBGPart;
+
     bool thumbPresent = hasThumb(scrollbar);
     IntRect currentThumbRect;
     if (thumbPresent) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list