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

Unified Diff: third_party/WebKit/Source/core/events/Event.h

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix comments Created 4 years, 10 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: third_party/WebKit/Source/core/events/Event.h
diff --git a/third_party/WebKit/Source/core/events/Event.h b/third_party/WebKit/Source/core/events/Event.h
index e447f5d3372663c4dcb7d470fa593c6cb6200c7d..65e2a69ebc6f3401f41fddad3e476b85ebf2cd5b 100644
--- a/third_party/WebKit/Source/core/events/Event.h
+++ b/third_party/WebKit/Source/core/events/Event.h
@@ -201,6 +201,15 @@ public:
void setHandlingPassive(bool value) { m_handlingPassive = value; }
+ DispatchEventResult eventResult() const
philipj_slow 2016/02/25 15:23:46 dispatchEventResult or dispatchResult? The result
dtapuska 2016/02/25 22:06:10 Done.
+ {
+ if (defaultPrevented())
+ return DispatchEventResult::CanceledByEventHandler;
+ if (defaultHandled())
+ return DispatchEventResult::CanceledByDefaultEventHandler;
+ return DispatchEventResult::NotCanceled;
+ }
+
DECLARE_VIRTUAL_TRACE();
protected:

Powered by Google App Engine
This is Rietveld 408576698