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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 bool hasEventListeners() const; | 132 bool hasEventListeners() const; |
133 bool hasEventListeners(const AtomicString& eventType) const; | 133 bool hasEventListeners(const AtomicString& eventType) const; |
134 bool hasCapturingEventListeners(const AtomicString& eventType); | 134 bool hasCapturingEventListeners(const AtomicString& eventType); |
135 const EventListenerVector& getEventListeners(const AtomicString& eventType); | 135 const EventListenerVector& getEventListeners(const AtomicString& eventType); |
136 Vector<AtomicString> eventTypes(); | 136 Vector<AtomicString> eventTypes(); |
137 | 137 |
138 bool fireEventListeners(Event*); | 138 bool fireEventListeners(Event*); |
139 | 139 |
140 virtual void trace(Visitor*) { } | 140 virtual void trace(Visitor*) { } |
141 | 141 |
| 142 virtual bool keepEventInNode(Event*) { return false; }; |
| 143 |
142 protected: | 144 protected: |
143 EventTarget(); | 145 EventTarget(); |
144 virtual ~EventTarget(); | 146 virtual ~EventTarget(); |
145 | 147 |
146 // Subclasses should likely not override these themselves; instead, they sho
uld subclass EventTargetWithInlineData. | 148 // Subclasses should likely not override these themselves; instead, they sho
uld subclass EventTargetWithInlineData. |
147 virtual EventTargetData* eventTargetData() = 0; | 149 virtual EventTargetData* eventTargetData() = 0; |
148 virtual EventTargetData& ensureEventTargetData() = 0; | 150 virtual EventTargetData& ensureEventTargetData() = 0; |
149 | 151 |
150 private: | 152 private: |
151 #if !ENABLE(OILPAN) | 153 #if !ENABLE(OILPAN) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro | 264 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro |
263 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_
TARGET_REFCOUNTING(baseClass) | 265 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_
TARGET_REFCOUNTING(baseClass) |
264 #endif | 266 #endif |
265 | 267 |
266 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. | 268 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. |
267 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. | 269 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. |
268 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. | 270 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. |
269 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
untedWillBeRefCountedGarbageCollected<className>) | 271 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
untedWillBeRefCountedGarbageCollected<className>) |
270 | 272 |
271 #endif // EventTarget_h | 273 #endif // EventTarget_h |
OLD | NEW |