mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibWeb: Simplify Animation::update_finished_state a bit
This removes the two boolean hack in favor of using the existing mechanism to remove queued tasks. It also exposes the element invalidation behavior for call sites that don't necessarily want to update the finished state, but still need to invalidate the associated target.
This commit is contained in:
parent
1e37ba5515
commit
06a8674eec
3 changed files with 37 additions and 31 deletions
|
@ -120,6 +120,8 @@ private:
|
|||
JS::NonnullGCPtr<WebIDL::Promise> current_ready_promise() const;
|
||||
JS::NonnullGCPtr<WebIDL::Promise> current_finished_promise() const;
|
||||
|
||||
void invalidate_effect();
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animation-id
|
||||
FlyString m_id;
|
||||
|
||||
|
@ -164,10 +166,7 @@ private:
|
|||
// https://www.w3.org/TR/web-animations-1/#pending-pause-task
|
||||
TaskState m_pending_pause_task { TaskState::None };
|
||||
|
||||
// Flags used to manage the finish notification microtask and ultimately prevent more than one finish notification
|
||||
// microtask from being queued at any given time
|
||||
bool m_should_abort_finish_notification_microtask { false };
|
||||
bool m_has_finish_notification_microtask_scheduled { false };
|
||||
Optional<int> m_pending_finish_microtask_id;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue