above-the-fold animations in scrollport (of e.g. 'height') can cause visible elements to jitter if WebRender is enabled
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
People
(Reporter: alice0775, Assigned: emilio)
References
(Depends on 1 open bug, Blocks 2 open bugs, )
Details
(Keywords: regression, reproducible)
Attachments
(2 files)
(deleted),
text/plain
|
Details | |
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details |
+++ This bug was initially created as a clone of Bug #1527899 +++
Build ID 20190215045130
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
STR:
0. WebRender turn on and restart
- Launch Firefox.
- Navigate to testcase of Bug 1519553 attachment 9036063 [details]
- Scroll up by 20-30px with drag scrollbar thumb
or Scroll up or down with mouse wheel one notch - Observe
(optionally if not reproduced)
5. Repeat step3
ER: Solid scroll position
AR: The contents jitter.
![]() |
Reporter | |
Comment 1•6 years ago
|
||
![]() |
Reporter | |
Updated•6 years ago
|
Comment hidden (offtopic) |
Comment hidden (offtopic) |
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
![]() |
Reporter | |
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Taking since I'm looking at this for the moment. Andrew was also looking at more general snapping, so this may also be interesting to him.
Assignee | ||
Comment 6•5 years ago
|
||
So I did a bit of debugging. What's going on is:
- Scroll anchoring adjusts to the offset of the frame.
- APC requests a fractionally different offset:
(rr) p geckoScrollPosition
$7 = {<mozilla::gfx::BasePoint<float, mozilla::gfx::PointTyped<mozilla::CSSPixel, float>, mozilla::gfx::CoordTyped<mozilla::CSSPixel, float> >> = {{{x = 0, y = 290.683319}, components = {0,
290.683319}}}, <mozilla::CSSPixel> = {<No data fields>}, <No data fields>}
(rr) p targetScrollPosition
$8 = {<mozilla::gfx::BasePoint<float, mozilla::gfx::PointTyped<mozilla::CSSPixel, float>, mozilla::gfx::CoordTyped<mozilla::CSSPixel, float> >> = {{{x = 0, y = 290.68335}, components = {0,
290.68335}}}, <mozilla::CSSPixel> = {<No data fields>}, <No data fields>}
- The APC scrolling ends up in ScrollToImpl, where we change the offset, invalidate the anchor, and start again.
Assignee | ||
Comment 7•5 years ago
|
||
This position is only invalidated from FrameLayerBuilder, that's not a very good
signal.
This would get out of sync when using WebRender, and APZ messages will send
sub-pixel scroll positions that will get wrongly adjusted, causing small scroll
offsets which scroll anchoring would incorrectly try to correct, which is the
ultimate cause of the jittering.
Assignee | ||
Comment 8•5 years ago
|
||
Mentioned this on IRC but: I'm only mildly confident in https://phabricator.services.mozilla.com/D37875 being the 100% correct fix, but I'm pretty sure that what we're doing right now is completely wrong. I'm unsure what the WebRender equivalent to the two calls of https://searchfox.org/mozilla-central/rev/15be167a5b436b57fef944b84eef061d24c1af8c/layout/painting/FrameLayerBuilder.cpp#2550 are, but an alternative that probably also works is calling that from the WebRender equivalents.
Assignee | ||
Comment 9•5 years ago
|
||
(It is unclear there is a WebRender equivalent at all to the point where we create a layer for a scrollable frame. :))
Assignee | ||
Comment 10•5 years ago
|
||
Try looks good btw: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ba18d6285d64968b1379ca41c5145784d797ece7
Comment 11•5 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a37238f046d5 Don't align scroll offsets to layer pixels when using WebRender. r=tnikkel
Comment 12•5 years ago
|
||
bugherder |
Comment 13•5 years ago
|
||
Bugbug thinks this bug is a regression, but please revert this change in case of error.
Assignee | ||
Comment 14•5 years ago
|
||
Comment on attachment 9077691 [details]
Bug 1528180 - Don't align scroll offsets to layer pixels when using WebRender. r=kats,jrmuizel
Beta/Release Uplift Approval Request
- User impact if declined: Bug 1554861 + jittering in some pages.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Very low effort patch that fixes a WR correctness bug. The risk of this change having fallout is pretty low I'd say.
- String changes made/needed: none
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Comment on attachment 9077691 [details]
Bug 1528180 - Don't align scroll offsets to layer pixels when using WebRender. r=kats,jrmuizel
Fixes a scroll anchoring bug with WebRender. Approved for 69.0b6.
Comment 17•5 years ago
|
||
bugherder uplift |
Comment 18•5 years ago
|
||
Verified as fixed on Firefox 70.0a1 (2019-07-17) on Windows 10 x 64, Windows 7 x32, Mac OS X 10.14 and on Ubuntu 18.04 x64.
![]() |
||
Updated•5 years ago
|
Comment 19•5 years ago
|
||
Verified as fixed on Firefox 69.0b6 on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 18.04 x64.
Description
•