diff --git a/Userland/Libraries/LibWeb/DOM/Range.cpp b/Userland/Libraries/LibWeb/DOM/Range.cpp index 365dab2f0e..2bdce1eaa0 100644 --- a/Userland/Libraries/LibWeb/DOM/Range.cpp +++ b/Userland/Libraries/LibWeb/DOM/Range.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1146,6 +1147,13 @@ WebIDL::ExceptionOr Range::delete_contents() return {}; } +// https://drafts.csswg.org/cssom-view/#dom-element-getclientrects +JS::NonnullGCPtr Range::get_client_rects() const +{ + dbgln("(STUBBED) Range::get_client_rects()"); + return Geometry::DOMRectList::create(realm(), {}); +} + // https://w3c.github.io/csswg-drafts/cssom-view/#dom-range-getboundingclientrect JS::NonnullGCPtr Range::get_bounding_client_rect() const { diff --git a/Userland/Libraries/LibWeb/DOM/Range.h b/Userland/Libraries/LibWeb/DOM/Range.h index 57f7a2cd83..239bfc246d 100644 --- a/Userland/Libraries/LibWeb/DOM/Range.h +++ b/Userland/Libraries/LibWeb/DOM/Range.h @@ -85,6 +85,7 @@ public: static HashTable& live_ranges(); + JS::NonnullGCPtr get_client_rects() const; JS::NonnullGCPtr get_bounding_client_rect() const; bool contains_node(Node const&) const; diff --git a/Userland/Libraries/LibWeb/DOM/Range.idl b/Userland/Libraries/LibWeb/DOM/Range.idl index 51f8eef3a5..3fef4da2e3 100644 --- a/Userland/Libraries/LibWeb/DOM/Range.idl +++ b/Userland/Libraries/LibWeb/DOM/Range.idl @@ -40,6 +40,7 @@ interface Range : AbstractRange { boolean intersectsNode(Node node); + DOMRectList getClientRects(); DOMRect getBoundingClientRect(); stringifier;