Bug 207113

Summary: [GTK] Mouse wheel events on horizontal scrollbar not correctly handled when AC mode is forced
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: aperez, berto, bugs-noreply, ews-watchlist, gustavo, zan
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch aperez: review+

Description Carlos Garcia Campos 2020-02-03 05:53:48 PST
When scrolling with the mouse over an horizontal srollbar we invert the axis to scroll horizontally. When AC mode is forced this doesn't happen because async scrolling doesn't use EventHandler::handleWheelEvent() which is where the axis are inverted. I'm not sure this is easy to fix, we should move the axis inversion to EventDispatcher.cpp, but that's happening in a secondary thread and we would need to perform a hit test to check if the mouse is over an horizontal scrollbar.
Comment 1 Carlos Garcia Campos 2020-03-05 01:35:24 PST
I've checked other browsers and they don't invert the axis when scrolling on an horizontal scrollbar, so mayb it's easier to simply stop doing so in GTK port as well. You can still use SHIFT + wheel to scroll horizontally.
Comment 2 Carlos Garcia Campos 2020-03-05 04:15:54 PST
Created attachment 392555 [details]

Horizontal scrolling with mouse wheel is still broken with async scrolling, but because it doesn't seem to be handling those events correctly (it doesn't work when using Shift + wheel either), so I'll file another bug.
Comment 3 EWS Watchlist 2020-03-05 04:16:56 PST
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 4 Carlos Garcia Campos 2020-03-05 05:05:23 PST
Ok, it works with async scrolling, but only in the main frame (due to bug #208635) and the right/left direction is swapped (that's another bug)
Comment 5 Carlos Garcia Campos 2020-03-05 06:07:10 PST
(In reply to Carlos Garcia Campos from comment #4)
> Ok, it works with async scrolling, but only in the main frame (due to bug
> #208635) and the right/left direction is swapped (that's another bug)

See bug #208638
Comment 6 Carlos Garcia Campos 2020-07-30 04:16:45 PDT
Created attachment 405562 [details]
Comment 7 Adrian Perez 2020-07-30 07:35:54 PDT
Comment on attachment 405562 [details]

Really nice patch, I like it that it actually simplifies the code :)
Comment 8 Carlos Garcia Campos 2020-07-31 03:57:26 PDT
Committed r265138: <https://trac.webkit.org/changeset/265138>