mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 18:37:58 +03: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: https://github.com/SerenityOS/serenity/commit/2c843798462 Pull-request: https://github.com/SerenityOS/serenity/pull/8341
@ -24,6 +24,21 @@ public:
|
||||
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;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user