Bug 1359658 - Crashtest for clearing animation-only dirty descendants bit on display:none descendants; r=hiro
I have verified that this crashtest fails without the corresponding Servo-side
code changes.
MozReview-Commit-ID: 9obKluN3fgv
new file mode 100644
--- /dev/null
+++ b/dom/animation/test/crashtests/1359658-1.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html class="reftest-wait">
+ <head>
+ <meta charset=utf-8>
+ <title>Bug 1359658: Animation-only dirty descendants bit should be cleared
+ for display:none content</title>
+ </head>
+ <body>
+ <div id="ancestor">
+ <svg>
+ <rect id="target" width="100%" height="100%" fill="lime"/>
+ </svg>
+ </div>
+ </body>
+ <script>
+'use strict';
+
+const ancestor = document.getElementById('ancestor');
+const target = document.getElementById('target');
+
+document.addEventListener('DOMContentLoaded', () => {
+ const animation = target.animate({ color: [ 'red', 'lime' ] },
+ { duration: 1000, iterations: Infinity });
+ requestAnimationFrame(() => {
+ // Tweak animation to cause animation dirty bit to be set
+ animation.effect.timing.duration = 2000;
+ ancestor.style.display = "none";
+ getComputedStyle(ancestor).display;
+ document.documentElement.className = '';
+ });
+});
+ </script>
+</html>
--- a/dom/animation/test/crashtests/crashtests.list
+++ b/dom/animation/test/crashtests/crashtests.list
@@ -21,8 +21,9 @@ pref(dom.animations-api.core.enabled,tru
pref(dom.animations-api.core.enabled,true) load 1325193-1.html
pref(dom.animations-api.core.enabled,true) load 1330190-1.html
pref(dom.animations-api.core.enabled,true) load 1330190-2.html
pref(dom.animations-api.core.enabled,true) load 1330513-1.html
pref(dom.animations-api.core.enabled,true) load 1333539-1.html
pref(dom.animations-api.core.enabled,true) load 1333539-2.html
pref(dom.animations-api.core.enabled,true) load 1333418-1.html
pref(dom.animations-api.core.enabled,true) load 1343589-1.html
+pref(dom.animations-api.core.enabled,true) load 1359658-1.html