mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
LibWeb: Invalidate element when setting AnimationEffect's animation
This commit is contained in:
parent
ce99636cd0
commit
6d25bf3aac
2 changed files with 9 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <LibWeb/Animations/Animation.h>
|
#include <LibWeb/Animations/Animation.h>
|
||||||
#include <LibWeb/Animations/AnimationEffect.h>
|
#include <LibWeb/Animations/AnimationEffect.h>
|
||||||
#include <LibWeb/Bindings/Intrinsics.h>
|
#include <LibWeb/Bindings/Intrinsics.h>
|
||||||
|
#include <LibWeb/DOM/Element.h>
|
||||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||||
|
|
||||||
namespace Web::Animations {
|
namespace Web::Animations {
|
||||||
|
@ -153,6 +154,13 @@ WebIDL::ExceptionOr<void> AnimationEffect::update_timing(OptionalEffectTiming ti
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AnimationEffect::set_associated_animation(JS::GCPtr<Animation> value)
|
||||||
|
{
|
||||||
|
m_associated_animation = value;
|
||||||
|
if (auto* target = this->target())
|
||||||
|
target->invalidate_style();
|
||||||
|
}
|
||||||
|
|
||||||
// https://www.w3.org/TR/web-animations-1/#animation-direction
|
// https://www.w3.org/TR/web-animations-1/#animation-direction
|
||||||
AnimationDirection AnimationEffect::animation_direction() const
|
AnimationDirection AnimationEffect::animation_direction() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
void set_timing_function(TimingFunction value) { m_timing_function = move(value); }
|
void set_timing_function(TimingFunction value) { m_timing_function = move(value); }
|
||||||
|
|
||||||
JS::GCPtr<Animation> associated_animation() const { return m_associated_animation; }
|
JS::GCPtr<Animation> associated_animation() const { return m_associated_animation; }
|
||||||
void set_associated_animation(JS::GCPtr<Animation> value) { m_associated_animation = value; }
|
void set_associated_animation(JS::GCPtr<Animation> value);
|
||||||
|
|
||||||
AnimationDirection animation_direction() const;
|
AnimationDirection animation_direction() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue