Scroll snapping should trigger when receiving a wheel event indicating momentum end. This will allow our failing scroll snapping layout tests to pass, since asynchronous momentum wheel events are currently being coalesced. However, in theory, if a user were to flick extremely lightly on the trackpad and generate fewer than 3 wheel momentum events before letting go, scroll snapping would not occur.
<rdar://problem/22336880>
Created attachment 259361 [details] Patch
Comment on attachment 259361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259361&action=review > Source/WebCore/platform/cocoa/ScrollController.mm:571 > + else { > + snapState.clearInitialWheelDeltaWindow(); > + snapState.m_shouldOverrideWheelEvent = false; > + } It's not obvious to me why this is inside an "else". beginScrollSnapAnimation does set these variables, but not in all code paths.
Comment on attachment 259361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259361&action=review Thanks for the review! >> Source/WebCore/platform/cocoa/ScrollController.mm:571 >> + } > > It's not obvious to me why this is inside an "else". beginScrollSnapAnimation does set these variables, but not in all code paths. Good point. I should be able to lift the logic to reset the delta window and override state out of the else clause, since we should be doing this anyway even if we don't trigger a glide here.
Committed r188641: <http://trac.webkit.org/changeset/188641>