From f64c1759600ba4a4b591607070926219eec2fe48 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 14 Sep 2022 21:24:31 +0200 Subject: [PATCH] LibWeb: Invalidate layout whenever a CSS font is loaded It's not enough to invalidate only the style, we have to do a full layout invalidation since new fonts might mean new metrics, etc. --- Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 0f4c201f8c..4e8a121c46 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -1344,7 +1344,7 @@ Gfx::IntRect StyleComputer::viewport_rect() const void StyleComputer::did_load_font([[maybe_unused]] FlyString const& family_name) { - document().invalidate_style(); + document().invalidate_layout(); } void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)