diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-07 16:35:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-07 17:33:29 +0100 |
commit | 75829c1b8146fc337dc8fa5fd9a66650f9167469 (patch) | |
tree | bfd9323e36f2d8d2c42587394ee93c779bee8549 /Libraries/LibWeb/DOM | |
parent | fe9de4b55c1ff3cffd24d81f3f94bd348ee8cd03 (diff) | |
download | serenity-75829c1b8146fc337dc8fa5fd9a66650f9167469.zip |
LibWeb: Move remove_all_children() from Node to TreeNode<T>
This is useful in all tree types.
Diffstat (limited to 'Libraries/LibWeb/DOM')
-rw-r--r-- | Libraries/LibWeb/DOM/Node.cpp | 7 | ||||
-rw-r--r-- | Libraries/LibWeb/DOM/Node.h | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/Libraries/LibWeb/DOM/Node.cpp b/Libraries/LibWeb/DOM/Node.cpp index 55e062f4bc..f5dcc872ce 100644 --- a/Libraries/LibWeb/DOM/Node.cpp +++ b/Libraries/LibWeb/DOM/Node.cpp @@ -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) diff --git a/Libraries/LibWeb/DOM/Node.h b/Libraries/LibWeb/DOM/Node.h index 8103bbbff6..624b41b951 100644 --- a/Libraries/LibWeb/DOM/Node.h +++ b/Libraries/LibWeb/DOM/Node.h @@ -82,7 +82,6 @@ public: RefPtr<Node> append_child(NonnullRefPtr<Node>, bool notify = true); RefPtr<Node> insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, bool notify = true); - void remove_all_children(); virtual RefPtr<Layout::Node> create_layout_node(); |