| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 bool EventTarget::clearAttributeEventListener(const AtomicString& eventType) | 242 bool EventTarget::clearAttributeEventListener(const AtomicString& eventType) |
| 243 { | 243 { |
| 244 EventListener* listener = getAttributeEventListener(eventType); | 244 EventListener* listener = getAttributeEventListener(eventType); |
| 245 if (!listener) | 245 if (!listener) |
| 246 return false; | 246 return false; |
| 247 return removeEventListener(eventType, listener, false); | 247 return removeEventListener(eventType, listener, false); |
| 248 } | 248 } |
| 249 | 249 |
| 250 bool EventTarget::dispatchEventForBindings(PassRefPtrWillBeRawPtr<Event> event,
ExceptionState& exceptionState) | 250 bool EventTarget::dispatchEventForBindings(PassRefPtrWillBeRawPtr<Event> event,
ExceptionState& exceptionState) |
| 251 { | 251 { |
| 252 if (!event) { | |
| 253 exceptionState.throwDOMException(InvalidStateError, "The event provided
is null."); | |
| 254 return false; | |
| 255 } | |
| 256 if (event->type().isEmpty()) { | 252 if (event->type().isEmpty()) { |
| 257 exceptionState.throwDOMException(InvalidStateError, "The event provided
is uninitialized."); | 253 exceptionState.throwDOMException(InvalidStateError, "The event provided
is uninitialized."); |
| 258 return false; | 254 return false; |
| 259 } | 255 } |
| 260 if (event->isBeingDispatched()) { | 256 if (event->isBeingDispatched()) { |
| 261 exceptionState.throwDOMException(InvalidStateError, "The event is alread
y being dispatched."); | 257 exceptionState.throwDOMException(InvalidStateError, "The event is alread
y being dispatched."); |
| 262 return false; | 258 return false; |
| 263 } | 259 } |
| 264 | 260 |
| 265 if (!executionContext()) | 261 if (!executionContext()) |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 // they have one less listener to invoke. | 466 // they have one less listener to invoke. |
| 471 if (d->firingEventIterators) { | 467 if (d->firingEventIterators) { |
| 472 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 468 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
| 473 d->firingEventIterators->at(i).iterator = 0; | 469 d->firingEventIterators->at(i).iterator = 0; |
| 474 d->firingEventIterators->at(i).end = 0; | 470 d->firingEventIterators->at(i).end = 0; |
| 475 } | 471 } |
| 476 } | 472 } |
| 477 } | 473 } |
| 478 | 474 |
| 479 } // namespace blink | 475 } // namespace blink |
| OLD | NEW |