1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 10:44:57 +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

@ -38,7 +38,7 @@ void HTMLBaseElement::removed_from(Node* parent)
document().update_base_element({});
}
void HTMLBaseElement::parse_attribute(FlyString const& name, String const& value)
void HTMLBaseElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
{
HTMLElement::parse_attribute(name, value);
@ -75,13 +75,13 @@ void HTMLBaseElement::set_the_frozen_base_url()
}
// https://html.spec.whatwg.org/multipage/semantics.html#dom-base-href
String HTMLBaseElement::href() const
DeprecatedString HTMLBaseElement::href() const
{
// 1. Let document be element's node document.
auto& document = this->document();
// 2. Let url be the value of the href attribute of this element, if it has one, and the empty string otherwise.
auto url = String::empty();
auto url = DeprecatedString::empty();
if (has_attribute(AttributeNames::href))
url = attribute(AttributeNames::href);
@ -98,7 +98,7 @@ String HTMLBaseElement::href() const
}
// https://html.spec.whatwg.org/multipage/semantics.html#dom-base-href
void HTMLBaseElement::set_href(String const& href)
void HTMLBaseElement::set_href(DeprecatedString const& href)
{
// The href IDL attribute, on setting, must set the href content attribute to the given new value.
MUST(set_attribute(AttributeNames::href, href));