Bug 1619428 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

When overlay scrollbars are enabled (macOS and Android by default, other platforms if you set the `ui.useOverlayScrollbars` pref), scrollbars don't take up any layout space. That's because [`nsScrollbarFrame::GetXULMargin`](https://searchfox.org/mozilla-central/rev/a3266997560904b484fd89d6a6bcdeace4a13652/layout/xul/nsScrollbarFrame.cpp#165-199) sets a negative margin on the scrollbar that is equal to its size. However, it only does that if `theme->ThemeSupportsWidget(presContext, this, StyleAppearance::Scrollbar)`. It seems that Windows (?), Linux and the non-native theme don't return true in this call, so overlay scrollbars incorrectly take up space.
When overlay scrollbars are enabled (macOS and Android by default, other platforms if you set the `ui.useOverlayScrollbars` pref), scrollbars shouldn't take up any layout space. The way this works on the platforms it works on is that [`nsScrollbarFrame::GetXULMargin`](https://searchfox.org/mozilla-central/rev/a3266997560904b484fd89d6a6bcdeace4a13652/layout/xul/nsScrollbarFrame.cpp#165-199) sets a negative margin on the scrollbar that is equal to its size. However, it only does that if `theme->ThemeSupportsWidget(presContext, this, StyleAppearance::Scrollbar)`. It seems that Windows (?), Linux and the non-native theme don't return true in this call, so overlay scrollbars incorrectly take up space.

Back to Bug 1619428 Comment 0