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

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

Issue 2501333003: Event failed to dispatch after stopPropagation (Closed)
Patch Set: 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
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..774f13692c955e32bd121f3be5dad7b319b75ad2 100644
--- a/third_party/WebKit/Source/core/events/EventDispatcher.cpp
+++ b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
@@ -249,8 +249,14 @@ inline void EventDispatcher::dispatchEventAtBubbling() {
inline void EventDispatcher::dispatchEventPostProcess(
EventDispatchHandlingState* preDispatchEventHandlerResult) {
m_event->setTarget(EventPath::eventTargetRespectingTargetRules(*m_node));
+ // https://dom.spec.whatwg.org/#concept-event-dispatch
+ // 16. Set event’s currentTarget attribute to null.
m_event->setCurrentTarget(nullptr);
+ // 15. Set event’s eventPhase attribute to NONE.
m_event->setEventPhase(0);
+ // 14. Unset event’s dispatch flag, stop propagation flag, and stop immediate propagation flag.
hayato 2016/11/17 05:37:42 Could you reorder [16, 15, 14] to [14, 15, 16]?
+ m_event->clearStopPropagation();
+ m_event->clearStopImmediatePropagation();
// Pass the data from the preDispatchEventHandler to the
// postDispatchEventHandler.

Powered by Google App Engine
This is Rietveld 408576698