mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibWeb: Move ComponentValue to CSS::Parser namespace
This commit is contained in:
parent
c449cabae3
commit
fff2c35f51
11 changed files with 26 additions and 23 deletions
|
@ -9,7 +9,7 @@
|
|||
#include <LibWeb/CSS/Parser/StyleBlockRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleFunctionRule.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
namespace Web::CSS::Parser {
|
||||
|
||||
ComponentValue::ComponentValue(Token token)
|
||||
: m_value(token)
|
||||
|
|
|
@ -12,9 +12,11 @@
|
|||
#include <LibWeb/CSS/Parser/Token.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
class StyleBlockRule;
|
||||
class StyleFunctionRule;
|
||||
}
|
||||
|
||||
namespace Web::CSS::Parser {
|
||||
|
||||
// https://www.w3.org/TR/css-syntax-3/#component-value
|
||||
class ComponentValue {
|
||||
|
|
|
@ -21,14 +21,14 @@ public:
|
|||
~Declaration();
|
||||
|
||||
String const& name() const { return m_name; }
|
||||
Vector<ComponentValue> const& values() const { return m_values; }
|
||||
Vector<Parser::ComponentValue> const& values() const { return m_values; }
|
||||
Important importance() const { return m_important; }
|
||||
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
String m_name;
|
||||
Vector<ComponentValue> m_values;
|
||||
Vector<Parser::ComponentValue> m_values;
|
||||
Important m_important { Important::No };
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class StyleBlockRule : public RefCounted<StyleBlockRule> {
|
|||
|
||||
public:
|
||||
StyleBlockRule();
|
||||
explicit StyleBlockRule(Token token, Vector<ComponentValue>&& values)
|
||||
explicit StyleBlockRule(Token token, Vector<Parser::ComponentValue>&& values)
|
||||
: m_token(move(token))
|
||||
, m_values(move(values))
|
||||
{
|
||||
|
@ -33,12 +33,12 @@ public:
|
|||
|
||||
Token const& token() const { return m_token; }
|
||||
|
||||
Vector<ComponentValue> const& values() const { return m_values; }
|
||||
Vector<Parser::ComponentValue> const& values() const { return m_values; }
|
||||
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
Token m_token;
|
||||
Vector<ComponentValue> m_values;
|
||||
Vector<Parser::ComponentValue> m_values;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,16 +20,16 @@ class StyleFunctionRule : public RefCounted<StyleFunctionRule> {
|
|||
|
||||
public:
|
||||
explicit StyleFunctionRule(String name);
|
||||
StyleFunctionRule(String name, Vector<ComponentValue>&& values);
|
||||
StyleFunctionRule(String name, Vector<Parser::ComponentValue>&& values);
|
||||
~StyleFunctionRule();
|
||||
|
||||
String const& name() const { return m_name; }
|
||||
Vector<ComponentValue> const& values() const { return m_values; }
|
||||
Vector<Parser::ComponentValue> const& values() const { return m_values; }
|
||||
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
String m_name;
|
||||
Vector<ComponentValue> m_values;
|
||||
Vector<Parser::ComponentValue> m_values;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
bool is_qualified_rule() const { return m_type == Type::Qualified; }
|
||||
bool is_at_rule() const { return m_type == Type::At; }
|
||||
|
||||
Vector<ComponentValue> const& prelude() const { return m_prelude; }
|
||||
Vector<Parser::ComponentValue> const& prelude() const { return m_prelude; }
|
||||
RefPtr<StyleBlockRule const> block() const { return m_block; }
|
||||
String const& at_rule_name() const { return m_at_rule_name; }
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
private:
|
||||
Type const m_type;
|
||||
String m_at_rule_name;
|
||||
Vector<ComponentValue> m_prelude;
|
||||
Vector<Parser::ComponentValue> m_prelude;
|
||||
RefPtr<StyleBlockRule> m_block;
|
||||
};
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ StyleFunctionRule::StyleFunctionRule(String name)
|
|||
{
|
||||
}
|
||||
|
||||
StyleFunctionRule::StyleFunctionRule(String name, Vector<ComponentValue>&& values)
|
||||
StyleFunctionRule::StyleFunctionRule(String name, Vector<Parser::ComponentValue>&& values)
|
||||
: m_name(move(name))
|
||||
, m_values(move(values))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue