LibWeb: Don't disassociate animations from timeline when target orphaned

An animation with an orphaned owning element should continue to be
ticked by the timeline.

Reverts c8b574e and instead avoids leaking animations by not visiting
`Animation`s from `AnimationTimeline`s.

Fixes a timeout in the imported test
This commit is contained in:
Callum Law
2025-12-18 13:53:21 +13:00
committed by Alexander Kalenik
parent d62e2e39a3
commit f235625670
Notes: github-actions[bot] 2025-12-23 13:55:58 +00:00
10 changed files with 156 additions and 18 deletions

View File

@@ -1445,4 +1445,10 @@ void Animation::visit_edges(Cell::Visitor& visitor)
m_owning_element->visit(visitor);
}
void Animation::finalize()
{
if (m_timeline)
m_timeline->disassociate_with_animation(*this);
}
}