mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb: Run update_finished_state when setting AnimationEffect's timing
This will need to a necessary style invalidation
This commit is contained in:
parent
6d25bf3aac
commit
3721a1a81c
Notes:
sideshowbarker
2024-07-17 05:02:35 +09:00
Author: https://github.com/mattco98
Commit: 3721a1a81c
Pull-request: https://github.com/SerenityOS/serenity/pull/23184
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 10 additions and 0 deletions
|
@ -509,6 +509,11 @@ void Animation::notify_timeline_time_did_change()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Animation::effect_timing_changed(Badge<AnimationEffect>)
|
||||||
|
{
|
||||||
|
update_finished_state(DidSeek::No, SynchronouslyNotify::Yes);
|
||||||
|
}
|
||||||
|
|
||||||
// https://www.w3.org/TR/web-animations-1/#associated-effect-end
|
// https://www.w3.org/TR/web-animations-1/#associated-effect-end
|
||||||
double Animation::associated_effect_end() const
|
double Animation::associated_effect_end() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,8 @@ public:
|
||||||
JS::GCPtr<DOM::Document> document_for_timing() const;
|
JS::GCPtr<DOM::Document> document_for_timing() const;
|
||||||
void notify_timeline_time_did_change();
|
void notify_timeline_time_did_change();
|
||||||
|
|
||||||
|
void effect_timing_changed(Badge<AnimationEffect>);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Animation(JS::Realm&);
|
Animation(JS::Realm&);
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,9 @@ WebIDL::ExceptionOr<void> AnimationEffect::update_timing(OptionalEffectTiming ti
|
||||||
if (timing.easing.has_value())
|
if (timing.easing.has_value())
|
||||||
m_easing_function = timing.easing.value();
|
m_easing_function = timing.easing.value();
|
||||||
|
|
||||||
|
if (auto animation = m_associated_animation)
|
||||||
|
animation->effect_timing_changed({});
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue