Bug 162574 - [WK2] Navigating to a Blob URL does not trigger a download
Summary: [WK2] Navigating to a Blob URL does not trigger a download
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: http://jsfiddle.net/cW7W5/1587/
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-26 13:13 PDT by Chris Dumez
Modified: 2016-09-27 10:01 PDT (History)
5 users (show)

See Also:


Attachments
WIP patch (4.39 KB, patch)
2016-09-26 16:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (8.96 KB, patch)
2016-09-26 19:38 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (22.55 KB, patch)
2016-09-26 21:06 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 2016-09-26 13:13:49 PDT
Navigating to a Blob URL does not trigger a download.

Test Case: http://jsfiddle.net/cW7W5/1587/

The test case works as expected in Firefox and Chrome.
Comment 1 Chris Dumez 2016-09-26 16:40:31 PDT
Created attachment 289892 [details]
WIP patch
Comment 2 Chris Dumez 2016-09-26 19:38:05 PDT
Created attachment 289901 [details]
WIP Patch
Comment 3 Chris Dumez 2016-09-26 21:06:34 PDT
Created attachment 289909 [details]
Patch
Comment 4 Darin Adler 2016-09-27 09:39:46 PDT
Comment on attachment 289909 [details]
Patch

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

This is OK for the short term, but probably not OK for the long term.

> Source/WebKit2/NetworkProcess/Downloads/BlobDownloadClient.cpp:47
> +    m_download.decideDestinationWithSuggestedFilenameAsync(m_download.suggestedName().isEmpty() ? "unknown" : m_download.suggestedName());

While this may be expedient, is not great that this special "filename" is an English word that is not localized. I suppose it’s a workaround for the fact that the client can’t handle no suggestion at all, but it does not seem like a good long term solution. Someone at Apple should think through how they want the Safari user interface to behave in cases like this. Then we should also think about how we want the WebKit API to behave; I can’t imagine we’d have wanted to pass a special string to mean no name suggested. After thinking this through, we should then do what is necessary to make sure we aren’t stuck with this forever.
Comment 5 WebKit Commit Bot 2016-09-27 10:01:02 PDT
Comment on attachment 289909 [details]
Patch

Clearing flags on attachment: 289909

Committed r206439: <http://trac.webkit.org/changeset/206439>
Comment 6 WebKit Commit Bot 2016-09-27 10:01:07 PDT
All reviewed patches have been landed.  Closing bug.