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 | 132 |
133 private: | 133 private: |
134 #if !ENABLE(OILPAN) | 134 #if !ENABLE(OILPAN) |
135 // Subclasses should likely not override these themselves; instead, they sho
uld use the REFCOUNTED_EVENT_TARGET() macro. | 135 // Subclasses should likely not override these themselves; instead, they sho
uld use the REFCOUNTED_EVENT_TARGET() macro. |
136 virtual void refEventTarget() = 0; | 136 virtual void refEventTarget() = 0; |
137 virtual void derefEventTarget() = 0; | 137 virtual void derefEventTarget() = 0; |
138 #endif | 138 #endif |
139 | 139 |
140 LocalDOMWindow* executingWindow(); | 140 LocalDOMWindow* executingWindow(); |
141 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&); | 141 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&); |
142 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect
or*, EventListenerVector*); | |
143 | 142 |
144 friend class EventListenerIterator; | 143 friend class EventListenerIterator; |
145 }; | 144 }; |
146 | 145 |
147 class EventTargetWithInlineData : public EventTarget { | 146 class EventTargetWithInlineData : public EventTarget { |
148 protected: | 147 protected: |
149 virtual EventTargetData* eventTargetData() override final { return &m_eventT
argetData; } | 148 virtual EventTargetData* eventTargetData() override final { return &m_eventT
argetData; } |
150 virtual EventTargetData& ensureEventTargetData() override final { return m_e
ventTargetData; } | 149 virtual EventTargetData& ensureEventTargetData() override final { return m_e
ventTargetData; } |
151 private: | 150 private: |
152 EventTargetData m_eventTargetData; | 151 EventTargetData m_eventTargetData; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro | 196 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro |
198 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_
TARGET_REFCOUNTING(baseClass) | 197 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_
TARGET_REFCOUNTING(baseClass) |
199 #endif | 198 #endif |
200 | 199 |
201 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. | 200 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. |
202 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. | 201 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. |
203 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. | 202 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. |
204 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_
BE_REMOVED(RefCounted<className>) | 203 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_
BE_REMOVED(RefCounted<className>) |
205 | 204 |
206 #endif // SKY_ENGINE_CORE_EVENTS_EVENTTARGET_H_ | 205 #endif // SKY_ENGINE_CORE_EVENTS_EVENTTARGET_H_ |
OLD | NEW |