Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: Source/core/dom/EventTarget.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/ExceptionCode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/ExceptionCode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698