Changeset 206562 in webkit
- Timestamp:
- Sep 28, 2016 4:51:04 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206561 r206562 1 2016-09-28 Chris Dumez <cdumez@apple.com> 2 3 Log console messages when the anchor download attribute is ignored 4 https://bugs.webkit.org/show_bug.cgi?id=162703 5 6 Reviewed by Alex Christensen. 7 8 Log console messages when the anchor download attribute is ignored so 9 that the developer can better understand what's happening. 10 11 * fast/dom/HTMLAnchorElement/anchor-download-synthetic-click-expected.txt: 12 * http/tests/security/anchor-download-block-crossorigin-expected.txt: 13 1 14 2016-09-28 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-synthetic-click-expected.txt
r206356 r206562 1 CONSOLE MESSAGE: line 22: Synthetic clicks on anchors that have a download attribute are ignored. 1 2 Test that synthetic clicks on an anchor with a download attribute are ignored. 2 3 -
trunk/LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt
r206478 r206562 1 CONSOLE MESSAGE: line 24: The download attribute on anchor was ignored because its href URL has a different security origin. 1 2 PASS -
trunk/Source/WebCore/ChangeLog
r206561 r206562 1 2016-09-28 Chris Dumez <cdumez@apple.com> 2 3 Log console messages when the anchor download attribute is ignored 4 https://bugs.webkit.org/show_bug.cgi?id=162703 5 6 Reviewed by Alex Christensen. 7 8 Log console messages when the anchor download attribute is ignored so 9 that the developer can better understand what's happening. 10 11 No new tests, rebaselined existing tests. 12 13 * html/HTMLAnchorElement.cpp: 14 (WebCore::HTMLAnchorElement::handleClick): 15 1 16 2016-09-28 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r206561 r206562 376 376 if (isSameOrigin) 377 377 downloadAttribute = attributeWithoutSynchronization(downloadAttr); 378 else if (hasAttributeWithoutSynchronization(downloadAttr)) 379 document().addConsoleMessage(MessageSource::Security, MessageLevel::Warning, "The download attribute on anchor was ignored because its href URL has a different security origin."); 378 380 // If the a element has a download attribute and the algorithm is not triggered by user activation 379 381 // then abort these steps. 380 382 // https://html.spec.whatwg.org/#the-a-element:triggered-by-user-activation 381 if (!downloadAttribute.isNull() && !event.isTrusted()) 383 if (!downloadAttribute.isNull() && !event.isTrusted()) { 384 // The specification says to throw an InvalidAccessError but other browsers do not. 385 document().addConsoleMessage(MessageSource::Security, MessageLevel::Warning, "Synthetic clicks on anchors that have a download attribute are ignored."); 382 386 return; 387 } 383 388 } 384 389 #endif
Note: See TracChangeset
for help on using the changeset viewer.