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

LibWeb: Implement Animation::set_current_time

This commit is contained in:
Matthew Olsson 2023-11-11 08:03:41 -07:00 committed by Andreas Kling
parent f898b49c8e
commit 749462f3df
2 changed files with 75 additions and 2 deletions

View file

@ -62,6 +62,7 @@ private:
};
void apply_any_pending_playback_rate();
WebIDL::ExceptionOr<void> silently_set_current_time(Optional<double>);
JS::NonnullGCPtr<WebIDL::Promise> current_ready_promise() const;
JS::NonnullGCPtr<WebIDL::Promise> current_finished_promise() const;
@ -81,6 +82,9 @@ private:
// https://www.w3.org/TR/web-animations-1/#animation-hold-time
Optional<double> m_hold_time {};
// https://www.w3.org/TR/web-animations-1/#previous-current-time
Optional<double> m_previous_current_time {};
// https://www.w3.org/TR/web-animations-1/#playback-rate
double m_playback_rate { 1.0 };