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

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

Issue 15179010: Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: correct upload Created 7 years, 7 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/Event.h ('k') | no next file » | 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 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();
« no previous file with comments | « Source/core/dom/Event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698