Bug 1374233 - Part 12: Implement ToAnimatedValue for LineHeight.

Besides, we replace its type with
GenericLineHeight<NonNegativeNumber, NonNegativeAu>.

MozReview-Commit-ID: GGOGXyUFJsJ
This commit is contained in:
Boris Chiou 2017-07-24 17:25:47 +08:00
parent ebedea5860
commit 6dd8b159d7
7 changed files with 42 additions and 37 deletions

View file

@ -4,10 +4,10 @@
//! Computed types for text properties.
use app_units::Au;
use properties::animated_properties::Animatable;
use values::{CSSInteger, CSSFloat};
use values::animated::ToAnimatedZero;
use values::computed::{NonNegativeAu, NonNegativeNumber};
use values::computed::length::{Length, LengthOrPercentage};
use values::generics::text::InitialLetter as GenericInitialLetter;
use values::generics::text::LineHeight as GenericLineHeight;
@ -23,7 +23,7 @@ pub type LetterSpacing = Spacing<Length>;
pub type WordSpacing = Spacing<LengthOrPercentage>;
/// A computed value for the `line-height` property.
pub type LineHeight = GenericLineHeight<CSSFloat, Au>;
pub type LineHeight = GenericLineHeight<NonNegativeNumber, NonNegativeAu>;
impl Animatable for LineHeight {
#[inline]