LibWeb: Move "owning element" of Animation classes into Animation

There's no need to have a virtual method here when we can just store the
owning element pointer on the Animation instead.
This commit is contained in:
Sam Atkins 2024-09-12 16:53:14 +01:00 committed by Andreas Kling
commit a0b96280e4
Notes: github-actions[bot] 2024-09-22 04:43:15 +00:00
6 changed files with 14 additions and 29 deletions

View file

@ -20,9 +20,6 @@ class CSSAnimation : public Animations::Animation {
public:
static JS::NonnullGCPtr<CSSAnimation> create(JS::Realm&);
JS::GCPtr<DOM::Element> owning_element() const override { return m_owning_element; }
void set_owning_element(JS::GCPtr<DOM::Element> value) { m_owning_element = value; }
FlyString const& animation_name() const { return id(); }
virtual Animations::AnimationClass animation_class() const override;
@ -32,12 +29,8 @@ private:
explicit CSSAnimation(JS::Realm&);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
virtual bool is_css_animation() const override { return true; }
// https://www.w3.org/TR/css-animations-2/#owning-element-section
JS::GCPtr<DOM::Element> m_owning_element;
};
}