Bug 156834 - [GTK] WebKitWebView should propagate wheel events not handled by the web process
Summary: [GTK] WebKitWebView should propagate wheel events not handled by the web process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2016-04-21 00:51 PDT by Carlos Garcia Campos
Modified: 2016-04-21 03:50 PDT (History)
2 users (show)

See Also:


Attachments
Patch (8.80 KB, patch)
2016-04-21 00:56 PDT, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2016-04-21 00:51:17 PDT
We are currently swallowing all wheel events unconditionally, not allowing applications to handle wheel events when not handled by us. Since the GTK+ event propagation system is synchronous, and our events are handled asynchronously, we need to do something similar to what we do for key events, not propagate the vent the first time and if not handled by the web process, re-inject it in the event loop and then just propagate it.
Comment 1 Carlos Garcia Campos 2016-04-21 00:56:18 PDT
Created attachment 276901 [details]
Patch
Comment 2 Zan Dobersek 2016-04-21 03:37:15 PDT
Comment on attachment 276901 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=276901&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:857
> +    if (priv->shouldForwardNextWheelEvent) {

std::exchange()

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:863
> -        return TRUE;
> +        return FALSE;

Intended?
Comment 3 Carlos Garcia Campos 2016-04-21 03:43:18 PDT
(In reply to comment #2)
> Comment on attachment 276901 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=276901&action=review
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:857
> > +    if (priv->shouldForwardNextWheelEvent) {
> 
> std::exchange()
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:863
> > -        return TRUE;
> > +        return FALSE;
> 
> Intended?

Yes, because the web view is never scrollable when the auth dialog is present, we want to propagate the event to allow apps to handle it.
Comment 4 Carlos Garcia Campos 2016-04-21 03:50:51 PDT
Committed r199810: <http://trac.webkit.org/changeset/199810>