LibWeb: Store last_css_animation_play_state on anim instead of effect

Since it is the animation rather than the effect which has a play state
it makes more sense to store it here
This commit is contained in:
Callum Law 2025-11-12 22:59:03 +13:00 committed by Sam Atkins
parent 6a95506bb1
commit 1af0364cfc
Notes: github-actions[bot] 2025-12-01 10:19:24 +00:00
4 changed files with 6 additions and 7 deletions

View file

@ -1136,7 +1136,7 @@ static void apply_animation_properties(DOM::Document const& document, ComputedPr
effect.set_playback_direction(Animations::css_animation_direction_to_bindings_playback_direction(animation_properties.direction));
effect.set_composite(Animations::css_animation_composition_to_bindings_composite_operation(animation_properties.composition));
if (animation_properties.play_state != effect.last_css_animation_play_state()) {
if (animation_properties.play_state != animation.last_css_animation_play_state()) {
if (animation_properties.play_state == CSS::AnimationPlayState::Running && animation.play_state() != Bindings::AnimationPlayState::Running) {
HTML::TemporaryExecutionContext context(document.realm());
animation.play().release_value_but_fixme_should_propagate_errors();
@ -1145,7 +1145,7 @@ static void apply_animation_properties(DOM::Document const& document, ComputedPr
animation.pause().release_value_but_fixme_should_propagate_errors();
}
effect.set_last_css_animation_play_state(animation_properties.play_state);
animation.set_last_css_animation_play_state(animation_properties.play_state);
}
}