mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/CSS: Avoid calling to_font_weight() when serializing font
This function attempts to resolve `lighter` and `bolder`, which we don't want to do when serializing - that should happen in style computation. This has the unexpected bonus of 37 more WPT passes!
This commit is contained in:
parent
3fe148f2d4
commit
f5cd853597
Notes:
github-actions[bot]
2025-05-24 12:36:28 +00:00
Author: https://github.com/AtkinsSJ
Commit: f5cd853597
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4862
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 41 additions and 41 deletions
|
@ -238,8 +238,9 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
|
|||
append(font_style_string);
|
||||
if (font_variant_string != "normal"sv && font_variant_string != "initial"sv)
|
||||
append(font_variant_string);
|
||||
if (font_weight->to_font_weight() != Gfx::FontWeight::Regular && font_weight->to_keyword() != Keyword::Initial)
|
||||
append(font_weight->to_string(mode));
|
||||
auto font_weight_string = font_weight->to_string(mode);
|
||||
if (font_weight_string != "normal"sv && font_weight_string != "initial"sv && font_weight_string != "400"sv)
|
||||
append(font_weight_string);
|
||||
if (font_width->to_keyword() != Keyword::Normal && font_width->to_keyword() != Keyword::Initial)
|
||||
append(font_width->to_string(mode));
|
||||
append(font_size->to_string(mode));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue