LibWeb: Invalidate the layout tree on DOM node insertion

This commit is contained in:
Andreas Kling 2023-06-06 06:51:17 +02:00
commit 3cea86632d
Notes: sideshowbarker 2024-07-16 19:19:26 +09:00
3 changed files with 12 additions and 0 deletions

View file

@ -487,6 +487,8 @@ void Node::insert_before(JS::NonnullGCPtr<Node> node, JS::GCPtr<Node> child, boo
// FIXME: This will need to become smarter when we implement the :has() selector.
invalidate_style();
document().invalidate_layout();
}
// https://dom.spec.whatwg.org/#concept-node-pre-insert