| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 { | 151 { |
| 152 EventListener* listener = getAttributeEventListener(eventType, isolatedWorld
); | 152 EventListener* listener = getAttributeEventListener(eventType, isolatedWorld
); |
| 153 if (!listener) | 153 if (!listener) |
| 154 return false; | 154 return false; |
| 155 return removeEventListener(eventType, listener, false); | 155 return removeEventListener(eventType, listener, false); |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool EventTarget::dispatchEvent(PassRefPtr<Event> event, ExceptionState& es) | 158 bool EventTarget::dispatchEvent(PassRefPtr<Event> event, ExceptionState& es) |
| 159 { | 159 { |
| 160 if (!event || event->type().isEmpty() || event->isBeingDispatched()) { | 160 if (!event || event->type().isEmpty() || event->isBeingDispatched()) { |
| 161 es.throwDOMException(InvalidStateError); | 161 es.throwUninformativeAndGenericDOMException(InvalidStateError); |
| 162 return false; | 162 return false; |
| 163 } | 163 } |
| 164 | 164 |
| 165 if (!scriptExecutionContext()) | 165 if (!scriptExecutionContext()) |
| 166 return false; | 166 return false; |
| 167 | 167 |
| 168 return dispatchEvent(event); | 168 return dispatchEvent(event); |
| 169 } | 169 } |
| 170 | 170 |
| 171 bool EventTarget::dispatchEvent(PassRefPtr<Event> event) | 171 bool EventTarget::dispatchEvent(PassRefPtr<Event> event) |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // they have one less listener to invoke. | 357 // they have one less listener to invoke. |
| 358 if (d->firingEventIterators) { | 358 if (d->firingEventIterators) { |
| 359 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 359 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
| 360 d->firingEventIterators->at(i).iterator = 0; | 360 d->firingEventIterators->at(i).iterator = 0; |
| 361 d->firingEventIterators->at(i).end = 0; | 361 d->firingEventIterators->at(i).end = 0; |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 | 365 |
| 366 } // namespace WebCore | 366 } // namespace WebCore |
| OLD | NEW |