LibWeb: Update m_previous_sibling in TreeNode::insert_before.

This commit is contained in:
asynts 2020-11-27 21:06:15 +01:00 committed by Andreas Kling
parent 024b216141
commit 4eb23abf06
Notes: sideshowbarker 2024-07-19 01:15:21 +09:00

View file

@ -380,6 +380,8 @@ inline void TreeNode<T>::insert_before(NonnullRefPtr<T> node, RefPtr<T> child, b
node->m_previous_sibling = child->m_previous_sibling;
node->m_next_sibling = child;
child->m_previous_sibling = node;
if (m_first_child == child)
m_first_child = node;