mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
LibWeb: Remove DeprecatedString support from {Child,Parent}Node
No interface pulls this in that requires DeprecatedString support.
This commit is contained in:
parent
d818bbf918
commit
57d7637b59
5 changed files with 0 additions and 52 deletions
|
@ -113,21 +113,6 @@ public:
|
|||
node->remove();
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> before(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes)
|
||||
{
|
||||
return before(from_deprecated_nodes(nodes));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> after(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes)
|
||||
{
|
||||
return after(from_deprecated_nodes(nodes));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> replace_with(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes)
|
||||
{
|
||||
return replace_with(from_deprecated_nodes(nodes));
|
||||
}
|
||||
|
||||
protected:
|
||||
ChildNode() = default;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,4 @@ namespace Web::DOM {
|
|||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> convert_nodes_to_single_node(Vector<Variant<JS::Handle<Node>, String>> const& nodes, DOM::Document& document);
|
||||
|
||||
Vector<Variant<JS::Handle<Node>, String>> from_deprecated_nodes(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& deprecated_nodes);
|
||||
|
||||
}
|
||||
|
|
|
@ -213,21 +213,6 @@ WebIDL::ExceptionOr<void> ParentNode::prepend(Vector<Variant<JS::Handle<Node>, S
|
|||
return {};
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> ParentNode::prepend(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes)
|
||||
{
|
||||
return prepend(from_deprecated_nodes(nodes));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> ParentNode::append(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes)
|
||||
{
|
||||
return append(from_deprecated_nodes(nodes));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> ParentNode::replace_children(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes)
|
||||
{
|
||||
return replace_children(from_deprecated_nodes(nodes));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> ParentNode::append(Vector<Variant<JS::Handle<Node>, String>> const& nodes)
|
||||
{
|
||||
// 1. Let node be the result of converting nodes into a node given nodes and this’s node document.
|
||||
|
|
|
@ -38,10 +38,6 @@ public:
|
|||
WebIDL::ExceptionOr<void> append(Vector<Variant<JS::Handle<Node>, String>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> replace_children(Vector<Variant<JS::Handle<Node>, String>> const& nodes);
|
||||
|
||||
WebIDL::ExceptionOr<void> prepend(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> append(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> replace_children(Vector<Variant<JS::Handle<Node>, DeprecatedString>> const& nodes);
|
||||
|
||||
protected:
|
||||
ParentNode(JS::Realm& realm, Document& document, NodeType type)
|
||||
: Node(realm, document, type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue