Fix some bugs in scrollToVisual
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
People
(Reporter: botond, Assigned: botond)
References
Details
(Whiteboard: [geckoview:p2])
Attachments
(2 external files)
While working on bug 1531531, Randall and I discovered a couple of bugs in the main thread mechanism for scrolling the visual viewport (nsIDOMWindowUtils.scrollToVisual / nsIPresShell::SetPendingVisualScrollUpdate):
-
The pending visual update is sent to APZ on the next transaction (paint). However, the call to set a pending update doesn't schedule a paint, so if nothing else has scheduled a paint, the update won't happen until arbitrarily far in the future.
-
The transaction that sends the visual update still has the displayport at the old position. Since APZ composites the visual update right away, if the target position is far away from the previous scroll position, we can checkerboard. Moreover, the checkerboarding can be permanent because APZ assumes that when the main thread sends a scroll update, it has already painted the desired displayport for it.
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
A possible alternative would be to have the main thread already paint a
displayport at the target position of a requested visual update as part of
the same transaction that requests the update.
There are a couple of reasons we may not want to do that:
-
APZ could reject the requested visual update under certain conditions,
e.g. if there is a higher-priority layout update. -
It would break the property that the displayport in the main thread's
scroll metadata is relative to the scroll offset in said metadata.
Various places assume this and untangling that seems tricky.
This does mean that if the main thread requests a visual update to "far way"
(outside the existing displayport), we can get temporary checkerboarding
before the content at the target position is painted. However, it's
straightforward for callers to work around that, by changing the layout scroll
offset and scheduling a visual update if they wish to visual-scroll far
away.
Depends on D23901
Comment 5•7 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/847ee44069dc
https://hg.mozilla.org/mozilla-central/rev/7635315e975f
Comment 6•7 years ago
|
||
Botond, do you think we should uplift this scrolling fix for Fenix MVP? GV 67 (now in Beta) is the GV version that will ship in Fenix MVP.
| Assignee | ||
Comment 7•7 years ago
|
||
Yes, we should. I will request uplift after a few days of baking on Nightly.
| Assignee | ||
Comment 8•7 years ago
|
||
Comment on attachment 9051774 [details]
Bug 1536157 - Schedule a paint when setting a pending visual scroll update. r=kats
Beta/Release Uplift Approval Request
- Feature/Bug causing the regression: Bug 1507279
- User impact if declined: In some cases, workflows that involve the session store (e.g. reloading a page) may not restore the scroll position until after a tap or other action that triggers a repaint.
- Is this code covered by automated tests?: Unknown
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Fairly low risk, small targeted fix. Note that while this doesn't have direct test coverage, bug 1531531 will be exercising it in codepaths that do have test coverage.
- String changes made/needed:
- Do you want to request approval of these patches as well?: on
| Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 9051775 [details]
Bug 1536157 - Make sure we repaint after accepting a visual scroll update. r=kats
Beta/Release Uplift Approval Request
- Feature/Bug causing the regression: None
- User impact if declined: (Same as other patch)
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky):
- String changes made/needed:
- Do you want to request approval of these patches as well?: on
Comment 10•7 years ago
|
||
Comment on attachment 9051774 [details]
Bug 1536157 - Schedule a paint when setting a pending visual scroll update. r=kats
Low risk targetted fix that impacts our Fenix MVP, uplift approved for 67 beta 7, thanks!
Updated•7 years ago
|
Comment 11•7 years ago
|
||
| bugherder uplift | ||
Description
•