Closed Bug 1343802 Opened 7 years ago Closed 7 years ago

[GTK 3.20] Excessive (fat) scrollbar width KDE breeze GTK theme on Firefox >= 52 (beta)

Categories

(Core :: Widget: Gtk, defect, P2)

52 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: rikmills, Assigned: karlt)

References

(Blocks 1 open bug)

Details

(Whiteboard: tpi:+)

Attachments

(11 files)

105.56 KB, image/png
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
59 bytes, text/x-review-board-request
jhorak
: review+
Details
Attached image 96cd277e4f.png
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170301084303

Steps to reproduce:

1. Switch to Firefox v52 (beta), developer v53 or nightly v54.
2. Using breeze GTK3 theme in KDE plasma desktop.
3. GTK3 version is 3.20 or greater (tested minimum = 3.20.6)

Confirmed on, but not limited to:

- kubuntu zesty 17.04 -  GTK 3.22.7
- kubuntu yakkety 16.10 - GTK 3.20.9

&

- chakra latest packages - GTK 3.20.6

Unaffected:

- Neon developer edition - GTK 3.18.9


Actual results:

The themes scrollbars in Firefox were rendered with excessive width and little trough. See attached screenshot.

This is a regression from Firefox 50 where these scrollbars render as intended in all GTK versions.


Expected results:

The scrollbars should have rendered with the width intended by the theme, as they do correctly in Firefox 50 and in GTK 3.18.

This seems to be a mozilla specific issue, but for reference a link to the KDE bug report is:

https://bugs.kde.org/show_bug.cgi?id=377008
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
Prior to GTK 3.20, the trough was typically the width of the scrollbar/range
https://git.gnome.org/browse/gtk+/tree/gtk/gtkrange.c?h=3.18.9#n3889
and the range width was calculated by adding trough-border to slider-width
(for the thumb)
https://git.gnome.org/browse/gtk+/tree/gtk/gtkrange.c?h=3.18.9#n3513
Steppers did not influence the width the scrollbar, but their width was
derived from the range width.
https://git.gnome.org/browse/gtk+/tree/gtk/gtkrange.c?h=3.18.9#n3805

Gecko's scrollbar is sized to accommodate the width of the steppers and the
trough.  The steppers and trough then stretch to fill available width inside
the scrollbar border.  The thumb stretches to fills the width of the slider
inside its border.  This model worked with GTK < 3.20 because the steppers
were not wider than the trough.

In GTK 3.20, the steppers and the scrollbar can have their own minimum sizes,
independent of the trough.  The trough gadget does not fill available space
but is centered across the minor axis of the scrollbar:
https://git.gnome.org/browse/gtk+/tree/gtk/gtkrange.c?h=3.20.9#n822

Similarly the slider (thumb) gadget does not fill available space but is
centered across the trough:
https://git.gnome.org/browse/gtk+/tree/gtk/gtkrange.c?h=3.20.9#n3513

Changes for bug 1289148 added consideration of GTK 3.20 thumb and scrollbar
minimum sizes (which made the Breeze scrollbar the correct width), but didn't
make appropriate changes to limit the widths of the trough and the thumb.
Assignee: nobody → karlt
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Whiteboard: tpi:+
I can confirm this is also happening for me.

I'm using openSUSE 42.1 Leap and Firefox 52.0.1. My GTK3 version is 3.16 and I'm on the KDE Plasma 5 desktop.

If you require anything additional, please let me know.
(In reply to rafjaimes from comment #2)
> I'm using openSUSE 42.1 Leap and Firefox 52.0.1. My GTK3 version is 3.16 and
> I'm on the KDE Plasma 5 desktop.

Please compare rendering with GTK_OVERLAY_SCROLLING=0 gtk3-demo.
If rendering is the same then you may want bug 1147847.

If not, then please file a separate report, as changes here will not fix an issue with GTK 3.16.
Please include in that report an indication of where to obtain the GTK theme involved.
Summary: Excessive (fat) scrollbar width KDE breeze GTK theme on Firefox >= 52 (beta) → [GTK 3.20] Excessive (fat) scrollbar width KDE breeze GTK theme on Firefox >= 52 (beta)
Comment on attachment 8850363 [details]
bug 1343802 remove unused moz_gtk_enable_style_props

https://reviewboard.mozilla.org/r/122930/#review125856
Attachment #8850363 - Flags: review?(jhorak) → review+
Comment on attachment 8850372 [details]
bug 1343802 draw trough centered instead of filling the scrollbar

https://reviewboard.mozilla.org/r/122948/#review125858
Attachment #8850372 - Flags: review?(jhorak) → review+
Comment on attachment 8850371 [details]
bug 1343802 consider scrollbar trough min-width/min-height properties

https://reviewboard.mozilla.org/r/122946/#review125862
Attachment #8850371 - Flags: review?(jhorak) → review+
Comment on attachment 8850370 [details]
bug 1343802 swap vertical scrollbar button dimensions for horizontal scrollbars

https://reviewboard.mozilla.org/r/122944/#review125864
Attachment #8850370 - Flags: review?(jhorak) → review+
Comment on attachment 8850368 [details]
bug 1343802 update notebook_has_tab_gap and scrollbar metrics after theme changes

https://reviewboard.mozilla.org/r/122940/#review125868
Attachment #8850368 - Flags: review?(jhorak) → review+
Comment on attachment 8850367 [details]
bug 1343802 remove have_arrow_scaling, which was always true

https://reviewboard.mozilla.org/r/122938/#review125872
Attachment #8850367 - Flags: review?(jhorak) → review+
Comment on attachment 8850366 [details]
bug 1343802 remove moz_gtk_get_scrollbar_widget()

https://reviewboard.mozilla.org/r/122936/#review125874
Attachment #8850366 - Flags: review?(jhorak) → review+
Comment on attachment 8850364 [details]
bug 1343802 remove code for native scrollbar thumb border sizes

https://reviewboard.mozilla.org/r/122932/#review125878
Attachment #8850364 - Flags: review?(jhorak) → review+
Comment on attachment 8850369 [details]
bug 1343802 adjust scrollbar track border to prevent thumb expanding to fill available breadth +328198

https://reviewboard.mozilla.org/r/122942/#review125882
Attachment #8850369 - Flags: review?(jhorak) → review+
Comment on attachment 8850365 [details]
bug 1343802 calculate scrollbar metrics in one place

https://reviewboard.mozilla.org/r/122934/#review125888

Thanks for looking into it. That was calling for real refactoring long time.
Attachment #8850365 - Flags: review?(jhorak) → review+
Blocks: 1350099
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bc81d40f3290
remove unused moz_gtk_enable_style_props r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/5dc7564d651b
remove code for native scrollbar thumb border sizes r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/8c45140a2819
calculate scrollbar metrics in one place r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/af279778b154
remove moz_gtk_get_scrollbar_widget() r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/88ea23ae0627
remove have_arrow_scaling, which was always true r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/45330fa58671
update notebook_has_tab_gap and scrollbar metrics after theme changes r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/9abd87cd2dff
adjust scrollbar track border to prevent thumb expanding to fill available breadth r=jhorak+328198+328198
https://hg.mozilla.org/integration/autoland/rev/7abbf6d092eb
swap vertical scrollbar button dimensions for horizontal scrollbars r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/22f4dc6bb4db
consider scrollbar trough min-width/min-height properties r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/db84a68eaaec
draw trough centered instead of filling the scrollbar r=jhorak+328198
Backed out for likely causing bug 1350875 and reviving bug 1332040:

https://hg.mozilla.org/integration/autoland/rev/eeabb6e839e4c6abd473bb95c188fe3ea5995344
https://hg.mozilla.org/integration/autoland/rev/764ff98e83fce4d52d866751d5fb36c8e61c2cad
https://hg.mozilla.org/integration/autoland/rev/7f86a3c1f65d5677248cfebee1afe3927de7fdae
https://hg.mozilla.org/integration/autoland/rev/cd0123859db70d7054640336839b285374eb58cb
https://hg.mozilla.org/integration/autoland/rev/41ea7f3b8d16291acd0dc8b682f6e6f3242e9a39
https://hg.mozilla.org/integration/autoland/rev/d55285edcc49009c42eab6d03735138fc9775d9e
https://hg.mozilla.org/integration/autoland/rev/f387dcfd940fc00c1d47317b2d873ac0a33fb579
https://hg.mozilla.org/integration/autoland/rev/01c689ae86dabd1941e96766678a708af5dde7d2
https://hg.mozilla.org/integration/autoland/rev/133d02c94803be19b6134912172bb14eb0901c17
https://hg.mozilla.org/integration/autoland/rev/b099c950706cb62f237c06844d887399d0850463

An affected push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=88c9c2bcfaf9714e4194ad92d1a7d8075cfda738&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=running&filter-resultStatus=pending&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=86612972&repo=autoland
Failure list: https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1350875
[task 2017-03-27T11:15:46.255915Z] 11:15:46     INFO - TEST-PASS | dom/html/test/test_fullscreen-api.html | [scrollbar] Should have vertical scrollbar 
[task 2017-03-27T11:15:46.258167Z] 11:15:46     INFO - TEST-PASS | dom/html/test/test_fullscreen-api.html | [scrollbar] Should have horizontal scrollbar 
[task 2017-03-27T11:15:46.263601Z] 11:15:46     INFO - [scrollbar] Entering fullscreen on root
[task 2017-03-27T11:15:46.265653Z] 11:15:46     INFO - Buffered messages logged at 11:15:44
[task 2017-03-27T11:15:46.271335Z] 11:15:46     INFO - TEST-PASS | dom/html/test/test_fullscreen-api.html | [scrollbar] Should only check the current fullscreen element 
[task 2017-03-27T11:15:46.273520Z] 11:15:46     INFO - Buffered messages finished
[task 2017-03-27T11:15:46.276094Z] 11:15:46     INFO - TEST-UNEXPECTED-FAIL | dom/html/test/test_fullscreen-api.html | [scrollbar] Should have vertical scrollbar when [object HTMLHtmlElement] is in fullscreen - got 487, expected 1587
[task 2017-03-27T11:15:46.278071Z] 11:15:46     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-03-27T11:15:46.279952Z] 11:15:46     INFO -     is@dom/html/test/file_fullscreen-scrollbar.html:30:25
[task 2017-03-27T11:15:46.281999Z] 11:15:46     INFO -     assertHasScrollbars@dom/html/test/file_fullscreen-scrollbar.html:54:3
[task 2017-03-27T11:15:46.284165Z] 11:15:46     INFO -     checkScrollbars@dom/html/test/file_fullscreen-scrollbar.html:73:3
[task 2017-03-27T11:15:46.288019Z] 11:15:46     INFO -     enteredFullscreenOnRoot@dom/html/test/file_fullscreen-scrollbar.html:100:3
[task 2017-03-27T11:15:46.290035Z] 11:15:46     INFO -     invokeCallback/</<@dom/html/test/file_fullscreen-utils.js:54:50
[task 2017-03-27T11:15:46.292265Z] 11:15:46     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-03-27T11:15:46.294219Z] 11:15:46     INFO -     invokeCallback/<@dom/html/test/file_fullscreen-utils.js:54:33
[task 2017-03-27T11:15:46.298079Z] 11:15:46     INFO -     FrameRequestCallback*invokeCallback@dom/html/test/file_fullscreen-utils.js:54:5
[task 2017-03-27T11:15:46.300260Z] 11:15:46     INFO -     onFullscreenChange@dom/html/test/file_fullscreen-utils.js:59:7
[task 2017-03-27T11:15:46.302220Z] 11:15:46     INFO -     EventListener.handleEvent*addFullscreenChangeContinuation@dom/html/test/file_fullscreen-utils.js:70:3
[task 2017-03-27T11:15:46.304092Z] 11:15:46     INFO -     begin@dom/html/test/file_fullscreen-scrollbar.html:95:3
[task 2017-03-27T11:15:46.306051Z] 11:15:46     INFO -     focusedOrLoaded/<@SimpleTest/SimpleTest.js:791:59

Please also have a look at this timeout in the same test: https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1332040
They all only affect Linux.
Status: RESOLVED → REOPENED
Flags: needinfo?(karlt)
Resolution: FIXED → ---
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/858dfd6b90fc
remove unused moz_gtk_enable_style_props r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/9d2a1059675c
remove code for native scrollbar thumb border sizes r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/6bb2674c5ecb
calculate scrollbar metrics in one place r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/9181b8953b46
remove moz_gtk_get_scrollbar_widget() r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/5f31d05b6a70
remove have_arrow_scaling, which was always true r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/0c9392847e7f
update notebook_has_tab_gap and scrollbar metrics after theme changes r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/ccb8ca1eecd1
adjust scrollbar track border to prevent thumb expanding to fill available breadth r=jhorak+328198+328198
https://hg.mozilla.org/integration/autoland/rev/ec09b72a0975
swap vertical scrollbar button dimensions for horizontal scrollbars r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/627ff46c8f16
consider scrollbar trough min-width/min-height properties r=jhorak+328198
https://hg.mozilla.org/integration/autoland/rev/84c553eab3d8
draw trough centered instead of filling the scrollbar r=jhorak+328198
Relanded it. The failures seems to be regressions from bug 1194751. Sorry for the adrenalin rush.
Flags: needinfo?(karlt)
Depends on: 1278282
It's fixed in FF55+ only??? Will a fix be ported for FF52ESR which is just starting its run?  Otherwise it will be broken for its entire lifespan.  Reproduces on OpenSUSE 42.2, KDE 5.  That's an LTS release, so it probably won't get the GTK update which is the alternative fix.

Please fix in FF52ESR!  Thanks.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: