Bug 211073 - [GTK4] Add support for motion events
Summary: [GTK4] Add support for motion events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 211045
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-04-27 06:00 PDT by Carlos Garcia Campos
Modified: 2020-04-28 05:27 PDT (History)
5 users (show)

See Also:


Attachments
Patch (13.86 KB, patch)
2020-04-27 06:03 PDT, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff
Patch for landing (13.82 KB, patch)
2020-04-28 04:57 PDT, Carlos Garcia Campos
no flags 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 2020-04-27 06:00:57 PDT
enter, leave and motion
Comment 1 Carlos Garcia Campos 2020-04-27 06:03:28 PDT
Created attachment 397675 [details]
Patch
Comment 2 Adrian Perez 2020-04-27 07:59:13 PDT
Comment on attachment 397675 [details]
Patch

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

> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
> +    // FIXME: Forward event to dialog.

Wouldn't this be “if (priv->dialog) return GDK_EVENT_PROPAGATE;” like
in the function right above? If so, I think we should do it already for
this patch and remove this FIXME.

> Tools/MiniBrowser/gtk/BrowserTab.c:410
> +#if !GTK_CHECK_VERSION(3, 98, 0)

How about removing the margin also for GTK3 so we don't need the #if here?
Comment 3 Carlos Garcia Campos 2020-04-28 04:49:37 PDT
Comment on attachment 397675 [details]
Patch

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

>> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
>> +    // FIXME: Forward event to dialog.
> 
> Wouldn't this be “if (priv->dialog) return GDK_EVENT_PROPAGATE;” like
> in the function right above? If so, I think we should do it already for
> this patch and remove this FIXME.

No, in the case of motion events we are not just returning propagate but chaining up. I don't remember why, so I prefer to wait until we implement the dialogs to see what we need to do here.

>> Tools/MiniBrowser/gtk/BrowserTab.c:410
>> +#if !GTK_CHECK_VERSION(3, 98, 0)
> 
> How about removing the margin also for GTK3 so we don't need the #if here?

Or adding it in the case of GTK4, but I don't know how or whether it's possible. This bug is not about this, that's why I didn't change any behavior here, I added back the overlay just to avoid runtime criticals and check that items are properly hovered.
Comment 4 Carlos Garcia Campos 2020-04-28 04:57:25 PDT
Created attachment 397829 [details]
Patch for landing
Comment 5 EWS Watchlist 2020-04-28 04:58:12 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
Comment 6 Carlos Garcia Campos 2020-04-28 05:27:58 PDT
Committed r260819: <https://trac.webkit.org/changeset/260819>