LibWeb: Distinguish parent/child on style invalidation for DOM insertion

This commit is contained in:
Andreas Kling 2024-09-22 13:27:02 +02:00 committed by Andreas Kling
commit 7d644ecd50
Notes: github-actions[bot] 2024-09-22 18:08:35 +00:00
2 changed files with 2 additions and 1 deletions

View file

@ -682,7 +682,7 @@ void Node::insert_before(JS::NonnullGCPtr<Node> node, JS::GCPtr<Node> child, boo
if (is_connected()) {
// FIXME: This will need to become smarter when we implement the :has() selector.
invalidate_style(StyleInvalidationReason::NodeInsertBefore);
invalidate_style(StyleInvalidationReason::ParentOfInsertedNode);
document().invalidate_layout_tree();
}