mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
LibWeb: Tidy up StyleRule API
Constantly accessing private `m_foo` fields feels uncomfortable and doesn't fit well with our code style.
This commit is contained in:
parent
75db8b1f86
commit
6a0adbefc7
3 changed files with 16 additions and 12 deletions
|
@ -26,14 +26,18 @@ public:
|
|||
StyleRule(Type);
|
||||
~StyleRule();
|
||||
|
||||
bool is_qualified_rule() const { return m_type == Type::Qualified; }
|
||||
bool is_at_rule() const { return m_type == Type::At; }
|
||||
|
||||
Vector<StyleComponentValueRule> const& prelude() const { return m_prelude; }
|
||||
RefPtr<StyleBlockRule const> block() const { return m_block; }
|
||||
String const& at_rule_name() const { return m_at_rule_name; }
|
||||
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
Type const m_type;
|
||||
String m_name; // At-rules only
|
||||
String m_at_rule_name;
|
||||
Vector<StyleComponentValueRule> m_prelude;
|
||||
RefPtr<StyleBlockRule> m_block;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue