Merge ComputeDistance trait into Animatable trait

This commit is contained in:
Brian Birtles 2017-05-10 14:41:26 +09:00
parent 4d25e87ac6
commit 6dfc1d1aa8
10 changed files with 481 additions and 684 deletions

View file

@ -1022,7 +1022,7 @@ ${helpers.single_keyword_system("font-variant-caps",
}
pub mod computed_value {
use properties::animated_properties::{Animatable, ComputeDistance};
use properties::animated_properties::Animatable;
use std::fmt;
use style_traits::ToCss;
use values::CSSFloat;
@ -1062,9 +1062,7 @@ ${helpers.single_keyword_system("font-variant-caps",
_ => Err(()),
}
}
}
impl ComputeDistance for T {
#[inline]
fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
match (*self, *other) {