LibWeb: Update style before getting animation play state

Pending style updates can influence this value
This commit is contained in:
Callum Law 2025-10-31 01:14:05 +13:00 committed by Alexander Kalenik
parent a95cde3660
commit fbcef936a9
Notes: github-actions[bot] 2025-11-02 22:55:11 +00:00
7 changed files with 286 additions and 1 deletions

View file

@ -277,6 +277,14 @@ WebIDL::ExceptionOr<void> Animation::set_playback_rate(double new_playback_rate)
}
// https://www.w3.org/TR/web-animations-1/#animation-play-state
Bindings::AnimationPlayState Animation::play_state_for_bindings() const
{
if (m_owning_element)
m_owning_element->document().update_style();
return play_state();
}
Bindings::AnimationPlayState Animation::play_state() const
{
// The play state of animation, animation, at a given moment is the state corresponding to the first matching