Title: [160623] trunk
Revision
160623
Author
rwlb...@webkit.org
Date
2013-12-15 14:34:08 -0800 (Sun, 15 Dec 2013)

Log Message

[CSS Shapes] shape-outside animation does not handle 'auto' well
https://bugs.webkit.org/show_bug.cgi?id=125700

Reviewed by Dirk Schulze.

Source/WebCore:

Handle the case where we are blending/animating with a null ShapeValue due to 'auto'.

Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):

LayoutTests:

Test a shape-outside animation where one keyframe uses 'auto'.

* fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
* fast/shapes/shape-outside-floats/shape-outside-animation.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (160622 => 160623)


--- trunk/LayoutTests/ChangeLog	2013-12-15 21:13:54 UTC (rev 160622)
+++ trunk/LayoutTests/ChangeLog	2013-12-15 22:34:08 UTC (rev 160623)
@@ -1,3 +1,15 @@
+2013-12-15  Rob Buis  <rob.b...@samsung.com>
+
+        [CSS Shapes] shape-outside animation does not handle 'auto' well
+        https://bugs.webkit.org/show_bug.cgi?id=125700
+
+        Reviewed by Dirk Schulze.
+
+        Test a shape-outside animation where one keyframe uses 'auto'.
+
+        * fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
+        * fast/shapes/shape-outside-floats/shape-outside-animation.html:
+
 2013-12-14  Darin Adler  <da...@apple.com>
 
         Crash in CSSImageGeneratorValue and RenderScrollbar

Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt (160622 => 160623)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt	2013-12-15 21:13:54 UTC (rev 160622)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt	2013-12-15 22:34:08 UTC (rev 160623)
@@ -3,9 +3,11 @@
 Moving Text
 Moving Text
 Moving Text
+Moving Text
 PASS - "webkitShapeOutside" property for "rectangle-box" element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%, 0px, 0px)
 PASS - "webkitShapeOutside" property for "circle-box" element at 1s saw something close to: circle(35% at 35% 35%)
 PASS - "webkitShapeOutside" property for "ellipse-box" element at 1s saw something close to: ellipse(35% 30% at 35% 35%)
 PASS - "webkitShapeOutside" property for "polygon-box" element at 1s saw something close to: polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)
 PASS - "webkitShapeOutside" property for "polygon2-box" element at 1s saw something close to: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)
+PASS - "webkitShapeOutside" property for "circle-auto-box" element at 1s saw something close to: circle(50% at 50% 50%)
 

Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html (160622 => 160623)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html	2013-12-15 21:13:54 UTC (rev 160622)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html	2013-12-15 22:34:08 UTC (rev 160623)
@@ -34,6 +34,10 @@
       -webkit-animation: polygon2-anim 2s linear
     }
 
+    #circle-auto-box {
+      -webkit-animation: circle-auto-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%); }
@@ -59,6 +63,11 @@
         to   { -webkit-shape-outside: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%); }
     }
 
+    @-webkit-keyframes circle-auto-anim {
+        from { -webkit-shape-outside: auto }
+        to   { -webkit-shape-outside: circle(50% at 50% 50%); }
+    }
+
   </style>
   <script src=""
   <script type="text/_javascript_">
@@ -69,6 +78,7 @@
       ["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],
+      ["circle-auto-anim",  1, "circle-auto-box", "webkitShapeOutside", "circle(50% at 50% 50%)", 0.05],
     ];
     
     runAnimationTest(expectedValues);
@@ -96,6 +106,10 @@
   <div class="box" id="polygon2-box"></div>
   Moving Text
 </div>
+<div class='container'>
+  <div class="box" id="circle-auto-box"></div>
+  Moving Text
+</div>
 
 <div id="result">
 </div>

Modified: trunk/Source/WebCore/ChangeLog (160622 => 160623)


--- trunk/Source/WebCore/ChangeLog	2013-12-15 21:13:54 UTC (rev 160622)
+++ trunk/Source/WebCore/ChangeLog	2013-12-15 22:34:08 UTC (rev 160623)
@@ -1,3 +1,17 @@
+2013-12-15  Rob Buis  <rob.b...@samsung.com>
+
+        [CSS Shapes] shape-outside animation does not handle 'auto' well
+        https://bugs.webkit.org/show_bug.cgi?id=125700
+
+        Reviewed by Dirk Schulze.
+
+        Handle the case where we are blending/animating with a null ShapeValue due to 'auto'.
+
+        Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this.
+
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::blendFunc):
+
 2013-12-15  Andy Estes  <aes...@apple.com>
 
         [iOS] Upstream changes to FeatureDefines.xcconfig

Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (160622 => 160623)


--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2013-12-15 21:13:54 UTC (rev 160622)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2013-12-15 22:34:08 UTC (rev 160623)
@@ -146,6 +146,9 @@
 #if ENABLE(CSS_SHAPES)
 static inline PassRefPtr<ShapeValue> blendFunc(const AnimationBase*, ShapeValue* from, ShapeValue* to, double progress)
 {
+    if (!from || !to)
+        return to;
+
     // FIXME Bug 102723: Shape-inside should be able to animate a value of 'outside-shape' when shape-outside is set to a BasicShape
     if (from->type() != ShapeValue::Shape || to->type() != ShapeValue::Shape)
         return to;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to