Index: Source/core/dom/EventTarget.cpp |
diff --git a/Source/core/dom/EventTarget.cpp b/Source/core/dom/EventTarget.cpp |
index 06255877ea1dd3a675b7fd8ab298cf11c8330e33..7e8a70b4bf4af775f91624e642a3009b20eed7e7 100644 |
--- a/Source/core/dom/EventTarget.cpp |
+++ b/Source/core/dom/EventTarget.cpp |
@@ -162,20 +162,6 @@ void EventTarget::uncaughtExceptionInEventHandler() |
{ |
} |
-static PassRefPtr<Event> createMatchingPrefixedEvent(const Event* event) |
-{ |
- if (event->type() == eventNames().transitionendEvent) { |
- const TransitionEvent* transitionEvent = static_cast<const TransitionEvent*>(event); |
- RefPtr<Event> prefixedEvent = TransitionEvent::create(eventNames().webkitTransitionEndEvent, transitionEvent->propertyName(), transitionEvent->elapsedTime(), transitionEvent->pseudoElement()); |
- prefixedEvent->setTarget(event->target()); |
- prefixedEvent->setCurrentTarget(event->currentTarget()); |
- prefixedEvent->setEventPhase(event->eventPhase()); |
- return prefixedEvent.release(); |
- } |
- ASSERT_NOT_REACHED(); |
- return 0; |
-} |
- |
static AtomicString prefixedType(const Event* event) |
{ |
if (event->type() == eventNames().transitionendEvent) |
@@ -202,8 +188,12 @@ bool EventTarget::fireEventListeners(Event* event) |
if (listenerUnprefixedVector) |
fireEventListeners(event, d, *listenerUnprefixedVector); |
- else if (listenerPrefixedVector) |
- fireEventListeners(createMatchingPrefixedEvent(event).get(), d, *listenerPrefixedVector); |
+ else if (listenerPrefixedVector) { |
+ AtomicString unprefixedTypeName = event->type(); |
+ event->setType(prefixedTypeName); |
+ fireEventListeners(event, d, *listenerPrefixedVector); |
+ event->setType(unprefixedTypeName); |
abarth-chromium
2013/05/16 21:11:57
Woah
|
+ } |
if (!prefixedTypeName.isEmpty()) { |
ScriptExecutionContext* context = scriptExecutionContext(); |