| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 * | 29 * |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "config.h" | 32 #include "config.h" |
| 33 #include "core/events/EventTarget.h" | 33 #include "core/events/EventTarget.h" |
| 34 | 34 |
| 35 #include "bindings/core/v8/ExceptionState.h" | 35 #include "bindings/core/v8/ExceptionState.h" |
| 36 #include "bindings/core/v8/V8DOMActivityLogger.h" | 36 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
| 38 #include "core/dom/NoEventDispatchAssertion.h" | |
| 39 #include "core/editing/Editor.h" | 38 #include "core/editing/Editor.h" |
| 40 #include "core/events/Event.h" | 39 #include "core/events/Event.h" |
| 41 #include "core/inspector/InspectorInstrumentation.h" | 40 #include "core/inspector/InspectorInstrumentation.h" |
| 42 #include "core/frame/LocalDOMWindow.h" | 41 #include "core/frame/LocalDOMWindow.h" |
| 43 #include "core/frame/UseCounter.h" | 42 #include "core/frame/UseCounter.h" |
| 43 #include "platform/EventDispatchForbiddenScope.h" |
| 44 #include "platform/RuntimeEnabledFeatures.h" | 44 #include "platform/RuntimeEnabledFeatures.h" |
| 45 #include "wtf/StdLibExtras.h" | 45 #include "wtf/StdLibExtras.h" |
| 46 #include "wtf/Vector.h" | 46 #include "wtf/Vector.h" |
| 47 | 47 |
| 48 using namespace WTF; | 48 using namespace WTF; |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| 51 | 51 |
| 52 EventTargetData::EventTargetData() | 52 EventTargetData::EventTargetData() |
| 53 { | 53 { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 else | 251 else |
| 252 UseCounter::count(executingWindow->document(), prefixedFeature); | 252 UseCounter::count(executingWindow->document(), prefixedFeature); |
| 253 } else if (listenersVector) { | 253 } else if (listenersVector) { |
| 254 UseCounter::count(executingWindow->document(), unprefixedFeature); | 254 UseCounter::count(executingWindow->document(), unprefixedFeature); |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 bool EventTarget::fireEventListeners(Event* event) | 259 bool EventTarget::fireEventListeners(Event* event) |
| 260 { | 260 { |
| 261 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); | 261 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
| 262 ASSERT(event && !event->type().isEmpty()); | 262 ASSERT(event && !event->type().isEmpty()); |
| 263 | 263 |
| 264 EventTargetData* d = eventTargetData(); | 264 EventTargetData* d = eventTargetData(); |
| 265 if (!d) | 265 if (!d) |
| 266 return true; | 266 return true; |
| 267 | 267 |
| 268 EventListenerVector* legacyListenersVector = 0; | 268 EventListenerVector* legacyListenersVector = 0; |
| 269 AtomicString legacyTypeName = legacyType(event); | 269 AtomicString legacyTypeName = legacyType(event); |
| 270 if (!legacyTypeName.isEmpty()) | 270 if (!legacyTypeName.isEmpty()) |
| 271 legacyListenersVector = d->eventListenerMap.find(legacyTypeName); | 271 legacyListenersVector = d->eventListenerMap.find(legacyTypeName); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // they have one less listener to invoke. | 382 // they have one less listener to invoke. |
| 383 if (d->firingEventIterators) { | 383 if (d->firingEventIterators) { |
| 384 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 384 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
| 385 d->firingEventIterators->at(i).iterator = 0; | 385 d->firingEventIterators->at(i).iterator = 0; |
| 386 d->firingEventIterators->at(i).end = 0; | 386 d->firingEventIterators->at(i).end = 0; |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace blink | 391 } // namespace blink |
| OLD | NEW |