mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
ebedea5860
commit
6dd8b159d7
7 changed files with 42 additions and 37 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue