diff --git a/Libraries/LibWeb/TreeNode.h b/Libraries/LibWeb/TreeNode.h index 5f1fef9d1f..5221e260f9 100644 --- a/Libraries/LibWeb/TreeNode.h +++ b/Libraries/LibWeb/TreeNode.h @@ -99,7 +99,6 @@ public: void append_child(NonnullRefPtr node, bool notify = true); void insert_before(NonnullRefPtr node, RefPtr child, bool notify = true); NonnullRefPtr remove_child(NonnullRefPtr node); - void donate_all_children_to(T& node); bool is_child_allowed(const T&) const { return true; } @@ -391,24 +390,6 @@ inline void TreeNode::prepend_child(NonnullRefPtr node) static_cast(this)->children_changed(); } -template -inline void TreeNode::donate_all_children_to(T& node) -{ - for (T* child = m_first_child; child != nullptr;) { - T* next_child = child->m_next_sibling; - - child->m_parent = nullptr; - child->m_next_sibling = nullptr; - child->m_previous_sibling = nullptr; - - node.append_child(adopt(*child)); - child = next_child; - } - - m_first_child = nullptr; - m_last_child = nullptr; -} - template inline bool TreeNode::is_ancestor_of(const TreeNode& other) const {