mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Derive the most trivial Animate impls
This commit is contained in:
parent
faaf31411a
commit
7ee124b1ed
20 changed files with 168 additions and 314 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
//! Computed types for CSS values that are related to transformations.
|
||||
|
||||
use values::animated::{Animate, Procedure};
|
||||
use values::computed::{Length, LengthOrPercentage, Number, Percentage};
|
||||
use values::generics::transform::TimingFunction as GenericTimingFunction;
|
||||
use values::generics::transform::TransformOrigin as GenericTransformOrigin;
|
||||
|
@ -26,14 +25,3 @@ impl TransformOrigin {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Animate for TransformOrigin {
|
||||
#[inline]
|
||||
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
Ok(Self::new(
|
||||
self.horizontal.animate(&other.horizontal, procedure)?,
|
||||
self.vertical.animate(&other.vertical, procedure)?,
|
||||
self.depth.animate(&other.depth, procedure)?,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue