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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/EventPath.cpp ('k') | Source/core/page/FrameTree.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventTarget.cpp
diff --git a/Source/core/events/EventTarget.cpp b/Source/core/events/EventTarget.cpp
index 3c4983b7545ce628cc12e68eef7446bbfcbd7460..91e4d24452a96e039e879f2fb201788295aa9f57 100644
--- a/Source/core/events/EventTarget.cpp
+++ b/Source/core/events/EventTarget.cpp
@@ -224,40 +224,34 @@ void EventTarget::countLegacyEvents(const AtomicString& legacyTypeName, EventLis
UseCounter::Feature unprefixedFeature;
UseCounter::Feature prefixedFeature;
UseCounter::Feature prefixedAndUnprefixedFeature;
- bool shouldCount = false;
-
if (legacyTypeName == EventTypeNames::webkitTransitionEnd) {
prefixedFeature = UseCounter::PrefixedTransitionEndEvent;
unprefixedFeature = UseCounter::UnprefixedTransitionEndEvent;
prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedTransitionEndEvent;
- shouldCount = true;
} else if (legacyTypeName == EventTypeNames::webkitAnimationEnd) {
prefixedFeature = UseCounter::PrefixedAnimationEndEvent;
unprefixedFeature = UseCounter::UnprefixedAnimationEndEvent;
prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimationEndEvent;
- shouldCount = true;
} else if (legacyTypeName == EventTypeNames::webkitAnimationStart) {
prefixedFeature = UseCounter::PrefixedAnimationStartEvent;
unprefixedFeature = UseCounter::UnprefixedAnimationStartEvent;
prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimationStartEvent;
- shouldCount = true;
} else if (legacyTypeName == EventTypeNames::webkitAnimationIteration) {
prefixedFeature = UseCounter::PrefixedAnimationIterationEvent;
unprefixedFeature = UseCounter::UnprefixedAnimationIterationEvent;
prefixedAndUnprefixedFeature = UseCounter::PrefixedAndUnprefixedAnimationIterationEvent;
- shouldCount = true;
+ } else {
+ return;
}
- if (shouldCount) {
- if (LocalDOMWindow* executingWindow = this->executingWindow()) {
- if (legacyListenersVector) {
- if (listenersVector)
- UseCounter::count(executingWindow->document(), prefixedAndUnprefixedFeature);
- else
- UseCounter::count(executingWindow->document(), prefixedFeature);
- } else if (listenersVector) {
- UseCounter::count(executingWindow->document(), unprefixedFeature);
- }
+ if (LocalDOMWindow* executingWindow = this->executingWindow()) {
+ if (legacyListenersVector) {
+ if (listenersVector)
+ UseCounter::count(executingWindow->document(), prefixedAndUnprefixedFeature);
+ else
+ UseCounter::count(executingWindow->document(), prefixedFeature);
+ } else if (listenersVector) {
+ UseCounter::count(executingWindow->document(), unprefixedFeature);
}
}
}
« 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