From 195a67ed80a729839d81ca3e80095b57e00e85e1 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Mon, 17 Nov 2025 20:09:39 +0100 Subject: [PATCH] LibWeb: Delete dead code from `Node::append_child()` --- Libraries/LibWeb/DOM/Node.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Libraries/LibWeb/DOM/Node.cpp b/Libraries/LibWeb/DOM/Node.cpp index aabe6d1469..15905b490c 100644 --- a/Libraries/LibWeb/DOM/Node.cpp +++ b/Libraries/LibWeb/DOM/Node.cpp @@ -874,11 +874,6 @@ WebIDL::ExceptionOr> Node::append_child(GC::Ref node) { // To append a node to a parent, pre-insert node into parent before null. return pre_insert(node, nullptr); - - // AD-HOC: invalidate the ordinal of the first list_item of the first child sibling of the appended node, if any. - // NOTE: This works since ordinal values are accessed (for layout and paint) in the preorder of list_item nodes !! - if (auto* first_child_element = this->first_child_of_type()) - first_child_element->maybe_invalidate_ordinals_for_list_owner(); } // https://dom.spec.whatwg.org/#live-range-pre-remove-steps