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

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: Created 7 years 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 event->setEventPhase(Event::AT_TARGET); 182 event->setEventPhase(Event::AT_TARGET);
183 bool defaultPrevented = fireEventListeners(event.get()); 183 bool defaultPrevented = fireEventListeners(event.get());
184 event->setEventPhase(0); 184 event->setEventPhase(0);
185 return defaultPrevented; 185 return defaultPrevented;
186 } 186 }
187 187
188 void EventTarget::uncaughtExceptionInEventHandler() 188 void EventTarget::uncaughtExceptionInEventHandler()
189 { 189 {
190 } 190 }
191 191
192 static AtomicString legacyType(const Event* event) 192 static const AtomicString& legacyType(const Event* event)
193 { 193 {
194 if (event->type() == EventTypeNames::transitionend) 194 if (event->type() == EventTypeNames::transitionend)
195 return EventTypeNames::webkitTransitionEnd; 195 return EventTypeNames::webkitTransitionEnd;
196 196
197 if (event->type() == EventTypeNames::animationstart) 197 if (event->type() == EventTypeNames::animationstart)
198 return EventTypeNames::webkitAnimationStart; 198 return EventTypeNames::webkitAnimationStart;
199 199
200 if (event->type() == EventTypeNames::animationend) 200 if (event->type() == EventTypeNames::animationend)
201 return EventTypeNames::webkitAnimationEnd; 201 return EventTypeNames::webkitAnimationEnd;
202 202
203 if (event->type() == EventTypeNames::animationiteration) 203 if (event->type() == EventTypeNames::animationiteration)
204 return EventTypeNames::webkitAnimationIteration; 204 return EventTypeNames::webkitAnimationIteration;
205 205
206 if (event->type() == EventTypeNames::wheel) 206 if (event->type() == EventTypeNames::wheel)
207 return EventTypeNames::mousewheel; 207 return EventTypeNames::mousewheel;
208 208
209 return emptyString(); 209 return emptyAtom;
210 } 210 }
211 211
212 void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis tenerVector* listenersVector, EventListenerVector* legacyListenersVector) 212 void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis tenerVector* listenersVector, EventListenerVector* legacyListenersVector)
213 { 213 {
214 UseCounter::Feature unprefixedFeature; 214 UseCounter::Feature unprefixedFeature;
215 UseCounter::Feature prefixedFeature; 215 UseCounter::Feature prefixedFeature;
216 UseCounter::Feature prefixedAndUnprefixedFeature; 216 UseCounter::Feature prefixedAndUnprefixedFeature;
217 bool shouldCount = false; 217 bool shouldCount = false;
218 218
219 if (legacyTypeName == EventTypeNames::webkitTransitionEnd) { 219 if (legacyTypeName == EventTypeNames::webkitTransitionEnd) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // they have one less listener to invoke. 368 // they have one less listener to invoke.
369 if (d->firingEventIterators) { 369 if (d->firingEventIterators) {
370 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 370 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
371 d->firingEventIterators->at(i).iterator = 0; 371 d->firingEventIterators->at(i).iterator = 0;
372 d->firingEventIterators->at(i).end = 0; 372 d->firingEventIterators->at(i).end = 0;
373 } 373 }
374 } 374 }
375 } 375 }
376 376
377 } // namespace WebCore 377 } // namespace WebCore
OLDNEW
« Source/core/dom/DOMTokenList.h ('K') | « Source/core/dom/TreeScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698