1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

LibWeb: Make factory method of SVG::SVGAnimatedLength fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 08:43:44 +01:00 committed by Linus Groh
parent 200d22c650
commit 63b69f3672
7 changed files with 35 additions and 24 deletions

View file

@ -91,7 +91,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::cx() const
// FIXME: Create a proper animated value when animations are supported.
auto base_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
// https://www.w3.org/TR/SVG11/shapes.html#EllipseElementCYAttribute
@ -101,7 +101,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::cy() const
// FIXME: Create a proper animated value when animations are supported.
auto base_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
// https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRXAttribute
@ -111,7 +111,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::rx() const
// 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));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
// https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRYAttribute
@ -121,7 +121,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGEllipseElement::ry() const
// 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));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length)).release_value_but_fixme_should_propagate_errors();
}
}