diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-09-13 16:05:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-13 20:55:21 +0200 |
commit | 34439a04e8e2147c429a7eb9515cd550a7e156b9 (patch) | |
tree | 0e3cd89ca2384485cfc744a2f030224e58ec78cb /Userland/Libraries/LibWeb/DOM/Event.cpp | |
parent | e68a35611be8bd7787894cf0cc1c407bbac531bd (diff) | |
download | serenity-34439a04e8e2147c429a7eb9515cd550a7e156b9.zip |
LibWeb: Add a visit_edges for DOM/Event
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Event.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Event.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Event.cpp b/Userland/Libraries/LibWeb/DOM/Event.cpp index 9053ea5567..7527725c82 100644 --- a/Userland/Libraries/LibWeb/DOM/Event.cpp +++ b/Userland/Libraries/LibWeb/DOM/Event.cpp @@ -41,6 +41,23 @@ Event::Event(HTML::Window& window, FlyString const& type, EventInit const& event { } +void Event::visit_edges(Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_target.ptr()); + visitor.visit(m_related_target.ptr()); + visitor.visit(m_current_target.ptr()); + for (auto& it : m_path) { + visitor.visit(it.invocation_target.ptr()); + visitor.visit(it.shadow_adjusted_target.ptr()); + visitor.visit(it.related_target.ptr()); + for (auto& itit : it.touch_target_list) + visitor.visit(itit.ptr()); + } + for (auto& it : m_touch_target_list) + visitor.visit(it.ptr()); +} + // https://dom.spec.whatwg.org/#concept-event-path-append void Event::append_to_path(EventTarget& invocation_target, JS::GCPtr<EventTarget> shadow_adjusted_target, JS::GCPtr<EventTarget> related_target, TouchTargetList& touch_targets, bool slot_in_closed_tree) { |