Bug 156834

Summary: [GTK] WebKitWebView should propagate wheel events not handled by the web process
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, mcrha
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch zan: review+

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>