Title: [206630] trunk
Revision 206630
Author cdu...@apple.com
Date 2016-09-29 22:05:35 -0700 (Thu, 29 Sep 2016)
Log Message
Add support for download attribute on area elements
https://bugs.webkit.org/show_bug.cgi?id=162765
Reviewed by Brent Fulgham.
LayoutTests/imported/w3c:
Rebaseline W3C test now that more checks are passing.
* web-platform-tests/html/dom/reflection-embedded-expected.txt:
Source/WebCore:
Add support for download attribute on area elements:
- https://html.spec.whatwg.org/#htmlanchorelement
Because HTMLAreaElement inherits from HTMLAnchorElement on native side,
and because HTMLAnchorElement already supports the download attribute,
all that was needed was to add the download attribute to
HTMLAreaElement.idl file.
Test: http/tests/download/area-download.html
* html/HTMLAreaElement.idl:
LayoutTests:
Add layout test coverage.
* http/tests/download/area-download-expected.txt: Added.
* http/tests/download/area-download.html: Added.
* http/tests/download/resources/FAIL-notify-done.html: Added.
Modified Paths
trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt
trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt
trunk/LayoutTests/platform/mac-wk1/TestExpectations
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLAreaElement.idl
Added Paths
trunk/LayoutTests/http/tests/download/area-download-expected.txt
trunk/LayoutTests/http/tests/download/area-download.html
trunk/LayoutTests/http/tests/download/resources/FAIL-notify-done.html
Diff
Modified: trunk/LayoutTests/ChangeLog (206629 => 206630)
--- trunk/LayoutTests/ChangeLog 2016-09-30 02:04:07 UTC (rev 206629)
+++ trunk/LayoutTests/ChangeLog 2016-09-30 05:05:35 UTC (rev 206630)
@@ -1,3 +1,16 @@
+2016-09-29 Chris Dumez
+
+Add support for download attribute on area elements
+https://bugs.webkit.org/show_bug.cgi?id=162765
+
+Reviewed by Brent Fulgham.
+
+Add layout test coverage.
+
+* http/tests/download/area-download-expected.txt: Added.
+* http/tests/download/area-download.html: Added.
+* http/tests/download/resources/FAIL-notify-done.html: Added.
+
2016-09-29 Jiewen Tan
Expose CryptoKey to web workers
Added: trunk/LayoutTests/http/tests/download/area-download-expected.txt (0 => 206630)
--- trunk/LayoutTests/http/tests/download/area-download-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/download/area-download-expected.txt 2016-09-30 05:05:35 UTC (rev 206630)
@@ -0,0 +1,12 @@
+Download started.
+Downloading URL with suggested filename "foo.pdf"
+Download completed.
+
+Tests that the download attribute on area elements is working.
+
+The suggested filename at the top should be foo.pdf.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/http/tests/download/area-download.html (0 => 206630)
--- trunk/LayoutTests/http/tests/download/area-download.html (rev 0)
+++ trunk/LayoutTests/http/tests/download/area-download.html 2016-09-30 05:05:35 UTC (rev 206630)
@@ -0,0 +1,40 @@
+
+
+
+
+if (window.testRunner)
+testRunner.waitUntilDownloadFinished();
+
+
+
+
+
+
+Tests that the download attribute on area elements is working.
+The suggested filename at the top should be foo.pdf.
+
+
+function click(elmt)
+{
+if (!window.eventSender)
+return;
+
+eventSender.mouseMoveTo(elmt.offsetLeft + 10, elmt.offsetTop + 10);
+eventSender.mouseDown();
+eventSender.mouseUp();
+}
+
+function runTest()
+{
+var img = document.getElementById("testImage");
+click(img);
+}
+_onload_ = function() {
+runTest();
+}
+
+
+