2020-01-18 05:38:21 -03:00
|
|
|
/*
|
2021-03-08 09:40:53 -03:00
|
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
2021-02-21 08:45:26 -03:00
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
2020-01-18 05:38:21 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2019-06-20 18:25:25 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
2021-03-07 12:14:04 -03:00
|
|
|
#include <AK/RefCounted.h>
|
2021-03-08 07:22:18 -03:00
|
|
|
#include <LibWeb/Bindings/Wrappable.h>
|
|
|
|
|
#include <LibWeb/Forward.h>
|
2019-06-20 18:25:25 -03:00
|
|
|
|
2020-07-26 15:01:35 -03:00
|
|
|
namespace Web::CSS {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2021-03-08 07:22:18 -03:00
|
|
|
class StyleSheet
|
|
|
|
|
: public RefCounted<StyleSheet>
|
|
|
|
|
, public Bindings::Wrappable {
|
2019-06-20 18:25:25 -03:00
|
|
|
public:
|
2021-03-08 07:22:18 -03:00
|
|
|
using WrapperType = Bindings::StyleSheetWrapper;
|
|
|
|
|
|
2021-03-07 12:14:04 -03:00
|
|
|
virtual ~StyleSheet() = default;
|
2019-06-21 14:19:49 -03:00
|
|
|
|
2021-03-08 12:16:28 -03:00
|
|
|
virtual String type() const = 0;
|
|
|
|
|
|
2021-03-08 09:40:53 -03:00
|
|
|
DOM::Element* owner_node() { return m_owner_node; }
|
|
|
|
|
void set_owner_node(DOM::Element*);
|
|
|
|
|
|
2021-03-07 12:14:04 -03:00
|
|
|
protected:
|
|
|
|
|
StyleSheet() = default;
|
2021-03-08 09:40:53 -03:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
WeakPtr<DOM::Element> m_owner_node;
|
2019-06-20 18:25:25 -03:00
|
|
|
};
|
2020-03-07 06:27:02 -03:00
|
|
|
|
|
|
|
|
}
|