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

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

Issue 1241613004: Rework dispatchEvent so it is consistent for isTrusted support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work around MSVC optimization bug Created 5 years, 5 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
Index: Source/core/events/EventTarget.cpp
diff --git a/Source/core/events/EventTarget.cpp b/Source/core/events/EventTarget.cpp
index 09bccffcb2549d8974a6d940984cf832bbca5c7f..d66b217b3b747f170bf2b5daf7aa5e49f2748911 100644
--- a/Source/core/events/EventTarget.cpp
+++ b/Source/core/events/EventTarget.cpp
@@ -182,11 +182,16 @@ bool EventTarget::dispatchEventForBindings(PassRefPtrWillBeRawPtr<Event> event,
if (!executionContext())
return false;
- return dispatchEvent(event);
+ return dispatchEventInternal(event);
}
bool EventTarget::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event)
{
+ return dispatchEventInternal(event);
+}
+
+bool EventTarget::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
+{
event->setTarget(this);
event->setCurrentTarget(this);
event->setEventPhase(Event::AT_TARGET);

Powered by Google App Engine
This is Rietveld 408576698