diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 8c8cf6cb55ea1a7f47093e529a43f7fdadc3245d..e10a6e5edb1cf50cdad40294e08954d12d555b29 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -4838,10 +4838,10 @@ Element const* Document::element_from_point(double x, double y) } // https://drafts.csswg.org/cssom-view/#dom-document-elementsfrompoint -Vector> Document::elements_from_point(double x, double y) +JS::MarkedVector> Document::elements_from_point(double x, double y) { // 1. Let sequence be a new empty sequence. - Vector> sequence; + JS::MarkedVector> sequence(heap()); // 2. If either argument is negative, x is greater than the viewport width excluding the size of a rendered scroll bar (if any), // or y is greater than the viewport height excluding the size of a rendered scroll bar (if any), diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 8ed42f85e81ba94a1b4715636e1fdde351302289..08896e8196656975ac0c2ec1da0414ca81eaa1f4 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -656,7 +656,7 @@ public: WebIDL::ExceptionOr set_design_mode(String const&); Element const* element_from_point(double x, double y); - Vector> elements_from_point(double x, double y); + JS::MarkedVector> elements_from_point(double x, double y); JS::GCPtr scrolling_element() const; void set_needs_to_resolve_paint_only_properties() { m_needs_to_resolve_paint_only_properties = true; }