LibWeb: Account for animated values when computing font

Computing the font for an element in `compute_font` is premature since
we are yet to apply animated properties - instead we should compute the
value on the fly (with a cache to avoid unnecessary work) to ensure we
are respecting the latest values
This commit is contained in:
Callum Law 2025-11-09 00:39:08 +13:00 committed by Sam Atkins
parent 6c236d04d8
commit dca80ad5eb
Notes: github-actions[bot] 2025-12-05 10:04:25 +00:00
12 changed files with 69 additions and 43 deletions

View file

@ -696,7 +696,7 @@ static CSS::RequiredInvalidationAfterStyleChange compute_required_invalidation(C
{
CSS::RequiredInvalidationAfterStyleChange invalidation;
if (!old_style.computed_font_list().equals(new_style.computed_font_list()))
if (old_style.cached_computed_font_list() != new_style.cached_computed_font_list())
invalidation.relayout = true;
for (auto i = to_underlying(CSS::first_longhand_property_id); i <= to_underlying(CSS::last_longhand_property_id); ++i) {