LibWeb: Avoid overwriting non-animated font-weight when computing font

Previously if we would overwrite the non-animated font-size with the
animated font-size if it was set.

Loses us 2 WPT tests but this is in line with other browsers
This commit is contained in:
Callum Law 2025-09-02 15:13:20 +12:00 committed by Sam Atkins
commit 44eaa7ad98
Notes: github-actions[bot] 2025-09-19 09:08:34 +00:00
2 changed files with 5 additions and 5 deletions

View file

@ -1983,7 +1983,7 @@ void StyleComputer::compute_font(ComputedProperties& style, Optional<DOM::Abstra
auto inherited_font_weight = inheritance_parent_has_computed_properties ? inheritance_parent->computed_properties()->font_weight() : InitialValues::font_weight();
auto const& font_weight_specified_value = style.property(PropertyID::FontWeight);
auto const& font_weight_specified_value = style.property(PropertyID::FontWeight, ComputedProperties::WithAnimationsApplied::No);
style.set_property(
PropertyID::FontWeight,