Bug 98121 - [EFL][WK2] Add setting to allow file access from file:// URLs
Summary: [EFL][WK2] Add setting to allow file access from file:// URLs
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: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 00:01 PDT by Chris Dumez
Modified: 2012-10-04 08:52 PDT (History)
10 users (show)

See Also:


Attachments
Patch (5.79 KB, patch)
2012-10-02 00:11 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.79 KB, patch)
2012-10-02 01:22 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.63 KB, patch)
2012-10-02 04:24 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-10-02 00:01:45 PDT
We should add a setting to Ewk_Settings to that the browser can allow file access from file:// URLs. Such access is currently disallowed by default and makes testing with Minibrowser more complicated.
Comment 1 Chris Dumez 2012-10-02 00:11:16 PDT
Created attachment 166624 [details]
Patch
Comment 2 Chris Dumez 2012-10-02 01:22:08 PDT
Created attachment 166639 [details]
Patch

Fix bug title (add WK2 tag).
Comment 3 Raphael Kubo da Costa (:rakuco) 2012-10-02 03:50:17 PDT
Comment on attachment 166639 [details]
Patch

Looks fine to me. I wonder if it is possible to check that actually accessing local URIs works/does not work in the API tests?
Comment 4 Chris Dumez 2012-10-02 04:15:29 PDT
Comment on attachment 166639 [details]
Patch

Will take rakuco's feedback into consideration.
Comment 5 Chris Dumez 2012-10-02 04:24:58 PDT
Created attachment 166660 [details]
Patch

Take rakuco's feedback into consideration.
Comment 6 Raphael Kubo da Costa (:rakuco) 2012-10-02 04:30:10 PDT
Comment on attachment 166660 [details]
Patch

LGTM.
Comment 7 Dominik Röttsches (drott) 2012-10-02 05:10:49 PDT
Comment on attachment 166660 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/tests/resources/local_file_access.html:16
> +    document.title = "Frame NOT loaded";

I don't know the exact semantics of waitUntilTitleChangedTo() - is this document.title line needed?

> Source/WebKit2/UIProcess/API/efl/tests/resources/local_file_access.html:24
> +    setTimeout("checkFrameLoaded()", 300);

Could you get rid of the timeout by using a callback to parent from the loaded iframe?
Comment 8 Chris Dumez 2012-10-02 05:14:59 PDT
Comment on attachment 166660 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/efl/tests/resources/local_file_access.html:16
>> +    document.title = "Frame NOT loaded";
> 
> I don't know the exact semantics of waitUntilTitleChangedTo() - is this document.title line needed?

Well, yes, it is needed. The unit tests are testing both cases (local frame is loaded, and local frame is NOT loaded). Therefore, I also need to specific title when the iframe is not loaded.

>> Source/WebKit2/UIProcess/API/efl/tests/resources/local_file_access.html:24
>> +    setTimeout("checkFrameLoaded()", 300);
> 
> Could you get rid of the timeout by using a callback to parent from the loaded iframe?

What if the iframe is not loaded? (which happens when we disallow local file access from file:// URLs).
Comment 9 Dominik Röttsches (drott) 2012-10-02 05:57:57 PDT
(In reply to comment #8)

> What if the iframe is not loaded? (which happens when we disallow local file access from file:// URLs).

Yes, as discussed offline, it looks like then there wouldn't be a good way to detect the failure case without a timeout, in which case it's much easier to just have one timer for both cases. So, I am fine with leaving the timer there if there's no good way for both, success and load failure case.
Comment 10 Laszlo Gombos 2012-10-04 08:23:45 PDT
Comment on attachment 166660 [details]
Patch

Looks good to me, r+.
Comment 11 WebKit Review Bot 2012-10-04 08:52:20 PDT
Comment on attachment 166660 [details]
Patch

Clearing flags on attachment: 166660

Committed r130395: <http://trac.webkit.org/changeset/130395>
Comment 12 WebKit Review Bot 2012-10-04 08:52:25 PDT
All reviewed patches have been landed.  Closing bug.