mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibWeb: Return child navigable target name set with FlyString keys
Saves us some unnecessary conversion since we already have FlyStrings in the first place.
This commit is contained in:
parent
ff63b2603d
commit
de993be02f
2 changed files with 4 additions and 4 deletions
|
@ -1506,7 +1506,7 @@ JS::NonnullGCPtr<CustomElementRegistry> Window::custom_elements()
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/#document-tree-child-navigable-target-name-property-set
|
// https://html.spec.whatwg.org/#document-tree-child-navigable-target-name-property-set
|
||||||
OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> Window::document_tree_child_navigable_target_name_property_set()
|
OrderedHashMap<FlyString, JS::NonnullGCPtr<Navigable>> 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:
|
// 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<String, JS::NonnullGCPtr<Navigable>> Window::document_tree_child_
|
||||||
auto children = associated_document().document_tree_child_navigables();
|
auto children = associated_document().document_tree_child_navigables();
|
||||||
|
|
||||||
// 2. Let firstNamedChildren be an empty ordered set.
|
// 2. Let firstNamedChildren be an empty ordered set.
|
||||||
OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> first_named_children;
|
OrderedHashMap<FlyString, JS::NonnullGCPtr<Navigable>> first_named_children;
|
||||||
|
|
||||||
// 3. For each navigable of children:
|
// 3. For each navigable of children:
|
||||||
for (auto const& navigable : children) {
|
for (auto const& navigable : children) {
|
||||||
|
@ -1534,7 +1534,7 @@ OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> Window::document_tree_child_
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Let names be an empty ordered set.
|
// 4. Let names be an empty ordered set.
|
||||||
OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> names;
|
OrderedHashMap<FlyString, JS::NonnullGCPtr<Navigable>> names;
|
||||||
|
|
||||||
// 5. For each navigable of firstNamedChildren:
|
// 5. For each navigable of firstNamedChildren:
|
||||||
for (auto const& [name, navigable] : first_named_children) {
|
for (auto const& [name, navigable] : first_named_children) {
|
||||||
|
|
|
@ -201,7 +201,7 @@ public:
|
||||||
static void set_inspector_object_exposed(bool);
|
static void set_inspector_object_exposed(bool);
|
||||||
static void set_internals_object_exposed(bool);
|
static void set_internals_object_exposed(bool);
|
||||||
|
|
||||||
[[nodiscard]] OrderedHashMap<String, JS::NonnullGCPtr<Navigable>> document_tree_child_navigable_target_name_property_set();
|
[[nodiscard]] OrderedHashMap<FlyString, JS::NonnullGCPtr<Navigable>> document_tree_child_navigable_target_name_property_set();
|
||||||
|
|
||||||
[[nodiscard]] Vector<FlyString> supported_property_names();
|
[[nodiscard]] Vector<FlyString> supported_property_names();
|
||||||
[[nodiscard]] WebIDL::ExceptionOr<JS::Value> named_item_value(FlyString const&);
|
[[nodiscard]] WebIDL::ExceptionOr<JS::Value> named_item_value(FlyString const&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue