1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:15:06 +00:00

LibWeb: Make HTMLCollection and subclasses GC-allocated

This commit is contained in:
Andreas Kling 2022-09-01 20:50:16 +02:00
parent 4c887bf6c3
commit 2bba97964b
22 changed files with 115 additions and 85 deletions

View file

@ -222,7 +222,7 @@ void HTMLTableElement::delete_t_foot()
}
}
NonnullRefPtr<DOM::HTMLCollection> HTMLTableElement::t_bodies()
JS::NonnullGCPtr<DOM::HTMLCollection> HTMLTableElement::t_bodies()
{
return DOM::HTMLCollection::create(*this, [](DOM::Element const& element) {
return element.local_name() == TagNames::tbody;
@ -253,7 +253,7 @@ JS::NonnullGCPtr<HTMLTableSectionElement> HTMLTableElement::create_t_body()
return static_cast<HTMLTableSectionElement&>(*tbody);
}
NonnullRefPtr<DOM::HTMLCollection> HTMLTableElement::rows()
JS::NonnullGCPtr<DOM::HTMLCollection> HTMLTableElement::rows()
{
HTMLTableElement* table_node = this;
// FIXME: The elements in the collection must be ordered such that those elements whose parent is a thead are