mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 18:24:45 -05:00
LibWeb: Update m_previous_sibling in TreeNode::insert_before.
This commit is contained in:
parent
024b216141
commit
4eb23abf06
Notes:
sideshowbarker
2024-07-19 01:15:21 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/4eb23abf065 Pull-request: https://github.com/SerenityOS/serenity/pull/4182
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue