Bug 113009 - [EFL][WK2] View is not focused when fullscreen mode toggled
Summary: [EFL][WK2] View is not focused when fullscreen mode toggled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-21 23:30 PDT by Sudarsana Nagineni (babu)
Modified: 2013-03-22 09:58 PDT (History)
3 users (show)

See Also:


Attachments
patch (1.46 KB, patch)
2013-03-21 23:42 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni (babu) 2013-03-21 23:30:12 PDT
View is not focused when fullscreen mode enabled/disabled by FullScreen API.
Comment 1 Sudarsana Nagineni (babu) 2013-03-21 23:42:32 PDT
Created attachment 194455 [details]
patch
Comment 2 Laszlo Gombos 2013-03-22 01:46:48 PDT
Comment on attachment 194455 [details]
patch

lgtm.
Comment 3 Sudarsana Nagineni (babu) 2013-03-22 01:56:24 PDT
Comment on attachment 194455 [details]
patch

Thanks Laszlo.
Comment 4 WebKit Review Bot 2013-03-22 02:26:06 PDT
Comment on attachment 194455 [details]
patch

Clearing flags on attachment: 194455

Committed r146581: <http://trac.webkit.org/changeset/146581>
Comment 5 WebKit Review Bot 2013-03-22 02:26:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Chris Dumez 2013-03-22 04:04:47 PDT
Comment on attachment 194455 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=194455&action=review

> Tools/MiniBrowser/efl/main.c:1008
> +    evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);

You're supposed to call view_focus_set() not evas_object_focus_set(). Otherwise, an elementary object may keep the focus.

> Tools/MiniBrowser/efl/main.c:1019
> +    evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);

Ditto.
Comment 7 Sudarsana Nagineni (babu) 2013-03-22 05:18:26 PDT
Comment on attachment 194455 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=194455&action=review

>> Tools/MiniBrowser/efl/main.c:1008
>> +    evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);
> 
> You're supposed to call view_focus_set() not evas_object_focus_set(). Otherwise, an elementary object may keep the focus.

Initially I also thought about calling view_focus_set(), but I don't see any issues if we don't call that here. May be it is needed only in case of stealing focus away from the url_bar.
Comment 8 Chris Dumez 2013-03-22 05:35:09 PDT
Comment on attachment 194455 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=194455&action=review

>>> Tools/MiniBrowser/efl/main.c:1008
>>> +    evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);
>> 
>> You're supposed to call view_focus_set() not evas_object_focus_set(). Otherwise, an elementary object may keep the focus.
> 
> Initially I also thought about calling view_focus_set(), but I don't see any issues if we don't call that here. May be it is needed only in case of stealing focus away from the url_bar.

It is useful when stealing away focus from any elm widget. Depending on who owns the focus when you call evas_object_focus_set(), your change may not work. We introduced view_focus_set() exactly for this reason and it should be used. There is no drawback to using view_focus_set() but using evas_object_focus_set() may not work as expected in some cases.
Comment 9 Sudarsana Nagineni (babu) 2013-03-22 09:58:01 PDT
Comment on attachment 194455 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=194455&action=review

>>>> Tools/MiniBrowser/efl/main.c:1008
>>>> +    evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);
>>> 
>>> You're supposed to call view_focus_set() not evas_object_focus_set(). Otherwise, an elementary object may keep the focus.
>> 
>> Initially I also thought about calling view_focus_set(), but I don't see any issues if we don't call that here. May be it is needed only in case of stealing focus away from the url_bar.
> 
> It is useful when stealing away focus from any elm widget. Depending on who owns the focus when you call evas_object_focus_set(), your change may not work. We introduced view_focus_set() exactly for this reason and it should be used. There is no drawback to using view_focus_set() but using evas_object_focus_set() may not work as expected in some cases.

I agree with you, evas_object_focus_set() doesn't work in some cases. But, in this particular case I don't see an issue by not calling view_focus_set(). Anyway, I don't mind uploading a new patch, if really needed :)