Title: [198484] trunk/Source/WebCore
Revision
198484
Author
carlo...@webkit.org
Date
2016-03-21 02:18:30 -0700 (Mon, 21 Mar 2016)

Log Message

[GTK] scrollbar thumb clipped in 2.11.92
https://bugs.webkit.org/show_bug.cgi?id=155586

Reviewed by Michael Catanzaro.

In the current version of Adwaita, the scrollbar itself also has a
one pixel border that we are not taking into account.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::paintThumb): Use the scrollbar size
in indicator mode, instead of only the thumb size, to correctly
position the thumb in indicator mode.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (198483 => 198484)


--- trunk/Source/WebCore/ChangeLog	2016-03-21 06:05:49 UTC (rev 198483)
+++ trunk/Source/WebCore/ChangeLog	2016-03-21 09:18:30 UTC (rev 198484)
@@ -1,3 +1,18 @@
+2016-03-21  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] scrollbar thumb clipped in 2.11.92
+        https://bugs.webkit.org/show_bug.cgi?id=155586
+
+        Reviewed by Michael Catanzaro.
+
+        In the current version of Adwaita, the scrollbar itself also has a
+        one pixel border that we are not taking into account.
+
+        * platform/gtk/ScrollbarThemeGtk.cpp:
+        (WebCore::ScrollbarThemeGtk::paintThumb): Use the scrollbar size
+        in indicator mode, instead of only the thumb size, to correctly
+        position the thumb in indicator mode.
+
 2016-03-20  Gyuyoung Kim  <gyuyoung....@webkit.org>
 
         Reduce uses of PassRefPtr in WebCore/dom - 6

Modified: trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp (198483 => 198484)


--- trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp	2016-03-21 06:05:49 UTC (rev 198483)
+++ trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp	2016-03-21 09:18:30 UTC (rev 198484)
@@ -357,15 +357,10 @@
     if (m_usesOverlayScrollbars && scrollbar.hoveredPart() == NoPart) {
         // When using overlay scrollbars we always claim the size of the scrollbar when hovered, so when
         // drawing the indicator we need to adjust the rectangle to its actual size in indicator mode.
-#if GTK_CHECK_VERSION(3, 19, 11)
-        int thumbFat = thumbFatness(styleContext.get(), orientation);
-#else
-        int thumbFat = thumbFatness(parentStyleContext.get(), orientation);
-#endif
         if (orientation == VerticalScrollbar)
-            thumbRect.move(scrollbar.width() - thumbFat, 0);
+            thumbRect.move(scrollbar.width() - scrollbarThickness(parentStyleContext.get(), orientation), 0);
         else
-            thumbRect.move(0, scrollbar.height() - thumbFat);
+            thumbRect.move(0, scrollbar.height() - scrollbarThickness(parentStyleContext.get(), orientation));
     }
     adjustRectAccordingToMargin(styleContext.get(), thumbRect);
     gtk_render_slider(styleContext.get(), context.platformContext()->cr(), thumbRect.x(), thumbRect.y(), thumbRect.width(), thumbRect.height(),
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to