mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Handle non-numeric font-weight
values in keyframes
Previously, using `font-weight` with a keyword or `calc()` value inside a keyframe rule would cause a crash.
This commit is contained in:
parent
e69d9fb331
commit
48f56cad08
Notes:
github-actions[bot]
2025-06-25 07:03:08 +00:00
Author: https://github.com/tcl3
Commit: 48f56cad08
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5206
Reviewed-by: https://github.com/gmta ✅
3 changed files with 42 additions and 1 deletions
|
@ -386,7 +386,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
// 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.font_size());
|
||||
computed_values.set_font_weight(round_to<int>(computed_style.property(CSS::PropertyID::FontWeight).as_number().number()));
|
||||
computed_values.set_font_weight(computed_style.property(CSS::PropertyID::FontWeight).to_font_weight());
|
||||
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