subframe scroll thumbs mispositioned with pinch zoom + webrender
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: tnikkel, Assigned: botond)
References
(Blocks 2 open bugs)
Details
Attachments
(8 files)
263 bytes,
text/html
|
Details | |
70.53 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The async transform is most likely the source of the problem.
I checked older builds, the problem seems to exist as far back as I can reasonably test, before that desktop zooming isn't in good enough shape to test it seems.
Reporter | ||
Comment 1•4 years ago
|
||
Here's one example of the problem, I can scroll the thumbs all the way out of view.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Raising priority as we are seeing users notice this.
Reporter | ||
Comment 5•3 years ago
|
||
The work we did with "transform to ancestor" (bug 1732600 and related), mostly the new understandings we got about how resolution works with webrender vs layers, might make this easier to debug/understand.
Assignee | ||
Comment 6•3 years ago
|
||
The async transform of the scrollbars appears to be off by a factor equal to the resolution.
Assignee | ||
Comment 7•3 years ago
•
|
||
I believe what's happening here is that ComputeTransformForScrollThumb() is computing a transform in the scrollbar's "layer space", that is, a coordinate space such that one unit of translation moves the scrollbar by one rendered pixel.
With Layers, this transform was used as the scrollbar layer's shadow transform. The scrollbar layer was also subject to the shadow transforms of ancestor layers, which in the case of a subframe scrollbar included the zoom container layer. However, the zoom container layer's effective transform scale was 1.0 (the zoom was cancelled out by a pre-scale, to reflect the fact that the zoom container's descendants are already rendered at a higher resolution to account for the zoom).
With WebRender, this transform is used as a transform property associated with the scrollbar's animation id. In this usage, subframe scrollbars are also subject to the zoom transform, but this time there is no pre-scale to cancel that out.
Therefore, for subframe scrollbars, the values expected by Layers and WebRender in this computed transform differ by a factor equal to the zoom level.
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D130534
Assignee | ||
Comment 10•3 years ago
|
||
These already pass, just adding them for test coverage.
Depends on D130535
Assignee | ||
Comment 11•3 years ago
|
||
For these tests, the reference file also has the resolution (otherwise
the subframe scrollbar thicknesses wouldn't match), the only difference
is async scroll vs. sync scroll.
These tests fail without the fix for this bug.
Depends on D130536
Assignee | ||
Comment 12•3 years ago
|
||
The computation included the resolution of enclosing scroll frames
in the scrollbar transform. This was correct with Layers (where
the resolution was "pushed down" to descendant layers such that
their layer space represented rendered pixels) but incorrect with
WebRender (where items with transform properties like a subframe
scrollbar are still subject to enclosing transform properties like
the zoom).
This makes the reftests added in the previous patch pass.
Depends on D130537
Assignee | ||
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Comment 15•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eeea103db0ee
https://hg.mozilla.org/mozilla-central/rev/9fd7371a4616
https://hg.mozilla.org/mozilla-central/rev/448061f3c607
https://hg.mozilla.org/mozilla-central/rev/eaa080c9e238
https://hg.mozilla.org/mozilla-central/rev/3bb9cf3fa215
https://hg.mozilla.org/mozilla-central/rev/254807479c9d
Reporter | ||
Comment 16•3 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #7)
I believe what's happening here is that ComputeTransformForScrollThumb() is computing a transform in the scrollbar's "layer space", that is, a coordinate space such that one unit of translation moves the scrollbar by one rendered pixel.
With Layers, this transform was used as the scrollbar layer's shadow transform. The scrollbar layer was also subject to the shadow transforms of ancestor layers, which in the case of a subframe scrollbar included the zoom container layer. However, the zoom container layer's effective transform scale was 1.0 (the zoom was cancelled out by a pre-scale, to reflect the fact that the zoom container's descendants are already rendered at a higher resolution to account for the zoom).
With WebRender, this transform is used as a transform property associated with the scrollbar's animation id. In this usage, subframe scrollbars are also subject to the zoom transform, but this time there is no pre-scale to cancel that out.
Therefore, for subframe scrollbars, the values expected by Layers and WebRender in this computed transform differ by a factor equal to the zoom level.
I missed this comment when reviewing, it would have been helpful! I need to remind myself to check the bug.
Description
•