RESOLVED FIXED 142351
[Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
https://bugs.webkit.org/show_bug.cgi?id=142351
Summary [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
Brent Fulgham
Reported 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.
Attachments
Patch (1.78 KB, patch)
2015-03-05 12:47 PST, Brent Fulgham
dino: review+
Radar WebKit Bug Importer
Comment 1 2015-03-05 11:35:28 PST
Brent Fulgham
Comment 2 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.
Brent Fulgham
Comment 3 2015-03-05 12:47:34 PST
Brent Fulgham
Comment 4 2015-03-05 21:18:15 PST
Note You need to log in before you can comment on or make changes to this bug.