1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

LibWeb: Make NodeList GC-allocated

This commit is contained in:
Andreas Kling 2022-09-01 16:30:26 +02:00
parent 8f4ea4e308
commit 48e0066371
16 changed files with 128 additions and 57 deletions

View file

@ -38,7 +38,7 @@ ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_t
return result;
}
ExceptionOr<NonnullRefPtr<NodeList>> ParentNode::query_selector_all(StringView selector_text)
ExceptionOr<JS::NonnullGCPtr<NodeList>> ParentNode::query_selector_all(StringView selector_text)
{
auto maybe_selectors = parse_selector(CSS::Parser::ParsingContext(*this), selector_text);
if (!maybe_selectors.has_value())
@ -57,7 +57,7 @@ ExceptionOr<NonnullRefPtr<NodeList>> ParentNode::query_selector_all(StringView s
return IterationDecision::Continue;
});
return StaticNodeList::create(move(elements));
return StaticNodeList::create(window(), move(elements));
}
JS::GCPtr<Element> ParentNode::first_element_child()