mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 08:41:15 +00:00
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:
parent
df49a6ae9b
commit
f64c175960
Notes:
sideshowbarker
2024-07-17 07:10:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f64c175960
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue