mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Delete schedule_style_update()
and schedule_layout_update()
Both functions schedule HTML event loop processing but that's unnecessary, because we schedule a rendering task that checks if style/layout needs an update 60/s anyway.
This commit is contained in:
parent
93f957051a
commit
9b9acf0bd5
Notes:
github-actions[bot]
2025-07-15 14:58:43 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 9b9acf0bd5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5458
Reviewed-by: https://github.com/gmta ✅
3 changed files with 0 additions and 30 deletions
|
@ -442,7 +442,6 @@ void Node::invalidate_style(StyleInvalidationReason reason)
|
|||
if (is_document()) {
|
||||
auto& document = static_cast<DOM::Document&>(*this);
|
||||
document.set_needs_full_style_update(true);
|
||||
document.schedule_style_update();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -493,8 +492,6 @@ void Node::invalidate_style(StyleInvalidationReason reason)
|
|||
|
||||
for (auto* ancestor = parent_or_shadow_host(); ancestor; ancestor = ancestor->parent_or_shadow_host())
|
||||
ancestor->m_child_needs_style_update = true;
|
||||
|
||||
document().schedule_style_update();
|
||||
}
|
||||
|
||||
void Node::invalidate_style(StyleInvalidationReason reason, Vector<CSS::InvalidationSet::Property> const& properties, StyleInvalidationOptions options)
|
||||
|
@ -558,8 +555,6 @@ void Node::invalidate_style(StyleInvalidationReason reason, Vector<CSS::Invalida
|
|||
invalidate_entire_subtree(*sibling);
|
||||
}
|
||||
}
|
||||
|
||||
document().schedule_style_update();
|
||||
}
|
||||
|
||||
String Node::child_text_content() const
|
||||
|
@ -1703,7 +1698,6 @@ void Node::set_needs_style_update(bool value)
|
|||
break;
|
||||
ancestor->m_child_needs_style_update = true;
|
||||
}
|
||||
document().schedule_style_update();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue