ladybird/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

45 lines
1.2 KiB
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/NonnullRefPtrVector.h>
#include <LibWeb/CSS/CSSRule.h>
#include <LibWeb/CSS/CSSStyleDeclaration.h>
#include <LibWeb/CSS/Selector.h>
namespace Web::CSS {
class CSSStyleRule : public CSSRule {
AK_MAKE_NONCOPYABLE(CSSStyleRule);
AK_MAKE_NONMOVABLE(CSSStyleRule);
public:
static NonnullRefPtr<CSSStyleRule> create(Vector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
{
return adopt(*new CSSStyleRule(move(selectors), move(declaration)));
}
~CSSStyleRule();
const Vector<Selector>& selectors() const { return m_selectors; }
const CSSStyleDeclaration& declaration() const { return m_declaration; }
virtual StringView class_name() const { return "CSSStyleRule"; };
virtual Type type() const { return Type::Style; };
private:
CSSStyleRule(Vector<Selector>&&, NonnullRefPtr<CSSStyleDeclaration>&&);
Vector<Selector> m_selectors;
NonnullRefPtr<CSSStyleDeclaration> m_declaration;
};
template<>
inline bool CSSRule::fast_is<CSSStyleRule>() const { return type() == CSSRule::Type::Style; }
}