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

@ -540,7 +540,7 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, WebView::DOMNodePropert
auto serialize_used_fonts = [&]() {
JsonArray serialized;
properties->computed_font_list().for_each_font_entry([&](Gfx::FontCascadeList::Entry const& entry) {
properties->computed_font_list(node->document().font_computer())->for_each_font_entry([&](Gfx::FontCascadeList::Entry const& entry) {
auto const& font = *entry.font;
JsonObject font_object;