aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/css-transforms
diff options
context:
space:
mode:
authorWPT Sync Bot <josh+wptsync@joshmatthews.net>2021-02-25 08:20:53 +0000
committerWPT Sync Bot <josh+wptsync@joshmatthews.net>2021-02-25 09:47:00 +0000
commit4db11786c54fe9519d09e616c731da8fd6927106 (patch)
tree3500efe1afb553a69c2167a5755deafc8ba19b24 /tests/wpt/web-platform-tests/css/css-transforms
parent60b642968b1821fdb3a793f41b2c935d0e0ca89c (diff)
downloadservo-4db11786c54fe9519d09e616c731da8fd6927106.tar.gz
servo-4db11786c54fe9519d09e616c731da8fd6927106.zip
Update web-platform-tests to revision b'51407aaa3d17aa440f6807caef5e390dc779087a'
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-transforms')
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/animation/transform-interpolation-skew.html14
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html1
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-attribute-in-svg-ref.html22
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-css-property-in-svg-ref.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-in-svg-ref.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-attribute-in-svg.html26
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-css-property-in-svg.html24
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/translate/translate-in-svg.html24
8 files changed, 150 insertions, 1 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/animation/transform-interpolation-skew.html b/tests/wpt/web-platform-tests/css/css-transforms/animation/transform-interpolation-skew.html
index 4f8aa52fd10..95277d4b8cf 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/animation/transform-interpolation-skew.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/animation/transform-interpolation-skew.html
@@ -2,7 +2,19 @@
<html class="reftest-wait">
<link rel="match" href="transform-interpolation-ref.html?skew">
<link rel="help" href="https://drafts.csswg.org/css-transforms/">
-
+<!--
+Fuzzy match is needed because the browser may raster in different scales for the
+test and the reference. For example, in the first case the test animates skew
+from 0deg to 60deg and take snapshot when the skew is 30deg, while the reference
+animates skew from 30deg to 30deg, and the browser may choose a higher raster
+scale for the former because at 60deg the ideal scale is higher.
+ 3000: 130 * 6 * 2 + 80 * 9 * 2
+ 130, 80: width and height of the div
+ 6: number of antialiased horizontal edges
+ 9: number of antialiased vertical edges
+ 2: number of antialiased pixels for each pixel on the edge
+-->
+<meta name=fuzzy content="0-255;0-3000">
<script src="../../../common/reftest-wait.js"></script>
<script src="support/transform-interpolation-reftests.js"></script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html
index 9055e7dfd5f..46bb91c8ba0 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html
@@ -35,6 +35,7 @@ test_valid_value("scale", "100% 200%", "1 2");
test_valid_value("scale", "100 200 1", "100 200");
test_valid_value("scale", "100% 200% 1", "1 2");
test_valid_value("scale", "100 200 300");
+test_valid_value("scale", "100 100 2", "100 100 2");
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-attribute-in-svg-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-attribute-in-svg-ref.html
new file mode 100644
index 00000000000..1f60f3fcb0b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-attribute-in-svg-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Transforms Test: combination of the CSS translate and transform properties and the SVG transform attribute</title>
+ <link rel="author" title="Antoine Quint" href="mailto:graouts@apple.com">
+ <meta name="flags" content="svg">
+ <style type="text/css">
+ svg {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there is a green rectangle and no red.</p>
+ <svg>
+ <rect x="100" y="100" width="200" height="200" fill="green"/>
+ </svg>
+</body>
+</html>
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-css-property-in-svg-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-css-property-in-svg-ref.html
new file mode 100644
index 00000000000..cce3f40477d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-and-transform-css-property-in-svg-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Transforms Test: combination of the CSS translate property and SVG transform attribute</title>
+ <link rel="author" title="Antoine Quint" href="mailto:graouts@apple.com">
+ <meta name="flags" content="svg">
+ <style type="text/css">
+ svg {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there is a green rectangle and no red.</p>
+ <svg>
+ <rect x="100" y="100" width="200" height="200" fill="green"/>
+ </svg>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-in-svg-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-in-svg-ref.html
new file mode 100644
index 00000000000..ed185a63b69
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/translate/reference/translate-in-svg-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Transforms Test: the CSS translate property applied to an SVG element</title>
+ <link rel="author" title="Antoine Quint" href="mailto:graouts@apple.com">
+ <meta name="flags" content="svg">
+ <style type="text/css">
+ svg {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there is a green rectangle and no red.</p>
+ <svg>
+ <rect x="100" y="100" width="100" height="100" fill="green" />
+ </svg>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-attribute-in-svg.html b/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-attribute-in-svg.html
new file mode 100644
index 00000000000..6fd8027964d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-attribute-in-svg.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Transforms Test: combination of the CSS translate and transform properties and the SVG transform attribute</title>
+ <link rel="author" title="Antoine Quint" href="mailto:graouts@apple.com">
+ <link rel="help" href="https://www.w3.org/TR/css-transforms-2/#propdef-translate">
+ <link rel="match" href="reference/translate-and-transform-attribute-in-svg-ref.html">
+ <meta name="flags" content="svg">
+ <meta name="assert" content="The CSS translate property is applied in combination with the CSS transform property and the SVG transform attribute has no effect.">
+ <style type="text/css">
+ svg {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there is a green rectangle and no red.</p>
+ <svg>
+ <rect x="101" y="101" width="198" height="198" fill="red"/>
+ <rect width="100" height="100" fill="green" transform="rotate(45deg)" style="transform: scale(2); translate: 100px 100px" />
+ </svg>
+</body>
+</html>
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-css-property-in-svg.html b/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-css-property-in-svg.html
new file mode 100644
index 00000000000..e44fd145060
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-and-transform-css-property-in-svg.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Transforms Test: combination of the CSS translate property and SVG transform attribute</title>
+ <link rel="author" title="Antoine Quint" href="mailto:graouts@apple.com">
+ <link rel="help" href="https://www.w3.org/TR/css-transforms-2/#propdef-translate">
+ <link rel="match" href="reference/translate-and-transform-css-property-in-svg-ref.html">
+ <meta name="flags" content="svg">
+ <meta name="assert" content="The CSS translate property is applied in combination with the SVG transform attribute in the absence of a CSS transform property.">
+ <style type="text/css">
+ svg {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there is a green rectangle and no red.</p>
+ <svg>
+ <rect x="101" y="101" width="198" height="198" fill="red"/>
+ <rect width="100" height="100" fill="green" transform="scale(2)" style="translate: 100px 100px" />
+ </svg>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-in-svg.html b/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-in-svg.html
new file mode 100644
index 00000000000..6652f543f47
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/translate/translate-in-svg.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Transforms Test: the CSS translate property applied to an SVG element</title>
+ <link rel="author" title="Antoine Quint" href="mailto:graouts@apple.com">
+ <link rel="help" href="https://www.w3.org/TR/css-transforms-2/#propdef-translate">
+ <link rel="match" href="reference/translate-in-svg-ref.html">
+ <meta name="flags" content="svg">
+ <meta name="assert" content="The CSS translate property is applied to an SVG element.">
+ <style type="text/css">
+ svg {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there is a green rectangle and no red.</p>
+ <svg>
+ <rect x="101" y="101" width="98" height="98" fill="red"/>
+ <rect width="100" height="100" fill="green" style="translate: 100px 100px" />
+ </svg>
+</body>
+</html>