Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /web-animations/crashtests/reparent-animating-element-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="test-wait">
<title>CSS Test (Animations): Reparenting an element with a web animation on the compositor</title>
<meta name="assert" content="This should not crash.">
<!--
The Chromium implementation of <marquee> essentially uses web animations
underneath. However, I was unable to make a testcase for this crash
that uses web animations directly. Despite that, it still seems worth
adding this testcase here in WPT.
-->
<style>
#animate {
width: 100px;
height: 100px;
}
#newparent {
display: none;
}
</style>
<marquee id="animate">X</marquee>
<div id="newparent"></div>
<script>
let a = document.getElementById("animate");
requestAnimationFrame(function() {
// use setTimeout because the crash doesn't happen if we do this inside
// a requestAnimationFrame callback
setTimeout(function() {
a.remove();
document.getElementById("newparent").appendChild(a);
requestAnimationFrame(function() {
document.documentElement.classList.remove("test-wait");
});
}, 0);
});
</script>