From b275b8c87a10f0a85a75fe36a60cfaa5debe74f5 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Thu, 2 Sep 2021 19:33:01 +0100 Subject: [PATCH] LibWeb: Check target's root instead of target itself in EventDispatcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was accidentally missing ".root()": "or parent is a node and target’s _root_ is a shadow-including inclusive ancestor of parent" https://dom.spec.whatwg.org/#concept-event-dispatch Step 5.9.6 --- Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp index 2ef8c6bd52..d6615c1b4a 100644 --- a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp @@ -202,7 +202,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr target, NonnullRefPtr< } if (is(parent) - || (is(parent) && verify_cast(*target).is_shadow_including_inclusive_ancestor_of(verify_cast(*parent)))) { + || (is(parent) && verify_cast(*target).root().is_shadow_including_inclusive_ancestor_of(verify_cast(*parent)))) { if (is_activation_event && event->bubbles() && !activation_target && parent->activation_behaviour) activation_target = parent;