Modified: trunk/LayoutTests/css3/masking/clip-path-animation-expected.txt (155104 => 155105)
--- trunk/LayoutTests/css3/masking/clip-path-animation-expected.txt 2013-09-05 07:33:38 UTC (rev 155104)
+++ trunk/LayoutTests/css3/masking/clip-path-animation-expected.txt 2013-09-05 07:38:46 UTC (rev 155105)
@@ -1,6 +1,7 @@
-
+
PASS - "webkitClipPath" property for "rectangle-box" element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%, 0px, 0px)
PASS - "webkitClipPath" property for "circle-box" element at 1s saw something close to: circle(35%, 35%, 35%)
PASS - "webkitClipPath" property for "ellipse-box" element at 1s saw something close to: ellipse(35%, 35%, 35%, 30%)
PASS - "webkitClipPath" property for "polygon-box" element at 1s saw something close to: polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)
+PASS - "webkitClipPath" property for "none-box" element at 1s saw something close to: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)
Modified: trunk/LayoutTests/css3/masking/clip-path-animation.html (155104 => 155105)
--- trunk/LayoutTests/css3/masking/clip-path-animation.html 2013-09-05 07:33:38 UTC (rev 155104)
+++ trunk/LayoutTests/css3/masking/clip-path-animation.html 2013-09-05 07:38:46 UTC (rev 155105)
@@ -27,6 +27,9 @@
-webkit-animation: polygon-anim 2s linear
}
+ #none-box {
+ -webkit-animation: none-anim 2s linear
+ }
@-webkit-keyframes rectangle-anim {
from { -webkit-clip-path: rectangle(0%, 0%, 100%, 100%); }
@@ -48,6 +51,12 @@
to { -webkit-clip-path: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%); }
}
+ @-webkit-keyframes none-anim {
+ /* We do not support animations from or to 'none' as specified. */
+ from { -webkit-clip-path: none; }
+ to { -webkit-clip-path: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%); }
+ }
+
</style>
<script src=""
<script type="text/_javascript_">
@@ -57,6 +66,7 @@
["circle-anim", 1, "circle-box", "webkitClipPath", "circle(35%, 35%, 35%)", 0.05],
["ellipse-anim", 1, "ellipse-box", "webkitClipPath", "ellipse(35%, 35%, 35%, 30%)", 0.05],
["polygon-anim", 1, "polygon-box", "webkitClipPath", "polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)", 0.05],
+ ["none-anim", 1, "none-box", "webkitClipPath", "polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)", 0],
];
runAnimationTest(expectedValues);
@@ -68,6 +78,7 @@
<div class="box" id="circle-box"></div>
<div class="box" id="ellipse-box"></div>
<div class="box" id="polygon-box"></div>
+<div class="box" id="none-box"></div>
<div id="result">
</div>
Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (155104 => 155105)
--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp 2013-09-05 07:33:38 UTC (rev 155104)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp 2013-09-05 07:38:46 UTC (rev 155105)
@@ -133,6 +133,9 @@
static inline PassRefPtr<ClipPathOperation> blendFunc(const AnimationBase*, ClipPathOperation* from, ClipPathOperation* to, double progress)
{
+ if (!from || !to)
+ return to;
+
// Other clip-path operations than BasicShapes can not be animated.
if (from->getOperationType() != ClipPathOperation::SHAPE || to->getOperationType() != ClipPathOperation::SHAPE)
return to;