1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibWeb: Move remove_all_children() from Node to TreeNode<T>

This is useful in all tree types.
This commit is contained in:
Andreas Kling 2021-01-07 16:35:23 +01:00
parent fe9de4b55c
commit 75829c1b81
3 changed files with 9 additions and 8 deletions

View file

@ -199,13 +199,6 @@ RefPtr<Node> Node::insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, b
return node;
}
void Node::remove_all_children()
{
while (RefPtr<Node> child = first_child()) {
remove_child(*child);
}
}
void Node::set_document(Badge<Document>, Document& document)
{
if (m_document == &document)