mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:55:06 +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:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -35,7 +35,7 @@ bool prescan_skip_whitespace_and_slashes(ByteBuffer const& input, size_t& positi
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#algorithm-for-extracting-a-character-encoding-from-a-meta-element
|
||||
Optional<StringView> extract_character_encoding_from_meta_element(String const& string)
|
||||
Optional<StringView> extract_character_encoding_from_meta_element(DeprecatedString const& string)
|
||||
{
|
||||
// Checking for "charset" is case insensitive, as is getting an encoding.
|
||||
// Therefore, stick to lowercase from the start for simplicity.
|
||||
|
@ -158,7 +158,7 @@ value:
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding
|
||||
Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, ByteBuffer const& input)
|
||||
Optional<DeprecatedString> run_prescan_byte_stream_algorithm(DOM::Document& document, ByteBuffer const& input)
|
||||
{
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding
|
||||
|
||||
|
@ -188,10 +188,10 @@ Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, Byte
|
|||
&& (input[position + 4] == 'A' || input[position + 4] == 'a')
|
||||
&& prescan_is_whitespace_or_slash(input[position + 5])) {
|
||||
position += 6;
|
||||
Vector<String> attribute_list {};
|
||||
Vector<DeprecatedString> attribute_list {};
|
||||
bool got_pragma = false;
|
||||
Optional<bool> need_pragma {};
|
||||
Optional<String> charset {};
|
||||
Optional<DeprecatedString> charset {};
|
||||
|
||||
while (true) {
|
||||
auto attribute = prescan_get_attribute(document, input, position);
|
||||
|
@ -213,7 +213,7 @@ Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, Byte
|
|||
} else if (attribute_name == "charset") {
|
||||
auto maybe_charset = TextCodec::get_standardized_encoding(attribute->value());
|
||||
if (maybe_charset.has_value()) {
|
||||
charset = Optional<String> { maybe_charset };
|
||||
charset = Optional<DeprecatedString> { maybe_charset };
|
||||
need_pragma = { false };
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ Optional<String> run_prescan_byte_stream_algorithm(DOM::Document& document, Byte
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding
|
||||
String run_encoding_sniffing_algorithm(DOM::Document& document, ByteBuffer const& input)
|
||||
DeprecatedString run_encoding_sniffing_algorithm(DOM::Document& document, ByteBuffer const& input)
|
||||
{
|
||||
if (input.size() >= 2) {
|
||||
if (input[0] == 0xFE && input[1] == 0xFF) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue