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.
This commit is contained in:
Andreas Kling 2022-09-14 21:24:31 +02:00
parent df49a6ae9b
commit f64c175960
Notes: sideshowbarker 2024-07-17 07:10:08 +09:00

View file

@ -1344,7 +1344,7 @@ Gfx::IntRect StyleComputer::viewport_rect() const
void StyleComputer::did_load_font([[maybe_unused]] FlyString const& family_name) 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) void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)