[Webkit-unassigned] [Bug 159631] [GTK] Add webkit_context_menu_item_new_from_gaction

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 8 07:43:11 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=159631

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at igalia.com

--- Comment #6 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to comment #5)
> I'm not sure about this API, TBH. It's just creating a GtkAction from a
> GAction and then calling webkit_context_menu_item_new() with the GtkAction,
> something that applications can do. I agree it would be convenient if that
> code is duplicated in all applications, but I don't think there's any
> application currently using this.

It's quite a complex thing to expect applications to do, though. This code is being moved from Epiphany. We want to stop using GtkAction so we can drop -Wno-deprecated-declarations from our build. Surely, any application creating its own WebKitContextMenuItems would want this API. It might be that only Epiphany is doing that right now, but this is generally useful.

> No, we can't. To do that we need to rework the internal context menu code to
> work with GAction (I don't even know if that's possible), and then deprecate
> the public API using GtkAction. With this patch if you create a context menu
> item from a GAction, the only way to get the action is using
> webkit_context_menu_item_get_action(), that returns a GtkAction.

OK, you're right about that, I didn't notice this problem. :( So deprecating the GtkAction version only makes sense if we also deprecate webkit_context_menu_item_get_action, even though we don't have a replacement for that. I don't think it matters too much whether we deprecate these or not, but I would, since GtkAction itself is deprecated and we have no choice but to remove these functions from our GTK+ 4 API.

Another issue is that the first unstable GTK+ 4 release is right around the corner, and GtkAction is going away. This patch is a good band-aid for GTK+ 3 API users, but for GTK+ 4 we need to completely rewrite WebKitContextMenu/WebKitContextMenuItem to no longer use GtkAction. We will need two parallel implementations depending on which version of GTK+ we compile with. (The function added in this patch clearly only makes sense for our GTK+ 3 API.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160908/c4177882/attachment.html>


More information about the webkit-unassigned mailing list