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

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

Issue 22859012: Add support for DOM Level 3 WheelEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename prefixedType() to legacyType() Created 7 years, 4 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/dom/EventNames.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/EventTarget.cpp
diff --git a/Source/core/dom/EventTarget.cpp b/Source/core/dom/EventTarget.cpp
index db4032152b38c8c78206f0b42599858ce018126c..e04248afc8f0cc2c5b195e6f53bcfd2367fe875b 100644
--- a/Source/core/dom/EventTarget.cpp
+++ b/Source/core/dom/EventTarget.cpp
@@ -176,11 +176,14 @@ void EventTarget::uncaughtExceptionInEventHandler()
{
}
-static AtomicString prefixedType(const Event* event)
+static AtomicString legacyType(const Event* event)
{
if (event->type() == eventNames().transitionendEvent)
return eventNames().webkitTransitionEndEvent;
+ if (event->type() == eventNames().wheelEvent)
+ return eventNames().mousewheelEvent;
+
return emptyString();
}
@@ -194,7 +197,7 @@ bool EventTarget::fireEventListeners(Event* event)
return true;
EventListenerVector* listenerPrefixedVector = 0;
- AtomicString prefixedTypeName = prefixedType(event);
+ AtomicString prefixedTypeName = legacyType(event);
if (!prefixedTypeName.isEmpty())
listenerPrefixedVector = d->eventListenerMap.find(prefixedTypeName);
@@ -209,7 +212,7 @@ bool EventTarget::fireEventListeners(Event* event)
event->setType(unprefixedTypeName);
}
- if (!prefixedTypeName.isEmpty()) {
+ if (prefixedTypeName == eventNames().webkitTransitionEndEvent) {
if (DOMWindow* executingWindow = this->executingWindow()) {
if (listenerPrefixedVector) {
if (listenerUnprefixedVector)
« no previous file with comments | « Source/core/dom/EventNames.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698