mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Rename the Interpolate trait to Animatable
This commit is contained in:
parent
e029a42653
commit
4d25e87ac6
11 changed files with 89 additions and 88 deletions
|
@ -99,17 +99,17 @@ ${helpers.single_keyword("mask-mode",
|
|||
pub use properties::longhands::background_position_x::single_value::parse;
|
||||
pub use properties::longhands::background_position_x::single_value::SpecifiedValue;
|
||||
pub use properties::longhands::background_position_x::single_value::computed_value;
|
||||
use properties::animated_properties::{ComputeDistance, Interpolate, RepeatableListInterpolate};
|
||||
use properties::animated_properties::{Animatable, ComputeDistance, RepeatableListAnimatable};
|
||||
use properties::longhands::mask_position_x::computed_value::T as MaskPositionX;
|
||||
|
||||
impl Interpolate for MaskPositionX {
|
||||
impl Animatable for MaskPositionX {
|
||||
#[inline]
|
||||
fn interpolate(&self, other: &Self, progress: f64) -> Result<Self, ()> {
|
||||
Ok(MaskPositionX(try!(self.0.interpolate(&other.0, progress))))
|
||||
}
|
||||
}
|
||||
|
||||
impl RepeatableListInterpolate for MaskPositionX {}
|
||||
impl RepeatableListAnimatable for MaskPositionX {}
|
||||
|
||||
impl ComputeDistance for MaskPositionX {
|
||||
#[inline]
|
||||
|
@ -128,17 +128,17 @@ ${helpers.single_keyword("mask-mode",
|
|||
pub use properties::longhands::background_position_y::single_value::parse;
|
||||
pub use properties::longhands::background_position_y::single_value::SpecifiedValue;
|
||||
pub use properties::longhands::background_position_y::single_value::computed_value;
|
||||
use properties::animated_properties::{ComputeDistance, Interpolate, RepeatableListInterpolate};
|
||||
use properties::animated_properties::{Animatable, ComputeDistance, RepeatableListAnimatable};
|
||||
use properties::longhands::mask_position_y::computed_value::T as MaskPositionY;
|
||||
|
||||
impl Interpolate for MaskPositionY {
|
||||
impl Animatable for MaskPositionY {
|
||||
#[inline]
|
||||
fn interpolate(&self, other: &Self, progress: f64) -> Result<Self, ()> {
|
||||
Ok(MaskPositionY(try!(self.0.interpolate(&other.0, progress))))
|
||||
}
|
||||
}
|
||||
|
||||
impl RepeatableListInterpolate for MaskPositionY {}
|
||||
impl RepeatableListAnimatable for MaskPositionY {}
|
||||
|
||||
impl ComputeDistance for MaskPositionY {
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue