mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibWeb: Add the CSSAnimation IDL object
This commit is contained in:
parent
3721a1a81c
commit
3a87c000c4
7 changed files with 88 additions and 1 deletions
36
Userland/Libraries/LibWeb/CSS/CSSAnimation.cpp
Normal file
36
Userland/Libraries/LibWeb/CSS/CSSAnimation.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Animations/KeyframeEffect.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/CSS/CSSAnimation.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
JS::NonnullGCPtr<CSSAnimation> CSSAnimation::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<CSSAnimation>(realm, realm);
|
||||
}
|
||||
|
||||
CSSAnimation::CSSAnimation(JS::Realm& realm)
|
||||
: Animations::Animation(realm)
|
||||
{
|
||||
}
|
||||
|
||||
void CSSAnimation::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSAnimationPrototype>(realm, "CSSAnimation"_fly_string));
|
||||
}
|
||||
|
||||
void CSSAnimation::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_owning_element);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue