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

Unified Diff: Source/core/events/EventTarget.cpp

Issue 263553010: Make sure we correctly dispatch custom events having the same names as unprefixed animations events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
Index: Source/core/events/EventTarget.cpp
diff --git a/Source/core/events/EventTarget.cpp b/Source/core/events/EventTarget.cpp
index 8cc27463a0873ccad916847db2874518a9511632..7110ca1cf8e93fb2b675d869f45559d60afbeb6c 100644
--- a/Source/core/events/EventTarget.cpp
+++ b/Source/core/events/EventTarget.cpp
@@ -267,7 +267,11 @@ bool EventTarget::fireEventListeners(Event* event)
EventListenerVector* listenersVector = d->eventListenerMap.find(event->type());
if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled() && (event->type() == EventTypeNames::animationiteration || event->type() == EventTypeNames::animationend
- || event->type() == EventTypeNames::animationstart))
+ || event->type() == EventTypeNames::animationstart)
+ // Some code out-there uses custom events to dispatch unprefixed animation events manually,
+ // we can safely remove all this block when cssAnimationUnprefixedEnabled is always on, this
+ // is really a special case. DO NOT ADD MORE EVENTS HERE.
+ && event->interfaceName() != EventNames::CustomEvent)
listenersVector = 0;
if (listenersVector) {

Powered by Google App Engine
This is Rietveld 408576698