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

Side by Side Diff: third_party/WebKit/Source/core/events/EventDispatchResult.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 typo Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EventDispatchResult_h
6 #define EventDispatchResult_h
7
8 namespace blink {
9
10 enum class DispatchEventResult {
11 // Event was not canceled by event handler or default event handler.
12 NotCanceled,
13 // Event was canceled by event handler; i.e. a script handler calling preven tDefault.
14 CanceledByEventHandler,
15 // Event was canceled by the default event handler; i.e. executing the defau lt action.
16 // This result should be used sparingly as it deviates from the DOM Event Di spatch
17 // model. Default event handlers really shouldn't be invoked inside of dispa tch.
18 CanceledByDefaultEventHandler,
19 // Event was canceled but suppressed before dispatched to event handler.
20 // This result should be used sparingly; and its usage likely indicates
21 // there is potential for a bug. Trusted events may return this code; but un trusted
22 // events likely should always execute the event handler the developer inten ds to
23 // execute.
24 CanceledBeforeDispatch,
25 };
26
27 } // namespace blink
28
29 #endif // EventDispatchResult_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698