mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:07:45 +00:00
LibWeb: Avoid copies while computing ARIA name/description
This also makes the cycle-detection work as intended.
This commit is contained in:
parent
a9b3aaa887
commit
85f822381f
1 changed files with 1 additions and 1 deletions
|
@ -1762,7 +1762,7 @@ ErrorOr<String> Node::name_or_description(NameOrDescription target, Document con
|
||||||
TRY(Node::append_without_space(total_accumulated_text, after->computed_values().content().data));
|
TRY(Node::append_without_space(total_accumulated_text, after->computed_values().content().data));
|
||||||
|
|
||||||
// iii. For each child node of the current node:
|
// 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 {
|
DOM::Node const& child_node) mutable {
|
||||||
if (visited_nodes.contains(child_node.id()))
|
if (visited_nodes.contains(child_node.id()))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue