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

LibWeb: Expose Animation::is_finished()

This will be required to handle forward-fill state in StyleComputer
This commit is contained in:
Matthew Olsson 2024-02-03 18:25:04 -07:00 committed by Andreas Kling
parent 5eea53f27a
commit 1e37ba5515
2 changed files with 11 additions and 7 deletions

View file

@ -61,6 +61,7 @@ public:
// https://www.w3.org/TR/web-animations-1/#dom-animation-finished
JS::NonnullGCPtr<JS::Object> finished() const { return *current_finished_promise()->promise(); }
bool is_finished() const { return m_is_finished; }
enum class AutoRewind {
Yes,
@ -155,7 +156,7 @@ private:
// https://www.w3.org/TR/web-animations-1/#current-finished-promise
mutable JS::GCPtr<WebIDL::Promise> m_current_finished_promise;
bool m_current_finished_promise_resolved { false };
bool m_is_finished { false };
// https://www.w3.org/TR/web-animations-1/#pending-play-task
TaskState m_pending_play_task { TaskState::None };