[Webkit-unassigned] [Bug 49904] [GTK] Add a signal to allow applications to handle its own context menu

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 14 08:28:33 PST 2010


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





--- Comment #10 from Carlos Garcia Campos <cgarcia at igalia.com>  2010-12-14 08:28:33 PST ---
(In reply to comment #9)
> The context menu signal + setting is already far too complex. I'm not a fan of adding another signal entirely. This patch is very close to handling every use case we need for context menus. 

close? which use case is not handled? I see 4 uses cases:

- Apps that don't care at all about the context menu and want webkit to show its default context menu. In this case just enable the default context menu setting.
- Apps tha want to add just a few custom options to the context menu that are not already handled by the default context menu. In this case just enabled the default context menu setting and connect to the populate signal to add the custom options to the default menu.
- Apps that want to handle the whole menu by their own. This is the case of epiphany. It disables the default context menu and creates its own, with the options handled by the default context menu and some others. In this case connect to contex-menu signal, show the menu and return TRUE to not handle the default context menu.
- Apps that don't want any context menu at all, not even the default one. They simply connect to context-menu and return TRUE without doing anything else.

> The changes that make sense to me:
> 1. Have the signal carry a GList of default menu items. Users can modify the list to modify what the default signal handler uses for the menu.

what would be the id to know whether an item is the same you want to use? the label of the menu item? 

> 2. Deprecate the existing context menu setting and signal.

how would you handle the case of applications (like ephy) that want to handle its own context menu?You are assuming apps want a menu to fill, but some apps have their own menu like the ephy one, created with GtkUIManager using a placeholder menu item to fill. 

> 3. Pass the actual DOM node instead of the hit test result. The DOM node carries more useful information and makes sense even for keyboard activation.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list