diff --git a/Userland/Libraries/LibWeb/TreeNode.h b/Userland/Libraries/LibWeb/TreeNode.h index f4142e79e1..0c548f3cec 100644 --- a/Userland/Libraries/LibWeb/TreeNode.h +++ b/Userland/Libraries/LibWeb/TreeNode.h @@ -109,8 +109,6 @@ public: void insert_before(JS::NonnullGCPtr node, JS::GCPtr child); void remove_child(JS::NonnullGCPtr node); - bool is_child_allowed(T const&) const { return true; } - T* next_in_pre_order() { if (first_child()) @@ -465,9 +463,6 @@ inline void TreeNode::append_child(JS::NonnullGCPtr node) { VERIFY(!node->m_parent); - if (!static_cast(this)->is_child_allowed(*node)) - return; - if (m_last_child) m_last_child->m_next_sibling = node.ptr(); node->m_previous_sibling = m_last_child; @@ -505,9 +500,6 @@ inline void TreeNode::prepend_child(JS::NonnullGCPtr node) { VERIFY(!node->m_parent); - if (!static_cast(this)->is_child_allowed(*node)) - return; - if (m_first_child) m_first_child->m_previous_sibling = node.ptr(); node->m_next_sibling = m_first_child;