mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Format style component.
This commit is contained in:
parent
31fc6cd565
commit
8dab4d659a
120 changed files with 2207 additions and 1417 deletions
|
@ -15,7 +15,9 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
|
|||
/// A computed angle.
|
||||
#[animate(fallback = "Self::animate_fallback")]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToAnimatedZero, ToCss)]
|
||||
#[derive(
|
||||
Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToAnimatedZero, ToCss,
|
||||
)]
|
||||
pub enum Angle {
|
||||
/// An angle with degree unit.
|
||||
#[css(dimension)]
|
||||
|
@ -73,7 +75,9 @@ impl Angle {
|
|||
/// <https://drafts.csswg.org/css-transitions/#animtype-number>
|
||||
#[inline]
|
||||
fn animate_fallback(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
Ok(Angle::from_radians(self.radians().animate(&other.radians(), procedure)?))
|
||||
Ok(Angle::from_radians(
|
||||
self.radians().animate(&other.radians(), procedure)?,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue