blob: d9e13c02dde995eb0952b3ead346b72da0a6e4b5 [file] [log] [blame]
<!DOCTYPE html>
<style>
body { margin: 0 }
.margin { margin: 100px }
.grow { animation: zoom .01s }
@keyframes zoom { 0% {transform: scale(0)} 100% {transform: scale(1)} }
#box {
will-change: transform;
display: inline-block;
background: #9cd;
width: 100px;
height: 100px;
opacity: 0.5;
}
</style>
<script src="../../resources/js-test.js"></script>
<div class="margin">
<span class="grow">
<div id="box"></div>
</span>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
jsTestIsAsync = true;
description("Tests that when a LayoutObject loses its PaintLayer " +
"due to completion of an animation of an inline statically positioned " +
"element, we correctly update the locations of descendent layers.");
var box = document.querySelector("#box");
box.parentNode.addEventListener("animationend", function() {
shouldBeTrue("document.elementFromPoint(150, 150) === box");
finishJSTest();
});
</script>