diff options
Diffstat (limited to 'components/layout_2020/query.rs')
-rw-r--r-- | components/layout_2020/query.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/layout_2020/query.rs b/components/layout_2020/query.rs index 2702fe52117..48e052996ff 100644 --- a/components/layout_2020/query.rs +++ b/components/layout_2020/query.rs @@ -29,7 +29,7 @@ use style::shared_lock::SharedRwLock; use style::stylesheets::{CssRuleType, Origin, UrlExtraData}; use style::stylist::RuleInclusion; use style::traversal::resolve_style; -use style::values::generics::text::LineHeight; +use style::values::generics::font::LineHeight; use style_traits::{ParsingMode, ToCss}; use webrender_api::ExternalScrollId; @@ -161,8 +161,9 @@ pub fn process_resolved_style_request<'dom>( // For line height, the resolved value is the computed value if it // is "normal" and the used value otherwise. if longhand_id == LonghandId::LineHeight { - let font_size = style.get_font().font_size.computed_size(); - return match style.get_inherited_text().line_height { + let font = style.get_font(); + let font_size = font.font_size.computed_size(); + return match font.line_height { LineHeight::Normal => computed_style(), LineHeight::Number(value) => (font_size * value.0).to_css_string(), LineHeight::Length(value) => value.0.to_css_string(), |