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

Side by Side Diff: third_party/WebKit/Source/core/events/AddEventListenerOptionsDefaults.h

Issue 2125683002: Add option to force document level passive event listeners as a runtime feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef AddEventListenerOptionsDefaults_h 5 #ifndef AddEventListenerOptionsDefaults_h
6 #define AddEventListenerOptionsDefaults_h 6 #define AddEventListenerOptionsDefaults_h
7 7
8 namespace blink { 8 namespace blink {
9 9
10 // Defines the default for 'passive' field used in the AddEventListenerOptions i nterface 10 // Defines the default for 'passive' field used in the AddEventListenerOptions i nterface
11 // when javascript calls addEventListener. 11 // when javascript calls addEventListener.
12 // |False| is the default specified in 12 // |False| is the default specified in
13 // https://dom.spec.whatwg.org/#dictdef-addeventlisteneroptions. However 13 // https://dom.spec.whatwg.org/#dictdef-addeventlisteneroptions. However
14 // specifying a different default value is useful in demonstrating the 14 // specifying a different default value is useful in demonstrating the
15 // power of passive event listeners. 15 // power of passive event listeners.
16 enum class PassiveListenerDefault { 16 enum class PassiveListenerDefault {
17 False, // Default of false. 17 False, // Default of false.
18 True, // Default of true. 18 True, // Default of true.
19 DocumentTrue, // Default of true for document level elements, false otherwis e.
20 ForceAllTrue // Force all values to be true even when specified. 19 ForceAllTrue // Force all values to be true even when specified.
21 }; 20 };
22 21
23 } // namespace blink 22 } // namespace blink
24 23
25 #endif // AddEventListenerOptionsDefaults_h 24 #endif // AddEventListenerOptionsDefaults_h
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698