[Web Animations] Expose Web Animations CSS integration as an experimental feature
[WebKit-https.git] / LayoutTests / fast / shapes / shape-outside-floats / shape-outside-animation.html
index b9c33e4..4a31f61 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html><!-- webkit-test-runner [ enableWebAnimationsCSSIntegration=true ] -->
 
 <html>
 <head>
@@ -14,8 +14,8 @@
         float: left;
     }
 
-    #rectangle-box {
-      -webkit-animation: rectangle-anim 2s linear
+    #inset-box {
+      -webkit-animation: inset-anim 2s linear
     }
 
     #circle-box {
@@ -66,9 +66,9 @@
       -webkit-animation: circle-to-bottomright-extended-using-keyword-2-anim 2s linear
     }
 
-    @-webkit-keyframes rectangle-anim {
-        from { -webkit-shape-outside: rectangle(0%, 0%, 100%, 100%); }
-        to   { -webkit-shape-outside: rectangle(20%, 20%, 60%, 60%); }
+    @-webkit-keyframes inset-anim {
+        from { -webkit-shape-outside: inset(0%); }
+        to   { -webkit-shape-outside: inset(20%); }
     }
 
     @-webkit-keyframes circle-anim {
@@ -82,8 +82,8 @@
     }
 
     @-webkit-keyframes polygon-anim {
-        from { -webkit-shape-outside: polygon(nonzero, 0% 0%, 100% 0%, 100% 100%, 0% 100%); }
-        to   { -webkit-shape-outside: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%); }
+        from { -webkit-shape-outside: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
+        to   { -webkit-shape-outside: polygon(20% 20%, 80% 20%, 80% 80%, 20% 80%); }
     }
 
     @-webkit-keyframes polygon2-anim {
   <script type="text/javascript">
     const expectedValues = [
       // [animation-name, time, element-id, property, expected-value, tolerance]
-      ["rectangle-anim",  1, "rectangle-box", "webkitShapeOutside", "rectangle(10%, 10%, 80%, 80%, 0px, 0px)", 0.05],
+      ["inset-anim",  1, "inset-box", "webkitShapeOutside", "inset(10%)", 0.05],
       ["circle-anim",  1, "circle-box", "webkitShapeOutside", "circle(35% at 35% 35%)", 0.05],
       ["ellipse-anim",  1, "ellipse-box", "webkitShapeOutside", "ellipse(35% 30% at 35% 35%)", 0.05],
-      ["polygon-anim",  1, "polygon-box", "webkitShapeOutside", "polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)", 0.05],
-      ["polygon2-anim",  1, "polygon2-box", "webkitShapeOutside", "polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)", 0.05],
+      ["polygon-anim",  1, "polygon-box", "webkitShapeOutside", "polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)", 0.05],
+      ["polygon2-anim",  1, "polygon2-box", "webkitShapeOutside", "polygon(20% 20%, 80% 20%, 80% 80%, 20% 80%)", 0.05],
       ["circle-auto-anim",  1, "circle-auto-box", "webkitShapeOutside", "circle(50% at 50% 50%)", 0.05],
       ["circle-to-topleft-anim",  1, "circle-to-topleft-box", "webkitShapeOutside", "circle(35% at 25% 25%)", 0.05],
       ["circle-to-topleft-anim",  1, "circle-to-topleft-box", "webkitShapeOutside", "circle(35% at 25% 25%)", 0.05],
-      ["circle-to-bottomright-using-keyword-anim",  1, "circle-to-bottomright-using-keyword-box", "webkitShapeOutside", "circle(35% at 75% 75%)", 0.05],
-      ["circle-to-bottomright-using-keyword-anim",  1, "circle-to-bottomright-using-keyword-box", "webkitShapeOutside", "circle(35% at 75% 75%)", 0.05],
+      ["circle-to-bottomright-using-keyword-anim",  1, "circle-to-bottomright-using-keyword-box", "webkitShapeOutside", "circle(35% at calc((50% * 0.5) + ((100% - 0px) * 0.5)) calc((50% * 0.5) + ((100% - 0px) * 0.5)))", 0.05],
+      ["circle-to-bottomright-using-keyword-anim",  1, "circle-to-bottomright-using-keyword-box", "webkitShapeOutside", "circle(35% at calc((50% * 0.5) + ((100% - 0px) * 0.5)) calc((50% * 0.5) + ((100% - 0px) * 0.5)))", 0.05],
       ["circle-to-bottomright-extended-anim",  1, "circle-to-bottomright-extended-box", "webkitShapeOutside", "circle(35% at 75% 75%)", 0.05],
-      ["circle-to-bottomright-extended-using-keyword-anim",  1, "circle-to-bottomright-extended-using-keyword-box", "webkitShapeOutside", "circle(35% at 70% 70%)", 0.01],
-      ["circle-to-bottomright-extended-using-keyword-2-anim",  1, "circle-to-bottomright-extended-using-keyword-2-box", "webkitShapeOutside", "circle(35% at 70% 70%)", 0.01],
+      ["circle-to-bottomright-extended-using-keyword-anim",  1, "circle-to-bottomright-extended-using-keyword-box", "webkitShapeOutside", "circle(35% at 70% calc((50% * 0.5) + ((100% - 20px) * 0.5)))", 0.01],
+      ["circle-to-bottomright-extended-using-keyword-2-anim",  1, "circle-to-bottomright-extended-using-keyword-2-box", "webkitShapeOutside", "circle(35% at 70% calc((50% * 0.5) + ((100% - 10px) * 0.5)))", 0.01],
     ];
     
     runAnimationTest(expectedValues);
 <body>
 
 <div class='container'>
-  <div class="box" id="rectangle-box"></div>
+  <div class="box" id="inset-box"></div>
   Moving Text
 </div>
 <div class='container'>