Block containers with small width/height missing horizontal/vertical scrollbar
Categories
(Core :: Layout: Scrolling and Overflow, enhancement)
Tracking
()
People
(Reporter: TYLin, Unassigned)
Details
Attachments
(2 files)
Steps to reproduce:
Load the attached testcase.
Expected result:
All the block containers should have either horizontal or vertical scrollbar.
Actual result:
On my linux, the first block has no horizontal scrollbar, and the third container has no vertical scrollbar.
Note:
On macOS, the same testcase have the expected result. Other browser also have the expected result.
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
I discovered this bug while looking at the try results after applying my patches in bug 1527949.
The second green box in layout/reftests/bugs/825999.html
seems to generate extra scrollbar on windows and macOS, but it turns out that the scrollbar is missing on Linux. Here is one of the failure on windows. https://treeherder.mozilla.org/jobs?repo=try&revision=8357ba59900a7629d1bcab51a5872302ce2aaed7&selectedTaskRun=TTbgLMUKRk21Agw9d2OrnQ.0
Comment 3•4 years ago
|
||
My first guess would be that the min size for the scrollbar as computed here
would be larger then these divs so we would skip the scrollbar.
Reporter | ||
Comment 4•4 years ago
|
||
Indeed, we have code to compute horizontal scrollbar is not desired when the scrollbar min width is large than the scroll port's width. So I guess this bug is more or less by design. The scrollbar min width is varied depending on the platform, and on macOS, the scrollbar disappears if I shrink the first block's width down to 10px.
Just a thought, we might want to always display the slider when there is a horizontal overflow so that overflow-x: auto
matches the rendering of overflow-x: scroll
in a scroll container with small width. I feel this is less surprising to the author.
Description
•