Fix scrollbar rendering when zoomed out on desktop
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: botond, Assigned: botond)
References
Details
Attachments
(1 file)
With bug 1554790 in place, non-async scrollbar rendering reftests that involve zooming in are passing. (I was pleasantly surprised to discover this; it looks like containerless scrolling did most if not all of the heavy lifting for getting these scenarios to work.)
However, scrollbar-zoom-resolution-2.html
, which involves zooming out, renders blank. Probably a clipping issue. This bug tracks fixing it.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
diagnosis |
(In reply to Botond Ballo [:botond] from comment #0)
However,
scrollbar-zoom-resolution-2.html
, which involves zooming out, renders blank.
Specifically, the scrollbars are clipped out by the scroll parts clip, which is scaled by the resolution, making it smaller than the scroll frame when zoomed out.
Assignee | ||
Comment 2•5 years ago
|
||
The scaling of the scroll parts clip by the resolution was introduced in bug 1527511. The rationale I gave for doing so is:
The test cases that this fixes (e.g. layout/reftests/bugs/1133905-4-vh-rtl.html) use an initial-scale greater than 1 (e.g. 1.25). This causes the initial containing block size to be smaller than the display size (e.g. 640x800 CSS pixels instead of 800x1000 CSS pixels on the Android emulator). The scroll parts clip here is sized to the RSF's mOuter's size, which comes from the ICB size, and as such is the smaller size (e.g. 640x800). For the scrollframe contents, that's not a problem, because they're in the async zoom container so they get expanded to fill the display size. If a clip of this size is applied to the scroll parts, however, it can clip aways scrollbars near the right or bottom edge of the screen.
Markus' response comment is also informative:
This patch is fine insofar as it still keeps the clip around for Desktop (where it matters and scrollbars can overflow) and it stops the clip from interfering on Android. But what I don't like about the patch is that layout isn't aware of the true outer size of the scroll frame. However, that can be fixed later.
Basically, we want to size the scroll parts clip to the scroll frame's "true outer size". Prior to bug 1527511, we were sizing it to the ICB size; that was tripping up testcases that used initial-scale
which caused the ICB size to be smaller than the true outer size by a factor of the (initial) resolution, so we started scaling the clip by the resolution.
However, this logic is flawed: the ICB size and the "true outer size" are not related by the current resolution in general; they are only related by the initial resolution, and even then only when it was specified using initial-scale
(which affects viewport sizing) and not some other mechanism like reftest-resolution
.
Assignee | ||
Comment 3•5 years ago
|
||
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d7a497d0d97 Size the scroll parts clip to the scroll frame's true outer size. r=tnikkel
Comment 5•5 years ago
|
||
bugherder |
Description
•