blob: f583b92d71f7974efc8850653fac6a4ee7f54ab9 [file] [log] [blame]
<!DOCTYPE html>
.animating {
-webkit-animation: slide 10s alternate linear infinite;
.container {
height: 200px;
width: 250px;
padding: 5px;
border: 1px solid black;
.banner {
width: 100%;
height: 50px;
background-color: silver;
.box {
position: relative;
height: 100px;
width: 100px;
margin: 10px;
background-color: blue;
.test1 {
position: absolute;
left: 0;
top: 10px;
background-color: orange;
.test2 {
position: absolute;
top: 60px;
left: 120px;
background-color: orange;
.composited {
-webkit-transform: translateZ(0);
@-webkit-keyframes slide {
from { -webkit-transform: none; }
to { -webkit-transform: translateX(100px); }
if (window.testRunner) {
function runTest()
var box = document.getElementById('to-animate');
box.addEventListener('webkitAnimationStart', animationStarted, false);
function animationStarted()
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
window.addEventListener('load', runTest, false);
<div id="to-animate" class="container">
<div class="composited banner"></div>
<div class="test1 box">Should be composited</div>
<div class="test2 box">Should not be composited</div>
<div class="box">Should be composited</div>
<pre id="layers">Layer tree goes here in DRT</pre>