Add API for loading local files
Created attachment 238727 [details] Patch
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?
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!
Created attachment 238745 [details] Patch
Committed r174029: <http://trac.webkit.org/changeset/174029>
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?
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?