2023-05-26 23:30:54 +03:30
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Ali Mohammad Pur <mpfard@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "CSSKeyframeRule.h"
|
2023-06-25 14:06:11 -06:00
|
|
|
#include <LibWeb/Bindings/CSSKeyframeRulePrototype.h>
|
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2023-05-26 23:30:54 +03:30
|
|
|
#include <LibWeb/CSS/CSSRuleList.h>
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
void CSSKeyframeRule::visit_edges(Visitor& visitor)
|
|
|
|
{
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
visitor.visit(m_declarations);
|
|
|
|
}
|
|
|
|
|
2023-06-25 14:06:11 -06:00
|
|
|
JS::ThrowCompletionOr<void> CSSKeyframeRule::initialize(JS::Realm& realm)
|
2023-05-26 23:30:54 +03:30
|
|
|
{
|
2023-06-25 14:06:11 -06:00
|
|
|
MUST_OR_THROW_OOM(Base::initialize(realm));
|
|
|
|
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSKeyframeRulePrototype>(realm, "CSSKeyframeRule"));
|
2023-05-26 23:30:54 +03:30
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
DeprecatedString CSSKeyframeRule::serialized() const
|
|
|
|
{
|
|
|
|
StringBuilder builder;
|
|
|
|
builder.appendff("{}% {{ {} }}", key().value(), style()->serialized());
|
|
|
|
return builder.to_deprecated_string();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|