summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Supports.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Supports.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Supports.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Supports.cpp b/Userland/Libraries/LibWeb/CSS/Supports.cpp
index d0ad51e382..41287f0b8c 100644
--- a/Userland/Libraries/LibWeb/CSS/Supports.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Supports.cpp
@@ -73,33 +73,34 @@ bool Supports::Feature::evaluate() const
});
}
-DeprecatedString Supports::Declaration::to_string() const
+DeprecatedString Supports::Declaration::to_deprecated_string() const
{
return DeprecatedString::formatted("({})", declaration);
}
-DeprecatedString Supports::Selector::to_string() const
+DeprecatedString Supports::Selector::to_deprecated_string() const
{
return DeprecatedString::formatted("selector({})", selector);
}
-DeprecatedString Supports::Feature::to_string() const
+DeprecatedString Supports::Feature::to_deprecated_string() const
{
- return value.visit([](auto& it) { return it.to_string(); });
+ return value.visit([](auto& it) { return it.to_deprecated_string(); });
}
-DeprecatedString Supports::InParens::to_string() const
+DeprecatedString Supports::InParens::to_deprecated_string() const
{
return value.visit(
- [](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_string()); },
- [](auto& it) -> DeprecatedString { return it.to_string(); });
+ [](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_deprecated_string()); },
+ [](Supports::Feature const& it) -> DeprecatedString { return it.to_deprecated_string(); },
+ [](GeneralEnclosed const& it) -> DeprecatedString { return it.to_string(); });
}
-DeprecatedString Supports::Condition::to_string() const
+DeprecatedString Supports::Condition::to_deprecated_string() const
{
switch (type) {
case Type::Not:
- return DeprecatedString::formatted("not {}", children.first().to_string());
+ return DeprecatedString::formatted("not {}", children.first().to_deprecated_string());
case Type::And:
return DeprecatedString::join(" and "sv, children);
case Type::Or:
@@ -108,9 +109,9 @@ DeprecatedString Supports::Condition::to_string() const
VERIFY_NOT_REACHED();
}
-DeprecatedString Supports::to_string() const
+DeprecatedString Supports::to_deprecated_string() const
{
- return m_condition->to_string();
+ return m_condition->to_deprecated_string();
}
}