Changeset 206659 in webkit
- Timestamp:
- Sep 30, 2016, 1:08:27 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206657 r206659 1 2016-09-30 Chris Dumez <cdumez@apple.com> 2 3 FileSaver.js does not work in WebKit 4 https://bugs.webkit.org/show_bug.cgi?id=162788 5 6 Reviewed by Sam Weinig. 7 8 Add layout test coverage. 9 10 * fast/dom/HTMLAnchorElement/anchor-download-synthetic-click-expected.txt: 11 * fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click-expected.txt: Added. 12 * fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html: Added. 13 1 14 2016-09-30 Ryan Haddad <ryanhaddad@apple.com> 2 15 -
trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-synthetic-click-expected.txt
r206562 r206659 1 CONSOLE MESSAGE: line 22: Synthetic clicks onanchors that have a download attribute are ignored.1 CONSOLE MESSAGE: line 22: Non user-triggered activations of anchors that have a download attribute are ignored. 2 2 Test that synthetic clicks on an anchor with a download attribute are ignored. 3 3 -
trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations
r206657 r206659 1315 1315 # <a download> is not supported in WK1 yet. 1316 1316 webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ] 1317 webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ] 1317 1318 webkit.org/b/156069 http/tests/download/area-download.html [ Skip ] 1318 1319 webkit.org/b/156069 http/tests/security/anchor-download-allow-blob.html [ Skip ] -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r206630 r206659 1808 1808 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ] 1809 1809 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload.html [ Skip ] 1810 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ] 1811 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ] 1810 1812 webkit.org/b/156067 http/tests/download/area-download.html [ Skip ] 1811 1813 webkit.org/b/156067 http/tests/security/anchor-download-allow-blob.html [ Skip ] -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r206656 r206659 192 192 webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download.html [ Failure ] 193 193 webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ] 194 webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ] 194 195 webkit.org/b/156069 http/tests/download/area-download.html [ Skip ] 195 196 webkit.org/b/156069 http/tests/security/anchor-download-allow-blob.html [ Skip ] -
trunk/LayoutTests/platform/win/TestExpectations
r206630 r206659 443 443 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ] 444 444 fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ] 445 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ] 446 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ] 445 447 http/tests/download/area-download.html [ Skip ] 446 448 http/tests/security/anchor-download-allow-data.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r206653 r206659 1 2016-09-30 Chris Dumez <cdumez@apple.com> 2 3 FileSaver.js does not work in WebKit 4 https://bugs.webkit.org/show_bug.cgi?id=162788 5 6 Reviewed by Sam Weinig. 7 8 FileSaver.js does not work in WebKit: 9 - https://eligrey.com/demos/FileSaver.js/ 10 11 It works in Firefox and Chrome, but in WebKit, we were getting a 12 "Synthetic clicks on anchors that have a download attribute are 13 ignored." warning. We were too strict in restricting synthetic clicks. 14 We now allow synthetic clicks as long as they are triggered by a user 15 gesture. 16 17 Test: fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html 18 19 * html/HTMLAnchorElement.cpp: 20 (WebCore::HTMLAnchorElement::handleClick): 21 1 22 2016-09-30 Joseph Pecoraro <pecoraro@apple.com> 2 23 -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r206616 r206659 45 45 #include "RuntimeEnabledFeatures.h" 46 46 #include "SVGImage.h" 47 #include "ScriptController.h" 47 48 #include "SecurityOrigin.h" 48 49 #include "SecurityPolicy.h" … … 381 382 // then abort these steps. 382 383 // https://html.spec.whatwg.org/#the-a-element:triggered-by-user-activation 383 if (!downloadAttribute.isNull() && !event.isTrusted() ) {384 if (!downloadAttribute.isNull() && !event.isTrusted() && !ScriptController::processingUserGesture()) { 384 385 // The specification says to throw an InvalidAccessError but other browsers do not. 385 document().addConsoleMessage(MessageSource::Security, MessageLevel::Warning, " Synthetic clicks onanchors that have a download attribute are ignored.");386 document().addConsoleMessage(MessageSource::Security, MessageLevel::Warning, "Non user-triggered activations of anchors that have a download attribute are ignored."); 386 387 return; 387 388 }
Note:
See TracChangeset
for help on using the changeset viewer.