mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibJS+LibWeb: Remove more uses of DeprecatedFlyString
This commit is contained in:
parent
46a5710238
commit
f1914893e9
Notes:
github-actions[bot]
2025-03-24 22:28:20 +00:00
Author: https://github.com/awesomekling
Commit: f1914893e9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4067
Reviewed-by: https://github.com/trflynn89
12 changed files with 10 additions and 22 deletions
|
@ -106,7 +106,7 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name,
|
|||
if (namespaces.find_if([&](auto const& namespace_and_prefix) { return namespace_and_prefix.prefix == prefix; }) != namespaces.end())
|
||||
continue;
|
||||
|
||||
namespaces.append({ MUST(FlyString::from_deprecated_fly_string(namespace_)), prefix });
|
||||
namespaces.append({ FlyString(MUST(String::from_byte_string(namespace_))), prefix });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name,
|
|||
|
||||
auto namespace_ = namespace_for_element(name);
|
||||
|
||||
auto qualified_name_or_error = DOM::validate_and_extract(m_document->realm(), namespace_, MUST(FlyString::from_deprecated_fly_string(name)));
|
||||
auto qualified_name_or_error = DOM::validate_and_extract(m_document->realm(), namespace_, FlyString(MUST(String::from_byte_string(name))));
|
||||
|
||||
if (qualified_name_or_error.is_error()) {
|
||||
m_has_error = true;
|
||||
|
@ -157,7 +157,7 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name,
|
|||
auto name = attribute.key;
|
||||
if (!name.is_one_of("xmlns:"sv, "xmlns:xmlns"sv)) {
|
||||
// The prefix xmlns is used only to declare namespace bindings and is by definition bound to the namespace name http://www.w3.org/2000/xmlns/.
|
||||
MUST(node->set_attribute_ns(Namespace::XMLNS, MUST(FlyString::from_deprecated_fly_string(name)), MUST(String::from_byte_string(attribute.value))));
|
||||
MUST(node->set_attribute_ns(Namespace::XMLNS, MUST(String::from_byte_string(name)), MUST(String::from_byte_string(attribute.value))));
|
||||
} else {
|
||||
m_has_error = true;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name,
|
|||
m_has_error = true;
|
||||
}
|
||||
}
|
||||
MUST(node->set_attribute(MUST(FlyString::from_deprecated_fly_string(attribute.key)), MUST(String::from_byte_string(attribute.value))));
|
||||
MUST(node->set_attribute(MUST(String::from_byte_string(attribute.key)), MUST(String::from_byte_string(attribute.value))));
|
||||
}
|
||||
|
||||
m_current_node = node.ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue