From ad1853cbf53d216e31b04ec386a7f05263fc49c9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 28 Aug 2023 18:42:27 +0200 Subject: [PATCH] LibWeb: Remove unnecessary layout node detach in DOM::Node::finalize() Manually detaching the layout node is not necessary since both the DOM and the layout tree is garbage collected anyway. --- Userland/Libraries/LibWeb/DOM/Node.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp index 8d37e5b9f6..4cd4895e7e 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.cpp +++ b/Userland/Libraries/LibWeb/DOM/Node.cpp @@ -85,10 +85,6 @@ Node::~Node() = default; void Node::finalize() { Base::finalize(); - - if (layout_node() && layout_node()->parent()) - layout_node()->parent()->remove_child(*layout_node()); - deallocate_node_id(m_id); }