diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-transforms/external-styles | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-transforms/external-styles')
15 files changed, 485 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/reference/svg-external-styles-ref.html b/testing/web-platform/tests/css/css-transforms/external-styles/reference/svg-external-styles-ref.html new file mode 100644 index 0000000000..3a95342030 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/reference/svg-external-styles-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Reftest Reference</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <meta name="flags" content="svg"> + <style type="text/css"> + svg { + width: 300px; + height: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad"> + <stop offset="50%" stop-color="green"/> + <stop offset="50%" stop-color="yellow"/> + </linearGradient> + </defs> + <rect width="100" height="100" fill="url(#grad)"/> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/support/svg-external-styles.css b/testing/web-platform/tests/css/css-transforms/external-styles/support/svg-external-styles.css new file mode 100644 index 0000000000..ad60fd8117 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/support/svg-external-styles.css @@ -0,0 +1,11 @@ +.rotate { + transform: rotate(90deg); +} + +.translateY { + transform: translateY(-100px); +} + +.invalid { + transform: scale(invalid); +} diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-001.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-001.html new file mode 100644 index 0000000000..36e8811c9b --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-001.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: External transform style on SVG element with presentation attribute style on the same element</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="External styles on SVG elements should override presentation attribute styles on the same element. The rect in the test should be rotated by 90 degrees clockwise and not scaled."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <rect class="rotate" y="-100" width="100" height="100" fill="url(#grad)" transform="scale(0.5)"/> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-002.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-002.html new file mode 100644 index 0000000000..3ef0139a48 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-002.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: External transform style on SVG child element with presentation attribute styles on the parent and child elements</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="External styles on SVG elements should override presentation attribute styles on the same element. Presentation attribute styles on its parent should also be applied. The rect in the test should be rotated by 90 degrees clockwise, moved up 100 pixels, and not scaled."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g transform="rotate(90)"> + <rect class="translateY" width="100" height="100" fill="url(#grad)" transform="scale(0.5)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-003.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-003.html new file mode 100644 index 0000000000..564f230cc4 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-003.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: External transform style on SVG group element and presentation attribute style on child element</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="External styles on SVG group elements should be pre-multipled on the child elements. The rect in the test should be rotated by 90 degrees clockwise and moved up 100 pixels."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g class="rotate"> + <rect width="100" height="100" fill="url(#grad)" transform="translate(0 -100)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-004.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-004.html new file mode 100644 index 0000000000..ea51002ba2 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-004.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: External transform style on SVG group element and presentation attribute style on group and child elements</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="External styles on SVG group elements override presentation attribute styles on the same element. Presentation attribute styles on child elements should be post-multiplied. The rect in the test should be rotated by 90 degrees clockwise and moved up 100 pixels and not scaled."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g class="rotate" transform="scale(0.5)"> + <rect width="100" height="100" fill="url(#grad)" transform="translate(0 -100)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-005.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-005.html new file mode 100644 index 0000000000..93e876bfe3 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-005.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Fall back to presentation attribute style of SVG element with invalid external transform style</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="Invalid external transform styles on SVG elements should fall back to presentation attributes styles on the same element. The rect in the test should be rotated by 90 degrees clockwise."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <rect class="invalid" y="-100" width="100" height="100" fill="url(#grad)" transform="rotate(90)"/> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-006.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-006.html new file mode 100644 index 0000000000..d43e40a814 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-006.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Fall back to presentation attribute styles of SVG element with invalid external transform style and presentation attribute style on group</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="Invalid external transform styles on SVG elements should fall back to presentation attributes styles on the same element. The rect in the test should be rotated by 90 degrees clockwise and moved up 100 pixels."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g transform="rotate(90)"> + <rect class="invalid" width="100" height="100" fill="url(#grad)" transform="translate(0 -100)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-007.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-007.html new file mode 100644 index 0000000000..f5745e7830 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-007.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Invalid external transform style on SVG child element with valid presentation attribute style on group and invalid presentation attribute style on child</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="When both the external and presentation attribute styles on an element are invalid, no transform should be applied. However, valid presentation attribute styles on the group should still be applied. The rect in the test should be rotated by 90 degrees clockwise and not scaled down or flipped."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g transform="rotate(90)"> + <rect class="invalid" y="-100" width="100" height="100" fill="url(#grad)" transform="scale(invalid)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-008.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-008.html new file mode 100644 index 0000000000..c229269074 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-008.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Invalid external and presentation attribute styles on an SVG element</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="When both the external and presentation attribute styles are invalid, no transform should be applied. The rect in the test should not be scaled down or flipped."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad"> + <stop offset="50%" stop-color="green"/> + <stop offset="50%" stop-color="yellow"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <rect class="invalid" width="100" height="100" fill="url(#grad)" transform="scale(invalid)"/> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-009.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-009.html new file mode 100644 index 0000000000..969951a1f9 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-009.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Invalid external transform style on SVG group with valid presentation attribute style on child element</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="Invalid external transform styles on group elements should not be applied, but valid presentation attribute styles on the child should be applied. The rect in the test should be rotated by 90 degrees clockwise and not scaled."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g class="invalid"> + <rect y="-100" width="100" height="100" fill="url(#grad)" transform="rotate(90)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-010.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-010.html new file mode 100644 index 0000000000..863278fafe --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-010.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Invalid external transform style on SVG group with valid presentation attribute styles on group and child elements</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="Invalid external transform styles on group elements should fall back to presentation attribute styles on the same element. Presentation attribute styles on the child should also be applied. The rect in the test should be rotated by 90 degrees clockwise, moved up 100 pixels and not scaled."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g class="invalid" transform="rotate(90)"> + <rect width="100" height="100" fill="url(#grad)" transform="translate(0 -100)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-011.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-011.html new file mode 100644 index 0000000000..353f097451 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-011.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Test: Invalid external transform style and invalid presentation attribute style on SVG group and valid presentation attribute style on child</title> + <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="When both the external and presentation attribute styles on a group are invalid, no transform should be applied. However, the valid presentation attribute style on the child should be applied. The rect in the test should be rotated by 90 degrees clockwise and not scaled down or flipped."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <g class="invalid" transform="scale(invalid)"> + <rect y="-100" width="100" height="100" fill="url(#grad)" transform="rotate(90)"/> + </g> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-013.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-013.html new file mode 100644 index 0000000000..f45639f8c6 --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-013.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Transforms Test: Fall back to presentation attribute style of rotate with three arguments of SVG element with invalid external style</title> + <link rel="author" title="David Alcala" href="mailto:dalcala@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform-functions"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="Invalid external styles on SVG elements should fall back to presentation attributes styles of rotate with three arguments on the same element. The rect in the test should be rotated by 90 degrees clockwise after the transform origin is translated by 20 pixels in both the vertical and horizontal directions."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad" x2="0%" y2="100%"> + <stop offset="50%" stop-color="yellow"/> + <stop offset="50%" stop-color="green"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <rect class="invalid" y="-60" width="100" height="100" fill="url(#grad)" transform="rotate(90 20 20)"/> + </svg> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-014.html b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-014.html new file mode 100644 index 0000000000..6ec267febe --- /dev/null +++ b/testing/web-platform/tests/css/css-transforms/external-styles/svg-external-styles-014.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Transforms Test: Invalid external and presentation attribute styles on an SVG element</title> + <link rel="author" title="David Alcala" href="mailto:dalcala@adobe.com"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-attribute-specificity"> + <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform-functions"> + <link rel="match" href="reference/svg-external-styles-ref.html"> + <link rel="stylesheet" href="support/svg-external-styles.css"> + <meta name="flags" content="svg"> + <meta name="assert" content="When both the external and presentation attribute styles are invalid, no transform should be applied. The rect in the test should not be scaled down or rotated."> + <style type="text/css"> + svg { + height: 300px; + width: 300px; + } + </style> +</head> +<body> + <p>The test passes if there is a vertical green stripe to the left of a yellow vertical stripe. You should see no red.</p> + <svg> + <!-- Fill with Gradient to avoid false positive. --> + <defs> + <linearGradient id="grad"> + <stop offset="50%" stop-color="green"/> + <stop offset="50%" stop-color="yellow"/> + </linearGradient> + </defs> + <rect x="1" y="1" width="98" height="98" fill="red"/> + <rect class="invalid" width="100" height="100" fill="url(#grad)" transform="rotate(90,)"/> + </svg> +</body> +</html> |