1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

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
parent e7de5cb4d2
commit c82d517447
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