unexpected discrepancy in scrollbar thumb size depending on writing-mode
Categories
(Core :: Layout: Scrolling and Overflow, defect, P3)
Tracking
()
People
(Reporter: jfkthame, Unassigned)
References
Details
Attachments
(1 file)
752 bytes,
text/html
|
Details |
Updated•7 years ago
|
Comment 1•4 years ago
|
||
While debugging bug 1042151, I found a useful reftest scrollbars.html for flexbox on wpt. Part of the reason that the test is failing on Firefox is because of this bug.
I discover that when calculating vertical scrollbar thumb size, we use lineScrollAmount
as a factor [1], and lineScrollAmount
depends on font metrics (AveCharWidth
and MaxHeight
) [2] which can be different depends on the container being vertical or horizontal. That's why setting font-size: 0
on the scroll container can eliminate the discrepancy.
I'm not sure what's expected outcome of this bug though.
[1] https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/layout/generic/nsGfxScrollFrame.cpp#6232,6244
[2] https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/layout/generic/nsGfxScrollFrame.cpp#4673-4674
Comment 2•4 years ago
|
||
As far as I can tell, the lineScrollAmount
is only used for the "increment" property which is independent of the thumb size. But it's not surprising to me that the thumb size depends on font properties, because the thumb size depends on the scrollable content height which can be affected by the font-size of the content.
Comment 3•4 years ago
|
||
Ah, looks like pageincrement
property can affect the thumb size in nsSliderFrame.cpp
Description
•