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