OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
5 <style> | 5 <style> |
6 .outer { | 6 .outer { |
7 width: 120px; | 7 width: 120px; |
8 height: 230px; | 8 height: 230px; |
9 margin: 20px 100px; | 9 margin: 20px 100px; |
10 border: 1px solid black; | 10 border: 1px solid black; |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 .inner.animated { | 24 .inner.animated { |
25 -webkit-animation: swing 1s linear 1 alternate; | 25 -webkit-animation: swing 1s linear 1 alternate; |
26 } | 26 } |
27 | 27 |
28 .inner:hover { | 28 .inner:hover { |
29 -webkit-animation-play-state: paused; | 29 -webkit-animation-play-state: paused; |
30 } | 30 } |
31 | 31 |
32 .composited { | 32 .composited { |
33 -webkit-transform: translateZ(0); | 33 transform: translateZ(0); |
34 } | 34 } |
35 | 35 |
36 @-webkit-keyframes swing { | 36 @-webkit-keyframes swing { |
37 from { -webkit-transform: rotate(0deg); } | 37 from { transform: rotate(0deg); } |
38 to { -webkit-transform: rotate(90deg); } | 38 to { transform: rotate(90deg); } |
39 } | 39 } |
40 </style> | 40 </style> |
41 <script src="../../animations/resources/animation-test-helpers.js" type="text/
javascript" charset="utf-8"></script> | 41 <script src="../../animations/resources/animation-test-helpers.js" type="text/
javascript" charset="utf-8"></script> |
42 <script type="text/javascript" charset="utf-8"> | 42 <script type="text/javascript" charset="utf-8"> |
43 const expectedValues = [ | 43 const expectedValues = [ |
44 // [time, element-id, property, expected-value, tolerance] | 44 // [time, element-id, property, expected-value, tolerance] |
45 [0.5, "inner", "webkitTransform.0", 0.76, 0.1], | 45 [0.5, "inner", "webkitTransform.0", 0.76, 0.1], |
46 ]; | 46 ]; |
47 | 47 |
48 var pixelTest = true; | 48 var pixelTest = true; |
49 var disablePauseAPI = false; | 49 var disablePauseAPI = false; |
50 runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest); | 50 runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest); |
51 </script> | 51 </script> |
52 </head> | 52 </head> |
53 <body> | 53 <body> |
54 <p>Animation on original and reflection should both be paused half way through
, giving 45deg rotation.</p> | 54 <p>Animation on original and reflection should both be paused half way through
, giving 45deg rotation.</p> |
55 <div class="outer composited"> | 55 <div class="outer composited"> |
56 <div id="inner" class="inner composited animated"> | 56 <div id="inner" class="inner composited animated"> |
57 1 | 57 1 |
58 </div> | 58 </div> |
59 </div> | 59 </div> |
60 <div id="result"></div> | 60 <div id="result"></div> |
61 </body> | 61 </body> |
62 </html> | 62 </html> |
OLD | NEW |