2019-06-20 23:25:25 +02:00
|
|
|
#pragma once
|
|
|
|
|
2019-06-27 12:16:20 +02:00
|
|
|
#include <AK/NonnullRefPtrVector.h>
|
2019-06-20 23:25:25 +02:00
|
|
|
#include <LibHTML/CSS/StyleRule.h>
|
|
|
|
|
2019-06-21 19:19:49 +02:00
|
|
|
class StyleSheet : public RefCounted<StyleSheet> {
|
2019-06-20 23:25:25 +02:00
|
|
|
public:
|
2019-06-27 12:16:20 +02:00
|
|
|
static NonnullRefPtr<StyleSheet> create(NonnullRefPtrVector<StyleRule>&& rules)
|
2019-06-21 19:19:49 +02:00
|
|
|
{
|
|
|
|
return adopt(*new StyleSheet(move(rules)));
|
|
|
|
}
|
|
|
|
|
2019-06-20 23:25:25 +02:00
|
|
|
~StyleSheet();
|
|
|
|
|
2019-06-27 12:16:20 +02:00
|
|
|
const NonnullRefPtrVector<StyleRule>& rules() const { return m_rules; }
|
2019-06-20 23:25:25 +02:00
|
|
|
|
|
|
|
private:
|
2019-06-27 12:16:20 +02:00
|
|
|
explicit StyleSheet(NonnullRefPtrVector<StyleRule>&&);
|
2019-06-21 19:19:49 +02:00
|
|
|
|
2019-06-27 12:16:20 +02:00
|
|
|
NonnullRefPtrVector<StyleRule> m_rules;
|
2019-06-20 23:25:25 +02:00
|
|
|
};
|