[Webkit-unassigned] [Bug 50762] [EFL] ContextMenu implementation is broken

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 15 10:50:40 PST 2010


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





--- Comment #5 from Brian Weinstein <bweinstein at apple.com>  2010-12-15 10:50:40 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (From update of attachment 76537 [details] [details] [details])
> > > Is there a way you can do this without passing a ContextMenuController to the ContextMenu constructor? That is a layering violation in itself, ContextMenu can't know about ContextMenuController.
> > 
> > The two places in which it's needed inside our APIs are (WebKit/efl/ewk_contextmenu.c):
> > 
> > Eina_Bool ewk_context_menu_destroy(Ewk_Context_Menu* menu)
> > Eina_Bool ewk_context_menu_item_select(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item* item)
> > 
> > 
> > With these functions we can respectively tell WebCore to destroy de ContextMenu and select an item. How would this be accomplished without access to the controller?
> > 
> > Should I go through page->contextMenuController()? I'm almost sure I can do this because there's a ref to webview in WebCore::ContextMenuClientEfl, but I need to check.
> 
> Checking again, the problem with this is that we need access to ContextMenuClient from within ContextMenu. When we create the ContextMenu, we give the ContextMenuClient (through the controller) because we don't create the widgets. We need to forward this call to browser so it can actually create them.

Could you pass the ContextMenuClient instead of the ContextMenuController? I think that would be okay, but would need to see a patch to know for sure.

One option would be to hook into the new USE(CROSS_PLATFORM_CONTEXT_MENUS) macro, which gives you a representation of ContextMenus and ContextMenuItems not using native types, and all you need to do is write functions that convert from ContextMenu <-> Native EFL Menus, and ContextMenuItem <-> Native EFL Menu Items. If you want to see how that is done currently, look at ContextMenu{.h|.cpp}, ContextMenuItem{.h|.cpp}, ContextMenuItemWin.cpp and ContextMenuWin.cpp.

All you would need to do is to write ContextMenuItemEfl.cpp and ContextMenuEfl.cpp, which convert to/from the native types.

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