mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
LibWeb: Remove default Length constructor and add make_auto()/make_px()
To prepare for adding an undefined/empty state for Length, let's first move away from Length() creating an auto value.
This commit is contained in:
@@ -179,7 +179,7 @@ void StyleProperties::load_font() const
|
||||
|
||||
float StyleProperties::line_height(const LayoutNode& layout_node) const
|
||||
{
|
||||
auto line_height_length = length_or_fallback(CSS::PropertyID::LineHeight, {});
|
||||
auto line_height_length = length_or_fallback(CSS::PropertyID::LineHeight, Length::make_auto());
|
||||
if (line_height_length.is_absolute())
|
||||
return (float)line_height_length.to_px(layout_node);
|
||||
return (float)font().glyph_height() * 1.4f;
|
||||
|
||||
Reference in New Issue
Block a user