mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 21:54:40 +03: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
Notes:
sideshowbarker
2024-07-17 02:42:21 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/02d5ed44cb Pull-request: https://github.com/SerenityOS/serenity/pull/22858
@ -18,6 +18,7 @@
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOMParsing/InnerHTML.h>
|
||||
#include <LibWeb/Geometry/DOMRect.h>
|
||||
#include <LibWeb/Geometry/DOMRectList.h>
|
||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Layout/Viewport.h>
|
||||
@ -1146,6 +1147,13 @@ WebIDL::ExceptionOr<void> Range::delete_contents()
|
||||
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
|
||||
JS::NonnullGCPtr<Geometry::DOMRect> Range::get_bounding_client_rect() const
|
||||
{
|
||||
|
@ -85,6 +85,7 @@ public:
|
||||
|
||||
static HashTable<Range*>& live_ranges();
|
||||
|
||||
JS::NonnullGCPtr<Geometry::DOMRectList> get_client_rects() const;
|
||||
JS::NonnullGCPtr<Geometry::DOMRect> get_bounding_client_rect() const;
|
||||
|
||||
bool contains_node(Node const&) const;
|
||||
|
@ -40,6 +40,7 @@ interface Range : AbstractRange {
|
||||
|
||||
boolean intersectsNode(Node node);
|
||||
|
||||
DOMRectList getClientRects();
|
||||
DOMRect getBoundingClientRect();
|
||||
|
||||
stringifier;
|
||||
|
Loading…
Reference in New Issue
Block a user