1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibWeb: Make factory method of SVG::SVGLength fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 20:25:50 +01:00 committed by Linus Groh
parent bfc8cbcf3b
commit 71316614b8
7 changed files with 45 additions and 45 deletions

View file

@ -84,8 +84,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::cx() 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_center_x.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_center_x.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_center_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();
}
@ -94,8 +94,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::cy() 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_center_y.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_center_y.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_center_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();
}
@ -104,8 +104,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::r() 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.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_radius.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_radius.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_radius.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();
}