8 will-change: transform;
10 -webkit-animation-duration:
2s;
11 -webkit-animation-timing-function: linear;
12 -webkit-animation-iteration-count:
2;
16 -webkit-animation-name: anim-left;
21 -webkit-animation-name: anim-transform;
25 @-webkit-keyframes anim-left {
29 @-webkit-keyframes anim-transform {
30 100% { transform: translateX(
300px); }
35 The section below has two boxes, the top runs on the main thread, the bottom
36 on the compositor. The animations should be identical but start at different
39 This test is successful if the each pair of boxes are mostly in sync (there
40 might be a small offset between them).
44 <div id=
"target-left" class='anim-left'
></div>
45 <div id=
"target-transform" class='anim-transform'
></div>
49 setTimeout(function() { document
.getElementById('target-left').style
.left
= '500px'; }, 2000);
50 setTimeout(function() { document
.getElementById('target-transform').style
.transform
= 'translateX(500px)'; }, 2000);