mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
LibWeb: Move/rename StyleFunctionRule to Parser::Function
This commit is contained in:
parent
084780a0a2
commit
e0b2ebcc7b
11 changed files with 59 additions and 58 deletions
|
@ -10,10 +10,10 @@
|
|||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibWeb/CSS/Parser/Token.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
class StyleBlockRule;
|
||||
class StyleFunctionRule;
|
||||
}
|
||||
|
||||
namespace Web::CSS::Parser {
|
||||
|
@ -22,15 +22,15 @@ namespace Web::CSS::Parser {
|
|||
class ComponentValue {
|
||||
public:
|
||||
ComponentValue(Token);
|
||||
explicit ComponentValue(NonnullRefPtr<StyleFunctionRule>);
|
||||
explicit ComponentValue(NonnullRefPtr<Function>);
|
||||
explicit ComponentValue(NonnullRefPtr<StyleBlockRule>);
|
||||
~ComponentValue();
|
||||
|
||||
bool is_block() const { return m_value.has<NonnullRefPtr<StyleBlockRule>>(); }
|
||||
StyleBlockRule const& block() const { return m_value.get<NonnullRefPtr<StyleBlockRule>>(); }
|
||||
|
||||
bool is_function() const { return m_value.has<NonnullRefPtr<StyleFunctionRule>>(); }
|
||||
StyleFunctionRule const& function() const { return m_value.get<NonnullRefPtr<StyleFunctionRule>>(); }
|
||||
bool is_function() const { return m_value.has<NonnullRefPtr<Function>>(); }
|
||||
Function const& function() const { return m_value.get<NonnullRefPtr<Function>>(); }
|
||||
|
||||
bool is_token() const { return m_value.has<Token>(); }
|
||||
bool is(Token::Type type) const { return is_token() && token().is(type); }
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
String to_debug_string() const;
|
||||
|
||||
private:
|
||||
Variant<Token, NonnullRefPtr<StyleFunctionRule>, NonnullRefPtr<StyleBlockRule>> m_value;
|
||||
Variant<Token, NonnullRefPtr<Function>, NonnullRefPtr<StyleBlockRule>> m_value;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue