1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +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

@ -86,7 +86,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::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#CircleElementCYAttribute
@ -96,7 +96,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::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#CircleElementRAttribute
@ -106,7 +106,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::r() const
// 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));
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();
}
}