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

@ -449,8 +449,8 @@ pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) ->
let font_size = style.get_font().font_size.0;
match style.get_inheritedtext().line_height {
LineHeight::Normal => metrics.line_gap,
LineHeight::Number(l) => font_size.scale_by(l),
LineHeight::Length(l) => l
LineHeight::Number(l) => font_size.scale_by(l.0),
LineHeight::Length(l) => l.0
}
}