1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Invalidate styles on font load

It is not sufficient to just invalidate layout when a new font has
loaded, because while it was loading we might have chosen a fallback
font-family value instead.

Invalidate style instead.
This commit is contained in:
Mathis Wiehl 2023-03-14 20:57:39 +01:00 committed by Andreas Kling
parent 50f9a86086
commit 3bd1d8bf6c

View file

@ -1582,7 +1582,7 @@ CSSPixelRect StyleComputer::viewport_rect() const
void StyleComputer::did_load_font([[maybe_unused]] FlyString const& family_name)
{
document().invalidate_layout();
document().invalidate_style();
}
void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)