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

Unified Diff: third_party/WebKit/public/web/WebSettings.h

Issue 1965493002: Add runtime setting to force passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/public/web/WebSettings.h
diff --git a/third_party/WebKit/public/web/WebSettings.h b/third_party/WebKit/public/web/WebSettings.h
index 0ed0f2c03ae65bb26215e2b50bd981ab7d28ca9e..5d745986de63e3b1bdfb1474f57543f8b0ef841a 100644
--- a/third_party/WebKit/public/web/WebSettings.h
+++ b/third_party/WebKit/public/web/WebSettings.h
@@ -88,6 +88,15 @@ public:
Subtitles
};
+ // Defines the default for 'passive' field used in the AddEventListenerOptions interface
+ // when javascript calls addEventListener.
+ enum class PassiveEventListenerDefault {
+ False, // Default of false.
+ True, // Default of true.
+ DocumentTrue, // Default of true for document level elements, false otherwise.
+ ForceAllTrue // Force all values to be true even when specified.
+ };
+
// Sets value of a setting by its string identifier from Settings.in and
// string representation of value. An enum's string representation is the
// string representation of the integer value of the enum.
@@ -177,6 +186,7 @@ public:
virtual void setMinimumLogicalFontSize(int) = 0;
virtual void setMockScrollbarsEnabled(bool) = 0;
virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
+ virtual void setPassiveEventListenerDefault(PassiveEventListenerDefault) = 0;
virtual void setPasswordEchoDurationInSeconds(double) = 0;
virtual void setPasswordEchoEnabled(bool) = 0;
virtual void setPerTilePaintingEnabled(bool) = 0;

Powered by Google App Engine
This is Rietveld 408576698