From bff67d82722abc77a229b283385f44e3a0e04e19 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Tue, 15 Aug 2017 13:04:06 +0900 Subject: [PATCH] Don't fallback to discrete animation within add_weighted() for Either<>. For CSS Transitions we want this case to return Err() so we know that the two values are not interpolable. For CSS Animations/Web Animations we implement discrete animation as the fallback behavior when Err() is returned. --- .../style/properties/helpers/animated_properties.mako.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 87325fa70cd..2863b04294c 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -2410,10 +2410,7 @@ impl Animatable for Either (Either::Second(ref this), Either::Second(ref other)) => { this.add_weighted(&other, self_portion, other_portion).map(Either::Second) }, - _ => { - let result = if self_portion > other_portion {*self} else {*other}; - Ok(result) - } + _ => Err(()), } } }