Bug 154890 - [GTK] Scrollbars are broken again with GTK+ >= 3.19.11
Summary: [GTK] Scrollbars are broken again with GTK+ >= 3.19.11
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-01 16:21 PST by Hussam Al-Tayeb
Modified: 2016-03-07 06:09 PST (History)
4 users (show)

See Also:


Attachments
unfocused scrollbar (119.47 KB, image/png)
2016-03-01 16:21 PST, Hussam Al-Tayeb
no flags Details
focused scrollbar (117.15 KB, image/png)
2016-03-01 16:21 PST, Hussam Al-Tayeb
no flags Details
Patch (24.86 KB, patch)
2016-03-04 03:08 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hussam Al-Tayeb 2016-03-01 16:21:07 PST
Created attachment 272603 [details]
unfocused scrollbar

I think they tweeked theming a bit in gtk post 3.19.10 release so webkitgtk+ has to adjust?
Comment 1 Hussam Al-Tayeb 2016-03-01 16:21:41 PST
Created attachment 272604 [details]
focused scrollbar
Comment 2 Hussam Al-Tayeb 2016-03-01 16:27:14 PST
Normal gtk+ applications still show normally sized scrollbars. Only webkitgtk+ implementation is affected.
Comment 4 Carlos Garcia Campos 2016-03-01 22:57:22 PST
Yes, hopefully after 3.20 we don't need to adjust our theme code for every single GTK+ commit :-(
Comment 5 Carlos Garcia Campos 2016-03-04 02:58:45 PST
Renaming since this is not specific to overlay scrollbars not 2.11.91 version, it was GTK+ what broke us again, deprecating style properties that are now ignored by GTK+.
Comment 6 Carlos Garcia Campos 2016-03-04 03:08:00 PST
Created attachment 272846 [details]
Patch

After two days fighting with this, I've finally managed to get something that keeps the exactly same behavior with previous version of GTK+ (at least the GTK+ version we have in out internal jhbuild which is the one I've tried), and matches exactly what GTK+ from today git master does. I can't promise it will work tomorrow, though.
Comment 7 Michael Catanzaro 2016-03-04 07:40:36 PST
See what thou hast wrought.
Comment 8 Michael Catanzaro 2016-03-04 07:41:08 PST
Comment on attachment 272846 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=272846&action=review

> Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:138
> +    GtkBorder stepperSpacing = { 0, 0, 0, 0};

0 };

> Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:296
> +        return IntRect(trackRect.x() + thumbPos, trackRect.y() + troughBorder.top + (trackRect.height() - thumbFat) / 2, thumbLength(scrollbar), thumbFat);

I don't see how this works in older GTK+.
Comment 9 Carlos Garcia Campos 2016-03-04 22:20:09 PST
Comment on attachment 272846 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=272846&action=review

>> Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:296
>> +        return IntRect(trackRect.x() + thumbPos, trackRect.y() + troughBorder.top + (trackRect.height() - thumbFat) / 2, thumbLength(scrollbar), thumbFat);
> 
> I don't see how this works in older GTK+.

See the #if above, in older GTK+ troughBorder is 0, so this doesn't have any new effect. As I said I tried with GTK+ 3.16 compiled in our jhbuild.
Comment 10 Carlos Garcia Campos 2016-03-04 22:25:27 PST
Committed r197609: <http://trac.webkit.org/changeset/197609>