Bug 178947
Summary: | Need WebView API to load blob: resources | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Hammer <jonathan> |
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, jonathan, rniwa, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Mac | ||
OS: | All | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=176986 https://bugs.webkit.org/show_bug.cgi?id=177801 https://bugs.webkit.org/show_bug.cgi?id=180969 |
Jonathan Hammer
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
<rdar://problem/35241514>
Ryosuke Niwa
We're going to restore the old behavior for WebKit1 clients for now: https://bugs.webkit.org/show_bug.cgi?id=180969