From 85f822381fd16f6376dba17539c50c9f5902c1ef Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Tue, 6 Jun 2023 23:38:37 +0200 Subject: [PATCH] LibWeb: Avoid copies while computing ARIA name/description This also makes the cycle-detection work as intended. --- Userland/Libraries/LibWeb/DOM/Node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp index 0fa190b776..1994d9ce75 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.cpp +++ b/Userland/Libraries/LibWeb/DOM/Node.cpp @@ -1762,7 +1762,7 @@ ErrorOr Node::name_or_description(NameOrDescription target, Document con TRY(Node::append_without_space(total_accumulated_text, after->computed_values().content().data)); // iii. For each child node of the current node: - element->for_each_child([&total_accumulated_text, current_node, target, &document, visited_nodes]( + element->for_each_child([&total_accumulated_text, current_node, target, &document, &visited_nodes]( DOM::Node const& child_node) mutable { if (visited_nodes.contains(child_node.id())) return;