mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
LibWeb: Combine "pending" and "ASAP" animation task states
It seems that the difference between pending and ASAP in the spec is only to allow the implementation to perform implementation-defined operations between the two states. We don't need to distinguish the two states, so lets just combine them for now.
This commit is contained in:
parent
66859c8cd8
commit
88518c29ca
2 changed files with 6 additions and 11 deletions
|
@ -44,7 +44,7 @@ public:
|
|||
Bindings::AnimationReplaceState replace_state() const { return m_replace_state; }
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animation-pending
|
||||
bool pending() const { return m_pending_pause_task != TaskState::None || m_pending_play_task != TaskState::None; }
|
||||
bool pending() const { return m_pending_play_task == TaskState::Scheduled || m_pending_pause_task == TaskState::Scheduled; }
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animation-ready
|
||||
JS::NonnullGCPtr<JS::Object> ready() const { return *current_ready_promise()->promise(); }
|
||||
|
@ -66,8 +66,7 @@ protected:
|
|||
private:
|
||||
enum class TaskState {
|
||||
None,
|
||||
Pending,
|
||||
RunAsSoonAsReady,
|
||||
Scheduled,
|
||||
};
|
||||
|
||||
enum class DidSeek {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue