Add FIXME for font-size animated value

This commit is contained in:
Manish Goregaokar 2017-09-24 00:47:29 -07:00
parent ce7d82e9c4
commit b238eae66c
2 changed files with 5 additions and 1 deletions

View file

@ -76,6 +76,10 @@ impl ToCss for FontSize {
} }
} }
/// XXXManishearth it might be better to
/// animate this as computed, however this complicates
/// clamping and might not be the right thing to do.
/// We should figure it out.
impl ToAnimatedValue for FontSize { impl ToAnimatedValue for FontSize {
type AnimatedValue = NonNegativeLength; type AnimatedValue = NonNegativeLength;

View file

@ -792,7 +792,7 @@ impl NonNegativeLength {
} }
#[inline] #[inline]
/// Ensures it is positive /// Ensures it is non negative
pub fn clamp(self) -> Self { pub fn clamp(self) -> Self {
if (self.0).0 < 0. { if (self.0).0 < 0. {
Self::zero() Self::zero()