From 39dc604642e5a54e6f8c4c485cc93869f383c96b Mon Sep 17 00:00:00 2001 From: Callum Law Date: Wed, 27 Aug 2025 23:13:34 +1200 Subject: [PATCH] LibWeb: Return unanimated font-size in `ComputedProperties::font_size()` 1a3da3d introduced a crash as we assumed that font-size values were always stored in their computed forms, this isn't correct for animated font-size values. As a temporary workaround until we store animated font-sizes in their computed form we will return the non-animated value - this restores the functionality prior to 1a3da3d --- Libraries/LibWeb/CSS/ComputedProperties.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/ComputedProperties.cpp b/Libraries/LibWeb/CSS/ComputedProperties.cpp index 751a5b00ef9..aa083be4921 100644 --- a/Libraries/LibWeb/CSS/ComputedProperties.cpp +++ b/Libraries/LibWeb/CSS/ComputedProperties.cpp @@ -2052,7 +2052,8 @@ WillChange ComputedProperties::will_change() const CSSPixels ComputedProperties::font_size() const { - return property(PropertyID::FontSize).as_length().length().absolute_length_to_px(); + // FIXME: Respect animated font-size here once we store it in computed form + return property(PropertyID::FontSize, WithAnimationsApplied::No).as_length().length().absolute_length_to_px(); } }