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

@ -71,7 +71,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::x1() const
// 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));
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#LineElementY1Attribute
@ -81,7 +81,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::y1() const
// 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));
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#LineElementX2Attribute
@ -91,7 +91,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::x2() const
// 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));
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#LineElementY2Attribute
@ -101,7 +101,7 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGLineElement::y2() const
// 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));
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();
}
}