mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
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:
committed by
Andreas Kling
parent
3a10596136
commit
a0b96280e4
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user