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

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

Issue 383153007: Fixes for re-enabling more MSVC level 4 warnings: Source/core/ edition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments Created 6 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/events/EventPath.cpp ('k') | Source/core/page/FrameTree.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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 return EventTypeNames::mousewheel; 217 return EventTypeNames::mousewheel;
218 218
219 return emptyAtom; 219 return emptyAtom;
220 } 220 }
221 221
222 void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis tenerVector* listenersVector, EventListenerVector* legacyListenersVector) 222 void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis tenerVector* listenersVector, EventListenerVector* legacyListenersVector)
223 { 223 {
224 UseCounter::Feature unprefixedFeature; 224 UseCounter::Feature unprefixedFeature;
225 UseCounter::Feature prefixedFeature; 225 UseCounter::Feature prefixedFeature;
226 UseCounter::Feature prefixedAndUnprefixedFeature; 226 UseCounter::Feature prefixedAndUnprefixedFeature;
227 bool shouldCount = false;
228
229 if (legacyTypeName == EventTypeNames::webkitTransitionEnd) { 227 if (legacyTypeName == EventTypeNames::webkitTransitionEnd) {
230 prefixedFeature = UseCounter::PrefixedTransitionEndEvent; 228 prefixedFeature = UseCounter::PrefixedTransitionEndEvent;
231 unprefixedFeature = UseCounter::UnprefixedTransitionEndEvent; 229 unprefixedFeature = UseCounter::UnprefixedTransitionEndEvent;
232 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedTransiti onEndEvent; 230 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedTransiti onEndEvent;
233 shouldCount = true;
234 } else if (legacyTypeName == EventTypeNames::webkitAnimationEnd) { 231 } else if (legacyTypeName == EventTypeNames::webkitAnimationEnd) {
235 prefixedFeature = UseCounter::PrefixedAnimationEndEvent; 232 prefixedFeature = UseCounter::PrefixedAnimationEndEvent;
236 unprefixedFeature = UseCounter::UnprefixedAnimationEndEvent; 233 unprefixedFeature = UseCounter::UnprefixedAnimationEndEvent;
237 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimatio nEndEvent; 234 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimatio nEndEvent;
238 shouldCount = true;
239 } else if (legacyTypeName == EventTypeNames::webkitAnimationStart) { 235 } else if (legacyTypeName == EventTypeNames::webkitAnimationStart) {
240 prefixedFeature = UseCounter::PrefixedAnimationStartEvent; 236 prefixedFeature = UseCounter::PrefixedAnimationStartEvent;
241 unprefixedFeature = UseCounter::UnprefixedAnimationStartEvent; 237 unprefixedFeature = UseCounter::UnprefixedAnimationStartEvent;
242 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimatio nStartEvent; 238 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimatio nStartEvent;
243 shouldCount = true;
244 } else if (legacyTypeName == EventTypeNames::webkitAnimationIteration) { 239 } else if (legacyTypeName == EventTypeNames::webkitAnimationIteration) {
245 prefixedFeature = UseCounter::PrefixedAnimationIterationEvent; 240 prefixedFeature = UseCounter::PrefixedAnimationIterationEvent;
246 unprefixedFeature = UseCounter::UnprefixedAnimationIterationEvent; 241 unprefixedFeature = UseCounter::UnprefixedAnimationIterationEvent;
247 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimatio nIterationEvent; 242 prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimatio nIterationEvent;
248 shouldCount = true; 243 } else {
244 return;
249 } 245 }
250 246
251 if (shouldCount) { 247 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
252 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 248 if (legacyListenersVector) {
253 if (legacyListenersVector) { 249 if (listenersVector)
254 if (listenersVector) 250 UseCounter::count(executingWindow->document(), prefixedAndUnpref ixedFeature);
255 UseCounter::count(executingWindow->document(), prefixedAndUn prefixedFeature); 251 else
256 else 252 UseCounter::count(executingWindow->document(), prefixedFeature);
257 UseCounter::count(executingWindow->document(), prefixedFeatu re); 253 } else if (listenersVector) {
258 } else if (listenersVector) { 254 UseCounter::count(executingWindow->document(), unprefixedFeature);
259 UseCounter::count(executingWindow->document(), unprefixedFeature );
260 }
261 } 255 }
262 } 256 }
263 } 257 }
264 258
265 bool EventTarget::fireEventListeners(Event* event) 259 bool EventTarget::fireEventListeners(Event* event)
266 { 260 {
267 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 261 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
268 ASSERT(event && !event->type().isEmpty()); 262 ASSERT(event && !event->type().isEmpty());
269 263
270 EventTargetData* d = eventTargetData(); 264 EventTargetData* d = eventTargetData();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // they have one less listener to invoke. 382 // they have one less listener to invoke.
389 if (d->firingEventIterators) { 383 if (d->firingEventIterators) {
390 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 384 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
391 d->firingEventIterators->at(i).iterator = 0; 385 d->firingEventIterators->at(i).iterator = 0;
392 d->firingEventIterators->at(i).end = 0; 386 d->firingEventIterators->at(i).end = 0;
393 } 387 }
394 } 388 }
395 } 389 }
396 390
397 } // namespace WebCore 391 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/EventPath.cpp ('k') | Source/core/page/FrameTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698