mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 15:55:07 +00:00
LibWeb: Use reverse iterator for reverse loop into NonnullRefPtrVector
This commit is contained in:
parent
0aed2f0f86
commit
43d5257619
1 changed files with 2 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "AK/ReverseIterator.h"
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <LibJS/Interpreter.h>
|
#include <LibJS/Interpreter.h>
|
||||||
#include <LibJS/Parser.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;
|
(void)new_focus_target;
|
||||||
|
|
||||||
// 4. For each entry entry in new chain, in reverse order, run these substeps:
|
// 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) {
|
for (auto& entry : new_chain.in_reverse()) {
|
||||||
auto& entry = new_chain[i];
|
|
||||||
|
|
||||||
// 1. If entry is a focusable area: designate entry as the focused area of the document.
|
// 1. If entry is a focusable area: designate entry as the focused area of the document.
|
||||||
// FIXME: This isn't entirely right.
|
// FIXME: This isn't entirely right.
|
||||||
if (is<DOM::Element>(entry))
|
if (is<DOM::Element>(entry))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue