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

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

Issue 112843002: Make calls to AtomicString(const String&) explicit in dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added comments Created 6 years, 11 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
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 event->setEventPhase(Event::AT_TARGET); 188 event->setEventPhase(Event::AT_TARGET);
189 bool defaultPrevented = fireEventListeners(event.get()); 189 bool defaultPrevented = fireEventListeners(event.get());
190 event->setEventPhase(0); 190 event->setEventPhase(0);
191 return defaultPrevented; 191 return defaultPrevented;
192 } 192 }
193 193
194 void EventTarget::uncaughtExceptionInEventHandler() 194 void EventTarget::uncaughtExceptionInEventHandler()
195 { 195 {
196 } 196 }
197 197
198 static AtomicString legacyType(const Event* event) 198 static const AtomicString& legacyType(const Event* event)
199 { 199 {
200 if (event->type() == EventTypeNames::transitionend) 200 if (event->type() == EventTypeNames::transitionend)
201 return EventTypeNames::webkitTransitionEnd; 201 return EventTypeNames::webkitTransitionEnd;
202 202
203 if (event->type() == EventTypeNames::animationstart) 203 if (event->type() == EventTypeNames::animationstart)
204 return EventTypeNames::webkitAnimationStart; 204 return EventTypeNames::webkitAnimationStart;
205 205
206 if (event->type() == EventTypeNames::animationend) 206 if (event->type() == EventTypeNames::animationend)
207 return EventTypeNames::webkitAnimationEnd; 207 return EventTypeNames::webkitAnimationEnd;
208 208
209 if (event->type() == EventTypeNames::animationiteration) 209 if (event->type() == EventTypeNames::animationiteration)
210 return EventTypeNames::webkitAnimationIteration; 210 return EventTypeNames::webkitAnimationIteration;
211 211
212 if (event->type() == EventTypeNames::wheel) 212 if (event->type() == EventTypeNames::wheel)
213 return EventTypeNames::mousewheel; 213 return EventTypeNames::mousewheel;
214 214
215 return emptyString(); 215 return emptyAtom;
216 } 216 }
217 217
218 void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis tenerVector* listenersVector, EventListenerVector* legacyListenersVector) 218 void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis tenerVector* listenersVector, EventListenerVector* legacyListenersVector)
219 { 219 {
220 UseCounter::Feature unprefixedFeature; 220 UseCounter::Feature unprefixedFeature;
221 UseCounter::Feature prefixedFeature; 221 UseCounter::Feature prefixedFeature;
222 UseCounter::Feature prefixedAndUnprefixedFeature; 222 UseCounter::Feature prefixedAndUnprefixedFeature;
223 bool shouldCount = false; 223 bool shouldCount = false;
224 224
225 if (legacyTypeName == EventTypeNames::webkitTransitionEnd) { 225 if (legacyTypeName == EventTypeNames::webkitTransitionEnd) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // they have one less listener to invoke. 375 // they have one less listener to invoke.
376 if (d->firingEventIterators) { 376 if (d->firingEventIterators) {
377 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 377 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
378 d->firingEventIterators->at(i).iterator = 0; 378 d->firingEventIterators->at(i).iterator = 0;
379 d->firingEventIterators->at(i).end = 0; 379 d->firingEventIterators->at(i).end = 0;
380 } 380 }
381 } 381 }
382 } 382 }
383 383
384 } // namespace WebCore 384 } // namespace WebCore
OLDNEW
« Source/core/dom/NamedFlowCollection.cpp ('K') | « Source/core/dom/TreeScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698