mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Fix clamping on animations for fort-style.
Bug: 1455358 Reviewed-by: xidorn MozReview-Commit-ID: Awyub0dMOmq
This commit is contained in:
parent
737501153b
commit
0a8518b452
5 changed files with 37 additions and 10 deletions
|
@ -110,8 +110,7 @@ impl Angle {
|
|||
/// Returns the amount of degrees this angle represents.
|
||||
#[inline]
|
||||
pub fn degrees(self) -> f32 {
|
||||
use std::f32::consts::PI;
|
||||
self.radians() * 360. / (2. * PI)
|
||||
self.value.degrees()
|
||||
}
|
||||
|
||||
/// Returns `0deg`.
|
||||
|
|
|
@ -19,7 +19,7 @@ use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
|
|||
use values::CustomIdent;
|
||||
use values::computed::{Angle as ComputedAngle, Percentage as ComputedPercentage};
|
||||
use values::computed::{font as computed, Context, Length, NonNegativeLength, ToComputedValue};
|
||||
use values::computed::font::{FamilyName, FontFamilyList, SingleFontFamily};
|
||||
use values::computed::font::{FamilyName, FontFamilyList, FontStyleAngle, SingleFontFamily};
|
||||
use values::generics::NonNegative;
|
||||
use values::generics::font::{self as generics, FeatureTagValue, FontSettings, FontTag};
|
||||
use values::generics::font::{KeywordInfo as GenericKeywordInfo, KeywordSize, VariationValue};
|
||||
|
@ -241,7 +241,7 @@ impl ToComputedValue for SpecifiedFontStyle {
|
|||
generics::FontStyle::Normal => generics::FontStyle::Normal,
|
||||
generics::FontStyle::Italic => generics::FontStyle::Italic,
|
||||
generics::FontStyle::Oblique(ref angle) => {
|
||||
generics::FontStyle::Oblique(Self::compute_angle(angle))
|
||||
generics::FontStyle::Oblique(FontStyleAngle(Self::compute_angle(angle)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ impl ToComputedValue for SpecifiedFontStyle {
|
|||
generics::FontStyle::Normal => generics::FontStyle::Normal,
|
||||
generics::FontStyle::Italic => generics::FontStyle::Italic,
|
||||
generics::FontStyle::Oblique(ref angle) => {
|
||||
generics::FontStyle::Oblique(Angle::from_computed_value(angle))
|
||||
generics::FontStyle::Oblique(Angle::from_computed_value(&angle.0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue