mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
LibWeb: Stub Range::get_client_rects()
Fixes "Application error: a client-side exception has occurred (see the browser console for more information)." on https://kotlinlang.org/
This commit is contained in:
parent
a0462f495c
commit
02d5ed44cb
|
@ -18,6 +18,7 @@
|
||||||
#include <LibWeb/DOM/Text.h>
|
#include <LibWeb/DOM/Text.h>
|
||||||
#include <LibWeb/DOMParsing/InnerHTML.h>
|
#include <LibWeb/DOMParsing/InnerHTML.h>
|
||||||
#include <LibWeb/Geometry/DOMRect.h>
|
#include <LibWeb/Geometry/DOMRect.h>
|
||||||
|
#include <LibWeb/Geometry/DOMRectList.h>
|
||||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||||
#include <LibWeb/HTML/Window.h>
|
#include <LibWeb/HTML/Window.h>
|
||||||
#include <LibWeb/Layout/Viewport.h>
|
#include <LibWeb/Layout/Viewport.h>
|
||||||
|
@ -1146,6 +1147,13 @@ WebIDL::ExceptionOr<void> Range::delete_contents()
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://drafts.csswg.org/cssom-view/#dom-element-getclientrects
|
||||||
|
JS::NonnullGCPtr<Geometry::DOMRectList> 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
|
// https://w3c.github.io/csswg-drafts/cssom-view/#dom-range-getboundingclientrect
|
||||||
JS::NonnullGCPtr<Geometry::DOMRect> Range::get_bounding_client_rect() const
|
JS::NonnullGCPtr<Geometry::DOMRect> Range::get_bounding_client_rect() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,6 +85,7 @@ public:
|
||||||
|
|
||||||
static HashTable<Range*>& live_ranges();
|
static HashTable<Range*>& live_ranges();
|
||||||
|
|
||||||
|
JS::NonnullGCPtr<Geometry::DOMRectList> get_client_rects() const;
|
||||||
JS::NonnullGCPtr<Geometry::DOMRect> get_bounding_client_rect() const;
|
JS::NonnullGCPtr<Geometry::DOMRect> get_bounding_client_rect() const;
|
||||||
|
|
||||||
bool contains_node(Node const&) const;
|
bool contains_node(Node const&) const;
|
||||||
|
|
|
@ -40,6 +40,7 @@ interface Range : AbstractRange {
|
||||||
|
|
||||||
boolean intersectsNode(Node node);
|
boolean intersectsNode(Node node);
|
||||||
|
|
||||||
|
DOMRectList getClientRects();
|
||||||
DOMRect getBoundingClientRect();
|
DOMRect getBoundingClientRect();
|
||||||
|
|
||||||
stringifier;
|
stringifier;
|
||||||
|
|
Loading…
Reference in a new issue