mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 12:17:52 +00:00
LibWeb: Handle percentage font-size values
This commit is contained in:
parent
b46378085d
commit
b85a8a23a7
Notes:
github-actions[bot]
2025-06-24 11:44:06 +00:00
Author: https://github.com/Gingeh
Commit: b85a8a23a7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5186
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 77 additions and 2 deletions
|
@ -385,7 +385,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
// m_font is used by Length::to_px() when resolving sizes against this layout node.
|
||||
// That's why it has to be set before everything else.
|
||||
computed_values.set_font_list(computed_style.computed_font_list());
|
||||
computed_values.set_font_size(computed_style.property(CSS::PropertyID::FontSize).as_length().length().to_px(*this));
|
||||
computed_values.set_font_size(computed_style.font_size());
|
||||
computed_values.set_font_weight(round_to<int>(computed_style.property(CSS::PropertyID::FontWeight).as_number().number()));
|
||||
computed_values.set_font_kerning(computed_style.font_kerning());
|
||||
computed_values.set_line_height(computed_style.line_height());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue