mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
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:
parent
6a95506bb1
commit
1af0364cfc
Notes:
github-actions[bot]
2025-12-01 10:19:24 +00:00
Author: https://github.com/Calme1709
Commit: 1af0364cfc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 6 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue