Skip to content

Truly independent web browser

LibWeb: Remove unused TreeNode::prepend_child

Shannon Booth9724576decad
diff --git a/Libraries/LibWeb/TreeNode.h b/Libraries/LibWeb/TreeNode.h
index fd3c6a8f606..ffa96c04926 100644
--- a/Libraries/LibWeb/TreeNode.h
+++ b/Libraries/LibWeb/TreeNode.h
@@ -139,7 +139,6 @@ public:
}
void append_child(GC::Ref<T> node);
- void prepend_child(GC::Ref<T> node);
void insert_before(GC::Ref<T> node, GC::Ptr<T> child);
void remove_child(GC::Ref<T> node);
@@ -572,23 +571,6 @@ inline void TreeNode<T>::insert_before(GC::Ref<T> node, GC::Ptr<T> child)
node->m_parent = static_cast<T*>(this);
}
-template<typename T>
-inline void TreeNode<T>::prepend_child(GC::Ref<T> node)
-{
- VERIFY(!node->m_parent);
-
- if (m_first_child)
- m_first_child->m_previous_sibling = node.ptr();
- node->m_next_sibling = m_first_child;
- node->m_parent = static_cast<T*>(this);
- m_first_child = node.ptr();
- if (!m_last_child)
- m_last_child = m_first_child;
- node->inserted_into(static_cast<T&>(*this));
-
- static_cast<T*>(this)->children_changed();
-}
-
template<typename T>
inline bool TreeNode<T>::is_ancestor_of(TreeNode<T> const& other) const
{