Bug 162531 - [WK2] anchor.download attribute value is ignored by NETWORK_SESSION code path
Summary: [WK2] anchor.download attribute value is ignored by NETWORK_SESSION code path
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: http://jsfiddle.net/cW7W5/1584/
Keywords:
: 156067 (view as bug list)
Depends on:
Blocks: 156056 162535
  Show dependency treegraph
 
Reported: 2016-09-24 09:53 PDT by Chris Dumez
Modified: 2016-09-24 20:13 PDT (History)
5 users (show)

See Also:


Attachments
Patch (13.02 KB, patch)
2016-09-24 16:04 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-24 09:53:52 PDT
anchor.download attribute value is ignored when href contains a data URL.

Test case:
http://jsfiddle.net/cW7W5/1582/

It should download the file as icon.gif but doesn't.
Comment 1 Chris Dumez 2016-09-24 09:59:55 PDT
Actual test case:
http://jsfiddle.net/cW7W5/1584/
Comment 2 Chris Dumez 2016-09-24 10:01:57 PDT
We call WebFrame::startDownload() with the right URL and suggestedName. However, the suggested name apparently gets ignored later on somehow.
Comment 3 Chris Dumez 2016-09-24 10:03:45 PDT
Oh, it looks like the new NETWORK_SESSION code path completely ignores 'suggestedName' on Network process side. This bug is not specific to data URLs.
Comment 4 Chris Dumez 2016-09-24 10:05:34 PDT
Should be trivial to fix. I'll look into it after I am done with Bug 156099.
Comment 5 Chris Dumez 2016-09-24 16:04:54 PDT
Created attachment 289764 [details]
Patch
Comment 6 Chris Dumez 2016-09-24 18:02:22 PDT
Comment on attachment 289764 [details]
Patch

Clearing flags on attachment: 289764

Committed r206355: <http://trac.webkit.org/changeset/206355>
Comment 7 Chris Dumez 2016-09-24 18:02:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Chris Dumez 2016-09-24 19:10:16 PDT
*** Bug 156067 has been marked as a duplicate of this bug. ***