MiniBrowser should support sub menus.
Created attachment 199643 [details] proposed patch Current implementation uses Elementary Ctxpopup widget, which does not support submenus. To implement submenus in Minibrowser, widget should be changed to Elementary Menu widget.
Comment on attachment 199643 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=199643&action=review > Tools/MiniBrowser/efl/main.c:1180 > + Evas_Coord ewk_x, ewk_y; Why is this coordinate translation needed now?
Comment on attachment 199643 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=199643&action=review >> Tools/MiniBrowser/efl/main.c:1180 >> + Evas_Coord ewk_x, ewk_y; > > Why is this coordinate translation needed now? It is just something I forgot to add in earlier patch. Parent object for elm_menu is elm_window and the coordinates received from WebKit are webview coordinates, which position differs from window because of i.e. url bar.
Comment on attachment 199643 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=199643&action=review >>> Tools/MiniBrowser/efl/main.c:1180 >>> + Evas_Coord ewk_x, ewk_y; >> >> Why is this coordinate translation needed now? > > It is just something I forgot to add in earlier patch. Parent object for elm_menu is elm_window and the coordinates received from WebKit are webview coordinates, which position differs from window because of i.e. url bar. The context menu is created in wrong places when the window is resized.
(In reply to comment #4) > (From update of attachment 199643 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=199643&action=review > > >>> Tools/MiniBrowser/efl/main.c:1180 > >>> + Evas_Coord ewk_x, ewk_y; > >> > >> Why is this coordinate translation needed now? > > > > It is just something I forgot to add in earlier patch. Parent object for elm_menu is elm_window and the coordinates received from WebKit are webview coordinates, which position differs from window because of i.e. url bar. > > The context menu is created in wrong places when the window is resized. We should disable window resizing during showing context menu/select popup, as it is done in other browsers. I will try to find solution for that.
Comment on attachment 199643 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=199643&action=review >>>>> Tools/MiniBrowser/efl/main.c:1180 >>>>> + Evas_Coord ewk_x, ewk_y; >>>> >>>> Why is this coordinate translation needed now? >>> >>> It is just something I forgot to add in earlier patch. Parent object for elm_menu is elm_window and the coordinates received from WebKit are webview coordinates, which position differs from window because of i.e. url bar. >> >> The context menu is created in wrong places when the window is resized. > > We should disable window resizing during showing context menu/select popup, as it is done in other browsers. I will try to find solution for that. I personally think it would be better to dismiss the context menu when the window gets resized.
Created attachment 202527 [details] hiding menu on window resize added
Created attachment 202528 [details] hiding menu on window resize added
It crashes when I maximize the window and the context menu is shown: Showing context menu at (457, 355). Program received signal SIGSEGV, Segmentation fault. 0x00007ffff78c08f0 in ewk_object_is_of_type<EwkContextMenu*> (object=0x17db8c0) at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:40 40 return (reinterpret_cast<T>(0)->className() == object->instanceClassName()); (gdb) bt #0 0x00007ffff78c08f0 in ewk_object_is_of_type<EwkContextMenu*> (object=0x17db8c0) at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:40 #1 0x00007ffff78c0717 in ewk_object_cast_check<EwkContextMenu*> (object=0x17db8c0) at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:48 #2 0x00007ffff78c0614 in ewk_object_cast<EwkContextMenu*> (object=0x17db8c0) at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:67 #3 0x00007ffff78bfb80 in ewk_context_menu_hide (menu=0x17db8c0) at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_context_menu.cpp:128 #4 0x0000000000405602 in on_window_resize (user_data=0x47ec30, e=0x480260, elm_window=0x8006b0, event_info=0x0) at /home/chris/devel/WebKit/Tools/MiniBrowser/efl/main.c:275 #5 0x00007ffff7e35252 in evas_object_event_callback_call (obj=obj@entry=0x8006b0, type=type@entry=EVAS_CALLBACK_RESIZE, event_info=event_info@entry=0x0, event_id=10884) at evas_callbacks.c:232 #6 0x00007ffff7e4f99e in evas_object_inform_call_resize (obj=0x8006b0) at evas_object_inform.c:38 #7 0x00007ffff7e4cfd1 in evas_object_resize (obj=<optimized out>, w=<optimized out>, h=<optimized out>) at evas_object_main.c:753 #8 0x00007ffff6dfa228 in _elm_win_resize_job (data=0x88e180) at elm_win.c:578 #9 0x00007ffff7fd56cb in _ecore_job_event_handler (data=<optimized out>, type=<optimized out>, ev=<optimized out>) at ecore_job.c:115 #10 0x00007ffff7fd210c in _ecore_call_handler_cb (event=<optimized out>, type=<optimized out>, data=<optimized out>, func=<optimized out>) at ecore_private.h:321 #11 _ecore_event_call () at ecore_events.c:559 #12 0x00007ffff7fd6909 in _ecore_main_loop_iterate_internal (once_only=once_only@entry=0) at ecore_main.c:1922 #13 0x00007ffff7fd6e97 in ecore_main_loop_begin () at ecore_main.c:956 #14 0x0000000000409bfa in elm_main (argc=1, argv=0x7fffffffe0d8) at /home/chris/devel/WebKit/Tools/MiniBrowser/efl/main.c:1719 #15 0x0000000000409c3c in main (argc=1, argv=0x7fffffffe0d8) at /home/chris/devel/WebKit/Tools/MiniBrowser/efl/main.c:1723
Comment on attachment 202528 [details] hiding menu on window resize added View in context: https://bugs.webkit.org/attachment.cgi?id=202528&action=review r- due to crashing. > Tools/MiniBrowser/efl/main.c:1620 > nit: useless blank line here.
(In reply to comment #9) > It crashes when I maximize the window and the context menu is shown: > > Showing context menu at (457, 355). > > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff78c08f0 in ewk_object_is_of_type<EwkContextMenu*> (object=0x17db8c0) > at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:40 > 40 return (reinterpret_cast<T>(0)->className() == object->instanceClassName()); > (gdb) bt > #0 0x00007ffff78c08f0 in ewk_object_is_of_type<EwkContextMenu*> (object=0x17db8c0) > at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:40 > #1 0x00007ffff78c0717 in ewk_object_cast_check<EwkContextMenu*> (object=0x17db8c0) > at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:48 > #2 0x00007ffff78c0614 in ewk_object_cast<EwkContextMenu*> (object=0x17db8c0) > at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_object_private.h:67 > #3 0x00007ffff78bfb80 in ewk_context_menu_hide (menu=0x17db8c0) > at /home/chris/devel/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_context_menu.cpp:128 > #4 0x0000000000405602 in on_window_resize (user_data=0x47ec30, e=0x480260, elm_window=0x8006b0, event_info=0x0) > at /home/chris/devel/WebKit/Tools/MiniBrowser/efl/main.c:275 > #5 0x00007ffff7e35252 in evas_object_event_callback_call (obj=obj@entry=0x8006b0, type=type@entry=EVAS_CALLBACK_RESIZE, > event_info=event_info@entry=0x0, event_id=10884) at evas_callbacks.c:232 > #6 0x00007ffff7e4f99e in evas_object_inform_call_resize (obj=0x8006b0) at evas_object_inform.c:38 > #7 0x00007ffff7e4cfd1 in evas_object_resize (obj=<optimized out>, w=<optimized out>, h=<optimized out>) at evas_object_main.c:753 > #8 0x00007ffff6dfa228 in _elm_win_resize_job (data=0x88e180) at elm_win.c:578 > #9 0x00007ffff7fd56cb in _ecore_job_event_handler (data=<optimized out>, type=<optimized out>, ev=<optimized out>) at ecore_job.c:115 > #10 0x00007ffff7fd210c in _ecore_call_handler_cb (event=<optimized out>, type=<optimized out>, data=<optimized out>, func=<optimized out>) > at ecore_private.h:321 > #11 _ecore_event_call () at ecore_events.c:559 > #12 0x00007ffff7fd6909 in _ecore_main_loop_iterate_internal (once_only=once_only@entry=0) at ecore_main.c:1922 > #13 0x00007ffff7fd6e97 in ecore_main_loop_begin () at ecore_main.c:956 > #14 0x0000000000409bfa in elm_main (argc=1, argv=0x7fffffffe0d8) at /home/chris/devel/WebKit/Tools/MiniBrowser/efl/main.c:1719 > #15 0x0000000000409c3c in main (argc=1, argv=0x7fffffffe0d8) at /home/chris/devel/WebKit/Tools/MiniBrowser/efl/main.c:1723 window->context_menu.ewk_menu was not nulled after menu was hidden by WebKit
Created attachment 202531 [details] added nulling context_menu.ewk_menu
wr(In reply to comment #12) > Created an attachment (id=202531) [details] > added nulling context_menu.ewk_menu wrong patch
Created attachment 202532 [details] added nulling context_menu.ewk_menu
Comment on attachment 202532 [details] added nulling context_menu.ewk_menu LGTM. r=me. However, the "go back" item shows as enabled on a page where going back is impossible. This is not related to this patch as the value provided by WebKit is wrong. Could you please look into this issue?
Comment on attachment 202532 [details] added nulling context_menu.ewk_menu Clearing flags on attachment: 202532 Committed r150515: <http://trac.webkit.org/changeset/150515>
All reviewed patches have been landed. Closing bug.