LibWeb: Invalidate layout after the computed font changes

If the font resource finishes loading we need to make sure the element
using it gets a chance to re-layout, even if the font-family property
didn't change.
This commit is contained in:
Simon Wanner 2022-04-09 21:38:24 +02:00 committed by Andreas Kling
parent 5ebcb15c92
commit b19e134999
Notes: sideshowbarker 2024-07-17 14:12:30 +09:00

View file

@ -327,6 +327,8 @@ enum class RequiredInvalidation {
static RequiredInvalidation compute_required_invalidation(CSS::StyleProperties const& old_style, CSS::StyleProperties const& new_style)
{
if (&old_style.computed_font() != &new_style.computed_font())
return RequiredInvalidation::Relayout;
bool requires_repaint = false;
bool requires_stacking_context_tree_rebuild = false;
for (auto i = to_underlying(CSS::first_property_id); i <= to_underlying(CSS::last_property_id); ++i) {