From 21db77eb4eaa2991242b79efd2b7cea3b09f216b Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Mon, 28 Aug 2017 14:16:33 +0900 Subject: [PATCH] Don't fallback to discrete animations within animate(). --- .../helpers/animated_properties.mako.rs | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 2f7aaafc63d..e3c831c8bc9 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -2623,13 +2623,7 @@ where (&SVGLength::Length(ref this), &SVGLength::Length(ref other)) => { Ok(SVGLength::Length(this.animate(other, procedure)?)) }, - _ => { - // FIXME(nox): Is this correct for addition and accumulation? - // I think an error should be returned if it's not - // an interpolation. - let (this_weight, other_weight) = procedure.weights(); - Ok(if this_weight > other_weight { self.clone() } else { other.clone() }) - }, + _ => Err(()), } } } @@ -2649,10 +2643,7 @@ where (&SVGStrokeDashArray::Values(ref this), &SVGStrokeDashArray::Values(ref other)) => { Ok(SVGStrokeDashArray::Values(this.animate(other, procedure)?)) }, - _ => { - let (this_weight, other_weight) = procedure.weights(); - Ok(if this_weight > other_weight { self.clone() } else { other.clone() }) - }, + _ => Err(()), } } } @@ -2684,13 +2675,7 @@ where (&SVGOpacity::Opacity(ref this), &SVGOpacity::Opacity(ref other)) => { Ok(SVGOpacity::Opacity(this.animate(other, procedure)?)) }, - _ => { - // FIXME(nox): Is this correct for addition and accumulation? - // I think an error should be returned if it's not - // an interpolation. - let (this_weight, other_weight) = procedure.weights(); - Ok(if this_weight > other_weight { self.clone() } else { other.clone() }) - }, + _ => Err(()), } } }