diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 8c8cf6cb55e..e10a6e5edb1 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 8ed42f85e81..08896e81966 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; }