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:
parent
5ebcb15c92
commit
b19e134999
Notes:
sideshowbarker
2024-07-17 14:12:30 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/b19e134999 Pull-request: https://github.com/SerenityOS/serenity/pull/13595
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue