mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03: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
Notes:
sideshowbarker
2024-07-18 18:45:54 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/8b5ea01cfb9 Pull-request: https://github.com/SerenityOS/serenity/pull/6831
@ -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…
Reference in New Issue
Block a user