mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibWeb: Use node_to_insert instead of node in Node::insert_before
It was using the passed in node instead of the node from the vector. Fixes a crash I found while testing jQuery.
This commit is contained in:
parent
4cf5514672
commit
8b5ea01cfb
1 changed files with 2 additions and 2 deletions
|
@ -232,9 +232,9 @@ void Node::insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, bool supp
|
|||
document().adopt_node(node_to_insert);
|
||||
|
||||
if (!child)
|
||||
TreeNode<Node>::append_child(node);
|
||||
TreeNode<Node>::append_child(node_to_insert);
|
||||
else
|
||||
TreeNode<Node>::insert_before(node, child);
|
||||
TreeNode<Node>::insert_before(node_to_insert, child);
|
||||
|
||||
// FIXME: If parent is a shadow host and node is a slottable, then assign a slot for node.
|
||||
// FIXME: If parent’s root is a shadow root, and parent is a slot whose assigned nodes is the empty list, then run signal a slot change for parent.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue