diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-13 19:42:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-13 19:52:25 +0200 |
commit | 32bff52c25af3adef64374c8817bd9f6cc57c4bf (patch) | |
tree | 4634885296978818b4f7f76ee4a3fcdb2f556b84 /Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp | |
parent | 35fcb028e950c804f8f0e5295b369ee1bc541ae3 (diff) | |
download | serenity-32bff52c25af3adef64374c8817bd9f6cc57c4bf.zip |
LibWeb: Use Vector::in_reverse() in DOM::EventDispatcher
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp index 9584813bed..bcc6fd8435 100644 --- a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp @@ -286,9 +286,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< if (activation_target) activation_target->legacy_pre_activation_behavior(); - for (ssize_t i = event->path().size() - 1; i >= 0; --i) { - auto& entry = event->path().at(i); - + for (auto& entry : event->path().in_reverse()) { if (entry.shadow_adjusted_target) event->set_phase(Event::Phase::AtTarget); else |