OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2012 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2012 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
8 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) | 8 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 bool isEmpty() const { return m_entries.isEmpty(); } | 55 bool isEmpty() const { return m_entries.isEmpty(); } |
56 bool contains(const AtomicString& eventType) const; | 56 bool contains(const AtomicString& eventType) const; |
57 bool containsCapturing(const AtomicString& eventType) const; | 57 bool containsCapturing(const AtomicString& eventType) const; |
58 | 58 |
59 void clear(); | 59 void clear(); |
60 bool add(const AtomicString& eventType, EventListener*, const AddEventListen
erOptionsResolved&, RegisteredEventListener* registeredListener); | 60 bool add(const AtomicString& eventType, EventListener*, const AddEventListen
erOptionsResolved&, RegisteredEventListener* registeredListener); |
61 bool remove(const AtomicString& eventType, const EventListener*, const Event
ListenerOptions&, size_t* indexOfRemovedListener, RegisteredEventListener* regis
teredListener); | 61 bool remove(const AtomicString& eventType, const EventListener*, const Event
ListenerOptions&, size_t* indexOfRemovedListener, RegisteredEventListener* regis
teredListener); |
62 EventListenerVector* find(const AtomicString& eventType); | 62 EventListenerVector* find(const AtomicString& eventType); |
63 Vector<AtomicString> eventTypes() const; | 63 Vector<AtomicString> eventTypes() const; |
64 | 64 |
65 void copyEventListenersNotCreatedFromMarkupToTarget(EventTarget*); | |
66 | |
67 DECLARE_TRACE(); | 65 DECLARE_TRACE(); |
68 | 66 |
69 private: | 67 private: |
70 friend class EventListenerIterator; | 68 friend class EventListenerIterator; |
71 | 69 |
72 void assertNoActiveIterators(); | 70 void assertNoActiveIterators(); |
73 | 71 |
74 // We use HeapVector instead of HeapHashMap because | 72 // We use HeapVector instead of HeapHashMap because |
75 // - HeapVector is much more space efficient than HeapHashMap. | 73 // - HeapVector is much more space efficient than HeapHashMap. |
76 // - An EventTarget rarely has event listeners for many event types, and | 74 // - An EventTarget rarely has event listeners for many event types, and |
(...skipping 24 matching lines...) Expand all Loading... |
101 unsigned m_index; | 99 unsigned m_index; |
102 }; | 100 }; |
103 | 101 |
104 #if !ENABLE(ASSERT) | 102 #if !ENABLE(ASSERT) |
105 inline void EventListenerMap::assertNoActiveIterators() { } | 103 inline void EventListenerMap::assertNoActiveIterators() { } |
106 #endif | 104 #endif |
107 | 105 |
108 } // namespace blink | 106 } // namespace blink |
109 | 107 |
110 #endif // EventListenerMap_h | 108 #endif // EventListenerMap_h |
OLD | NEW |