mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
LibWeb: Add accessors to CSS::DeclarationOrAtRule
This commit is contained in:
parent
6d14791c40
commit
2c84379846
1 changed files with 15 additions and 0 deletions
|
@ -24,6 +24,21 @@ public:
|
||||||
Declaration,
|
Declaration,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool is_at_rule() const { return m_type == DeclarationType::At; }
|
||||||
|
bool is_declaration() const { return m_type == DeclarationType::Declaration; }
|
||||||
|
|
||||||
|
StyleRule const& at_rule() const
|
||||||
|
{
|
||||||
|
VERIFY(is_at_rule());
|
||||||
|
return *m_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
StyleDeclarationRule const& declaration() const
|
||||||
|
{
|
||||||
|
VERIFY(is_declaration());
|
||||||
|
return m_declaration;
|
||||||
|
}
|
||||||
|
|
||||||
String to_string() const;
|
String to_string() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue