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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 { | 136 { |
137 EventListener* listener = getAttributeEventListener(eventType, isolatedWorld
); | 137 EventListener* listener = getAttributeEventListener(eventType, isolatedWorld
); |
138 if (!listener) | 138 if (!listener) |
139 return false; | 139 return false; |
140 return removeEventListener(eventType, listener, false); | 140 return removeEventListener(eventType, listener, false); |
141 } | 141 } |
142 | 142 |
143 bool EventTarget::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) | 143 bool EventTarget::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) |
144 { | 144 { |
145 if (!event || event->type().isEmpty() || event->isBeingDispatched()) { | 145 if (!event || event->type().isEmpty() || event->isBeingDispatched()) { |
146 ec = INVALID_STATE_ERR; | 146 ec = InvalidStateError; |
147 return false; | 147 return false; |
148 } | 148 } |
149 | 149 |
150 if (!scriptExecutionContext()) | 150 if (!scriptExecutionContext()) |
151 return false; | 151 return false; |
152 | 152 |
153 return dispatchEvent(event); | 153 return dispatchEvent(event); |
154 } | 154 } |
155 | 155 |
156 bool EventTarget::dispatchEvent(PassRefPtr<Event> event) | 156 bool EventTarget::dispatchEvent(PassRefPtr<Event> event) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 // they have one less listener to invoke. | 291 // they have one less listener to invoke. |
292 if (d->firingEventIterators) { | 292 if (d->firingEventIterators) { |
293 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 293 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
294 d->firingEventIterators->at(i).iterator = 0; | 294 d->firingEventIterators->at(i).iterator = 0; |
295 d->firingEventIterators->at(i).end = 0; | 295 d->firingEventIterators->at(i).end = 0; |
296 } | 296 } |
297 } | 297 } |
298 } | 298 } |
299 | 299 |
300 } // namespace WebCore | 300 } // namespace WebCore |
OLD | NEW |