Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / animation / compositor-transform-with-scale.html
blob5f446486066a72dbf2e560e02aca110060712d12
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
6 div {
7 position: absolute;
8 backface-visibility: visible;
9 height: 25px;
10 width: 25px;
13 #div1 {
14 left: 100px;
15 top: 200px;
16 background-color: blue;
19 #div2 {
20 left: 200px;
21 top: 200px;
22 background-color: red;
24 #div3 {
25 left: 300px;
26 top: 200px;
27 background-color: purple;
30 </style>
31 </head>
32 <body>
33 <p>
34 Tests that composited animation happens when only transform or only scale is present.
35 <p>
36 The 3 squares should equivalently scale. They need not be perfectly in time.
37 <p>
38 Blue - Only Transform, Red - Only Scale, Purple - Transform + Scale
40 <div id="div1"></div>
41 <div id="div2"></div>
42 <div id="div3"></div>
44 <script>
45 var div1 = document.getElementById('div1');
46 var div2 = document.getElementById('div2');
47 var div3 = document.getElementById('div3');
49 function startAnimations() {
50 div1.animate([
51 {transform: 'scale(1, 1)'},
52 {transform: 'scale(4, 4)'}
53 ], {
54 duration: 5000,
55 delay: 1000,
56 fill: 'forwards'
57 });
59 div2.animate([
60 {scale: '1 1'},
61 {scale: '4 4'}
62 ], {
63 duration: 5000,
64 delay: 1000,
65 fill: 'forwards'
66 });
68 div3.animate([
69 {transform: 'scale(1, 1)', scale: '1 1'},
70 {transform: 'scale(2, 2)', scale: '2 2'}
71 ], {
72 duration: 5000,
73 delay: 1000,
74 fill: 'forwards'
75 });
78 requestAnimationFrame(startAnimations);
80 </script>
82 </body>
83 </html>