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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 7 23:17:03 PDT 2016


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

Carlos Garcia Campos <cgarcia at igalia.com> changed:

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

--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #3)
> Comment on attachment 288043 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=288043&action=review
> 
> Great job!
> 
> r+ means review pass, since my comments are all minor. cq- means
> commit-queue denied. You'll need to re-upload this patch to address my
> comments, but you can manually write "Reviewed by Michael Catanzaro" and
> don't need to set the r? flag again, just cq?. Still, since this patch adds
> new API, it needs to be approved by a second GTK+ reviewer before we can
> commit it. Carlos Garcia will look at it soon.

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.

> Also, I forgot to suggest this earlier, but we should also deprecate
> webkit_context_menu_item_new(), since it's impossible to use without using
> deprecated GtkAction. You can look at
> webkit_web_context_set_disk_cache_directory() for an example of how to
> deprecate a method; it would look like this:
> 
> Deprecated: 2.16. Use webkit_context_menu_item_new_from_gaction() instead.

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. This is also quite confusing. It wouldn't be confusing in applications code, since they know they are actually creating a GtkAction from the GAction.

-- 
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/ba09129a/attachment.html>


More information about the webkit-unassigned mailing list