#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/dom/events/event_listener_map.h"
#include "base/bits.h"
#include "base/debug/crash_logging.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_options.h"
#include "third_party/blink/renderer/core/dom/events/add_event_listener_options_resolved.h"
#include "third_party/blink/renderer/core/dom/events/event_listener.h"
#include "third_party/blink/renderer/core/dom/events/event_target.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#if DCHECK_IS_ON()
#include "base/synchronization/lock.h"
#include "third_party/blink/renderer/platform/wtf/threading.h"
#endif
namespace blink {
EventListenerMap::EventListenerMap() = default;
bool EventListenerMap::Contains(const AtomicString& event_type) const { … }
bool EventListenerMap::ContainsCapturing(const AtomicString& event_type) const { … }
bool EventListenerMap::ContainsJSBasedEventListeners(
const AtomicString& event_type) const { … }
void EventListenerMap::Clear() { … }
Vector<AtomicString> EventListenerMap::EventTypes() const { … }
static bool AddListenerToVector(EventListenerVector* listener_vector,
EventListener* listener,
const AddEventListenerOptionsResolved* options,
RegisteredEventListener** registered_listener) { … }
bool EventListenerMap::Add(const AtomicString& event_type,
EventListener* listener,
const AddEventListenerOptionsResolved* options,
RegisteredEventListener** registered_listener) { … }
static bool RemoveListenerFromVector(
EventListenerVector* listener_vector,
const EventListener* listener,
const EventListenerOptions* options,
RegisteredEventListener** registered_listener) { … }
bool EventListenerMap::Remove(const AtomicString& event_type,
const EventListener* listener,
const EventListenerOptions* options,
RegisteredEventListener** registered_listener) { … }
EventListenerVector* EventListenerMap::Find(const AtomicString& event_type) { … }
static void CopyListenersNotCreatedFromMarkupToTarget(
const AtomicString& event_type,
EventListenerVector* listener_vector,
EventTarget* target) { … }
void EventListenerMap::CopyEventListenersNotCreatedFromMarkupToTarget(
EventTarget* target) { … }
void EventListenerMap::Trace(Visitor* visitor) const { … }
}