APZ repaint request can sometimes clobber window.scrollBy
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: botond, Assigned: hiro)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
User Story
user-impact-score:600
Attachments
(1 file)
Steps to reproduce
- Load https://bugzilla.mozilla.org/attachment.cgi?id=9593110
- Click on an anchor link (
A,B, orC). The problem is intermittent so it may be necessary to click on several links to trigger it.
Expected results
The page scrolls to a position where the section heading is below the fixed top bar.
Actual results
Sometimes the page scrolls to a position where the section heading is behind the fixed top bar.
Analysis
Anchor navigation itself initially scrolls the heading behind the fixed bar, but then the site calls scrollBy() to fix up the scroll position to be one further up.
When the bug occurs, an APZ repaint request clobbers the newer scroll position with the older one, which should not happen.
Updated•7 days ago
|
| Assignee | ||
Comment 1•6 days ago
|
||
This is a paint-skip issue, with apz.paint_skipping.enabled=false, the problem is never seen. A patch is coming.
| Assignee | ||
Comment 2•6 days ago
|
||
On a paint-skip transaction, FrameMetrics::UpdatePendingScrollInfo mutates the
ScrollMetadata retained from an earlier paint but left mVisualScrollUpdateType /
mVisualDestination in place. AsyncPanZoomController::NotifyMainThreadTransaction
then re-applied that already-consumed main-thread visual scroll update,
clobbering the scroll offset the paint-skip had just applied (e.g. a
scrollIntoView() followed by a deferred scrollBy() correction landing back at
the anchor instead of below it).
Clear the visual scroll update when applying the paint-skip scroll offset
update, so the reused metadata no longer carries a stale destination.
Updated•6 days ago
|
Comment 4•4 days ago
|
||
| bugherder | ||
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61216 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Description
•