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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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/editing/markup.cpp ('k') | Source/core/fileapi/FileError.cpp » ('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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 bool EventTarget::clearAttributeEventListener(const AtomicString& eventType, DOM WrapperWorld* isolatedWorld) 150 bool EventTarget::clearAttributeEventListener(const AtomicString& eventType, DOM WrapperWorld* isolatedWorld)
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& excepti onState)
159 { 159 {
160 if (!event) { 160 if (!event) {
161 es.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecu te("dispatchEvent", "EventTarget", "The event provided is null.")); 161 exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::f ailedToExecute("dispatchEvent", "EventTarget", "The event provided is null."));
162 return false; 162 return false;
163 } 163 }
164 if (event->type().isEmpty()) { 164 if (event->type().isEmpty()) {
165 es.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecu te("dispatchEvent", "EventTarget", "The event provided is uninitialized.")); 165 exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::f ailedToExecute("dispatchEvent", "EventTarget", "The event provided is uninitiali zed."));
166 return false; 166 return false;
167 } 167 }
168 if (event->isBeingDispatched()) { 168 if (event->isBeingDispatched()) {
169 es.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecu te("dispatchEvent", "EventTarget", "The event is already being dispatched.")); 169 exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::f ailedToExecute("dispatchEvent", "EventTarget", "The event is already being dispa tched."));
170 return false; 170 return false;
171 } 171 }
172 172
173 if (!executionContext()) 173 if (!executionContext())
174 return false; 174 return false;
175 175
176 return dispatchEvent(event); 176 return dispatchEvent(event);
177 } 177 }
178 178
179 bool EventTarget::dispatchEvent(PassRefPtr<Event> event) 179 bool EventTarget::dispatchEvent(PassRefPtr<Event> event)
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // they have one less listener to invoke. 365 // they have one less listener to invoke.
366 if (d->firingEventIterators) { 366 if (d->firingEventIterators) {
367 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 367 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
368 d->firingEventIterators->at(i).iterator = 0; 368 d->firingEventIterators->at(i).iterator = 0;
369 d->firingEventIterators->at(i).end = 0; 369 d->firingEventIterators->at(i).end = 0;
370 } 370 }
371 } 371 }
372 } 372 }
373 373
374 } // namespace WebCore 374 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/fileapi/FileError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698