blob: 650237254cafe330c6faab5f7edf12226ce978d2 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] -->
<html>
<head>
<style>
.container {
position: absolute;
top: 100px;
overflow: hidden;
width: 500px;
height: 150px;
border: 1px solid black;
}
.mover {
position: absolute;
width: 500px;
height: 100%;
left: 100%;
transform: translateX(-100%);
background-color: silver;
padding: 10px;
}
.mover.animating {
animation: slide 1s linear forwards;
}
@keyframes slide {
100% { transform: translateX(0) }
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function layerTreeWithoutTransforms()
{
var layerTreeText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED);
var filteredLines = layerTreeText.split("\n").filter(line => line.indexOf('transform') == -1);
return filteredLines.join('\n');
}
function dumpLayerTree()
{
if (!window.internals)
return;
document.getElementById('out').textContent = layerTreeWithoutTransforms();
}
function dumpLayersSoon()
{
requestAnimationFrame(function() {
// Trigger layer flush
document.querySelector('.container').style.width = '501px';
dumpLayerTree();
if (window.testRunner)
testRunner.notifyDone();
});
}
window.addEventListener('load', () => {
let box = document.getElementById('box');
box.addEventListener('animationstart', dumpLayersSoon, false);
box.classList.add('animating');
}, false);
</script>
</head>
<body>
<pre id="out"></pre>
<div class="container">
<div id="box" class="mover">
Some text here to force backing store.
</div>
</div>
</body>
</html>