LibWeb: Invalidate font cache when web fonts are downloaded

In case we've looked up the family name before and cached the result of
font fallback, we now invalidate any cached entries with the same family
name so that the next lookup may consider the newly downloaded font.
This commit is contained in:
Andreas Kling 2023-08-24 20:05:55 +02:00 committed by Sam Atkins
commit 418f9ceadd
Notes: sideshowbarker 2024-07-17 07:06:47 +09:00
3 changed files with 11 additions and 1 deletions

View file

@ -2794,8 +2794,9 @@ CSSPixelRect StyleComputer::viewport_rect() const
return {};
}
void StyleComputer::did_load_font([[maybe_unused]] FlyString const& family_name)
void StyleComputer::did_load_font(FlyString const& family_name)
{
m_font_cache.did_load_font({}, family_name);
document().invalidate_style();
}