summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Element.cpp
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-02-19 18:21:27 +0100
committerAndreas Kling <kling@serenityos.org>2023-02-22 09:55:33 +0100
commitec0049441c9aa87273996edcda614726d8caf7cc (patch)
treed1e9abcaaf05a02ce8404baa4f094b44ff84ef3b /Userland/Libraries/LibWeb/DOM/Element.cpp
parent9b190b9509ad6d05a564bf88cbe3345cd2364afe (diff)
downloadserenity-ec0049441c9aa87273996edcda614726d8caf7cc.zip
LibWeb: Make factory methods of Geometry::DOMRect fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Element.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp
index fc6f32f160..2a6264b103 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Element.cpp
@@ -657,12 +657,12 @@ JS::NonnullGCPtr<Geometry::DOMRect> Element::get_bounding_client_rect() const
// FIXME: Support inline layout nodes as well.
auto* paint_box = this->paint_box();
if (!paint_box)
- return Geometry::DOMRect::construct_impl(realm(), 0, 0, 0, 0);
+ return Geometry::DOMRect::construct_impl(realm(), 0, 0, 0, 0).release_value_but_fixme_should_propagate_errors();
VERIFY(document().browsing_context());
auto viewport_offset = document().browsing_context()->viewport_scroll_offset();
- return Geometry::DOMRect::create(realm(), paint_box->absolute_rect().translated(-viewport_offset.x(), -viewport_offset.y()).to_type<float>());
+ return Geometry::DOMRect::create(realm(), paint_box->absolute_rect().translated(-viewport_offset.x(), -viewport_offset.y()).to_type<float>()).release_value_but_fixme_should_propagate_errors();
}
// https://drafts.csswg.org/cssom-view/#dom-element-getclientrects