From de993be02f9efcffbf6e26141256d7a688e5d776 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 24 Dec 2023 21:11:09 +0100 Subject: [PATCH] LibWeb: Return child navigable target name set with FlyString keys Saves us some unnecessary conversion since we already have FlyStrings in the first place. --- Userland/Libraries/LibWeb/HTML/Window.cpp | 6 +++--- Userland/Libraries/LibWeb/HTML/Window.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/Window.cpp b/Userland/Libraries/LibWeb/HTML/Window.cpp index b3285e3679..663f831be0 100644 --- a/Userland/Libraries/LibWeb/HTML/Window.cpp +++ b/Userland/Libraries/LibWeb/HTML/Window.cpp @@ -1506,7 +1506,7 @@ JS::NonnullGCPtr Window::custom_elements() } // https://html.spec.whatwg.org/#document-tree-child-navigable-target-name-property-set -OrderedHashMap> Window::document_tree_child_navigable_target_name_property_set() +OrderedHashMap> Window::document_tree_child_navigable_target_name_property_set() { // The document-tree child navigable target name property set of a Window object window is the return value of running these steps: @@ -1514,7 +1514,7 @@ OrderedHashMap> Window::document_tree_child_ auto children = associated_document().document_tree_child_navigables(); // 2. Let firstNamedChildren be an empty ordered set. - OrderedHashMap> first_named_children; + OrderedHashMap> first_named_children; // 3. For each navigable of children: for (auto const& navigable : children) { @@ -1534,7 +1534,7 @@ OrderedHashMap> Window::document_tree_child_ } // 4. Let names be an empty ordered set. - OrderedHashMap> names; + OrderedHashMap> names; // 5. For each navigable of firstNamedChildren: for (auto const& [name, navigable] : first_named_children) { diff --git a/Userland/Libraries/LibWeb/HTML/Window.h b/Userland/Libraries/LibWeb/HTML/Window.h index 575e07ef26..a8c0768ab4 100644 --- a/Userland/Libraries/LibWeb/HTML/Window.h +++ b/Userland/Libraries/LibWeb/HTML/Window.h @@ -201,7 +201,7 @@ public: static void set_inspector_object_exposed(bool); static void set_internals_object_exposed(bool); - [[nodiscard]] OrderedHashMap> document_tree_child_navigable_target_name_property_set(); + [[nodiscard]] OrderedHashMap> document_tree_child_navigable_target_name_property_set(); [[nodiscard]] Vector supported_property_names(); [[nodiscard]] WebIDL::ExceptionOr named_item_value(FlyString const&);