Closed Bug 1785103 Opened 3 years ago Closed 3 years ago

Chrome-only scrollend events are fired multiple times for one gesture

Categories

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

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: dlrobertson, Assigned: dlrobertson)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Currently scrollend events are fired far more frequently than they should according to the spec. This happens because ScrollFrameHelper::ScrollToCSSPixelsForApz calls ScrollFrameHelper::ScrollToWithOrigin with the instant scroll option, which will cause the event to be fired here.

Blocks: 1785102
Severity: -- → S3
Priority: -- → P3
Blocks: 1785105
No longer blocks: 1785105

The scrollend event should only be fired once, at the very end of the gesture.
Fire the event for user gestures only on APZStateChange::eTransformEnd, which
is dispatched when APZ transitions from a transforming state to a state that
does not transform (e.g. a state change from PANNING to NOTHING).
CompleteAsyncScroll() should only post the scrollend event if the scroll was a
programmatic instant scroll.

Assignee: nobody → drobertson
Status: NEW → ASSIGNED
Pushed by drobertson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2712b51e6b75 Move ScrollFrameHelper::SetTransformingByAPZ(() definition out-of-line. r=botond https://hg.mozilla.org/integration/autoland/rev/0b1a9ad58327 Fire the scrollend event only once per gesture. r=botond,hiro

Gah! I should have caught that. The test uses wheel scroll events, which are not supported by android. The test should be skipped for mobile.

Flags: needinfo?(drobertson)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: