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, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 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 * | 8 * |
9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 EventListener*, | 175 EventListener*, |
176 const AddEventListenerOptionsResolved&); | 176 const AddEventListenerOptionsResolved&); |
177 virtual bool removeEventListenerInternal(const AtomicString& eventType, | 177 virtual bool removeEventListenerInternal(const AtomicString& eventType, |
178 const EventListener*, | 178 const EventListener*, |
179 const EventListenerOptions&); | 179 const EventListenerOptions&); |
180 | 180 |
181 // Called when an event listener has been successfully added. | 181 // Called when an event listener has been successfully added. |
182 virtual void addedEventListener(const AtomicString& eventType, | 182 virtual void addedEventListener(const AtomicString& eventType, |
183 RegisteredEventListener&); | 183 RegisteredEventListener&); |
184 | 184 |
185 // Called when an event listener is removed. The original registration paramet
ers of this | 185 // Called when an event listener is removed. The original registration |
186 // event listener are available to be queried. | 186 // parameters of this event listener are available to be queried. |
187 virtual void removedEventListener(const AtomicString& eventType, | 187 virtual void removedEventListener(const AtomicString& eventType, |
188 const RegisteredEventListener&); | 188 const RegisteredEventListener&); |
189 | 189 |
190 virtual DispatchEventResult dispatchEventInternal(Event*); | 190 virtual DispatchEventResult dispatchEventInternal(Event*); |
191 | 191 |
192 // Subclasses should likely not override these themselves; instead, they shoul
d subclass EventTargetWithInlineData. | 192 // Subclasses should likely not override these themselves; instead, they |
| 193 // should subclass EventTargetWithInlineData. |
193 virtual EventTargetData* eventTargetData() = 0; | 194 virtual EventTargetData* eventTargetData() = 0; |
194 virtual EventTargetData& ensureEventTargetData() = 0; | 195 virtual EventTargetData& ensureEventTargetData() = 0; |
195 | 196 |
196 private: | 197 private: |
197 LocalDOMWindow* executingWindow(); | 198 LocalDOMWindow* executingWindow(); |
198 void setDefaultAddEventListenerOptions(const AtomicString& eventType, | 199 void setDefaultAddEventListenerOptions(const AtomicString& eventType, |
199 AddEventListenerOptionsResolved&); | 200 AddEventListenerOptionsResolved&); |
200 | 201 |
201 // UseCounts the event if it has the specified type. Returns true iff the even
t type matches. | 202 // UseCounts the event if it has the specified type. Returns true iff the |
| 203 // event type matches. |
202 bool checkTypeThenUseCount(const Event*, | 204 bool checkTypeThenUseCount(const Event*, |
203 const AtomicString&, | 205 const AtomicString&, |
204 const UseCounter::Feature); | 206 const UseCounter::Feature); |
205 | 207 |
206 bool fireEventListeners(Event*, EventTargetData*, EventListenerVector&); | 208 bool fireEventListeners(Event*, EventTargetData*, EventListenerVector&); |
207 void countLegacyEvents(const AtomicString& legacyTypeName, | 209 void countLegacyEvents(const AtomicString& legacyTypeName, |
208 EventListenerVector*, | 210 EventListenerVector*, |
209 EventListenerVector*); | 211 EventListenerVector*); |
210 | 212 |
211 bool clearAttributeEventListener(const AtomicString& eventType); | 213 bool clearAttributeEventListener(const AtomicString& eventType); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 const AtomicString& eventType) { | 318 const AtomicString& eventType) { |
317 EventTargetData* d = eventTargetData(); | 319 EventTargetData* d = eventTargetData(); |
318 if (!d) | 320 if (!d) |
319 return false; | 321 return false; |
320 return d->eventListenerMap.containsCapturing(eventType); | 322 return d->eventListenerMap.containsCapturing(eventType); |
321 } | 323 } |
322 | 324 |
323 } // namespace blink | 325 } // namespace blink |
324 | 326 |
325 #endif // EventTarget_h | 327 #endif // EventTarget_h |
OLD | NEW |