WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
178947
Need WebView API to load blob: resources
https://bugs.webkit.org/show_bug.cgi?id=178947
Summary
Need WebView API to load blob: resources
Jonathan Hammer
Reported
2017-10-27 11:48:13 PDT
The efforts to move to blob: URLs for pasted RTFD and image content that have landed in <
https://trac.webkit.org/changeset/222119/webkit
> and <
https://trac.webkit.org/changeset/222839/webkit
> are great for JavaScript clients, but not so great for Obj-C WebKit clients. As far as I can tell, there is no Obj-C WebKit API for accessing or loading the data for the blob: URLs that are now appearing inside pasted DOM content. We need API for this because our Mac app uses WebKit (legacy) as an HTML email editor (similar to Mail.app) and needs to be able to "import" the image resources that users paste into the editor. Prior to the above two changesets landing, we could access these resources inside -webView:shouldInsertNode:replacingDOMRange:givenAction: by doing basically the following: WebResource *webResource = [range.commonAncestorContainer.ownerDocument.webFrame.dataSource subresourceForURL:imageURL]; However, this does not work for blob: URLs. Would be really great if there was a way to do this, otherwise we're kind of stuck. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-10-29 10:39:38 PDT
<
rdar://problem/35241514
>
Ryosuke Niwa
Comment 2
2017-12-19 02:01:08 PST
We're going to restore the old behavior for WebKit1 clients for now:
https://bugs.webkit.org/show_bug.cgi?id=180969
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