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

Unified Diff: third_party/WebKit/Source/core/events/EventDispatcher.cpp

Issue 2501333003: Event failed to dispatch after stopPropagation (Closed)
Patch Set: After format. Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/events/Event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/EventDispatcher.cpp
diff --git a/third_party/WebKit/Source/core/events/EventDispatcher.cpp b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
index e99aba072ab03089b2259ffe1d0c2ff460e9f270..5ed1e54f3bf8782db9affb6bb76a2a285be50fc1 100644
--- a/third_party/WebKit/Source/core/events/EventDispatcher.cpp
+++ b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
@@ -249,8 +249,15 @@ inline void EventDispatcher::dispatchEventAtBubbling() {
inline void EventDispatcher::dispatchEventPostProcess(
EventDispatchHandlingState* preDispatchEventHandlerResult) {
m_event->setTarget(EventPath::eventTargetRespectingTargetRules(*m_node));
- m_event->setCurrentTarget(nullptr);
+ // https://dom.spec.whatwg.org/#concept-event-dispatch
+ // 14. Unset event’s dispatch flag, stop propagation flag, and stop immediate
+ // propagation flag.
+ m_event->setStopPropagation(false);
+ m_event->setStopImmediatePropagation(false);
+ // 15. Set event’s eventPhase attribute to NONE.
m_event->setEventPhase(0);
+ // 16. Set event’s currentTarget attribute to null.
+ m_event->setCurrentTarget(nullptr);
// Pass the data from the preDispatchEventHandler to the
// postDispatchEventHandler.
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698