Bug 100009 - [EFL] MiniBrowser focuses the URL bar by default even though it should not
Summary: [EFL] MiniBrowser focuses the URL bar by default even though it should not
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2012-10-22 09:39 PDT by Raphael Kubo da Costa (:rakuco)
Modified: 2017-03-11 10:34 PST (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa (:rakuco) 2012-10-22 09:39:39 PDT
While looking at an issue with fast/repaint/delete-into-nested-block.html, I tried running it with MiniBrowser and noticed that, contrary to other MiniBrowsers and real browsers, the URL bar ended up being focused by default instead of the page itself -- in the specific case of this tests, this means we do not see the focus ring round the <div> at the end of the page.

MiniBrowser's code does try to force the view to have focus by default by calling view_focus_set(..., EINA_TRUE) at the end of window_create(), however when the actual window is created and receives focus by the window manager the following snippet gets executed:

#0  evas_object_focus_set (obj=0x6d9000, focus=1 '\001') at evas_focus.c:12
#1  0x00007fffed76ae30 in _elm_win_smart_on_focus (obj=0x6d9000) at elm_win.c:972
#2  _elm_win_smart_on_focus (obj=0x6d9000) at elm_win.c:965
#3  0x00007fffed764222 in _parent_focus (obj=0x6d9000) at elm_widget.c:834
#4  0x00007fffed76439b in elm_widget_focus_steal (obj=<optimized out>) at elm_widget.c:2870
#5  elm_widget_focus_steal (obj=<optimized out>) at elm_widget.c:2823
#6  0x00007fffed76b3ad in _elm_win_focus_in (ee=<optimized out>) at elm_win.c:782
#7  0x00007fffee0e55a3 in _ecore_evas_x_event_window_focus_in (data=<optimized out>, type=<optimized out>, event=0x743940) at ecore_evas_x.c:937
#8  0x00007fffee306f7c in _ecore_call_handler_cb (event=<optimized out>, type=<optimized out>, data=<optimized out>, func=<optimized out>) at ecore_private.h:319
#9  _ecore_event_call () at ecore_events.c:559
#10 0x00007fffee30b4c9 in _ecore_main_loop_iterate_internal (once_only=once_only@entry=0) at ecore_main.c:1900
#11 0x00007fffee30ba57 in ecore_main_loop_begin () at ecore_main.c:934
#12 0x0000000000405118 in elm_main (argc=2, argv=0x7fffffffe2c8) at /home/rakuco/dev/WebKit/Tools/MiniBrowser/efl/main.c:771
#13 0x000000000040515a in main (argc=2, argv=0x7fffffffe2c8) at /home/rakuco/dev/WebKit/Tools/MiniBrowser/efl/main.c:775

obj=0x6d9000 is the top-level elm_win.

This call to evas_object_focus_set(), in turn, also removes the focus from the previous owner (the webview), which triggers a call to the unfocus handlers in ewk_view, which then causes the focus ring to be removed from the <div>.

We probably need to override elm_{widget,win}'s focus stealing code or implement view_focus_set() in a different way.
Comment 1 Michael Catanzaro 2017-03-11 10:34:33 PST
Closing this bug because the EFL port has been removed from trunk.

If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.