LibWeb: Implement SVGLength's read-only property

An SVGLength can be read-only, e.g. all animVal values cannot be
modified. Implement this for all instantiations of SVGLength.

While we're here, add `fake_animated_length_fixme()` so we can easily
find all sites where we need to improve our animated length game.
This commit is contained in:
Jelle Raaijmakers 2025-08-26 16:51:46 +02:00 committed by Jelle Raaijmakers
commit 676f5837b3
Notes: github-actions[bot] 2025-08-27 09:51:30 +00:00
16 changed files with 175 additions and 113 deletions

View file

@ -218,38 +218,32 @@ Optional<Painting::PaintStyle> SVGRadialGradientElement::to_gfx_paint_style(SVGP
GC::Ref<SVGAnimatedLength> SVGRadialGradientElement::cx() const
{
// FIXME: Implement this properly.
return SVGAnimatedLength::create(realm(), SVGLength::create(realm(), 0, 0), SVGLength::create(realm(), 0, 0));
return fake_animated_length_fixme();
}
GC::Ref<SVGAnimatedLength> SVGRadialGradientElement::cy() const
{
// FIXME: Implement this properly.
return SVGAnimatedLength::create(realm(), SVGLength::create(realm(), 0, 0), SVGLength::create(realm(), 0, 0));
return fake_animated_length_fixme();
}
GC::Ref<SVGAnimatedLength> SVGRadialGradientElement::fx() const
{
// FIXME: Implement this properly.
return SVGAnimatedLength::create(realm(), SVGLength::create(realm(), 0, 0), SVGLength::create(realm(), 0, 0));
return fake_animated_length_fixme();
}
GC::Ref<SVGAnimatedLength> SVGRadialGradientElement::fy() const
{
// FIXME: Implement this properly.
return SVGAnimatedLength::create(realm(), SVGLength::create(realm(), 0, 0), SVGLength::create(realm(), 0, 0));
return fake_animated_length_fixme();
}
GC::Ref<SVGAnimatedLength> SVGRadialGradientElement::fr() const
{
// FIXME: Implement this properly.
return SVGAnimatedLength::create(realm(), SVGLength::create(realm(), 0, 0), SVGLength::create(realm(), 0, 0));
return fake_animated_length_fixme();
}
GC::Ref<SVGAnimatedLength> SVGRadialGradientElement::r() const
{
// FIXME: Implement this properly.
return SVGAnimatedLength::create(realm(), SVGLength::create(realm(), 0, 0), SVGLength::create(realm(), 0, 0));
return fake_animated_length_fixme();
}
}