summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-02-15 20:25:50 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-18 00:52:47 +0100
commit71316614b87713aeb2f952fda6635a980c8431eb (patch)
treeb2cdca9981b044e676fcc70869aee57b91125cc9 /Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp
parentbfc8cbcf3b30940c5e0ef26f9ff27f9a302f82eb (diff)
downloadserenity-71316614b87713aeb2f952fda6635a980c8431eb.zip
LibWeb: Make factory method of SVG::SVGLength fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp
index f2c3cf83c1..005a4325c1 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp
@@ -166,8 +166,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGRectElement::x() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(realm(), 0, m_x.value_or(0));
- auto anim_length = SVGLength::create(realm(), 0, m_x.value_or(0));
+ auto base_length = SVGLength::create(realm(), 0, m_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
+ auto anim_length = SVGLength::create(realm(), 0, m_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
@@ -176,8 +176,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGRectElement::y() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(realm(), 0, m_y.value_or(0));
- auto anim_length = SVGLength::create(realm(), 0, m_y.value_or(0));
+ auto base_length = SVGLength::create(realm(), 0, m_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
+ auto anim_length = SVGLength::create(realm(), 0, m_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
@@ -186,8 +186,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGRectElement::width() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(realm(), 0, m_width.value_or(0));
- auto anim_length = SVGLength::create(realm(), 0, m_width.value_or(0));
+ auto base_length = SVGLength::create(realm(), 0, m_width.value_or(0)).release_value_but_fixme_should_propagate_errors();
+ auto anim_length = SVGLength::create(realm(), 0, m_width.value_or(0)).release_value_but_fixme_should_propagate_errors();
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
@@ -196,8 +196,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGRectElement::height() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(realm(), 0, m_height.value_or(0));
- auto anim_length = SVGLength::create(realm(), 0, m_height.value_or(0));
+ auto base_length = SVGLength::create(realm(), 0, m_height.value_or(0)).release_value_but_fixme_should_propagate_errors();
+ auto anim_length = SVGLength::create(realm(), 0, m_height.value_or(0)).release_value_but_fixme_should_propagate_errors();
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
@@ -206,8 +206,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGRectElement::rx() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0));
- auto anim_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0));
+ auto base_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
+ auto anim_length = SVGLength::create(realm(), 0, m_radius_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
@@ -216,8 +216,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGRectElement::ry() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0));
- auto anim_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0));
+ auto base_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
+ auto anim_length = SVGLength::create(realm(), 0, m_radius_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}