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

--HG--
extra : rebase_source : 71d82eb24ccb9fea1674d08be9b317997df7fe3f
This commit is contained in:
Brian Birtles 2017-04-26 14:31:23 +09:00
Родитель 99eb2c1bc7
Коммит d5097e1bda
2 изменённых файлов: 34 добавлений и 0 удалений

Просмотреть файл

@ -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>

Просмотреть файл

@ -26,3 +26,4 @@ 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