1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

LibWeb: Make Web::Namespace::Foo strings be FlyString

This required dealing with a *lot* of fallout, but it's all basically
just switching from DeprecatedFlyString to either FlyString or
Optional<FlyString> in a hundred places to accommodate the change.
This commit is contained in:
Andreas Kling 2023-11-04 18:42:04 +01:00
parent 6b20a109c6
commit 3ff81dcb65
31 changed files with 184 additions and 185 deletions

View file

@ -47,7 +47,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> OptionConstructor::construct
auto& document = window.associated_document();
// 2. Let option be the result of creating an element given document, option, and the HTML namespace.
auto element = TRY(Bindings::throw_dom_exception_if_needed(vm, [&]() { return DOM::create_element(document, HTML::TagNames::option, MUST(FlyString::from_deprecated_fly_string(Namespace::HTML))); }));
auto element = TRY(Bindings::throw_dom_exception_if_needed(vm, [&]() { return DOM::create_element(document, HTML::TagNames::option, Namespace::HTML); }));
JS::NonnullGCPtr<HTML::HTMLOptionElement> option_element = verify_cast<HTML::HTMLOptionElement>(*element);
// 3. If text is not the empty string, then append to option a new Text node whose data is text.