WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
159630
[GTK] Add webkit_context_menu_find API
https://bugs.webkit.org/show_bug.cgi?id=159630
Summary
[GTK] Add webkit_context_menu_find API
Michael Catanzaro
Reported
2016-07-11 10:08:32 PDT
We have this code in ephy-window.c; it should probably be upstreamed into WebKitContextMenu. /* FIXME: Add webkit_context_menu_find() ? */ static WebKitContextMenuItem * find_item_in_context_menu (WebKitContextMenu *context_menu, WebKitContextMenuAction action) { GList *items, *iter; items = webkit_context_menu_get_items (context_menu); for (iter = items; iter; iter = g_list_next (iter)) { WebKitContextMenuItem *item = (WebKitContextMenuItem *)iter->data; if (webkit_context_menu_item_get_stock_action (item) == action) return g_object_ref (item); } return NULL; }
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2016-07-11 10:16:42 PDT
It's written by Carlos Garcia, so we have no copyright issues, but let's have Carlos give final review on this as a formality.
Carlos Garcia Campos
Comment 2
2016-07-13 00:03:43 PDT
Well, this is very specific to what we need in ephy, as a general purpose API we should probably use a compare function as argument instead of searching by stock action unconditionally. And maybe a flag to indicate whether we want to search for the item in submenus or not
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug