ladybird/Userland/Libraries/LibWeb/CSS/CSSRule.h
Andreas Kling 3a4565beec LibWeb: Make CSSRule and CSSRuleList available to JavaScript :^)
This patch makes both of these classes inherit from RefCounted and
Bindings::Wrappable, plus some minimal rejigging to allow us to keep
using them internally while also exposing them to web content.
2021-09-29 21:21:57 +02:00

41 lines
729 B
C++

/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <LibWeb/Bindings/Wrappable.h>
#include <LibWeb/CSS/CSSStyleDeclaration.h>
#include <LibWeb/CSS/Selector.h>
namespace Web::CSS {
class CSSRule
: public RefCounted<CSSRule>
, public Bindings::Wrappable {
public:
using WrapperType = Bindings::CSSRuleWrapper;
virtual ~CSSRule();
enum class Type : u32 {
Style,
Import,
Media,
__Count,
};
virtual StringView class_name() const = 0;
virtual Type type() const = 0;
template<typename T>
bool fast_is() const = delete;
private:
};
}