Bug 142351 - [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
Summary: [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Reported: 2015-03-05 11:34 PST by Brent Fulgham
Modified: 2015-03-05 21:18 PST (History)
2 users (show)

See Also:

Patch (1.78 KB, patch)
2015-03-05 12:47 PST, Brent Fulgham
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-03-05 11:34:50 PST
When working with scroll snap points, I frequently encounter a problem where a momentum gesture does not smoothly animate to the expected snap point. Instead, the momentum animation follows its normal animation curve, ending somewhat short of the desired scroll point. At that point, the snap point animation picks up and slides the element to the correct snap point.

This is incorrect. The momentum gesture should be calculating its path based on the snap point.
Comment 1 Radar WebKit Bug Importer 2015-03-05 11:35:28 PST
Comment 2 Brent Fulgham 2015-03-05 12:45:18 PST
The problem was caused by an incorrect command to start a new snapping animation timer when the end momentum phase event had been received. This caused WebKit to recalculate the animation curve for the remaining distance, resulting in the bad animation behavior.

Removing the start animation command when entering the momentum ended state causes the animation to play out properly.
Comment 3 Brent Fulgham 2015-03-05 12:47:34 PST
Created attachment 247983 [details]
Comment 4 Brent Fulgham 2015-03-05 21:18:15 PST
Committed r181137: <http://trac.webkit.org/changeset/181137>