Bug 190408

Summary: Anchor target should be ignored on activation when the download attribute is set
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, ggaren, gyuyoung.kim, japhet, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=190351
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Chris Dumez
Reported 2018-10-09 12:27:14 PDT
Anchor target should be ignored on activation when the download attribute is set: - https://html.spec.whatwg.org/#the-a-element:downloading-hyperlinks-2 When the download attribute is set, we should use the "download the hyperlink" algorithm [1] instead of the "follow the hyperlink" [2] algorithm. Note that the "download the hyperlink" triggers a download and ignores the target attribute entirely. This is important as an anchor element with target=_blank and the download attribute set may fail because of Safari's popup blocker if we do not disregard the anchor target. [1] https://html.spec.whatwg.org/#downloading-hyperlinks [2] https://html.spec.whatwg.org/#following-hyperlinks-2
Attachments
Patch (17.98 KB, patch)
2018-10-09 12:35 PDT, Chris Dumez
no flags
Patch (22.46 KB, patch)
2018-10-09 13:07 PDT, Chris Dumez
no flags
Patch (23.95 KB, patch)
2018-10-09 14:14 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-10-09 12:35:02 PDT
Chris Dumez
Comment 2 2018-10-09 13:07:56 PDT
Chris Dumez
Comment 3 2018-10-09 14:14:52 PDT
Geoffrey Garen
Comment 4 2018-10-09 15:54:06 PDT
Comment on attachment 351916 [details] Patch r=me
WebKit Commit Bot
Comment 5 2018-10-09 16:21:25 PDT
Comment on attachment 351916 [details] Patch Clearing flags on attachment: 351916 Committed r236987: <https://trac.webkit.org/changeset/236987>
WebKit Commit Bot
Comment 6 2018-10-09 16:21:27 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-10-09 16:22:29 PDT
Note You need to log in before you can comment on or make changes to this bug.