Bug 17046

Summary: [GTK] Context menu fixes and customisation suport
Product: WebKit Reporter: Christian Dywan <christian>
Component: WebKitGTKAssignee: Christian Dywan <christian>
Status: RESOLVED FIXED    
Severity: Major CC: alp, iwkse, lars, tofu.linden
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Make context menu native
none
Make context menu native, fixed
alp: review-
Updated as discussed alp: review+

Christian Dywan
Reported 2008-01-28 10:59:10 PST
WebCore's implementation of context menus is rather static and focused on the Mac port's needs. The goal of this bug is to make context menus behave according to Gtk conventions.
Attachments
Make context menu native (11.92 KB, patch)
2008-01-28 11:28 PST, Christian Dywan
no flags
Make context menu native, fixed (23.56 KB, patch)
2008-01-31 10:34 PST, Christian Dywan
alp: review-
Updated as discussed (23.42 KB, patch)
2008-02-02 16:16 PST, Christian Dywan
alp: review+
Christian Dywan
Comment 1 2008-01-28 11:28:38 PST
Created attachment 18739 [details] Make context menu native This is an attempt to make the context menu feel native on the Gtk port. . The editable menu gains Delete and Select All items. Further more the Writing Direction menu was superseded by Input Methods and Insert Unicode Control Character. . Back, Forward, Stop and Reload are always visible but insensitive when unavailable. . Stock item labels provided by Gtk are preferred over custom strings. . A 'populate-popup' signal is emitted on WebKitWebView to allow clients to extend the context menu.
Alp Toker
Comment 2 2008-01-30 20:54:12 PST
Sure this patch is complete? The new menu entries (Delete, Select All) don't appear for me.
Christian Dywan
Comment 3 2008-01-31 10:34:14 PST
Created attachment 18820 [details] Make context menu native, fixed Dunno what went wrong, uploading file anew.
Alp Toker
Comment 4 2008-02-01 15:20:22 PST
*** Bug 15784 has been marked as a duplicate of this bug. ***
Alp Toker
Comment 5 2008-02-01 15:52:18 PST
Comment on attachment 18820 [details] Make context menu native, fixed Needs better NULL safety and static WebCore strings for stock labels, and _ gettext should not be used for these strings, all as discussed on IRC. (I also wonder if there's a less intrusive way to support itemCount(), though this approach is OK I guess.)
Christian Dywan
Comment 6 2008-02-02 16:16:34 PST
Created attachment 18876 [details] Updated as discussed
Alp Toker
Comment 7 2008-02-03 22:21:00 PST
Comment on attachment 18876 [details] Updated as discussed r=me Adding a couple of null checks as discussed, and a FIXME noting that the WebKit use should be removed from WebCore at some point.
Alp Toker
Comment 8 2008-02-03 22:23:12 PST
Landed in r29958. Hope you'll be able to look into fixing the FIXMEs soon.
Note You need to log in before you can comment on or make changes to this bug.