See the patch.
Created attachment 403194 [details]
There's a bug where the velocity is calculated incorrectly. That's https://bugs.webkit.org/show_bug.cgi?id=213789, it happens in GTK3 as well, so a separate bug.
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment on attachment 403194 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=403194&action=review
Thanks! I think it would be easier to refactor the WebEventFactory create functions.
> NativeWebWheelEvent(GdkEvent*, const WebCore::IntPoint&, const WebCore::FloatSize& wheelTicks);
> + NativeWebWheelEvent(GdkEvent*, const WebCore::IntPoint&, const WebCore::FloatSize& wheelTicks, WebWheelEvent::Phase, WebWheelEvent::Phase momentumPhase);
I think this new one makes the previous one unused, so better to modify the existing one if needed.
> + WebWheelEvent::Phase phase = gdk_event_is_scroll_stop_event(event) ?
> + WebWheelEvent::Phase::PhaseEnded :
> + WebWheelEvent::Phase::PhaseChanged;
So, in the end we are passing a fixed momentum phase and phase value that depends on event, so this could be done in WebEventFactory.cpp instead if the parameters currently passed.
Sure, makes sense.
Created attachment 403366 [details]
Committed r263887: <https://trac.webkit.org/changeset/263887>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 403366 [details].