Bug 142351

Summary: [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: Layout and RenderingAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Patch dino: review+

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
<rdar://problem/20058023>
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]
Patch
Comment 4 Brent Fulgham 2015-03-05 21:18:15 PST
Committed r181137: <http://trac.webkit.org/changeset/181137>