mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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:
parent
3a10596136
commit
a0b96280e4
Notes:
github-actions[bot]
2024-09-22 04:43:15 +00:00
Author: https://github.com/AtkinsSJ
Commit: a0b96280e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1442
6 changed files with 14 additions and 29 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue