mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Allow use of calculated property for line-height
Previously, calculated properties for line-heights were not being calculated and were simply ignored.
This commit is contained in:
parent
7d863174b3
commit
d3b4a5fbdb
Notes:
sideshowbarker
2024-07-17 02:20:02 +09:00
Author: https://github.com/martinfalisse
Commit: d3b4a5fbdb
Pull-request: https://github.com/SerenityOS/serenity/pull/16759
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ float StyleProperties::line_height(Layout::Node const& layout_node) const
|
|||
return Length(percentage.as_fraction(), Length::Type::Em).to_px(layout_node);
|
||||
}
|
||||
|
||||
if (line_height->is_calculated())
|
||||
return CSS::Length::make_calculated(line_height->as_calculated()).to_px(layout_node);
|
||||
|
||||
return layout_node.font().pixel_metrics().line_spacing();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue