Bug 213791

Summary: [GTK4] Support kinetic scrolling
Product: WebKit Reporter: Alice Mikhaylenko <alicem>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, cgarcia, ews-watchlist, gustavo
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Alice Mikhaylenko
Reported 2020-06-30 06:37:44 PDT
See the patch.
Attachments
Patch (5.38 KB, patch)
2020-06-30 06:42 PDT, Alice Mikhaylenko
no flags
Patch (5.89 KB, patch)
2020-07-02 07:33 PDT, Alice Mikhaylenko
no flags
Alice Mikhaylenko
Comment 1 2020-06-30 06:42:06 PDT
Alice Mikhaylenko
Comment 2 2020-06-30 06:42:55 PDT
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.
EWS Watchlist
Comment 3 2020-06-30 06:43:03 PDT
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
Carlos Garcia Campos
Comment 4 2020-07-02 02:15:02 PDT
Comment on attachment 403194 [details] Patch 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. > Source/WebKit/Shared/NativeWebWheelEvent.h:64 > 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. > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:1278 > + 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.
Alice Mikhaylenko
Comment 5 2020-07-02 05:07:30 PDT
Sure, makes sense.
Alice Mikhaylenko
Comment 6 2020-07-02 07:33:16 PDT
EWS
Comment 7 2020-07-03 01:38:01 PDT
Committed r263887: <https://trac.webkit.org/changeset/263887> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403366 [details].
Note You need to log in before you can comment on or make changes to this bug.