8 transform: translateZ(
0);
9 -webkit-animation-direction: alternate;
10 -webkit-animation-duration:
2s;
11 -webkit-animation-timing-function: linear;
12 -webkit-animation-fill-mode: both;
16 -webkit-animation-iteration-count:
0;
20 -webkit-animation-iteration-count:
0.5;
24 -webkit-animation-iteration-count:
1;
28 -webkit-animation-iteration-count:
1.5;
32 -webkit-animation-iteration-count:
2;
36 -webkit-animation-iteration-count:
2.5;
40 -webkit-animation-name: anim-left;
45 -webkit-animation-name: anim-transform;
49 @-webkit-keyframes anim-left {
58 @-webkit-keyframes anim-transform {
60 transform: translateX(
0px);
63 transform: translateX(
300px);
69 Each section below has two boxes, the top runs on the main thread, the bottom
70 on the compositor. The animations should be identical but start at different
73 This test is successful if the boxes are mostly in sync (there might be a small
78 Iteration count
0 (should not animate)
80 <div class='test0 anim-left'
></div>
81 <div class='test0 anim-transform'
></div>
83 Iteration count
0.5 (should finish first in the middle)
85 <div class='test1 anim-left'
></div>
86 <div class='test1 anim-transform'
></div>
88 Iteration count
1 (should finish second at the end)
90 <div class='test2 anim-left'
></div>
91 <div class='test2 anim-transform'
></div>
93 Iteration count
1.5 (should finish third in the middle)
95 <div class='test3 anim-left'
></div>
96 <div class='test3 anim-transform'
></div>
98 Iteration count
2 (should finish fourth at the start)
100 <div class='test4 anim-left'
></div>
101 <div class='test4 anim-transform'
></div>
103 Iteration count
2.5 (should finish last in the middle)
105 <div class='test5 anim-left'
></div>
106 <div class='test5 anim-transform'
></div>