Bug 1049975 - Part 13: Add reftests for stacking context when effects are changed. draft
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 18 Jul 2016 17:44:24 +0800
changeset 405241 187bb0e99823bb30e80d02caa1da9168e9b5a8cb
parent 405240 588622cae10d2679f93e6d5b37f36584b8947c23
child 529398 1b28f904764d98c0c7097e8b3f55786ef4463505
push id27442
push userbmo:boris.chiou@gmail.com
push dateThu, 25 Aug 2016 04:26:27 +0000
bugs1049975
milestone51.0a1
Bug 1049975 - Part 13: Add reftests for stacking context when effects are changed. MozReview-Commit-ID: FaswbUx9aGW
layout/reftests/web-animations/reftest.list
layout/reftests/web-animations/stacking-context-opacity-changing-effect.html
layout/reftests/web-animations/stacking-context-transform-changing-effect.html
--- 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>