Closed Bug 1810935 Opened 2 years ago Closed 9 months ago

The overscroll gutter on the root scroller gets stuck in some cases

Categories

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

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: hiro, Assigned: botond)

References

Details

Attachments

(1 file)

STR;

  1. Open https://bugzilla.mozilla.org/attachment.cgi?id=9300038
  2. Try to scroll upward on the sub scroller there thus the root scroll container will be overscrolled
  3. Try to scroll downward on the sub scroller strongly, i.e. fling strongly to make the sub scroller overscrolling at the bottom edge

Interestingly I can't see the issue on Windows. (I haven't tried it on Mac)

Okay this issue doesn't happen on Mac either.

Blocks: overscroll-linux
No longer blocks: overscroll
Severity: -- → S3
Priority: -- → P3

I can reproduce this. I think this should be a straightforward fix.

Assignee: nobody → botond

I've debugged what's happening here.

First, to describe the expected behaviour:

  1. When the second pan gesture (which will scroll the subframe) starts while the root scroll frame is overscrolled, it's expected that the root scroll frame remains in an overscrolled state. (We don't want the root scroll frame to be animating, potentially moving the scroll port of the subframe relative to the cursor, while the fingers are in contact with the touchpad.)
  2. However, when the second pan gesture ends, all APZCs in the handoff chain which are overscrolled (including the root) should snap back

The reason the issue does not occur on Windows and Mac is that on those platforms, PanGestureInput::mSimulateMomentum is false, and so in OnPanEnd() we get to the SnapBackOverscrolledApzcForMomentum() call here.

On Linux, we take this branch to start a fling animation. In the fling animation code, we do have some code paths which trigger a snap-back of the entire handoff chain, but if we get into HandleFlingOverscroll(), we end up snapping back only the current APZC.

Note, the non-passive event listener in the testcase is not necessary for triggering the bug. The bug can also be reproduced on https://theres-waldo.github.io/mozilla-testcases/nested.html.

Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5ee5bd8712a5 When a fling animation ends, snap back all overscrolled APZCs. r=hiro
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: