mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
LibWeb: Add Document's pending animation event queue
This is needed for Animation's update finished state procedure
This commit is contained in:
parent
8053d40fd5
commit
979b9b942b
2 changed files with 15 additions and 0 deletions
|
@ -3585,4 +3585,9 @@ void Document::disassociate_with_timeline(JS::NonnullGCPtr<Animations::Animation
|
||||||
m_associated_animation_timelines.remove(timeline);
|
m_associated_animation_timelines.remove(timeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Document::append_pending_animation_event(Web::DOM::Document::PendingAnimationEvent const& event)
|
||||||
|
{
|
||||||
|
m_pending_animation_event_queue.append(event);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -539,6 +539,13 @@ public:
|
||||||
void associate_with_timeline(JS::NonnullGCPtr<Animations::AnimationTimeline>);
|
void associate_with_timeline(JS::NonnullGCPtr<Animations::AnimationTimeline>);
|
||||||
void disassociate_with_timeline(JS::NonnullGCPtr<Animations::AnimationTimeline>);
|
void disassociate_with_timeline(JS::NonnullGCPtr<Animations::AnimationTimeline>);
|
||||||
|
|
||||||
|
struct PendingAnimationEvent {
|
||||||
|
JS::NonnullGCPtr<DOM::Event> event;
|
||||||
|
JS::NonnullGCPtr<Animations::Animation> target;
|
||||||
|
Optional<double> scheduled_event_time;
|
||||||
|
};
|
||||||
|
void append_pending_animation_event(PendingAnimationEvent const&);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void initialize(JS::Realm&) override;
|
virtual void initialize(JS::Realm&) override;
|
||||||
virtual void visit_edges(Cell::Visitor&) override;
|
virtual void visit_edges(Cell::Visitor&) override;
|
||||||
|
@ -751,6 +758,9 @@ private:
|
||||||
|
|
||||||
// https://www.w3.org/TR/web-animations-1/#document-default-document-timeline
|
// https://www.w3.org/TR/web-animations-1/#document-default-document-timeline
|
||||||
JS::GCPtr<Animations::DocumentTimeline> m_default_timeline;
|
JS::GCPtr<Animations::DocumentTimeline> m_default_timeline;
|
||||||
|
|
||||||
|
// https://www.w3.org/TR/web-animations-1/#pending-animation-event-queue
|
||||||
|
Vector<PendingAnimationEvent> m_pending_animation_event_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue