OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <style> | 5 <style> |
6 .box { | 6 .box { |
7 height: 100px; | 7 height: 100px; |
8 width: 100px; | 8 width: 100px; |
9 margin: 10px; | 9 margin: 10px; |
10 background-color: blue; | 10 background-color: blue; |
11 display: inline-block; | 11 display: inline-block; |
12 } | 12 } |
13 | 13 |
14 #rectangle-box { | |
15 -webkit-animation: rectangle-anim 2s linear | |
16 } | |
17 | |
18 #circle-box { | 14 #circle-box { |
19 -webkit-animation: circle-anim 2s linear | 15 -webkit-animation: circle-anim 2s linear |
20 } | 16 } |
21 | 17 |
22 #ellipse-box { | 18 #ellipse-box { |
23 -webkit-animation: ellipse-anim 2s linear | 19 -webkit-animation: ellipse-anim 2s linear |
24 } | 20 } |
25 | 21 |
26 #polygon-box { | 22 #polygon-box { |
27 -webkit-animation: polygon-anim 2s linear | 23 -webkit-animation: polygon-anim 2s linear |
28 } | 24 } |
29 | 25 |
30 | 26 |
31 @-webkit-keyframes rectangle-anim { | |
32 from { -webkit-clip-path: rectangle(0%, 0%, 100%, 100%); } | |
33 to { -webkit-clip-path: rectangle(20%, 20%, 60%, 60%); } | |
34 } | |
35 | |
36 @-webkit-keyframes circle-anim { | 27 @-webkit-keyframes circle-anim { |
37 from { -webkit-clip-path: circle(50% at 50% 50%); } | 28 from { -webkit-clip-path: circle(50% at 50% 50%); } |
38 to { -webkit-clip-path: circle(20% at 20% 20%); } | 29 to { -webkit-clip-path: circle(20% at 20% 20%); } |
39 } | 30 } |
40 | 31 |
41 @-webkit-keyframes ellipse-anim { | 32 @-webkit-keyframes ellipse-anim { |
42 from { -webkit-clip-path: ellipse(50% 40% at 50% 50%); } | 33 from { -webkit-clip-path: ellipse(50% 40% at 50% 50%); } |
43 to { -webkit-clip-path: ellipse(20% 20% at 20% 20%); } | 34 to { -webkit-clip-path: ellipse(20% 20% at 20% 20%); } |
44 } | 35 } |
45 | 36 |
46 @-webkit-keyframes polygon-anim { | 37 @-webkit-keyframes polygon-anim { |
47 from { -webkit-clip-path: polygon(nonzero, 0% 0%, 100% 0%, 100% 100%, 0%
100%); } | 38 from { -webkit-clip-path: polygon(nonzero, 0% 0%, 100% 0%, 100% 100%, 0%
100%); } |
48 to { -webkit-clip-path: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20
% 80%); } | 39 to { -webkit-clip-path: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20
% 80%); } |
49 } | 40 } |
50 | 41 |
51 </style> | 42 </style> |
52 <script src="../../animations/resources/animation-test-helpers.js"></script> | 43 <script src="../../animations/resources/animation-test-helpers.js"></script> |
53 <script type="text/javascript"> | 44 <script type="text/javascript"> |
54 const expectedValues = [ | 45 const expectedValues = [ |
55 // [time, element-id, property, expected-value, tolerance] | 46 // [time, element-id, property, expected-value, tolerance] |
56 [1, "rectangle-box", "webkitClipPath", "rectangle(10%, 10%, 80%, 80%, 0px,
0px)", 0.05], | 47 // FIXME: BasicShapeInset::blend is not implemented, when it is add an ins
et test. |
57 [1, "circle-box", "webkitClipPath", "circle(35% at 35% 35%)", 0.05], | 48 // [1, "inset-box", "webkitClipPath", "inset(10% 10% 10% 10% round 0px 0px
0px 0px / 0px 0px 0px 0px)", 0.05], |
| 49 [1, "circle-box", "webkitClipPath", "circle(35% at 35% 35%)", 0.05], |
58 [1, "ellipse-box", "webkitClipPath", "ellipse(35% 30% at 35% 35%)", 0.05], | 50 [1, "ellipse-box", "webkitClipPath", "ellipse(35% 30% at 35% 35%)", 0.05], |
59 [1, "polygon-box", "webkitClipPath", "polygon(10% 10%, 90% 10%, 90% 90%, 1
0% 90%)", 0.05], | 51 [1, "polygon-box", "webkitClipPath", "polygon(10% 10%, 90% 10%, 90% 90%, 1
0% 90%)", 0.05], |
60 ]; | 52 ]; |
61 | 53 |
62 runAnimationTest(expectedValues); | 54 runAnimationTest(expectedValues); |
63 </script> | 55 </script> |
64 </head> | 56 </head> |
65 <body> | 57 <body> |
66 | 58 |
67 <div class="box" id="rectangle-box"></div> | |
68 <div class="box" id="circle-box"></div> | 59 <div class="box" id="circle-box"></div> |
69 <div class="box" id="ellipse-box"></div> | 60 <div class="box" id="ellipse-box"></div> |
70 <div class="box" id="polygon-box"></div> | 61 <div class="box" id="polygon-box"></div> |
71 | 62 |
72 <div id="result"> | 63 <div id="result"> |
73 </div> | 64 </div> |
74 </body> | 65 </body> |
75 </html> | 66 </html> |
OLD | NEW |