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

LibWeb: Port DOM::Node from DeprecatedString

This commit is contained in:
Shannon Booth 2023-12-03 08:24:04 +13:00 committed by Andreas Kling
parent 89bbf53745
commit a8f5ebeddd
8 changed files with 26 additions and 27 deletions

View file

@ -114,7 +114,7 @@ String HTMLAnchorElement::text() const
void HTMLAnchorElement::set_text(String const& text)
{
// The text attribute's setter must string replace all with the given value within this element.
string_replace_all(text.to_deprecated_string());
string_replace_all(text);
}
// https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-referrerpolicy

View file

@ -106,7 +106,7 @@ String HTMLOptionElement::text() const
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-option-text
void HTMLOptionElement::set_text(String const& text)
{
string_replace_all(text.to_deprecated_string());
string_replace_all(text);
}
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-index

View file

@ -429,7 +429,7 @@ void HTMLScriptElement::prepare_script()
// 2. Fetch an inline module script graph, given source text, base URL, settings object, options, and with the following steps given result:
// FIXME: Pass options
fetch_inline_module_script_graph(realm(), m_document->url().to_deprecated_string(), source_text, base_url, document().relevant_settings_object(), steps);
fetch_inline_module_script_graph(realm(), m_document->url().to_deprecated_string(), source_text.to_deprecated_string(), base_url, document().relevant_settings_object(), steps);
}
// -> "importmap"
else if (m_script_type == ScriptType::ImportMap) {

View file

@ -38,14 +38,14 @@ void HTMLTitleElement::children_changed()
DeprecatedString HTMLTitleElement::text()
{
// The text attribute's getter must return this title element's child text content.
return child_text_content();
return child_text_content().to_deprecated_string();
}
// https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
void HTMLTitleElement::set_text(String const& value)
{
// The text attribute's setter must string replace all with the given value within this title element.
string_replace_all(value.to_deprecated_string());
string_replace_all(value);
}
}