1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:47:34 +00:00

LibWeb: Visit Animatable::m_associated_effects

This commit is contained in:
Matthew Olsson 2024-03-07 09:31:52 -07:00 committed by Alexander Kalenik
parent 2a021a35fc
commit 24ec5838ba
3 changed files with 12 additions and 0 deletions

View file

@ -94,4 +94,12 @@ void Animatable::disassociate_with_effect(JS::NonnullGCPtr<AnimationEffect> effe
m_associated_effects.remove_first_matching([&](auto element) { return effect == element; }); m_associated_effects.remove_first_matching([&](auto element) { return effect == element; });
} }
void Animatable::visit_edges(JS::Cell::Visitor& visitor)
{
for (auto const& effect : m_associated_effects)
visitor.visit(effect);
visitor.visit(m_cached_animation_name_source);
visitor.visit(m_cached_animation_name_animation);
}
} }

View file

@ -39,6 +39,9 @@ public:
JS::GCPtr<Animations::Animation> cached_animation_name_animation() const { return m_cached_animation_name_animation; } JS::GCPtr<Animations::Animation> cached_animation_name_animation() const { return m_cached_animation_name_animation; }
void set_cached_animation_name_animation(JS::GCPtr<Animations::Animation> value) { m_cached_animation_name_animation = value; } void set_cached_animation_name_animation(JS::GCPtr<Animations::Animation> value) { m_cached_animation_name_animation = value; }
protected:
void visit_edges(JS::Cell::Visitor&);
private: private:
Vector<JS::NonnullGCPtr<AnimationEffect>> m_associated_effects; Vector<JS::NonnullGCPtr<AnimationEffect>> m_associated_effects;
bool m_is_sorted_by_composite_order { true }; bool m_is_sorted_by_composite_order { true };

View file

@ -91,6 +91,7 @@ void Element::visit_edges(Cell::Visitor& visitor)
{ {
Base::visit_edges(visitor); Base::visit_edges(visitor);
SlottableMixin::visit_edges(visitor); SlottableMixin::visit_edges(visitor);
Animatable::visit_edges(visitor);
visitor.visit(m_attributes); visitor.visit(m_attributes);
visitor.visit(m_inline_style); visitor.visit(m_inline_style);