| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // - Inherit from EventTargetWithInlineData (only in rare cases should you | 90 // - Inherit from EventTargetWithInlineData (only in rare cases should you |
| 91 // use EventTarget directly). | 91 // use EventTarget directly). |
| 92 // - In your class declaration, EventTargetWithInlineData must come first in | 92 // - In your class declaration, EventTargetWithInlineData must come first in |
| 93 // the base class list. If your class is non-final, classes inheriting from | 93 // the base class list. If your class is non-final, classes inheriting from |
| 94 // your class need to come first, too. | 94 // your class need to come first, too. |
| 95 // - If you added an onfoo attribute, use DEFINE_ATTRIBUTE_EVENT_LISTENER(foo) | 95 // - If you added an onfoo attribute, use DEFINE_ATTRIBUTE_EVENT_LISTENER(foo) |
| 96 // in your class declaration. Add "attribute EventHandler onfoo;" to the IDL | 96 // in your class declaration. Add "attribute EventHandler onfoo;" to the IDL |
| 97 // file. | 97 // file. |
| 98 // - Override EventTarget::interfaceName() and getExecutionContext(). The former | 98 // - Override EventTarget::interfaceName() and getExecutionContext(). The former |
| 99 // will typically return EventTargetNames::YourClassName. The latter will | 99 // will typically return EventTargetNames::YourClassName. The latter will |
| 100 // return ActiveDOMObject::executionContext (if you are an ActiveDOMObject) | 100 // return SuspendableObject::executionContext (if you are an |
| 101 // SuspendableObject) |
| 101 // or the document you're in. | 102 // or the document you're in. |
| 102 // - Your trace() method will need to call EventTargetWithInlineData::trace | 103 // - Your trace() method will need to call EventTargetWithInlineData::trace |
| 103 // depending on the base class of your class. | 104 // depending on the base class of your class. |
| 104 // - EventTargets do not support EAGERLY_FINALIZE. You need to use | 105 // - EventTargets do not support EAGERLY_FINALIZE. You need to use |
| 105 // a pre-finalizer instead. | 106 // a pre-finalizer instead. |
| 106 class CORE_EXPORT EventTarget : public GarbageCollectedFinalized<EventTarget>, | 107 class CORE_EXPORT EventTarget : public GarbageCollectedFinalized<EventTarget>, |
| 107 public ScriptWrappable { | 108 public ScriptWrappable { |
| 108 DEFINE_WRAPPERTYPEINFO(); | 109 DEFINE_WRAPPERTYPEINFO(); |
| 109 | 110 |
| 110 public: | 111 public: |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 const AtomicString& eventType) { | 319 const AtomicString& eventType) { |
| 319 EventTargetData* d = eventTargetData(); | 320 EventTargetData* d = eventTargetData(); |
| 320 if (!d) | 321 if (!d) |
| 321 return false; | 322 return false; |
| 322 return d->eventListenerMap.containsCapturing(eventType); | 323 return d->eventListenerMap.containsCapturing(eventType); |
| 323 } | 324 } |
| 324 | 325 |
| 325 } // namespace blink | 326 } // namespace blink |
| 326 | 327 |
| 327 #endif // EventTarget_h | 328 #endif // EventTarget_h |
| OLD | NEW |