mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb: Add the CSSAnimation IDL object
This commit is contained in:
parent
3721a1a81c
commit
3a87c000c4
Notes:
sideshowbarker
2024-07-16 21:42:29 +09:00
Author: https://github.com/mattco98
Commit: 3a87c000c4
Pull-request: https://github.com/SerenityOS/serenity/pull/23184
Reviewed-by: https://github.com/ADKaster ✅
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