Add scrollbar size to scroll frame's intrinsic size if it has non-auto "scrollbar-gutter"
Categories
(Core :: Layout: Scrolling and Overflow, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox97 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(2 files)
Per my conversation with Daniel, we should include the scrollbar-gutter's size to scroll frame's intrinsic size as a workaround of bug 764076 (promised in bug 764076 comment 24).
The code that handles this is in nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth [1].
Comment 1•3 years ago
|
||
(In reply to Ting-Yu Lin [:TYLin] (UTC-8) from comment #0)
Per my conversation with Daniel, we should include the scrollbar-gutter's size to scroll frame's intrinsic size as a workaround of bug 764076 (promised in bug 764076 comment 24).
To clarify: I do also think this is the correct thing to do, per spec.
It also conveniently provides a workaround for bug 764076, which is nice :) but it's worth doing regardless of that.
The idea here is that, with scrollbar-gutter:stable, we know that we should set aside some space for the scrollbar (just as we do for overflow:scroll), and that should be included as part of the element's intrinsic inline size.
Comment 2•3 years ago
•
|
||
Here's a testcase, where we differ from Chrome due to this bug.
Chrome renders this testcase's 3 boxes as skinny, wide, wide.
Firefox Nightly disagrees on the second one and renders it as skinny (i.e. we don't request any space for the scrollbar, even though it has scrollbar-gutter:stable and is requesting to always have space for a scrollbar, just like the 3rd box does via overflow-y:scroll).
| Assignee | ||
Comment 3•3 years ago
|
||
This patch fixed the following:
-
Make the helper support the vertical writing modes since its callers
GetMinISize() and GetPrefISize() are fully aware of the vertical writing modes.
This fixed a testcase with "writing-mode: vertical-lr" in flexbox's
cross-axis-scrollbar.html. Yay! -
Treat scrollbar's intrinsic size "zero" if we have "scrollbar-width: none"
since no scrollbar is showing at all. The test 002.html verifies this scenario. -
Return the scrollbar size if we have "scrollbar-gutter: stable", or twice the
size if we have "scrollbar-gutter: stable both-edges". The test 001.html
verifies this scenario.
Comment 6•3 years ago
|
||
| bugherder | ||
Description
•