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

@ -69,8 +69,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::x1() 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_x1.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_x1.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_x1.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_x1.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();
}
@ -79,8 +79,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::y1() 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_y1.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_y1.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_y1.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_y1.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();
}
@ -89,8 +89,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::x2() 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_x2.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_x2.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_x2.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_x2.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();
}
@ -99,8 +99,8 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::y2() 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_y2.value_or(0));
auto anim_length = SVGLength::create(realm(), 0, m_y2.value_or(0));
auto base_length = SVGLength::create(realm(), 0, m_y2.value_or(0)).release_value_but_fixme_should_propagate_errors();
auto anim_length = SVGLength::create(realm(), 0, m_y2.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();
}