Closed Bug 1835600 Opened 1 year ago Closed 1 year ago

Hand off absolute non-MSD smooth scrolls to APZ

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(2 files, 1 obsolete file)

We have codepaths to hand off smooth scroll animations to APZ for relative (ScrollBy) smooth scrolls, and for absolute (ScrollTo) smooth scrolls which use MSD physics, but we don't seem to have one for absolute smooth scrolls with non-MSD physics.

I think this is likely to be an oversight, and we should add such a codepath for completeness.

(This came up in bug 1331390 where we are replacing a relative non-MSD smooth scroll with an absolute one, and this resulted in us no longer handing off the smooth scroll to APZ.)

Yeah, surprisingly there's no such code and no one has reported such kind of async scrolling running on the main-thread is janky. Setting S3:P3 since it's been in our code for a while. Please feel free bumping up them this is necessary for bug 1331390.

Severity: -- → S3
Priority: -- → P3

I've been working on a patch for this. As is often the case, it's slightly less trivial than it seems, but I think I'm close to a fix which passes tests.

Assignee: nobody → botond

This was temporarily changed to SmoothMsd in bug 1331390 to work around
the lack of handoff to APZ fixed in the previous patch.

Depends on D181419

And also propagate the ScrollTriggeredByScript flag through it.

Depends on D181420

Unfortunately, the patches seem to regress helper_scrollbartrack_click_overshoot.html on Mac only.

(In reply to Botond Ballo [:botond] from comment #6)

Unfortunately, the patches seem to regress helper_scrollbartrack_click_overshoot.html on Mac only.

Some preliminary investigation suggests that:

  • The regression is caused by the "Use ScrollMode::Smooth in nsSliderFrame::PageScroll()" patch
  • The issue is with the test (specifically, our attempt to use scrollend to wait until the slider finishes moving is not working), and not with the changes made in the previous patch

I'm going to drop that patch from the patch series, and file a follow-up for making that change.

Attachment #9339922 - Attachment is obsolete: true
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e61b8e82bd48 Hand off absolute non-MSD smooth scrolls to APZ. r=hiro https://hg.mozilla.org/integration/autoland/rev/c8504e4bda95 Add scroll snap support to SmoothScrollAnimation. r=hiro https://hg.mozilla.org/integration/autoland/rev/968440cf258b apply code formatting via Lando
Blocks: 1840025

(In reply to Botond Ballo [:botond] from comment #7)

I'm going to drop that patch from the patch series, and file a follow-up for making that change.

The follow-up is bug 1840025.

Regressions: 1840239
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: