1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

LibWeb: Move set_needs_display() from layout node to paintable

For this method, there is no need to go through the layout node when we
can directly reach the paintable.
This commit is contained in:
Aliaksandr Kalenik 2024-01-14 13:46:52 +01:00 committed by Andreas Kling
parent 814bed33b4
commit 7c2713c14f
21 changed files with 97 additions and 87 deletions

View file

@ -602,8 +602,8 @@ Element::RequiredInvalidationAfterStyleChange Element::recompute_style()
if (!invalidation.rebuild_layout_tree && layout_node()) {
// If we're keeping the layout tree, we can just apply the new style to the existing layout tree.
layout_node()->apply_style(*m_computed_css_values);
if (invalidation.repaint)
layout_node()->set_needs_display();
if (invalidation.repaint && paintable())
paintable()->set_needs_display();
}
return invalidation;