1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:17:44 +00:00

LibWeb: Record position of Animations in global animation list

"position of an Animation in the global animation list" is a fancy way
of saying "which animation object was created first"
This commit is contained in:
Matthew Olsson 2024-02-19 13:53:01 +00:00 committed by Andreas Kling
parent c3b689488e
commit ceb9d0f8dc
3 changed files with 13 additions and 0 deletions

View file

@ -81,6 +81,8 @@ public:
virtual AnimationClass animation_class() const { return AnimationClass::None; }
virtual Optional<int> class_specific_composite_order(JS::NonnullGCPtr<Animation>) const { return {}; }
unsigned int global_animation_list_order() const { return m_global_animation_list_order; }
protected:
Animation(JS::Realm&);
@ -119,6 +121,9 @@ private:
// https://www.w3.org/TR/web-animations-1/#dom-animation-id
FlyString m_id;
// https://www.w3.org/TR/web-animations-1/#global-animation-list
unsigned int m_global_animation_list_order { 0 };
// https://www.w3.org/TR/web-animations-1/#dom-animation-effect
JS::GCPtr<AnimationEffect> m_effect;