mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
191c2a282b
commit
234d2c1b32
13 changed files with 87 additions and 57 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue