Page does not update when updating `scrollbar-gutter` from `stable both-edges` to `initial` on the root.
Categories
(Core :: Layout: Scrolling and Overflow, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox123 | --- | verified |
People
(Reporter: nchevobbe, Assigned: emilio)
References
Details
Attachments
(3 files)
Steps to reproduce
- Open attached document
- Click on
scrollbar-gutter: initialbutton
Expected results
The yellow div and buttons should shift to the left as we're going from scrollbar-gutter: stable both-edges to scrollbar-gutter: initial
Actual results
The page does not update, until some changes are made to the page (in the attached document, clicking on the update button will set the yellow div innerText to "hello" again, which makes the shift happen; a simple reflow doesn't seem to be enough).
Comment 1•2 years ago
|
||
The scrollbar-gutter property works if the element is a scroll container. In the testcase, the scrollbar-gutter is set on <html> element, and in most of the cases, even if it has no overflow property, we make it a scroll container as if it has overflow:auto [1].
However, when we're detecting dynamic changes to scrollbar-gutter [2], we only consider the change is meaningful when the element also has overflow property that make the element a scroll container, and the code decides the change requires no action since <html> has overflow:visible. If <html> has overflow:auto property specified, it works as expected.
I'm not familiar with the details of root element's scroll frame setup and the overflow property propagation, so I don't have a solution without digging deeper.
Emilia, any ideas?
[1] https://searchfox.org/mozilla-central/rev/8188f3b1ee40b1408674197923e923d94f0c7260/layout/base/nsCSSFrameConstructor.cpp#2799-2809
[2] https://searchfox.org/mozilla-central/rev/8188f3b1ee40b1408674197923e923d94f0c7260/layout/style/nsStyleStruct.cpp#2356-2364
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 3•2 years ago
|
||
No behavior change (maybe a bit cheaper in the "no style changed" case).
Comment 6•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9ef9a9d01379
https://hg.mozilla.org/mozilla-central/rev/8dcb680cf24d
Updated•2 years ago
|
Comment 8•2 years ago
|
||
I was able to reproduce the issue on Win10x64 using Firefox build 123.0a1(20240110213539) using steps from description.
Verified as fixed on Win10/Mac 12.6 using Firefox build 123.0b5, 124.0a1(20240202094312).
On Ubuntu 22.04 when pressing on 'scrollbar-gutter:initial' on latest versions( 123.0b5, 124.0a1) nothing happens. Is this expected? Thank you.
| Assignee | ||
Comment 9•2 years ago
|
||
Yes, overlay scrollbars means that there's no gutter.
Description
•