LibWeb: Add missing DOMRectList::visit_edges

This commit is contained in:
Luke Wilde 2024-01-01 16:31:00 +00:00 committed by Andreas Kling
parent 5af058d2b6
commit 6231aee761
Notes: sideshowbarker 2024-07-17 11:06:06 +09:00
2 changed files with 8 additions and 0 deletions

View File

@ -36,6 +36,13 @@ void DOMRectList::initialize(JS::Realm& realm)
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectListPrototype>(realm, "DOMRectList"_fly_string));
}
void DOMRectList::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
for (auto& rect : m_rects)
visitor.visit(rect);
}
// https://drafts.fxtf.org/geometry-1/#dom-domrectlist-length
u32 DOMRectList::length() const
{

View File

@ -33,6 +33,7 @@ private:
DOMRectList(JS::Realm&, Vector<JS::NonnullGCPtr<DOMRect>>);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
// ^Bindings::LegacyPlatformObject
virtual bool supports_indexed_properties() const override { return true; }