1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

LibWeb: Store Animations in Animatable instead of AnimationEffects

This is closer to what the spec instructs us to do, and matches how
associations are maintained in the timelines. Also note that the removed
destructor logic is not necessary since we visit the associated
animations anyways.
This commit is contained in:
Matthew Olsson 2024-03-07 11:11:27 -07:00 committed by Alexander Kalenik
parent f386c01ae1
commit 90290eb985
5 changed files with 22 additions and 26 deletions

View file

@ -352,7 +352,7 @@ void Animation::set_replace_state(Bindings::AnimationReplaceState value)
if (value == Bindings::AnimationReplaceState::Removed) {
// Remove the associated effect from its target, if applicable
if (m_effect && m_effect->target())
m_effect->target()->disassociate_with_effect(*m_effect);
m_effect->target()->disassociate_with_animation(*this);
// Remove this animation from its timeline
m_timeline->disassociate_with_animation(*this);