diff options
Diffstat (limited to 'layout/reftests/w3c-css/submitted/transforms')
9 files changed, 260 insertions, 0 deletions
diff --git a/layout/reftests/w3c-css/submitted/transforms/containing-block-dynamic-1-ref.html b/layout/reftests/w3c-css/submitted/transforms/containing-block-dynamic-1-ref.html new file mode 100644 index 000000000..34b66abdb --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/containing-block-dynamic-1-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: Creating containing block for fixed positioned elements</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<style> + html, body { margin: 0; padding: 0 } + #fixedmoves { + position: absolute; + top: 150px; + left: 150px; + background: green; + height: 100px; + width: 100px; + } +</style> +<body> + <div id="fixedmoves"></div> +</body> diff --git a/layout/reftests/w3c-css/submitted/transforms/perspective-containing-block-dynamic-1a.html b/layout/reftests/w3c-css/submitted/transforms/perspective-containing-block-dynamic-1a.html new file mode 100644 index 000000000..dcf7f2f4a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/perspective-containing-block-dynamic-1a.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: Creating containing block for fixed positioned elements</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#perspective-property"> +<link rel="match" href="containing-block-dynamic-1-ref.html"> +<meta name="assert" content="It also establishes a containing block (somewhat similar to position: relative), just like the transform property does."> +<meta name="flags" content="dom"> +<style> + html, body { margin: 0; padding: 0 } + #changeperspective { + position: absolute; + top: 100px; + left: 100px; + } + + #abscovered { + position: absolute; + top: 50px; + left: 50px; + background: red; + height: 100px; + width: 100px; + } + + #fixedmoves { + position: fixed; + top: 150px; + left: 150px; + background: green; + height: 100px; + width: 100px; + } +</style> +<body> + <div id="changeperspective" style="perspective: 1000px"> + <div id="abscovered"></div> + <div id="fixedmoves"></div> + </div> + <script> + var changeperspective = document.getElementById("changeperspective"); + var fixedmoves = document.getElementById("fixedmoves"); + var causeFlush = fixedmoves.offsetTop; + changeperspective.style.perspective = ""; + </script> +</body> diff --git a/layout/reftests/w3c-css/submitted/transforms/perspective-containing-block-dynamic-1b.html b/layout/reftests/w3c-css/submitted/transforms/perspective-containing-block-dynamic-1b.html new file mode 100644 index 000000000..12f8299fd --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/perspective-containing-block-dynamic-1b.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: Creating containing block for fixed positioned elements</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#perspective-property"> +<link rel="match" href="containing-block-dynamic-1-ref.html"> +<meta name="assert" content="It also establishes a containing block (somewhat similar to position: relative), just like the transform property does."> +<meta name="flags" content="dom"> +<style> + html, body { margin: 0; padding: 0 } + #changeperspective { + position: absolute; + top: 100px; + left: 100px; + } + + #abscovered { + position: absolute; + top: 50px; + left: 50px; + background: red; + height: 100px; + width: 100px; + } + + #fixedmoves { + position: fixed; + top: 50px; + left: 50px; + background: green; + height: 100px; + width: 100px; + } +</style> +<body> + <div id="changeperspective"> + <div id="abscovered"></div> + <div id="fixedmoves"></div> + </div> + <script> + var changeperspective = document.getElementById("changeperspective"); + var fixedmoves = document.getElementById("fixedmoves"); + var causeFlush = fixedmoves.offsetTop; + changeperspective.style.perspective = "1000px"; + </script> +</body> diff --git a/layout/reftests/w3c-css/submitted/transforms/perspective-zero.html b/layout/reftests/w3c-css/submitted/transforms/perspective-zero.html new file mode 100644 index 000000000..f0044ad00 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/perspective-zero.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Test: transform: perspective(0)</title> +<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#funcdef-perspective"> +<meta name="assert" content="perspective(0) should behave like identity transform function."> +<link rel="match" href="reference/green.html"> +<style> +#cover-me, #test { + width: 100px; + height: 100px; +} +#cover-me { + background: red; + position: relative; + margin-bottom: -100px; +} +#test { + background: green; + /* This should be an identity transform, since perspective(0) must be + * treated as perspective(infinity), and consequently translateZ() + * doesn't have any effect, so that it covers up #cover-me. + * If perspective(0) is invalid, #test would not create a stacking + * context, and #cover-me would be placed on top of #test showing red. + * If perspective(0) is handled as perspective(epsilon), #test would + * be invisible. */ + transform: perspective(0) translateZ(50px); +} +</style> +<p>Pass if there is NO red below:</p> +<div id="cover-me"></div><div id="test"></div> diff --git a/layout/reftests/w3c-css/submitted/transforms/reference/green.html b/layout/reftests/w3c-css/submitted/transforms/reference/green.html new file mode 100644 index 000000000..f7714d2b8 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/reference/green.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Reference: A green box</title> +<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<p>Pass if there is NO red below:</p> +<div id="ref" style="width: 100px; height: 100px; background: green"></div> diff --git a/layout/reftests/w3c-css/submitted/transforms/reftest-stylo.list b/layout/reftests/w3c-css/submitted/transforms/reftest-stylo.list new file mode 100644 index 000000000..6ab706d2f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/reftest-stylo.list @@ -0,0 +1,5 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +== transform-containing-block-dynamic-1a.html transform-containing-block-dynamic-1a.html +== transform-containing-block-dynamic-1b.html transform-containing-block-dynamic-1b.html +== perspective-containing-block-dynamic-1a.html perspective-containing-block-dynamic-1a.html +== perspective-containing-block-dynamic-1b.html perspective-containing-block-dynamic-1b.html diff --git a/layout/reftests/w3c-css/submitted/transforms/reftest.list b/layout/reftests/w3c-css/submitted/transforms/reftest.list new file mode 100644 index 000000000..80da1a6c2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/reftest.list @@ -0,0 +1,5 @@ +== transform-containing-block-dynamic-1a.html containing-block-dynamic-1-ref.html +== transform-containing-block-dynamic-1b.html containing-block-dynamic-1-ref.html +== perspective-containing-block-dynamic-1a.html containing-block-dynamic-1-ref.html +== perspective-containing-block-dynamic-1b.html containing-block-dynamic-1-ref.html +== perspective-zero.html reference/green.html diff --git a/layout/reftests/w3c-css/submitted/transforms/transform-containing-block-dynamic-1a.html b/layout/reftests/w3c-css/submitted/transforms/transform-containing-block-dynamic-1a.html new file mode 100644 index 000000000..7e6a10dda --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/transform-containing-block-dynamic-1a.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: Creating containing block for fixed positioned elements</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-rendering"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-property"> +<link rel="match" href="containing-block-dynamic-1-ref.html"> +<meta name="assert" content="For elements whose layout is governed by the CSS box model, any value other than none for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants."> +<meta name="assert" content="The object acts as a containing block for fixed positioned descendants." +<meta name="flags" content="dom"> +<style> + html, body { margin: 0; padding: 0 } + #changetransform { + position: absolute; + top: 100px; + left: 100px; + } + + #abscovered { + position: absolute; + top: 50px; + left: 50px; + background: red; + height: 100px; + width: 100px; + } + + #fixedmoves { + position: fixed; + top: 150px; + left: 150px; + background: green; + height: 100px; + width: 100px; + } +</style> +<body> + <div id="changetransform" style="transform: translateX(4px)"> + <div id="abscovered"></div> + <div id="fixedmoves"></div> + </div> + <script> + var changetransform = document.getElementById("changetransform"); + var fixedmoves = document.getElementById("fixedmoves"); + var causeFlush = fixedmoves.offsetTop; + changetransform.style.transform = ""; + </script> +</body> diff --git a/layout/reftests/w3c-css/submitted/transforms/transform-containing-block-dynamic-1b.html b/layout/reftests/w3c-css/submitted/transforms/transform-containing-block-dynamic-1b.html new file mode 100644 index 000000000..61266f02e --- /dev/null +++ b/layout/reftests/w3c-css/submitted/transforms/transform-containing-block-dynamic-1b.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: Creating containing block for fixed positioned elements</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-rendering"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-property"> +<link rel="match" href="containing-block-dynamic-1-ref.html"> +<meta name="assert" content="For elements whose layout is governed by the CSS box model, any value other than none for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants."> +<meta name="assert" content="The object acts as a containing block for fixed positioned descendants." +<meta name="flags" content="dom"> +<style> + html, body { margin: 0; padding: 0 } + #changetransform { + position: absolute; + top: 100px; + left: 100px; + } + + #abscovered { + position: absolute; + top: 50px; + left: 50px; + background: red; + height: 100px; + width: 100px; + } + + #fixedmoves { + position: fixed; + top: 50px; + left: 50px; + background: green; + height: 100px; + width: 100px; + } +</style> +<body> + <div id="changetransform"> + <div id="abscovered"></div> + <div id="fixedmoves"></div> + </div> + <script> + var changetransform = document.getElementById("changetransform"); + var fixedmoves = document.getElementById("fixedmoves"); + var causeFlush = fixedmoves.offsetTop; + changetransform.style.transform = "translateX(0px)"; + </script> +</body> |