1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

LibWeb: Use Vector::in_reverse() in DOM::EventDispatcher

This commit is contained in:
Andreas Kling 2022-04-13 19:42:47 +02:00
parent 35fcb028e9
commit 32bff52c25
Notes: sideshowbarker 2024-07-17 11:49:59 +09:00

View file

@ -286,9 +286,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr<
if (activation_target) if (activation_target)
activation_target->legacy_pre_activation_behavior(); activation_target->legacy_pre_activation_behavior();
for (ssize_t i = event->path().size() - 1; i >= 0; --i) { for (auto& entry : event->path().in_reverse()) {
auto& entry = event->path().at(i);
if (entry.shadow_adjusted_target) if (entry.shadow_adjusted_target)
event->set_phase(Event::Phase::AtTarget); event->set_phase(Event::Phase::AtTarget);
else else