diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 9c1bee5d3594..63e7c9f68412 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -617,16 +617,16 @@ KeyframeEffectReadOnly::ComposeStyle(RefPtr& aStyleRule, computedTiming.mBeforeFlag); StyleAnimationValue val; -#ifdef DEBUG - bool result = -#endif - StyleAnimationValue::Interpolate(prop.mProperty, - segment->mFromValue, - segment->mToValue, - valuePosition, val); - MOZ_ASSERT(result, "interpolate must succeed now"); - - aStyleRule->AddValue(prop.mProperty, Move(val)); + if (StyleAnimationValue::Interpolate(prop.mProperty, + segment->mFromValue, + segment->mToValue, + valuePosition, val)) { + aStyleRule->AddValue(prop.mProperty, Move(val)); + } else if (valuePosition < 0.5) { + aStyleRule->AddValue(prop.mProperty, segment->mFromValue); + } else { + aStyleRule->AddValue(prop.mProperty, segment->mToValue); + } } } diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index b77881be3152..6a82b626b542 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -28389,10 +28389,6 @@ "path": "web-animations/animatable/animate.html", "url": "/web-animations/animatable/animate.html" }, - { - "path": "web-animations/animation-effect-timing/delay.html", - "url": "/web-animations/animation-effect-timing/delay.html" - }, { "path": "web-animations/animation-effect-timing/direction.html", "url": "/web-animations/animation-effect-timing/direction.html" @@ -28421,6 +28417,10 @@ "path": "web-animations/animation-effect-timing/iterations.html", "url": "/web-animations/animation-effect-timing/iterations.html" }, + { + "path": "web-animations/animation-model/animation-types/discrete-animation.html", + "url": "/web-animations/animation-model/animation-types/discrete-animation.html" + }, { "path": "web-animations/animation-timeline/document-timeline.html", "url": "/web-animations/animation-timeline/document-timeline.html" diff --git a/testing/web-platform/tests/web-animations/animation-model/animation-types/discrete-animation.html b/testing/web-platform/tests/web-animations/animation-model/animation-types/discrete-animation.html new file mode 100644 index 000000000000..864a9e2845b5 --- /dev/null +++ b/testing/web-platform/tests/web-animations/animation-model/animation-types/discrete-animation.html @@ -0,0 +1,136 @@ + + +Tests for discrete animation + + + + + + +
+