mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +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
|
@ -139,6 +139,7 @@ impl ToAnimatedValue for ComputedTextShadowList {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME(nox): This could be derived if we implement Animate for bool.
|
||||
impl Animate for BoxShadow {
|
||||
#[inline]
|
||||
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
|
@ -211,15 +212,3 @@ impl ToAnimatedZero for FilterList {
|
|||
Ok(FilterList(vec![]))
|
||||
}
|
||||
}
|
||||
|
||||
impl Animate for SimpleShadow {
|
||||
#[inline]
|
||||
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
Ok(SimpleShadow {
|
||||
color: self.color.animate(&other.color, procedure)?,
|
||||
horizontal: self.horizontal.animate(&other.horizontal, procedure)?,
|
||||
vertical: self.vertical.animate(&other.vertical, procedure)?,
|
||||
blur: self.blur.animate(&other.blur, procedure)?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue