1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

AK+Everywhere: Rename String to DeprecatedString

We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -7,10 +7,10 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/FlyString.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Vector.h>
namespace Web::CSS {
@ -50,11 +50,11 @@ public:
int offset = { 0 }; // "B"
// https://www.w3.org/TR/css-syntax-3/#serializing-anb
String serialize() const
DeprecatedString serialize() const
{
// 1. If A is zero, return the serialization of B.
if (step_size == 0) {
return String::formatted("{}", offset);
return DeprecatedString::formatted("{}", offset);
}
// 2. Otherwise, let result initially be an empty string.
@ -141,7 +141,7 @@ public:
};
MatchType match_type;
FlyString name {};
String value {};
DeprecatedString value {};
CaseType case_type;
};
@ -171,7 +171,7 @@ public:
FlyString const& lowercase_name() const { return value.get<Name>().lowercase_name; }
FlyString& lowercase_name() { return value.get<Name>().lowercase_name; }
String serialize() const;
DeprecatedString serialize() const;
};
enum class Combinator {
@ -200,7 +200,7 @@ public:
Vector<CompoundSelector> const& compound_selectors() const { return m_compound_selectors; }
Optional<PseudoElement> pseudo_element() const { return m_pseudo_element; }
u32 specificity() const;
String serialize() const;
DeprecatedString serialize() const;
private:
explicit Selector(Vector<CompoundSelector>&&);
@ -294,7 +294,7 @@ constexpr StringView pseudo_class_name(Selector::SimpleSelector::PseudoClass::Ty
VERIFY_NOT_REACHED();
}
String serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const& selectors);
DeprecatedString serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const& selectors);
}