Closed Bug 1719427 Opened 3 years ago Closed 2 years ago

Use system scrollbars or update scrollbar to Windows 11 style

Categories

(Core :: Widget: Win32, enhancement, P1)

Firefox 90
enhancement

Tracking

()

VERIFIED FIXED
97 Branch
Tracking Status
relnote-firefox --- 97+
firefox97 --- verified

People

(Reporter: maicolbattistini, Assigned: spohl)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(11 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0

Actual results:

System scrollbars are Windows 10 ones, while I am on Windows 11. Check first screenshot

Expected results:

Firefox uses system scrollbars, so the new ones that come with Windows 11 (check second screenshot) or style them like the new ones

Attachment #9230011 - Attachment description: windows10scrollbars_firefox.png → Windows 10 scrollbars
Attachment #9230011 - Attachment description: Windows 10 scrollbars → Windows 10 scrollbars on firefox

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Win32' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Win32
Product: Firefox → Core
Assignee: nobody → spohl.mozilla.bugs
Severity: -- → S3
Priority: -- → P1
Status: UNCONFIRMED → NEW
Ever confirmed: true

Attaching a screen shot showing various applications in Windows 11 (10.0.22000.168) that have various scroll bars. Clockwise from top-left they are:

  1. A recent nightly build of Firefox
  2. Edge, whose scrollbars look just like Firefox's
  3. Wordpad, which has the thin scroll bar shown by the reporter
  4. Windows Explorer, whose scrollbar looks like FF and Edge's except that it's a bit narrower.
  5. Windows Store, whose scrollbar looks like Wordpad's except that it vanishes after a bit when not moused over (Wordpad does not do that)
  6. The Firefox console window that has the same style as Firefox.

I basically opened six windows and got six different scrollbars. There is no consistency (at this point at least) so the issue seems minor and is indistinguishable to the casual user.

Hmm, on 10.0.22000.176 all of your examples except browsers show the same scrollbar style as in your wordpad example.

Firefox 70, which was still using native theme on Windows, also shows the new Windows 11 scrollbar style.

Attached image New edge scrollbars

New scrollbar style on Edge Canary

When hovering the scrollbars it become a bit toughier and arrows appear at the top and the bottom of the scrollbars section

Both Edge and Chrome are expected to get overlay scrollbars soon but there is no fixed timeline. They both have the option to enable them now behind an experimental pref (similar steps to enable on Chrome). In the attached image, Chrome and Edge have overlayed scrollbars active. They look a bit different and the Chrome scrollbar is not always visible, unlike Edge, but they are definitely similar, unlike Firefox.

I'm not sure why Maicol's scrollbars look like that but I don't think they should. I don't think scroll bars are supposed to be able to get into that state without the setting, so few people would see it before then. (Randomly, the Edge settings page has overlayed scrollbars regardless.)

@David if you mean the latest screenshot about Edge I've screenshotted the window while I was hovering the Edge scrollbars. If you mean the second attachment it's another app (just an example of the new scrollbars)

Thanks Maicol. I'm not clear on why your Edge scrollbars are overlapped without changing the setting but I don't think that's expected. Users, at this point, should have to change the setting to see overlapped scrollbars.

Oh, yes. I've enabled the flag to show the scrollbars. Anyway, we're waiting news on this update for Firefox

It looks like Firefox's popups use the system scrollbars correctly. Is there any reason why the other scrollbars aren't following the same theme?

Yes, we don't want call into Win32 apis from the content process for sandboxing reasons.

Ohhh. That makes more sense. Scrollbars from the content process, then, are xml themed to mimic the scrollbar from the Win32 apis?

Just curious, which popup uses system scrollbars?

I've noticed the system scrollbars in the hamburger menu (https://bug1736664.bmoattachments.org/attachment.cgi?id=9246693) and the library menu.

Depends on D130671

Attachment #9247271 - Attachment description: WIP: Bug 1719427: Refactor scrollbar drawing code across platforms. → Bug 1719427: Refactor scrollbar drawing code across platforms.
Attachment #9247271 - Attachment description: Bug 1719427: Refactor scrollbar drawing code across platforms. → WIP: Bug 1719427: Refactor scrollbar drawing code across platforms.
Attachment #9247271 - Attachment description: WIP: Bug 1719427: Refactor scrollbar drawing code across platforms. → Bug 1719427: Refactor scrollbar drawing code across platforms.
Attachment #9248949 - Attachment description: WIP: Bug 1719427: Add ability to switch between scrollbar implementations via prefs. → Bug 1719427: Add ability to switch between scrollbar implementations via prefs.
Attachment #9249841 - Attachment description: WIP: Bug 1719427: Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs. → Bug 1719427: Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs.
Attachment #9249842 - Attachment description: WIP: Bug 1719427: Fix scrollbar tests. → Bug 1719427: Fix scrollbar tests.
Attachment #9247271 - Attachment description: Bug 1719427: Refactor scrollbar drawing code across platforms. → WIP: Bug 1719427: Refactor scrollbar drawing code across platforms.
Attachment #9248949 - Attachment description: Bug 1719427: Add ability to switch between scrollbar implementations via prefs. → WIP: Bug 1719427: Add ability to switch between scrollbar implementations via prefs.
Attachment #9249841 - Attachment description: Bug 1719427: Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs. → WIP: Bug 1719427: Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs.
Attachment #9249842 - Attachment description: Bug 1719427: Fix scrollbar tests. → WIP: Bug 1719427: Fix scrollbar tests.
Attachment #9247271 - Attachment description: WIP: Bug 1719427: Refactor scrollbar drawing code across platforms. → Bug 1719427: Refactor scrollbar drawing code across platforms. r=emilio,mstange
Attachment #9248949 - Attachment description: WIP: Bug 1719427: Add ability to switch between scrollbar implementations via prefs. → Bug 1719427: Add ability to switch between scrollbar implementations via prefs. r=emilio,mstange
Attachment #9249841 - Attachment description: WIP: Bug 1719427: Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs. → Bug 1719427: Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs. r=emilio,mstange
Attachment #9249842 - Attachment description: WIP: Bug 1719427: Fix scrollbar tests. → Bug 1719427: Fix scrollbar tests. r=emilio,mstange
Keywords: leave-open
Pushed by spohl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e32004dd2014
Refactor scrollbar drawing code across platforms. r=emilio
https://hg.mozilla.org/integration/autoland/rev/8c5bb08f80e9
Add ability to switch between scrollbar implementations via prefs. r=emilio
https://hg.mozilla.org/integration/autoland/rev/4df7017f6bc9
Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs. r=emilio
https://hg.mozilla.org/integration/autoland/rev/d6948ef7f495
Fix scrollbar tests. r=emilio
Pushed by spohl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81e93448c871
Refactor scrollbar drawing code across platforms. r=emilio
https://hg.mozilla.org/integration/autoland/rev/ffd6665288fe
Add ability to switch between scrollbar implementations via prefs. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3e67bbae3c92
Move scrollbar size information from prefs to C++ and allow sizing to be overridden via prefs. r=emilio
https://hg.mozilla.org/integration/autoland/rev/ef94ce8ed301
Fix scrollbar tests. r=emilio
Flags: needinfo?(spohl.mozilla.bugs)
Regressions: 1741367
Regressions: 1741398

:spohl your patches caused an improvement on macosx but I see that the intent was to affect Windows (11?). Is everything ok?
== Change summary for alert #32375 (as of Wed, 17 Nov 2021 00:47:06 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
19% perf_reftest_singletons scrollbar-styles-1.html macosx1014-64-shippable-qr e10s stylo webrender 536.33 -> 432.41
19% perf_reftest_singletons scrollbar-styles-1.html macosx1015-64-shippable-qr e10s fission stylo webrender 460.05 -> 372.08
19% perf_reftest_singletons scrollbar-styles-1.html macosx1015-64-shippable-qr e10s stylo webrender 455.77 -> 368.95
19% perf_reftest_singletons scrollbar-styles-1.html macosx1014-64-shippable-qr e10s fission stylo webrender 533.81 -> 432.78
3% cross_origin_pageload macosx1015-64-shippable-qr e10s stylo webrender-sw 85.89 -> 83.36

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=32375

Flags: needinfo?(spohl.mozilla.bugs)

Yeah that improvement probably comes from not having buttons on macOS anymore.

Flags: needinfo?(spohl.mozilla.bugs)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #28)

Yeah that improvement probably comes from not having buttons on macOS anymore.

This is true, and to further clarify: Even though this particular bug was filed for Windows 11, we have taken this opportunity to refactor scrollbars across all platforms, not just Windows. The actual Windows 11 piece is going through final tweaks in https://phabricator.services.mozilla.com/D131447 before review.

Attachment #9251257 - Attachment description: WIP: Bug 1719427: Add non-native implementation of Windows 11 scrollbars. → Bug 1719427: Add non-native implementation of Windows 11 scrollbars. r=emilio
Pushed by spohl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca2daf97b94b
Add non-native implementation of Windows 11 scrollbars. r=emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch

Would it be practical to apply the non-native theme scrollbars to the browser chrome? I like the default GTK style a lot, massive improvement over Windows 10's scrollbars, but the inconsistency with the scrollbars in popups and tree views makes the pref less practical

Flags: qe-verify+

(In reply to Shane Hughes [:aminomancer] from comment #32)

Would it be practical to apply the non-native theme scrollbars to the browser chrome? I like the default GTK style a lot, massive improvement over Windows 10's scrollbars, but the inconsistency with the scrollbars in popups and tree views makes the pref less practical

It should definitely be possible, at least in windows and Linux, file a separate bug please?

See Also: → 1749531

Should we relnote this?

Flags: needinfo?(spohl.mozilla.bugs)

[Links (documentation, blog post, etc)]:(In reply to Gian-Carlo Pascutto [:gcp] from comment #34)

Should we relnote this?

Good question. It seems a bit odd to say that we're going to display Windows 11-style scrollbars (instead of Windows 10-style scrollbars) on Windows 11, since that is what users would typically come to expect. But I can see the value in emphasizing the fact that we're good citizens on Windows 11, at least with respect to scrollbars.

Release Note Request (optional, but appreciated)
[Why is this notable]: Firefox supports Windows 11 scrollbars
[Affects Firefox for Android]: no
[Suggested wording]: Firefox supports and displays the new style of scrollbars on Windows 11.

relnote-firefox: --- → ?
Flags: needinfo?(spohl.mozilla.bugs)

I checked that the scrollbars are respecting the Win 11 style, on Firefox Beta 97.0b8. Also, verified with Dark, Light, and Alpenglow themes. I did not encounter any issues.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Added to the Fx97 beta relnotes.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: