mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibWeb: Avoid unnecessary Vector copy during find in page queries
This commit is contained in:
parent
63167cfd89
commit
7b389ca221
Notes:
github-actions[bot]
2024-11-24 19:29:06 +00:00
Author: https://github.com/tcl3
Commit: 7b389ca221
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2550
Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 1 additions and 1 deletions
|
@ -620,7 +620,7 @@ Page::FindInPageResult Page::perform_find_in_page_query(FindInPageQuery const& q
|
|||
return 0;
|
||||
};
|
||||
|
||||
for (auto document : documents_in_active_window()) {
|
||||
for (auto const& document : documents_in_active_window()) {
|
||||
auto matches = document->find_matching_text(query.string, query.case_sensitivity);
|
||||
if (document == top_level_traversable()->active_document()) {
|
||||
auto new_match_index = find_current_match_index(*document, matches);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue