mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Invalidate element when setting AnimationEffect's animation
This commit is contained in:
committed by
Andrew Kaster
parent
ce99636cd0
commit
6d25bf3aac
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user