Bug 1374233 - Part 3: Use NonNegativeAu as computed values for font-size related properties.

For font-size and font-size-adjust.

MozReview-Commit-ID: 5rrfVSzB7WF
This commit is contained in:
Boris Chiou 2017-07-21 15:38:55 +08:00
parent 191c2a282b
commit 234d2c1b32
13 changed files with 87 additions and 57 deletions

View file

@ -446,7 +446,7 @@ pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: ::Serv
/// Returns the line block-size needed by the given computed style and font size.
pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) -> Au {
let font_size = style.get_font().font_size;
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),