| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 #define DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER(attribute) \ | 155 #define DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER(attribute) \ |
| 156 virtual EventListener* on##attribute(DOMWrapperWorld* isolatedWorld); \ | 156 virtual EventListener* on##attribute(DOMWrapperWorld* isolatedWorld); \ |
| 157 virtual void setOn##attribute(PassRefPtr<EventListener>, DOMWrapperWorld
* isolatedWorld); \ | 157 virtual void setOn##attribute(PassRefPtr<EventListener>, DOMWrapperWorld
* isolatedWorld); \ |
| 158 | 158 |
| 159 #define DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER(type, attribute) \ | 159 #define DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER(type, attribute) \ |
| 160 EventListener* type::on##attribute(DOMWrapperWorld* isolatedWorld) { ret
urn getAttributeEventListener(eventNames().attribute##Event, isolatedWorld); } \ | 160 EventListener* type::on##attribute(DOMWrapperWorld* isolatedWorld) { ret
urn getAttributeEventListener(eventNames().attribute##Event, isolatedWorld); } \ |
| 161 void type::setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapp
erWorld* isolatedWorld) { setAttributeEventListener(eventNames().attribute##Even
t, listener, isolatedWorld); } \ | 161 void type::setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapp
erWorld* isolatedWorld) { setAttributeEventListener(eventNames().attribute##Even
t, listener, isolatedWorld); } \ |
| 162 | 162 |
| 163 #define DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(attribute) \ | 163 #define DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(attribute) \ |
| 164 EventListener* on##attribute(DOMWrapperWorld* isolatedWorld) { return do
cument()->getWindowAttributeEventListener(eventNames().attribute##Event, isolate
dWorld); } \ | 164 EventListener* on##attribute(DOMWrapperWorld* isolatedWorld) { return do
cument().getWindowAttributeEventListener(eventNames().attribute##Event, isolated
World); } \ |
| 165 void setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapperWorl
d* isolatedWorld) { document()->setWindowAttributeEventListener(eventNames().att
ribute##Event, listener, isolatedWorld); } \ | 165 void setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapperWorl
d* isolatedWorld) { document().setWindowAttributeEventListener(eventNames().attr
ibute##Event, listener, isolatedWorld); } \ |
| 166 | 166 |
| 167 #define DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(attribute, eventName) \ | 167 #define DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(attribute, eventName) \ |
| 168 EventListener* on##attribute(DOMWrapperWorld* isolatedWorld) { return ge
tAttributeEventListener(eventNames().eventName##Event, isolatedWorld); } \ | 168 EventListener* on##attribute(DOMWrapperWorld* isolatedWorld) { return ge
tAttributeEventListener(eventNames().eventName##Event, isolatedWorld); } \ |
| 169 void setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapperWorl
d* isolatedWorld) { setAttributeEventListener(eventNames().eventName##Event, lis
tener, isolatedWorld); } \ | 169 void setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapperWorl
d* isolatedWorld) { setAttributeEventListener(eventNames().eventName##Event, lis
tener, isolatedWorld); } \ |
| 170 | 170 |
| 171 #define DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(recipient, attribute) \ | 171 #define DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(recipient, attribute) \ |
| 172 EventListener* on##attribute(DOMWrapperWorld* isolatedWorld); \ | 172 EventListener* on##attribute(DOMWrapperWorld* isolatedWorld); \ |
| 173 void setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapperWorl
d* isolatedWorld); | 173 void setOn##attribute(PassRefPtr<EventListener> listener, DOMWrapperWorl
d* isolatedWorld); |
| 174 | 174 |
| 175 #define DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(type, recipient, attribut
e) \ | 175 #define DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(type, recipient, attribut
e) \ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 204 { | 204 { |
| 205 EventTargetData* d = eventTargetData(); | 205 EventTargetData* d = eventTargetData(); |
| 206 if (!d) | 206 if (!d) |
| 207 return false; | 207 return false; |
| 208 return d->eventListenerMap.containsCapturing(eventType); | 208 return d->eventListenerMap.containsCapturing(eventType); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace WebCore | 211 } // namespace WebCore |
| 212 | 212 |
| 213 #endif // EventTarget_h | 213 #endif // EventTarget_h |
| OLD | NEW |