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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void deref() { derefEventTarget(); } | 115 void deref() { derefEventTarget(); } |
116 #endif | 116 #endif |
117 | 117 |
118 virtual const AtomicString& interfaceName() const = 0; | 118 virtual const AtomicString& interfaceName() const = 0; |
119 virtual ExecutionContext* executionContext() const = 0; | 119 virtual ExecutionContext* executionContext() const = 0; |
120 | 120 |
121 virtual Node* toNode(); | 121 virtual Node* toNode(); |
122 virtual LocalDOMWindow* toDOMWindow(); | 122 virtual LocalDOMWindow* toDOMWindow(); |
123 virtual MessagePort* toMessagePort(); | 123 virtual MessagePort* toMessagePort(); |
124 | 124 |
125 // FIXME: first 2 args to addEventListener and removeEventListener should | 125 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture); |
126 // be required (per spec), but throwing TypeError breaks legacy content. | 126 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E
ventListener>, bool useCapture); |
127 // http://crbug.com/353484 | |
128 bool addEventListener(); | |
129 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false); | |
130 bool removeEventListener(); | |
131 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E
ventListener>, bool useCapture = false); | |
132 virtual void removeAllEventListeners(); | 127 virtual void removeAllEventListeners(); |
133 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 128 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
134 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>, ExceptionState&); // DOM A
PI | 129 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>, ExceptionState&); // DOM A
PI |
135 virtual void uncaughtExceptionInEventHandler(); | 130 virtual void uncaughtExceptionInEventHandler(); |
136 | 131 |
137 // Used for legacy "onEvent" attribute APIs. | 132 // Used for legacy "onEvent" attribute APIs. |
138 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>); | 133 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>); |
139 EventListener* getAttributeEventListener(const AtomicString& eventType); | 134 EventListener* getAttributeEventListener(const AtomicString& eventType); |
140 | 135 |
141 bool hasEventListeners() const; | 136 bool hasEventListeners() const; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 using baseClass::deref; \ | 293 using baseClass::deref; \ |
299 private: \ | 294 private: \ |
300 virtual void refEventTarget() override final { ref(); } \ | 295 virtual void refEventTarget() override final { ref(); } \ |
301 virtual void derefEventTarget() override final { deref(); } \ | 296 virtual void derefEventTarget() override final { deref(); } \ |
302 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro | 297 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro |
303 #define REFCOUNTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
unted<baseClass>) | 298 #define REFCOUNTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
unted<baseClass>) |
304 #define REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET
_REFCOUNTING(RefCountedGarbageCollected<baseClass>) | 299 #define REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET
_REFCOUNTING(RefCountedGarbageCollected<baseClass>) |
305 #endif // ENABLE(OILPAN) | 300 #endif // ENABLE(OILPAN) |
306 | 301 |
307 #endif // EventTarget_h | 302 #endif // EventTarget_h |
OLD | NEW |