LibWeb: Use reverse iterator for reverse loop into NonnullRefPtrVector
This commit is contained in:
parent
0aed2f0f86
commit
43d5257619
Notes:
sideshowbarker
2024-07-17 17:39:35 +09:00
Author: https://github.com/guerinoni Commit: https://github.com/SerenityOS/serenity/commit/43d5257619 Pull-request: https://github.com/SerenityOS/serenity/pull/12741 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "AK/ReverseIterator.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Parser.h>
|
||||
|
@ -242,9 +243,7 @@ static void run_focus_update_steps(NonnullRefPtrVector<DOM::Node> old_chain, Non
|
|||
(void)new_focus_target;
|
||||
|
||||
// 4. For each entry entry in new chain, in reverse order, run these substeps:
|
||||
for (ssize_t i = new_chain.size() - 1; i >= 0; --i) {
|
||||
auto& entry = new_chain[i];
|
||||
|
||||
for (auto& entry : new_chain.in_reverse()) {
|
||||
// 1. If entry is a focusable area: designate entry as the focused area of the document.
|
||||
// FIXME: This isn't entirely right.
|
||||
if (is<DOM::Element>(entry))
|
||||
|
|
Loading…
Add table
Reference in a new issue