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

LibWeb: Remove DeprecatedString support from {Child,Parent}Node

No interface pulls this in that requires DeprecatedString support.
This commit is contained in:
Shannon Booth 2023-10-06 07:53:36 +13:00 committed by Andreas Kling
parent d818bbf918
commit 57d7637b59
5 changed files with 0 additions and 52 deletions

View file

@ -42,20 +42,4 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> convert_nodes_to_single_node(Vector<
return document_fragment;
}
Vector<Variant<JS::Handle<Node>, String>> from_deprecated_nodes(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& deprecated_nodes)
{
Vector<Variant<JS::Handle<Node>, String>> nodes;
nodes.ensure_capacity(deprecated_nodes.size());
for (auto const& deprecated_node : deprecated_nodes) {
deprecated_node.visit(
[&nodes](JS::Handle<Node> node) {
nodes.unchecked_append(node);
},
[&nodes](DeprecatedString const& deprecated_node) {
nodes.unchecked_append(MUST(String::from_deprecated_string(deprecated_node)));
});
}
return nodes;
}
}