mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Make HTMLCollection and subclasses GC-allocated
This commit is contained in:
@@ -82,7 +82,7 @@ u32 ParentNode::child_element_count() const
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-parentnode-children
|
||||
NonnullRefPtr<HTMLCollection> ParentNode::children()
|
||||
JS::NonnullGCPtr<HTMLCollection> ParentNode::children()
|
||||
{
|
||||
// The children getter steps are to return an HTMLCollection collection rooted at this matching only element children.
|
||||
// FIXME: This should return the same HTMLCollection object every time,
|
||||
@@ -94,7 +94,7 @@ NonnullRefPtr<HTMLCollection> ParentNode::children()
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-getelementsbytagname
|
||||
// NOTE: This method is only exposed on Document and Element, but is in ParentNode to prevent code duplication.
|
||||
NonnullRefPtr<HTMLCollection> ParentNode::get_elements_by_tag_name(FlyString const& qualified_name)
|
||||
JS::NonnullGCPtr<HTMLCollection> ParentNode::get_elements_by_tag_name(FlyString const& qualified_name)
|
||||
{
|
||||
// 1. If qualifiedName is "*" (U+002A), return a HTMLCollection rooted at root, whose filter matches only descendant elements.
|
||||
if (qualified_name == "*") {
|
||||
@@ -122,7 +122,7 @@ NonnullRefPtr<HTMLCollection> ParentNode::get_elements_by_tag_name(FlyString con
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-getelementsbytagnamens
|
||||
// NOTE: This method is only exposed on Document and Element, but is in ParentNode to prevent code duplication.
|
||||
NonnullRefPtr<HTMLCollection> ParentNode::get_elements_by_tag_name_ns(FlyString const& nullable_namespace, FlyString const& local_name)
|
||||
JS::NonnullGCPtr<HTMLCollection> ParentNode::get_elements_by_tag_name_ns(FlyString const& nullable_namespace, FlyString const& local_name)
|
||||
{
|
||||
// 1. If namespace is the empty string, set it to null.
|
||||
String namespace_ = nullable_namespace;
|
||||
|
||||
Reference in New Issue
Block a user