LibWeb: Separate CSSAnimation::animationName from Animation::id

This commit is contained in:
Callum Law 2025-10-30 21:10:36 +13:00 committed by Alexander Kalenik
parent 2447b8a759
commit a95cde3660
Notes: github-actions[bot] 2025-11-02 22:55:20 +00:00
5 changed files with 40 additions and 3 deletions

View file

@ -19,7 +19,8 @@ class CSSAnimation : public Animations::Animation {
public:
static GC::Ref<CSSAnimation> create(JS::Realm&);
FlyString const& animation_name() const { return id(); }
FlyString const& animation_name() const { return m_animation_name; }
void set_animation_name(FlyString const& animation_name) { m_animation_name = animation_name; }
virtual Animations::AnimationClass animation_class() const override;
virtual Optional<int> class_specific_composite_order(GC::Ref<Animations::Animation> other) const override;
@ -30,6 +31,9 @@ private:
virtual void initialize(JS::Realm&) override;
virtual bool is_css_animation() const override { return true; }
// https://drafts.csswg.org/css-animations-2/#dom-cssanimation-animationname
FlyString m_animation_name;
};
}