mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:17:35 +00:00
LibHTML: More work on the CSS object model.
This commit is contained in:
parent
d343fb2429
commit
02e02ca3a5
6 changed files with 41 additions and 12 deletions
|
@ -3,13 +3,19 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibHTML/CSS/StyleRule.h>
|
||||
|
||||
class StyleSheet {
|
||||
class StyleSheet : public RefCounted<StyleSheet> {
|
||||
public:
|
||||
StyleSheet();
|
||||
NonnullRefPtr<StyleSheet> create(Vector<NonnullRefPtr<StyleRule>>&& rules)
|
||||
{
|
||||
return adopt(*new StyleSheet(move(rules)));
|
||||
}
|
||||
|
||||
~StyleSheet();
|
||||
|
||||
const Vector<StyleRule>& rules() const { return m_rules; }
|
||||
const Vector<NonnullRefPtr<StyleRule>>& rules() const { return m_rules; }
|
||||
|
||||
private:
|
||||
Vector<StyleRule> m_rules;
|
||||
explicit StyleSheet(Vector<NonnullRefPtr<StyleRule>>&&);
|
||||
|
||||
Vector<NonnullRefPtr<StyleRule>> m_rules;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue