mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Implement Document::remove_replaced_animations()
This commit is contained in:
parent
fe848487db
commit
10fddb99fc
Notes:
sideshowbarker
2024-07-17 04:10:16 +09:00
Author: https://github.com/mattco98
Commit: 10fddb99fc
Pull-request: https://github.com/SerenityOS/serenity/pull/23300
6 changed files with 105 additions and 1 deletions
|
@ -345,6 +345,20 @@ bool Animation::is_replaceable() const
|
|||
return true;
|
||||
}
|
||||
|
||||
void Animation::set_replace_state(Bindings::AnimationReplaceState value)
|
||||
{
|
||||
m_replace_state = 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);
|
||||
|
||||
// Remove this animation from its timeline
|
||||
m_timeline->disassociate_with_animation(*this);
|
||||
}
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animation-play
|
||||
WebIDL::ExceptionOr<void> Animation::play()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue