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

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

Gains us 8 WPT tests and means we now fail 9 others in line with other
browsers.
This commit is contained in:
Callum Law 2025-08-31 14:29:12 +12:00 committed by Sam Atkins
commit 64d2f0d55a
Notes: github-actions[bot] 2025-09-19 09:08:54 +00:00
3 changed files with 22 additions and 22 deletions

View file

@ -1938,7 +1938,7 @@ void StyleComputer::compute_font(ComputedProperties& style, Optional<DOM::Abstra
auto inherited_math_depth = inheritance_parent_has_computed_properties ? inheritance_parent->computed_properties()->math_depth() : InitialValues::math_depth();
auto length_resolution_context = inheritance_parent_has_computed_properties ? Length::ResolutionContext::for_element(inheritance_parent.value()) : Length::ResolutionContext::for_window(*m_document->window());
auto const& font_size_specified_value = style.property(PropertyID::FontSize);
auto const& font_size_specified_value = style.property(PropertyID::FontSize, ComputedProperties::WithAnimationsApplied::No);
style.set_property(
PropertyID::FontSize,