mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibWeb: Rename StyleComponentValueRule -> ComponentValue
"Component value" is the term used in the spec, and it doesn't conflict with any other types, so let's use the shorter name. :^) Also, this doesn't need to be friends with the Parser any more.
This commit is contained in:
parent
17632c3d2d
commit
8b538b1578
11 changed files with 216 additions and 217 deletions
|
@ -5,9 +5,9 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
||||
#include <LibWeb/CSS/Parser/DeclarationOrAtRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleBlockRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleComponentValueRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleDeclarationRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleFunctionRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleRule.h>
|
||||
|
@ -36,19 +36,19 @@ StyleRule::~StyleRule() = default;
|
|||
StyleBlockRule::StyleBlockRule() = default;
|
||||
StyleBlockRule::~StyleBlockRule() = default;
|
||||
|
||||
StyleComponentValueRule::StyleComponentValueRule(Token token)
|
||||
ComponentValue::ComponentValue(Token token)
|
||||
: m_value(token)
|
||||
{
|
||||
}
|
||||
StyleComponentValueRule::StyleComponentValueRule(NonnullRefPtr<StyleFunctionRule> function)
|
||||
ComponentValue::ComponentValue(NonnullRefPtr<StyleFunctionRule> function)
|
||||
: m_value(function)
|
||||
{
|
||||
}
|
||||
StyleComponentValueRule::StyleComponentValueRule(NonnullRefPtr<StyleBlockRule> block)
|
||||
ComponentValue::ComponentValue(NonnullRefPtr<StyleBlockRule> block)
|
||||
: m_value(block)
|
||||
{
|
||||
}
|
||||
StyleComponentValueRule::~StyleComponentValueRule() = default;
|
||||
ComponentValue::~ComponentValue() = default;
|
||||
|
||||
StyleDeclarationRule::StyleDeclarationRule() = default;
|
||||
StyleDeclarationRule::~StyleDeclarationRule() = default;
|
||||
|
@ -58,7 +58,7 @@ StyleFunctionRule::StyleFunctionRule(String name)
|
|||
{
|
||||
}
|
||||
|
||||
StyleFunctionRule::StyleFunctionRule(String name, Vector<StyleComponentValueRule>&& values)
|
||||
StyleFunctionRule::StyleFunctionRule(String name, Vector<ComponentValue>&& values)
|
||||
: m_name(move(name))
|
||||
, m_values(move(values))
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ String StyleBlockRule::to_string() const
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
String StyleComponentValueRule::to_string() const
|
||||
String ComponentValue::to_string() const
|
||||
{
|
||||
return m_value.visit(
|
||||
[](Token const& token) { return token.to_string(); },
|
||||
|
@ -132,7 +132,7 @@ String StyleComponentValueRule::to_string() const
|
|||
[](NonnullRefPtr<StyleFunctionRule> const& function) { return function->to_string(); });
|
||||
}
|
||||
|
||||
String StyleComponentValueRule::to_debug_string() const
|
||||
String ComponentValue::to_debug_string() const
|
||||
{
|
||||
return m_value.visit(
|
||||
[](Token const& token) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue