2019-06-20 23:25:25 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Vector.h>
|
|
|
|
|
#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-21 20:54:13 +02:00
|
|
|
static NonnullRefPtr<StyleSheet> create(Vector<NonnullRefPtr<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-21 19:19:49 +02:00
|
|
|
const Vector<NonnullRefPtr<StyleRule>>& rules() const { return m_rules; }
|
2019-06-20 23:25:25 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-06-21 19:19:49 +02:00
|
|
|
explicit StyleSheet(Vector<NonnullRefPtr<StyleRule>>&&);
|
|
|
|
|
|
|
|
|
|
Vector<NonnullRefPtr<StyleRule>> m_rules;
|
2019-06-20 23:25:25 +02:00
|
|
|
};
|