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