mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibWeb: Move/rename StyleBlockRule to Parser::Block
This commit is contained in:
parent
624df40e20
commit
3e49036edf
11 changed files with 36 additions and 39 deletions
|
@ -12,10 +12,6 @@
|
|||
#include <LibWeb/CSS/Parser/Token.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
class StyleBlockRule;
|
||||
}
|
||||
|
||||
namespace Web::CSS::Parser {
|
||||
|
||||
// https://www.w3.org/TR/css-syntax-3/#component-value
|
||||
|
@ -23,11 +19,11 @@ class ComponentValue {
|
|||
public:
|
||||
ComponentValue(Token);
|
||||
explicit ComponentValue(NonnullRefPtr<Function>);
|
||||
explicit ComponentValue(NonnullRefPtr<StyleBlockRule>);
|
||||
explicit ComponentValue(NonnullRefPtr<Block>);
|
||||
~ComponentValue();
|
||||
|
||||
bool is_block() const { return m_value.has<NonnullRefPtr<StyleBlockRule>>(); }
|
||||
StyleBlockRule const& block() const { return m_value.get<NonnullRefPtr<StyleBlockRule>>(); }
|
||||
bool is_block() const { return m_value.has<NonnullRefPtr<Block>>(); }
|
||||
Block const& block() const { return m_value.get<NonnullRefPtr<Block>>(); }
|
||||
|
||||
bool is_function() const { return m_value.has<NonnullRefPtr<Function>>(); }
|
||||
Function const& function() const { return m_value.get<NonnullRefPtr<Function>>(); }
|
||||
|
@ -41,7 +37,7 @@ public:
|
|||
String to_debug_string() const;
|
||||
|
||||
private:
|
||||
Variant<Token, NonnullRefPtr<Function>, NonnullRefPtr<StyleBlockRule>> m_value;
|
||||
Variant<Token, NonnullRefPtr<Function>, NonnullRefPtr<Block>> m_value;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue