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

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

Issue 1233233003: Add Event.isTrusted support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main2
Patch Set: Fix nits 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
« no previous file with comments | « Source/core/events/Event.idl ('k') | Source/core/events/MouseEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventTarget.cpp
diff --git a/Source/core/events/EventTarget.cpp b/Source/core/events/EventTarget.cpp
index 1153a1551abbefe875abdcdcba8830215b2a2358..b03435180c01633c12c9208132be8159a5dc5bf0 100644
--- a/Source/core/events/EventTarget.cpp
+++ b/Source/core/events/EventTarget.cpp
@@ -186,11 +186,13 @@ bool EventTarget::dispatchEventForBindings(PassRefPtrWillBeRawPtr<Event> event,
if (!executionContext())
return false;
+ event->setTrusted(false);
return dispatchEventInternal(event);
}
bool EventTarget::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event)
{
+ event->setTrusted(true);
return dispatchEventInternal(event);
}
« no previous file with comments | « Source/core/events/Event.idl ('k') | Source/core/events/MouseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698