mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Add accessors to CSS::DeclarationOrAtRule
This commit is contained in:
parent
6d14791c40
commit
2c84379846
Notes:
sideshowbarker
2024-07-18 09:13:56 +09:00
Author: https://github.com/AtkinsSJ
Commit: 2c84379846
Pull-request: https://github.com/SerenityOS/serenity/pull/8341
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