Changeset 240530 in webkit


Ignore:
Timestamp:
Jan 25, 2019 4:44:15 PM (5 years ago)
Author:
Chris Dumez
Message:

[iOS] Add support for the download attribute
https://bugs.webkit.org/show_bug.cgi?id=167341
<rdar://problem/30296281>

Reviewed by Geoffrey Garen.

Source/WTF:

Turn on HTML download attribute support on iOS.

  • wtf/FeatureDefines.h:

LayoutTests:

Make download attribute layout tests iOS-friendly and unskip them now that they pass.

  • fast/dom/HTMLAnchorElement/anchor-download-unset.html:
  • fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download.html:
  • fast/dom/HTMLAnchorElement/anchor-nodownload-set.html:
  • fast/dom/HTMLAnchorElement/anchor-nodownload.html:
  • http/tests/download/anchor-download-attribute-content-disposition.html:
  • http/tests/download/anchor-download-no-extension.html:
  • http/tests/download/anchor-download-no-value.html:
  • http/tests/download/anchor-download-redirect.html:
  • http/tests/download/area-download.html:
  • http/tests/download/convert-cached-load-to-download.html:
  • http/tests/security/anchor-download-allow-blob.html:
  • http/tests/security/anchor-download-allow-data.html:
  • http/tests/security/anchor-download-allow-sameorigin.html:
  • http/tests/security/anchor-download-block-crossorigin-expected.txt:
  • http/tests/security/anchor-download-block-crossorigin.html:
  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt: Copied from LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt.
Location:
trunk
Files:
1 added
3 deleted
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240515 r240530  
     12019-01-25  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS] Add support for the download attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=167341
     5        <rdar://problem/30296281>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Make download attribute layout tests iOS-friendly and unskip them now that they pass.
     10
     11        * fast/dom/HTMLAnchorElement/anchor-download-unset.html:
     12        * fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html:
     13        * fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html:
     14        * fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html:
     15        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html:
     16        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html:
     17        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html:
     18        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
     19        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html:
     20        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html:
     21        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html:
     22        * fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html:
     23        * fast/dom/HTMLAnchorElement/anchor-file-blob-download.html:
     24        * fast/dom/HTMLAnchorElement/anchor-nodownload-set.html:
     25        * fast/dom/HTMLAnchorElement/anchor-nodownload.html:
     26        * http/tests/download/anchor-download-attribute-content-disposition.html:
     27        * http/tests/download/anchor-download-no-extension.html:
     28        * http/tests/download/anchor-download-no-value.html:
     29        * http/tests/download/anchor-download-redirect.html:
     30        * http/tests/download/area-download.html:
     31        * http/tests/download/convert-cached-load-to-download.html:
     32        * http/tests/security/anchor-download-allow-blob.html:
     33        * http/tests/security/anchor-download-allow-data.html:
     34        * http/tests/security/anchor-download-allow-sameorigin.html:
     35        * http/tests/security/anchor-download-block-crossorigin-expected.txt:
     36        * http/tests/security/anchor-download-block-crossorigin.html:
     37        * platform/ios-wk2/TestExpectations:
     38        * platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt: Copied from LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt.
     39
    1402019-01-25  Shawn Roberts  <sroberts@apple.com>
    241
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset.html

    r125149 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script type='text/javascript'>
    57if (window.testRunner) {
     
    1820        return;
    1921    }
    20     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    21     eventSender.mouseDown();
    22     eventSender.mouseUp();
     22    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2323}
    2424
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2224        return;
    2325    }
    24     eventSender.mouseMoveTo(element.offsetLeft + 5, element.offsetTop + 5);
    25     eventSender.mouseDown();
    26     eventSender.mouseUp();
     26    UIHelper.activateAt(element.offsetLeft + 5, element.offsetTop + 5);
    2727}
    2828
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html

    r229177 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2325        return;
    2426    }
    25     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    26     eventSender.mouseDown();
    27     eventSender.mouseUp();
     27    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2828}
    2929
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2123        return;
    2224    }
    23     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24     eventSender.mouseDown();
    25     eventSender.mouseUp();
     25    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626}
    2727
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html

    r236987 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
    45<base target="_blank">
     6<script src="../../../resources/ui-helper.js"></script>
    57<script>
    68if (window.testRunner) {
     
    2123        return;
    2224    }
    23     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24     eventSender.mouseDown();
    25     eventSender.mouseUp();
     25    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626}
    2727
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html

    r236987 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html

    r236970 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2123        return;
    2224    }
    23     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24     eventSender.mouseDown();
    25     eventSender.mouseUp();
     25    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626}
    2727
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
    45<meta charset="utf-8">
     6<script src="../../../resources/ui-helper.js"></script>
    57<script>
    68if (window.testRunner) {
     
    2123        return;
    2224    }
    23     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24     eventSender.mouseDown();
    25     eventSender.mouseUp();
     25    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626}
    2727
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    1921        return;
    2022    }
    21     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    22     eventSender.mouseDown();
    23     eventSender.mouseUp();
     23    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2424}
    2525
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload.html

    r125149 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="../../../resources/ui-helper.js"></script>
    46<script type='text/javascript'>
    57if (window.testRunner) {
     
    1820        return;
    1921    }
    20     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    21     eventSender.mouseDown();
    22     eventSender.mouseUp();
     22    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2323}
    2424
  • trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2123        return;
    2224    }
    23     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24     eventSender.mouseDown();
    25     eventSender.mouseUp();
     25    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626}
    2727
  • trunk/LayoutTests/http/tests/download/anchor-download-no-extension.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/http/tests/download/anchor-download-no-value.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2022        return;
    2123    }
    22     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    23     eventSender.mouseDown();
    24     eventSender.mouseUp();
     24    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2525}
    2626
  • trunk/LayoutTests/http/tests/download/anchor-download-redirect.html

    r221749 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57    if (window.testRunner) {
     
    2224            return;
    2325
    24         eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    25         eventSender.mouseDown();
    26         eventSender.mouseUp();
     26        UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2727    }
    2828
  • trunk/LayoutTests/http/tests/download/area-download.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57    if (window.testRunner) {
     
    2325            return;
    2426
    25         eventSender.mouseMoveTo(elmt.offsetLeft + 10, elmt.offsetTop + 10);
    26         eventSender.mouseDown();
    27         eventSender.mouseUp();
     27        UIHelper.activateAt(elmt.offsetLeft + 10, elmt.offsetTop + 10);
    2828    }
    2929
  • trunk/LayoutTests/http/tests/download/convert-cached-load-to-download.html

    r234776 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57if (window.testRunner) {
     
    2325        return;
    2426    }
    25     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    26     eventSender.mouseDown();
    27     eventSender.mouseUp();
     27    UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2828}
    2929
  • trunk/LayoutTests/http/tests/security/anchor-download-allow-blob.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57    if (window.testRunner) {
     
    2123            return;
    2224
    23         eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24         eventSender.mouseDown();
    25         eventSender.mouseUp();
     25        UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626    }
    2727
  • trunk/LayoutTests/http/tests/security/anchor-download-allow-data.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57    if (window.testRunner) {
     
    2123            return;
    2224
    23         eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24         eventSender.mouseDown();
    25         eventSender.mouseUp();
     25        UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626    }
    2727
  • trunk/LayoutTests/http/tests/security/anchor-download-allow-sameorigin.html

    r220626 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
     5<script src="/js-test-resources/ui-helper.js"></script>
    46<script>
    57    if (window.testRunner) {
     
    2224            return;
    2325
    24         eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    25         eventSender.mouseDown();
    26         eventSender.mouseUp();
     26        UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2727    }
    2828
  • trunk/LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt

    r237760 r240530  
    1 CONSOLE MESSAGE: line 25: The download attribute on anchor was ignored because its href URL has a different security origin.
     1CONSOLE MESSAGE: line 88: The download attribute on anchor was ignored because its href URL has a different security origin.
    22Tests that the download attribute is ignored if the link is cross origin.
    33
  • trunk/LayoutTests/http/tests/security/anchor-download-block-crossorigin.html

    r237760 r240530  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
    22<html>
    33<head>
     4<meta name="viewport" content="width=device-width">
    45<script src="../../../resources/js-test-pre.js"></script>
     6<script src="/js-test-resources/ui-helper.js"></script>
    57<script>
    68    if (window.testRunner)
     
    2123            return;
    2224
    23         eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    24         eventSender.mouseDown();
    25         eventSender.mouseUp();
     25        UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
    2626    }
    2727
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r240515 r240530  
    10681068webkit.org/b/189686 webgl/2.0.0/conformance/textures/misc/tex-image-and-sub-image-2d-with-array-buffer-view.html [ Skip ]
    10691069
    1070 
    1071 # <a download> does not work on iOS.
    1072 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ]
    1073 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download.html [ Skip ]
    1074 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ]
    1075 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html [ Skip ]
    1076 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Skip ]
    1077 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html [ Skip ]
    1078 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html [ Skip ]
    1079 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html [ Skip ]
    1080 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html [ Skip ]
    1081 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html [ Skip ]
    1082 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html [ Skip ]
    1083 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html [ Skip ]
    1084 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html [ Skip ]
    1085 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html [ Skip ]
    1086 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ]
    1087 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload.html [ Skip ]
    1088 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
    1089 webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ]
    1090 webkit.org/b/156067 http/tests/download/anchor-download-attribute-content-disposition.html [ Skip ]
    1091 webkit.org/b/156067 http/tests/download/anchor-download-no-extension.html [ Skip ]
    1092 webkit.org/b/156067 http/tests/download/anchor-download-redirect.html [ Skip ]
    1093 webkit.org/b/156067 http/tests/download/anchor-load-after-download.html [ Skip ]
    1094 webkit.org/b/156067 http/tests/download/area-download.html [ Skip ]
    1095 webkit.org/b/156067 http/tests/security/anchor-download-allow-blob.html [ Skip ]
    1096 webkit.org/b/156067 http/tests/security/anchor-download-allow-data.html [ Skip ]
    1097 webkit.org/b/156067 http/tests/security/anchor-download-allow-sameorigin.html [ Skip ]
    1098 webkit.org/b/156067 http/tests/security/anchor-download-block-crossorigin.html [ Skip ]
    1099 webkit.org/b/156067 http/tests/download/anchor-download-no-value.html [ Skip ]
    1100 webkit.org/b/156067 http/tests/download/convert-cached-load-to-download.html [ Skip ]
    1101 
    11021070webkit.org/b/149087 http/tests/cache/disk-cache/disk-cache-vary.html [ Pass Timeout ]
    11031071webkit.org/b/149087 http/tests/cache/disk-cache/disk-cache-vary-no-body.html [ Pass Timeout ]
  • trunk/LayoutTests/platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt

    r240525 r240530  
    1 CONSOLE MESSAGE: line 25: The download attribute on anchor was ignored because its href URL has a different security origin.
     1CONSOLE MESSAGE: The download attribute on anchor was ignored because its href URL has a different security origin.
    22Tests that the download attribute is ignored if the link is cross origin.
    33
  • trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt

    r230445 r240530  
    68606860PASS area.target: IDL set to object "test-toString"
    68616861PASS area.target: IDL set to object "test-valueOf"
    6862 FAIL area.download: typeof IDL attribute assert_equals: expected "string" but got "undefined"
    6863 FAIL area.download: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (undefined) undefined
    6864 FAIL area.download: setAttribute() to "" assert_equals: IDL get expected (string) "" but got (undefined) undefined
    6865 FAIL area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " assert_equals: IDL get expected (string) " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " but got (undefined) undefined
    6866 FAIL area.download: setAttribute() to undefined assert_equals: IDL get expected (string) "undefined" but got (undefined) undefined
    6867 FAIL area.download: setAttribute() to 7 assert_equals: IDL get expected (string) "7" but got (undefined) undefined
    6868 FAIL area.download: setAttribute() to 1.5 assert_equals: IDL get expected (string) "1.5" but got (undefined) undefined
    6869 FAIL area.download: setAttribute() to true assert_equals: IDL get expected (string) "true" but got (undefined) undefined
    6870 FAIL area.download: setAttribute() to false assert_equals: IDL get expected (string) "false" but got (undefined) undefined
    6871 FAIL area.download: setAttribute() to object "[object Object]" assert_equals: IDL get expected (string) "[object Object]" but got (undefined) undefined
    6872 FAIL area.download: setAttribute() to NaN assert_equals: IDL get expected (string) "NaN" but got (undefined) undefined
    6873 FAIL area.download: setAttribute() to Infinity assert_equals: IDL get expected (string) "Infinity" but got (undefined) undefined
    6874 FAIL area.download: setAttribute() to -Infinity assert_equals: IDL get expected (string) "-Infinity" but got (undefined) undefined
    6875 FAIL area.download: setAttribute() to "\0" assert_equals: IDL get expected (string) "\0" but got (undefined) undefined
    6876 FAIL area.download: setAttribute() to null assert_equals: IDL get expected (string) "null" but got (undefined) undefined
    6877 FAIL area.download: setAttribute() to object "test-toString" assert_equals: IDL get expected (string) "test-toString" but got (undefined) undefined
    6878 FAIL area.download: setAttribute() to object "test-valueOf" assert_equals: IDL get expected (string) "test-valueOf" but got (undefined) undefined
    6879 FAIL area.download: IDL set to "" assert_equals: getAttribute() expected "" but got "test-valueOf"
    6880 FAIL area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " assert_equals: getAttribute() expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " but got "test-valueOf"
    6881 FAIL area.download: IDL set to undefined assert_equals: getAttribute() expected "undefined" but got "test-valueOf"
    6882 FAIL area.download: IDL set to 7 assert_equals: getAttribute() expected "7" but got "test-valueOf"
    6883 FAIL area.download: IDL set to 1.5 assert_equals: getAttribute() expected "1.5" but got "test-valueOf"
    6884 FAIL area.download: IDL set to true assert_equals: getAttribute() expected "true" but got "test-valueOf"
    6885 FAIL area.download: IDL set to false assert_equals: getAttribute() expected "false" but got "test-valueOf"
    6886 FAIL area.download: IDL set to object "[object Object]" assert_equals: getAttribute() expected "[object Object]" but got "test-valueOf"
    6887 FAIL area.download: IDL set to NaN assert_equals: getAttribute() expected "NaN" but got "test-valueOf"
    6888 FAIL area.download: IDL set to Infinity assert_equals: getAttribute() expected "Infinity" but got "test-valueOf"
    6889 FAIL area.download: IDL set to -Infinity assert_equals: getAttribute() expected "-Infinity" but got "test-valueOf"
    6890 FAIL area.download: IDL set to "\0" assert_equals: getAttribute() expected "\0" but got "test-valueOf"
    6891 FAIL area.download: IDL set to null assert_equals: getAttribute() expected "null" but got "test-valueOf"
    6892 FAIL area.download: IDL set to object "test-toString" assert_equals: getAttribute() expected "test-toString" but got "test-valueOf"
    6893 FAIL area.download: IDL set to object "test-valueOf" assert_equals: IDL get expected (string) "test-valueOf" but got (object) object "test-valueOf"
     6862PASS area.download: typeof IDL attribute
     6863PASS area.download: IDL get with DOM attribute unset
     6864PASS area.download: setAttribute() to ""
     6865PASS area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo "
     6866PASS area.download: setAttribute() to undefined
     6867PASS area.download: setAttribute() to 7
     6868PASS area.download: setAttribute() to 1.5
     6869PASS area.download: setAttribute() to true
     6870PASS area.download: setAttribute() to false
     6871PASS area.download: setAttribute() to object "[object Object]"
     6872PASS area.download: setAttribute() to NaN
     6873PASS area.download: setAttribute() to Infinity
     6874PASS area.download: setAttribute() to -Infinity
     6875PASS area.download: setAttribute() to "\0"
     6876PASS area.download: setAttribute() to null
     6877PASS area.download: setAttribute() to object "test-toString"
     6878PASS area.download: setAttribute() to object "test-valueOf"
     6879PASS area.download: IDL set to ""
     6880PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo "
     6881PASS area.download: IDL set to undefined
     6882PASS area.download: IDL set to 7
     6883PASS area.download: IDL set to 1.5
     6884PASS area.download: IDL set to true
     6885PASS area.download: IDL set to false
     6886PASS area.download: IDL set to object "[object Object]"
     6887PASS area.download: IDL set to NaN
     6888PASS area.download: IDL set to Infinity
     6889PASS area.download: IDL set to -Infinity
     6890PASS area.download: IDL set to "\0"
     6891PASS area.download: IDL set to null
     6892PASS area.download: IDL set to object "test-toString"
     6893PASS area.download: IDL set to object "test-valueOf"
    68946894PASS area.ping: typeof IDL attribute
    68956895PASS area.ping: IDL get with DOM attribute unset
  • trunk/LayoutTests/platform/ios/TestExpectations

    r240492 r240530  
    126126fast/frames/sandboxed-iframe-plugins.html
    127127fast/loader/reload-zero-byte-plugin.html
     128http/tests/download/convert-cached-load-to-download.html
    128129http/tests/security/contentSecurityPolicy/1.1/plugintypes-affects-child.html
    129130http/tests/security/contentSecurityPolicy/1.1/plugintypes-invalid.html
  • trunk/Source/WTF/ChangeLog

    r240494 r240530  
     12019-01-25  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS] Add support for the download attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=167341
     5        <rdar://problem/30296281>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Turn on HTML download attribute support on iOS.
     10
     11        * wtf/FeatureDefines.h:
     12
    1132019-01-25  David Kilzer  <ddkilzer@apple.com>
    214
  • trunk/Source/WTF/wtf/FeatureDefines.h

    r237402 r240530  
    163163
    164164#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
    165 #define ENABLE_DOWNLOAD_ATTRIBUTE 0
     165#define ENABLE_DOWNLOAD_ATTRIBUTE 1
    166166#endif
    167167
Note: See TracChangeset for help on using the changeset viewer.