Bug 145725 - [EFL] Execute Javascript method in mini browser address bar
Summary: [EFL] Execute Javascript method in mini browser address bar
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: Hyungwook Lee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-06 02:21 PDT by Hyungwook Lee
Modified: 2015-06-10 00:30 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.00 KB, patch)
2015-06-07 00:56 PDT, Hyungwook Lee
no flags Details | Formatted Diff | Diff
Patch (2.51 KB, patch)
2015-06-09 06:32 PDT, Hyungwook Lee
no flags Details | Formatted Diff | Diff
Patch (2.55 KB, patch)
2015-06-09 20:39 PDT, Hyungwook Lee
no flags Details | Formatted Diff | Diff
Patch (2.54 KB, patch)
2015-06-09 23:31 PDT, Hyungwook Lee
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hyungwook Lee 2015-06-06 02:21:04 PDT
Many browser able to execute JavaScript method from browser address bar as below.
javascript:{alert("ok");}

We also need to support this functionality for same user experience what they expected in address bar.
Comment 1 Hyungwook Lee 2015-06-07 00:56:01 PDT
Created attachment 254433 [details]
Patch
Comment 2 Darin Adler 2015-06-07 17:48:09 PDT
Comment on attachment 254433 [details]
Patch

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

> Source/WebKit2/ChangeLog:9
> +        Many browser able to execute JavaScript contents in browser address bar using 'javascript:' scheme.
> +        WebKit EFL port also need to support this functionality for same user experience.

Interesting choice.

Safari choses to not include this feature by default, and only enables it for developers who turn it on, to improve security for typical web browser users who have no need to do this, and could be tricked into doing it by social engineering.
Comment 3 Hyungwook Lee 2015-06-07 20:26:40 PDT
Comment on attachment 254433 [details]
Patch

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

>> Source/WebKit2/ChangeLog:9
>> +        WebKit EFL port also need to support this functionality for same user experience.
> 
> Interesting choice.
> 
> Safari choses to not include this feature by default, and only enables it for developers who turn it on, to improve security for typical web browser users who have no need to do this, and could be tricked into doing it by social engineering.

In my investigation, Chrome, Firefox, Opera, Internet Explorer supports this functionality in default.
I also agreed with your opinion.
How about turn it on only WebKit EFL mini browser as same as WebKit GTK Port?
Comment 4 Ryuan Choi 2015-06-08 19:35:50 PDT
Comment on attachment 254433 [details]
Patch

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

>>> Source/WebKit2/ChangeLog:9
>>> +        WebKit EFL port also need to support this functionality for same user experience.
>> 
>> Interesting choice.
>> 
>> Safari choses to not include this feature by default, and only enables it for developers who turn it on, to improve security for typical web browser users who have no need to do this, and could be tricked into doing it by social engineering.
> 
> In my investigation, Chrome, Firefox, Opera, Internet Explorer supports this functionality in default.
> I also agreed with your opinion.
> How about turn it on only WebKit EFL mini browser as same as WebKit GTK Port?

Sorry about late answer.

But, I think that it looks not good.
We should not assume whether the browser want javascript scheme or not, so we should consider both use cases.
With your patch, browser can't disable javascript scheme.
Comment 5 Hyungwook Lee 2015-06-09 00:09:38 PDT
Comment on attachment 254433 [details]
Patch

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

>>>> Source/WebKit2/ChangeLog:9
>>>> +        WebKit EFL port also need to support this functionality for same user experience.
>>> 
>>> Interesting choice.
>>> 
>>> Safari choses to not include this feature by default, and only enables it for developers who turn it on, to improve security for typical web browser users who have no need to do this, and could be tricked into doing it by social engineering.
>> 
>> In my investigation, Chrome, Firefox, Opera, Internet Explorer supports this functionality in default.
>> I also agreed with your opinion.
>> How about turn it on only WebKit EFL mini browser as same as WebKit GTK Port?
> 
> Sorry about late answer.
> 
> But, I think that it looks not good.
> We should not assume whether the browser want javascript scheme or not, so we should consider both use cases.
> With your patch, browser can't disable javascript scheme.

I will re-implement this only for efl mini browser.
Comment 6 Hyungwook Lee 2015-06-09 06:32:22 PDT
Created attachment 254563 [details]
Patch
Comment 7 Gyuyoung Kim 2015-06-09 17:56:38 PDT
Comment on attachment 254563 [details]
Patch

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

> Tools/MiniBrowser/efl/main.c:1064
> +load_url_from_user_input(Evas_Object* ewk_view, const char* url)

- Wrong * place.

- url_load_from_user_input() looks more like efl function name style.
Comment 8 Hyungwook Lee 2015-06-09 18:20:05 PDT
Comment on attachment 254563 [details]
Patch

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

>> Tools/MiniBrowser/efl/main.c:1064
>> +load_url_from_user_input(Evas_Object* ewk_view, const char* url)
> 
> - Wrong * place.
> 
> - url_load_from_user_input() looks more like efl function name style.

I referenced url_from_user_input() looks simulator function name in this case.
Could you suggest new one for me?
Comment 9 Gyuyoung Kim 2015-06-09 20:18:36 PDT
Comment on attachment 254563 [details]
Patch

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

>>> Tools/MiniBrowser/efl/main.c:1064
>>> +load_url_from_user_input(Evas_Object* ewk_view, const char* url)
>> 
>> - Wrong * place.
>> 
>> - url_load_from_user_input() looks more like efl function name style.
> 
> I referenced url_from_user_input() looks simulator function name in this case.
> Could you suggest new one for me?

> - url_load_from_user_input() looks more like efl function name style.

I already did ;)
Comment 10 Hyungwook Lee 2015-06-09 20:39:06 PDT
Created attachment 254623 [details]
Patch
Comment 11 Gyuyoung Kim 2015-06-09 23:14:47 PDT
Comment on attachment 254623 [details]
Patch

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

> Tools/MiniBrowser/efl/main.c:1064
> +url_load_from_user_input(Evas_Object* ewk_view, const char* url)

Though I pointed out, it is not fixed yet. Wrong * place.
Comment 12 Hyungwook Lee 2015-06-09 23:31:08 PDT
Created attachment 254630 [details]
Patch
Comment 13 WebKit Commit Bot 2015-06-10 00:30:09 PDT
Comment on attachment 254630 [details]
Patch

Clearing flags on attachment: 254630

Committed r185405: <http://trac.webkit.org/changeset/185405>
Comment 14 WebKit Commit Bot 2015-06-10 00:30:12 PDT
All reviewed patches have been landed.  Closing bug.