LibWeb: Move line-height from NodeWithStyle to ComputedValues

There's no need for this to live in the NodeWithStyle anymore. By moving
it to ComputedValues we get all the right inheritance behavior for free.
This commit is contained in:
Andreas Kling 2024-01-12 15:34:13 +01:00
commit c82d517447
Notes: sideshowbarker 2024-07-17 03:30:41 +09:00
8 changed files with 20 additions and 24 deletions

View file

@ -246,7 +246,7 @@ RefPtr<StyleValue const> ResolvedCSSStyleDeclaration::style_value_for_property(L
auto line_height = static_cast<DOM::Element const&>(*layout_node.dom_node()).computed_css_values()->property(property_id);
if (line_height->is_identifier() && line_height->to_identifier() == ValueID::Normal)
return line_height;
return LengthStyleValue::create(Length::make_px(layout_node.line_height()));
return LengthStyleValue::create(Length::make_px(layout_node.computed_values().line_height()));
}
// FIXME: -> block-size