mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
stylo: Add keyword info to computed value of font-size
This commit is contained in:
parent
5a6b90b14f
commit
c2fcc9ce1a
13 changed files with 141 additions and 52 deletions
|
@ -447,7 +447,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 = Au::from(style.get_font().font_size);
|
||||
let font_size = style.get_font().font_size.size();
|
||||
match style.get_inheritedtext().line_height {
|
||||
LineHeight::Normal => Au::from(metrics.line_gap),
|
||||
LineHeight::Number(l) => font_size.scale_by(l.0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue