summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/TreeNode.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-06 14:18:32 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-06 14:27:44 +0200
commit41e5a0fe0202155a663e6a61a5d8fb27d405e784 (patch)
tree581ece412017cd8af7d6f1ffc98f71e1689eed01 /Userland/Libraries/LibWeb/TreeNode.h
parent1d065aa51bf10ac99d4f41cd380678ffa384209d (diff)
downloadserenity-41e5a0fe0202155a663e6a61a5d8fb27d405e784.zip
LibWeb: Remove duplicated code in TreeNode::remove_child()
We were assigning to m_first_child twice.
Diffstat (limited to 'Userland/Libraries/LibWeb/TreeNode.h')
-rw-r--r--Userland/Libraries/LibWeb/TreeNode.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/TreeNode.h b/Userland/Libraries/LibWeb/TreeNode.h
index c304230e7b..35f9a960e2 100644
--- a/Userland/Libraries/LibWeb/TreeNode.h
+++ b/Userland/Libraries/LibWeb/TreeNode.h
@@ -397,9 +397,6 @@ inline void TreeNode<T>::insert_before(NonnullRefPtr<T> node, RefPtr<T> child, b
child->m_previous_sibling = node;
- if (m_first_child == child)
- m_first_child = node;
-
node->m_parent = static_cast<T*>(this);
if (notify)
node->inserted_into(static_cast<T&>(*this));