[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 10:19:49 PST 2010


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





--- Comment #17 from Carlos Garcia Campos <cgarcia at igalia.com>  2010-12-14 10:19:49 PST ---
(In reply to comment #15)
> (In reply to comment #14)
> 
> > I think both signals are complementary to cover different test cases. 
> 
> I think API simplicity is the big advantage of having only one signal. Even more confusing is an API where the WebKitWebSettings default context menu setting only affects the old signal. All of this logic can be encapsulated by simply firing one signal. If we're going to fix the situation, why not fix it all the way?

if the problem is the setting, we can have the 4 test cases I mentioned with the two signals without the setting. The problem is that I don't see how to implement such 4 cases with only one signal. 

> 
> > Passing a list of items, using a GList or any other container, would mean the client would have to iterate the list comparing every item in the list with every item he wanted to add to know wehter to add it ro not, assuming we know how to compare the items which is another problem.
> 
> Right now this is the only way to expose the default menu items to the embedder. We must expose some way for the embedder to both show the input method menu and use a non-default context menu. 
> 
> It's unfortunate that this is so ugly.  At the hackfest we briefly discussed making the order and naming follow API stability rules. If, as you say, there's an even saner way to do this with the GtkAction API, I think we should do that. Let's make the API simple and beautiful. :)

GtkAction has a unique id which is the name, but the API won't be simpler even less beautiful (but I admit it's a matter of taste). 
If we go with single signal I would need at least a way to disable the context menu, so that ephy can still has its own context menu and perform a hit test by its own, which is what it currently does, but disabling the context menu we would avoid doing the hit test twice. We would also need API to get the current focused node from ephy to implement the context menu when it's triggered by the keyboard.

-- 
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