1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

LibWeb: Run pending play tasks when the timeline time changes

Note that the timeline time changes every animation frame when the
Document sends out animation events
This commit is contained in:
Matthew Olsson 2024-02-02 15:01:30 -07:00 committed by Andreas Kling
parent daaaaec2d0
commit 727a9a6472
6 changed files with 101 additions and 13 deletions

View file

@ -63,6 +63,7 @@ public:
Optional<double> convert_a_timeline_time_to_an_origin_relative_time(Optional<double>) const;
JS::GCPtr<DOM::Document> document_for_timing() const;
void notify_timeline_time_did_change();
protected:
Animation(JS::Realm&);
@ -93,6 +94,9 @@ private:
WebIDL::ExceptionOr<void> silently_set_current_time(Optional<double>);
void update_finished_state(DidSeek, SynchronouslyNotify);
void run_pending_play_task();
void run_pending_pause_task();
JS::NonnullGCPtr<WebIDL::Promise> current_ready_promise() const;
JS::NonnullGCPtr<WebIDL::Promise> current_finished_promise() const;