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.
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.
Created attachment 247983 [details]
Committed r181137: <http://trac.webkit.org/changeset/181137>