Open Bug 1700526 Opened 3 years ago Updated 3 years ago

Block containers with small width/height missing horizontal/vertical scrollbar


(Core :: Layout: Scrolling and Overflow, enhancement)





(Reporter: TYLin, Unassigned)



(2 files)

Attached file scrollbar-missing.html

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.

On macOS, the same testcase have the expected result. Other browser also have the expected result.

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.

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.

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.

Severity: S3 → S4
Type: defect → enhancement
You need to log in before you can comment on or make changes to this bug.