mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02: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:
Notes:
sideshowbarker
2024-07-17 03:30:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c82d517447 Pull-request: https://github.com/SerenityOS/serenity/pull/22719 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user