2 <html class=
"reftest-wait reftest-no-flush">
5 <title>Check for animation restyling on an element's initial restyling after leaving a display:none subtree
</title>
16 <div id=
"target"></div>
18 // Wait for a steady state before beginning so that style flushes from the
19 // initial restyling don't interfere with the results.
20 document
.addEventListener('MozReftestInvalidate', () => {
21 requestAnimationFrame(() => {
22 // Get target element -- computed style should be display: none by now.
23 const target
= document
.getElementById('target');
25 // Update specified style but don't flush
26 target
.style
.display
= 'block';
28 // Trigger an animation on the element.
30 // animate() won't flush styles so we are testing that it still correctly
31 // marks the element as needing an animation restyle even when it doesn't have
34 { width
: ['0px', '100px'] },
35 { duration
: 100 * 1000, easing
: 'step-start' }
38 document
.documentElement
.classList
.remove('reftest-wait');