WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 137153
Add API for loading local files
https://bugs.webkit.org/show_bug.cgi?id=137153
Summary
Add API for loading local files
Anders Carlsson
Reported
2014-09-26 11:56:32 PDT
Add API for loading local files
Attachments
Patch
(6.75 KB, patch)
2014-09-26 12:08 PDT
,
Anders Carlsson
no flags
Details
Formatted Diff
Diff
Patch
(6.76 KB, patch)
2014-09-26 16:29 PDT
,
Anders Carlsson
oliver
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2014-09-26 12:08:19 PDT
Created
attachment 238727
[details]
Patch
mitz
Comment 2
2014-09-26 12:58:25 PDT
Comment on
attachment 238727
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238727&action=review
This new API could use a couple of API tests.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:99 > +- (WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL WK_AVAILABLE(NA, WK_IOS_TBA);
The Modern WebKit API has been described as “Class for class […] exactly the same on iOS and OS X”. Why is this method not available on OS X?
Anders Carlsson
Comment 3
2014-09-26 13:07:50 PDT
Comment on
attachment 238727
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238727&action=review
>> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:99 >> +- (WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL WK_AVAILABLE(NA, WK_IOS_TBA); > > The Modern WebKit API has been described as “Class for class […] exactly the same on iOS and OS X”. Why is this method not available on OS X?
No reason, I'll fix that!
Anders Carlsson
Comment 4
2014-09-26 16:29:37 PDT
Created
attachment 238745
[details]
Patch
Anders Carlsson
Comment 5
2014-09-26 16:38:41 PDT
Committed
r174029
: <
http://trac.webkit.org/changeset/174029
>
Darin Adler
Comment 6
2014-09-28 16:25:18 PDT
Comment on
attachment 238745
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238745&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:96 > + If readAccessURL references a directory, files inside that file may be loaded by WebKit.
file inside that *directory*
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:99 > +- (WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
Why is a single URL good enough for read-access? Should this be an array of NSURL instead?
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:423 > + auto navigation = _navigationState->createLoadRequestNavigation(navigationID, [NSURLRequest requestWithURL:URL]); > + > + return navigation.autorelease();
Wouldn’t this read better without a local variable?
Marcin Ignac
Comment 7
2015-08-18 02:02:21 PDT
Looks like images loaded from a local path on iOS even with allowingReadAccessToURL are tainted and trying to use them for WebGL textures throws DOM Exception 18. Is there any solution for that?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug