mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -64,6 +64,12 @@ impl Angle {
|
|||
radians.min(f64::MAX).max(f64::MIN)
|
||||
}
|
||||
|
||||
/// Return the value in degrees.
|
||||
pub fn degrees(&self) -> f32 {
|
||||
use std::f32::consts::PI;
|
||||
self.radians() * 360. / (2. * PI)
|
||||
}
|
||||
|
||||
/// <https://drafts.csswg.org/css-transitions/#animtype-number>
|
||||
#[inline]
|
||||
fn animate_fallback(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue