Bug 1049975 - Part 13: Add reftests for stacking context when effects are changed.
MozReview-Commit-ID: FaswbUx9aGW
--- a/layout/reftests/web-animations/reftest.list
+++ b/layout/reftests/web-animations/reftest.list
@@ -1,8 +1,10 @@
test-pref(dom.animations-api.core.enabled,true) == 1246046-1.html green-box.html
test-pref(dom.animations-api.core.enabled,true) == 1267937-1.html 1267937-ref.html
test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-none-animation-before-appending-element.html stacking-context-animation-ref.html
test-pref(dom.animations-api.core.enabled,true) == stacking-context-opacity-changing-keyframe.html stacking-context-animation-ref.html
test-pref(dom.animations-api.core.enabled,true) == stacking-context-opacity-changing-target.html stacking-context-animation-changing-target-ref.html
+test-pref(dom.animations-api.core.enabled,true) == stacking-context-opacity-changing-effect.html stacking-context-animation-ref.html
test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-changing-keyframe.html stacking-context-animation-ref.html
test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-changing-target.html stacking-context-animation-changing-target-ref.html
+test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-changing-effect.html stacking-context-animation-ref.html
test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-changing-display-property.html stacking-context-animation-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/web-animations/stacking-context-opacity-changing-effect.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<title>
+ Opacity animation creates a stacking context after changing effects
+</title>
+<style>
+span {
+ height: 100px;
+ width: 100px;
+ position: fixed;
+ background: green;
+ top: 50px;
+}
+div {
+ width: 100px;
+ height: 100px;
+ background: blue;
+}
+</style>
+<span></span>
+<div id="test"></div>
+<script>
+ var elem = document.getElementById("test");
+ var anim = elem.animate(null, { duration: 100000 });
+ var newEffect = new KeyframeEffect(elem, { opacity: [1, 1] }, 100000);
+ anim.ready.then(function() {
+ anim.effect = newEffect;
+ requestAnimationFrame(function() {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+</script>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/web-animations/stacking-context-transform-changing-effect.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class="reftest-wait reftest-no-flush">
+<title>
+ Transform animation creates a stacking context after changing effects
+</title>
+<style>
+span {
+ height: 100px;
+ width: 100px;
+ position: fixed;
+ background: green;
+ top: 50px;
+}
+div {
+ width: 100px;
+ height: 100px;
+ background: blue;
+}
+</style>
+<span></span>
+<div id="test"></div>
+<script>
+ var elem = document.getElementById("test");
+ var anim = elem.animate(null, { duration: 100000 });
+ var newEffect = new KeyframeEffect(elem,
+ { transform: ['none', 'none']},
+ 100000);
+ anim.ready.then(function() {
+ anim.effect = newEffect;
+ requestAnimationFrame(function() {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+</script>
+</html>