blob: 41c751b83b1b186946b49f3e8b35cc933ab421e2 [file] [log] [blame]
Matt Falkenhagen5cc652792018-06-21 10:34:331// Copyright 2018 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#include "third_party/blink/public/common/features.h"
6
Aran Gilman5e9672bed2019-08-02 19:07:497#include "base/feature_list.h"
Scott Haseley8eefdcd2018-08-22 16:50:198#include "build/build_config.h"
Hiroki Nakagawa893ee502019-02-04 06:49:539#include "services/network/public/cpp/features.h"
Aran Gilman5e9672bed2019-08-02 19:07:4910#include "third_party/blink/public/common/forcedark/forcedark_switches.h"
Scott Haseley8eefdcd2018-08-22 16:50:1911
Matt Falkenhagen5cc652792018-06-21 10:34:3312namespace blink {
13namespace features {
14
Yao Xiao2c1171a2019-04-01 23:44:3215// Enable intervention for download that was initiated from or occurred in an ad
16// frame without user activation.
17const base::Feature kBlockingDownloadsInAdFrameWithoutUserActivation{
18 "BlockingDownloadsInAdFrameWithoutUserActivation",
Yao Xiao3f9e4272019-05-23 15:22:4619 base::FEATURE_ENABLED_BY_DEFAULT};
Yao Xiao2c1171a2019-04-01 23:44:3220
Stephen Chenneyde6e5c82019-01-21 01:56:0421// Enable defer commits a bit to avoid flash.
22const base::Feature kAvoidFlashBetweenNavigation{
23 "AvoidFlashBetweenNavigation", base::FEATURE_DISABLED_BY_DEFAULT};
24
Matt Falkenhagenc25fea42018-07-17 07:13:5225// Enable eagerly setting up a CacheStorage interface pointer and
26// passing it to service workers on startup as an optimization.
27const base::Feature kEagerCacheStorageSetupForServiceWorkers{
28 "EagerCacheStorageSetupForServiceWorkers",
29 base::FEATURE_ENABLED_BY_DEFAULT};
30
Eric Karl0623ec72018-10-30 19:43:2631// Controls the user-specified viewport restriction for GPU Rasterization on
32// mobile. See https://crbug.com/899399
33const base::Feature kEnableGpuRasterizationViewportRestriction{
34 "EnableGpuRasterizationViewportRestriction",
Eric Karl35944642019-07-17 23:58:2435 base::FEATURE_DISABLED_BY_DEFAULT};
Eric Karl0623ec72018-10-30 19:43:2636
Peter Kvitek197eaf72018-12-04 19:14:5637// Controls script streaming.
38const base::Feature kScriptStreaming{"ScriptStreaming",
39 base::FEATURE_ENABLED_BY_DEFAULT};
40
Leszek Swirskif75c1912019-05-29 10:08:2541// Allow streaming small (<30kB) scripts.
42const base::Feature kSmallScriptStreaming{"SmallScriptStreaming",
43 base::FEATURE_DISABLED_BY_DEFAULT};
44
Keishi Hattori9e106922019-04-15 09:06:0345// Enables user level memory pressure signal generation on Android.
46const base::Feature kUserLevelMemoryPressureSignal{
47 "UserLevelMemoryPressureSignal", base::FEATURE_DISABLED_BY_DEFAULT};
48
Liquan(Max) Gu4e243fc2018-11-17 00:13:0249// Enable FCP++ by experiment. See https://crbug.com/869924
50const base::Feature kFirstContentfulPaintPlusPlus{
Liquan(Max) Gu739af152019-06-07 19:27:1951 "FirstContentfulPaintPlusPlus", base::FEATURE_ENABLED_BY_DEFAULT};
Liquan(Max) Gu4e243fc2018-11-17 00:13:0252
Aditya Keerthi6a933902019-03-14 21:09:2753// Perform memory purges after freezing only if all pages are frozen.
54const base::Feature kFreezePurgeMemoryAllPagesFrozen{
55 "FreezePurgeMemoryAllPagesFrozen", base::FEATURE_DISABLED_BY_DEFAULT};
56
John Delaneyac24e572019-04-30 19:47:0257// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
58const base::Feature kFreezeUserAgent{"FreezeUserAgent",
59 base::FEATURE_DISABLED_BY_DEFAULT};
60
Steve Kobesb51c2fed2019-02-27 15:36:3161// Enables the experimental sweep-line algorithm for tracking "jank" from
62// layout objects changing their visual location between animation frames.
Steve Kobesaa9c7c22019-01-21 18:24:1363const base::Feature kJankTrackingSweepLine{"JankTrackingSweepLine",
64 base::FEATURE_DISABLED_BY_DEFAULT};
65
Mason Freedc166cf12019-06-14 19:04:2666// Enable a new CSS property called backdrop-filter.
Mason Freed9a96b502019-08-29 18:28:4167const base::Feature kCSSBackdropFilter {
68 "CSSBackdropFilter",
69#if defined(OS_ANDROID)
70 // There are two bugs in the backdrop-filter feature for Android Webview
71 // only (crbug.com/990535 and crbug.com/991869). Because there is no
72 // compile-time flag for Webview, this disables all of Android, and the
73 // feature will be re-enabled for non-Webview Android by Finch.
74 base::FEATURE_DISABLED_BY_DEFAULT
75#else
76 base::FEATURE_ENABLED_BY_DEFAULT
77#endif
78};
Mason Freedc166cf12019-06-14 19:04:2679
Vladimir Levin43758ecc2019-05-09 18:04:0380// Enable Display Locking JavaScript APIs.
81const base::Feature kDisplayLocking{"DisplayLocking",
82 base::FEATURE_DISABLED_BY_DEFAULT};
83
Chris Harrelson6e41e3ae2019-05-03 23:09:4084// Enable applying rounded corner masks via a GL shader rather than
85// a mask layer.
Chris Harrelson3f7e36112019-08-21 19:15:4886const base::Feature kFastBorderRadius {
87 "FastBorderRadius",
88#if defined(OS_MACOSX)
89 // A FastBorderRadiusMac experiment is rolling out separately for that
90 // platform, due to complications with CALayer overlay optimizations.
91 base::FEATURE_DISABLED_BY_DEFAULT
92#else
93 base::FEATURE_ENABLED_BY_DEFAULT
94#endif
95};
Chris Harrelson6e41e3ae2019-05-03 23:09:4096
Ian Kilpatricke68ef11a2018-07-04 03:52:1097// Enable LayoutNG.
Emil A Eklund69eeb562019-07-03 01:38:3098const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_ENABLED_BY_DEFAULT};
Ian Kilpatricke68ef11a2018-07-04 03:52:1099
Makoto Shimazu172eec02018-11-29 06:21:44100const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
101 base::FEATURE_DISABLED_BY_DEFAULT};
102
Tarun Bansal422f9012019-01-23 16:55:58103// Used to control the collection of anchor element metrics (crbug.com/856683).
104// If kNavigationPredictor is enabled, then metrics of anchor elements
105// in the first viewport after the page load and the metrics of the clicked
106// anchor element will be extracted and recorded. Additionally, navigation
107// predictor may preconnect/prefetch to resources/origins to make the
108// future navigations faster.
Sofiya Semenovae4e076152019-07-29 20:10:27109const base::Feature kNavigationPredictor {
110 "NavigationPredictor",
111#if defined(OS_ANDROID)
112 base::FEATURE_ENABLED_BY_DEFAULT
113#else
114 base::FEATURE_DISABLED_BY_DEFAULT
115#endif
116};
Tarun Bansal422f9012019-01-23 16:55:58117
Kenichi Ishibashi0b9b91b2019-08-29 01:01:09118// Start service workers on a background thread.
Kenichi Ishibashi27bdc952019-08-16 03:16:30119// https://crbug.com/692909
120const base::Feature kOffMainThreadServiceWorkerStartup{
121 "OffMainThreadServiceWorkerStartup", base::FEATURE_DISABLED_BY_DEFAULT};
122
Hiroki Nakagawa61ee0042019-01-22 06:30:26123// Enable browser-initiated dedicated worker script loading
124// (PlzDedicatedWorker). https://crbug.com/906991
125const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
126 base::FEATURE_DISABLED_BY_DEFAULT};
127
Daniel Murphy95792ef2018-10-04 01:29:55128// Enable Portals. https://crbug.com/865123.
129const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
130
Tarun Bansal8df12b52019-02-15 05:46:30131// Enable limiting previews loading hints to specific resource types.
132const base::Feature kPreviewsResourceLoadingHintsSpecificResourceTypes{
133 "PreviewsResourceLoadingHintsSpecificResourceTypes",
134 base::FEATURE_DISABLED_BY_DEFAULT};
135
Aditya Keerthie84331b32019-03-20 15:25:52136// Perform a memory purge after a renderer is backgrounded. Formerly labelled as
137// the "PurgeAndSuspend" experiment.
138//
139// TODO(adityakeerthi): Disabled by default on Mac and Android for historical
140// reasons. Consider enabling by default if experiment results are positive.
141// https://crbug.com/926186
142const base::Feature kPurgeRendererMemoryWhenBackgrounded {
143 "PurgeRendererMemoryWhenBackgrounded",
144#if defined(OS_MACOSX) || defined(OS_ANDROID)
145 base::FEATURE_DISABLED_BY_DEFAULT
146#else
147 base::FEATURE_ENABLED_BY_DEFAULT
148#endif
149};
150
David Bokan911bded2018-11-27 23:23:32151// Enable Implicit Root Scroller. https://crbug.com/903260.
David Bokan145b5472019-05-22 14:38:44152// TODO(bokan): Temporarily disabled on desktop platforms to address issues
153// with non-overlay scrollbars. https://crbug.com/948059.
154const base::Feature kImplicitRootScroller {
155 "ImplicitRootScroller",
156#if defined(OS_ANDROID)
157 base::FEATURE_ENABLED_BY_DEFAULT
158#else
159 base::FEATURE_DISABLED_BY_DEFAULT
160#endif
161};
David Bokan911bded2018-11-27 23:23:32162
Makoto Shimazu172eec02018-11-29 06:21:44163// Enables usage of getDisplayMedia() that allows capture of web content, see
164// https://crbug.com/865060.
165const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
166 base::FEATURE_ENABLED_BY_DEFAULT};
167
168// Changes the default RTCPeerConnection constructor behavior to use Unified
169// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
170// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
171// argument).
172const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:56173 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44174
Johannes Kronad5a4532019-01-09 11:17:46175// Determines if the SDP attrbute extmap-allow-mixed should be offered by
176// default or not. The default value can be overridden by passing
177// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
178// constructor.
179const base::Feature kRTCOfferExtmapAllowMixed{
180 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
181
Antonio Gomes76a8ec62019-09-03 23:20:17182// Enables HW VP8 encoding on Android.
183const base::Feature kWebRtcHWVP8Encoding {
184 "WebRtcHWVP8Encoding",
185#if defined(OS_ANDROID)
186 base::FEATURE_DISABLED_BY_DEFAULT
187#else
188 base::FEATURE_ENABLED_BY_DEFAULT
189#endif
190};
191
192// Enables HW VP9 encoding on Android.
193const base::Feature kWebRtcHWVP9Encoding {
194 "WebRtcHWVP9Encoding",
195#if defined(OS_ANDROID)
196 base::FEATURE_DISABLED_BY_DEFAULT
197#else
198 base::FEATURE_DISABLED_BY_DEFAULT
199#endif
200};
201
202// Enables HW H264 encoding on Android.
203const base::Feature kWebRtcHWH264Encoding{"WebRtcHWH264Encoding",
204 base::FEATURE_ENABLED_BY_DEFAULT};
205
Antonio Gomesf3bcd512019-09-03 21:27:17206#if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
207// Run-time feature for the |rtc_use_h264| encoder/decoder.
208const base::Feature kWebRtcH264WithOpenH264FFmpeg{
209 "WebRTC-H264WithOpenH264FFmpeg", base::FEATURE_ENABLED_BY_DEFAULT};
210#endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
211
Ben Kelly24e20aa2019-04-25 21:27:16212const base::Feature kServiceWorkerIsolateInForeground{
Ben Kellyb27f17e82019-06-26 05:31:41213 "ServiceWorkerIsolateInForeground", base::FEATURE_ENABLED_BY_DEFAULT};
Ben Kelly24e20aa2019-04-25 21:27:16214
momohattfc352292018-08-29 05:12:36215const base::Feature kServiceWorkerImportedScriptUpdateCheck{
Makoto Shimazub9067eb02019-08-18 23:42:53216 "ServiceWorkerImportedScriptUpdateCheck", base::FEATURE_ENABLED_BY_DEFAULT};
momohattfc352292018-08-29 05:12:36217
Kenichi Ishibashi42f883d2019-01-11 08:26:14218const base::Feature kServiceWorkerAggressiveCodeCache{
219 "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};
220
Makoto Shimazua8b3d742019-04-05 06:55:51221// Experiment of the delay from navigation to starting an update of a service
222// worker's script.
223const base::Feature kServiceWorkerUpdateDelay{
224 "ServiceWorkerUpdateDelay", base::FEATURE_DISABLED_BY_DEFAULT};
225
Scott Haseley8eefdcd2018-08-22 16:50:19226// Freeze scheduler task queues in background after allowed grace time.
227// "stop" is a legacy name.
228const base::Feature kStopInBackground {
229 "stop-in-background",
230#if defined(OS_ANDROID)
231 base::FEATURE_ENABLED_BY_DEFAULT
232#else
233 base::FEATURE_DISABLED_BY_DEFAULT
234#endif
235};
236
Takashi Sakamotoc19fc2b2019-04-10 06:30:52237// Freeze scheduler task queues in background on network idle.
238// This feature only works if stop-in-background is enabled.
239const base::Feature kFreezeBackgroundTabOnNetworkIdle{
240 "freeze-background-tab-on-network-idle", base::FEATURE_DISABLED_BY_DEFAULT};
241
Shubhie Panicker60bd4b02018-09-26 00:02:15242// Freeze non-timer task queues in background, after allowed grace time.
243// "stop" is a legacy name.
Dave Tapuska9140c552019-05-30 16:18:56244const base::Feature kStopNonTimersInBackground{
245 "stop-non-timers-in-background", base::FEATURE_ENABLED_BY_DEFAULT};
Scott Haseley7757f6c2018-08-03 14:33:23246
Brandon Maslenda12cf82019-08-23 20:54:18247// Enable the Storage Access API. https://crbug.com/989663.
248const base::Feature kStorageAccessAPI{"StorageAccessAPI",
249 base::FEATURE_DISABLED_BY_DEFAULT};
250
David Bokane9370c22019-02-14 15:19:58251// Enable text snippets in URL fragments. https://crbug.com/919204.
252const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
253 base::FEATURE_DISABLED_BY_DEFAULT};
254
Bill Budge4d028f12018-11-20 15:05:12255// Enables the site isolated Wasm code cache that is keyed on the resource URL
256// and the origin lock of the renderer that is requesting the resource. When
257// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
258const base::Feature kWasmCodeCache = {"WasmCodeCache",
259 base::FEATURE_DISABLED_BY_DEFAULT};
260
Marijn Kruisselbrinkca4bb5e2019-04-22 18:19:42261// Writable files and native file system access. https://crbug.com/853326
262const base::Feature kNativeFileSystemAPI{"NativeFileSystemAPI",
Marijn Kruisselbrink4cc3ec22019-09-04 16:28:20263 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44264
Jay Harris583f48922019-05-06 05:55:24265// File handling integration. https://crbug.com/829689
266const base::Feature kFileHandlingAPI{"FileHandlingAPI",
267 base::FEATURE_DISABLED_BY_DEFAULT};
268
kdillon66bf5b522019-01-02 22:08:30269// Allows for synchronous XHR requests during page dismissal
270const base::Feature kForbidSyncXHRInPageDismissal{
Katie Dillon54c1ad222019-04-18 23:49:52271 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
kdillon66bf5b522019-01-02 22:08:30272
Dominic Farolino780df942019-09-04 06:49:44273// Prefetch request properties are updated to be privacy-preserving. See
274// crbug.com/988956.
275const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
276 base::FEATURE_DISABLED_BY_DEFAULT};
Dominic Farolino693fd72d2019-08-05 11:09:44277
Carlos ILd3be52b2018-10-08 17:57:18278const char kMixedContentAutoupgradeModeParamName[] = "mode";
279const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
280const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
281 "optionally-blockable";
282
Sasha McIntoshe889f9f2019-09-03 21:01:57283// Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this
284// format in the image decode cache. See crbug.com/919627 for details on the
285// feature.
286const base::Feature kDecodeJpeg420ImagesToYUV{
287 "DecodeJpeg420ImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
288
Madeleine Barowsky45be21a42018-12-07 18:39:30289// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
290// in the image decode cache. See crbug.com/900264 for details on the feature.
291const base::Feature kDecodeLossyWebPImagesToYUV{
292 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
293
Tarun Bansale4ad3472019-07-09 03:59:28294// Enables usage of render frame observer as the receiver of the resource
295// loading hints in the render process.
296// https://crbug.com/891328.
297const base::Feature kSendPreviewsLoadingHintsBeforeCommit{
298 "SendPreviewsLoadingHintsBeforeCommit", base::FEATURE_ENABLED_BY_DEFAULT};
299
Takashi Toyoshimaa91506d2019-03-28 05:44:42300// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
301// The feature is disabled on Android for WebView API issue discussed at
302// https://crbug.com/942440.
303const base::Feature kWebFontsCacheAwareTimeoutAdaption {
304 "WebFontsCacheAwareTimeoutAdaption",
305#if defined(OS_ANDROID)
306 base::FEATURE_DISABLED_BY_DEFAULT
307#else
308 base::FEATURE_ENABLED_BY_DEFAULT
309#endif
310};
311
Ehsan Karamadbe95d122019-05-10 17:59:06312// Enabled to block programmatic focus in subframes when not triggered by user
313// activation (see htpps://crbug.com/954349).
314const base::Feature kBlockingFocusWithoutUserActivation{
315 "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT};
316
Hongchan Choi370d3af2019-05-20 20:56:58317const base::Feature kAudioWorkletRealtimeThread{
318 "AudioWorkletRealtimeThread", base::FEATURE_DISABLED_BY_DEFAULT};
319
Ryan Sturm139c3ac2019-07-12 18:52:53320// A feature to reduce the set of resources fetched by No-State Prefetch.
321const base::Feature kLightweightNoStatePrefetch{
Ryan Sturm37bcbec2019-07-26 12:53:08322 "LightweightNoStatePrefetch", base::FEATURE_DISABLED_BY_DEFAULT};
Ryan Sturm139c3ac2019-07-12 18:52:53323
Daniel Libby7da24b72019-05-22 05:46:35324// Use scroll gestures for scrollbar scrolls (see https://crbug.com/954007).
325const base::Feature kScrollbarInjectScrollGestures{
Daniel Libby97b44752019-05-31 23:00:07326 "ScrollbarInjectScrollGestures", base::FEATURE_ENABLED_BY_DEFAULT};
Daniel Libby7da24b72019-05-22 05:46:35327
Aran Gilman5e9672bed2019-08-02 19:07:49328// Automatically convert light-themed pages to use a Blink-generated dark theme
329const base::Feature kForceWebContentsDarkMode{
330 "WebContentsForceDark", base::FEATURE_DISABLED_BY_DEFAULT};
331
332// Which algorithm should be used for color inversion?
333const base::FeatureParam<ForceDarkInversionMethod>::Option
334 forcedark_inversion_method_options[] = {
335 {ForceDarkInversionMethod::kUseBlinkSettings,
336 "use_blink_settings_for_method"},
337 {ForceDarkInversionMethod::kHslBased, "hsl_based"},
Aran Gilman8b3ca41c2019-08-12 18:59:04338 {ForceDarkInversionMethod::kCielabBased, "cielab_based"},
339 {ForceDarkInversionMethod::kRgbBased, "rgb_based"}};
Aran Gilman5e9672bed2019-08-02 19:07:49340
341const base::FeatureParam<ForceDarkInversionMethod>
342 kForceDarkInversionMethodParam{&kForceWebContentsDarkMode,
343 "inversion_method",
344 ForceDarkInversionMethod::kUseBlinkSettings,
345 &forcedark_inversion_method_options};
346
347// Should images be inverted?
348const base::FeatureParam<ForceDarkImageBehavior>::Option
349 forcedark_image_behavior_options[] = {
350 {ForceDarkImageBehavior::kUseBlinkSettings,
351 "use_blink_settings_for_images"},
352 {ForceDarkImageBehavior::kInvertNone, "none"},
353 {ForceDarkImageBehavior::kInvertSelectively, "selective"}};
354
355const base::FeatureParam<ForceDarkImageBehavior> kForceDarkImageBehaviorParam{
356 &kForceWebContentsDarkMode, "image_behavior",
357 ForceDarkImageBehavior::kUseBlinkSettings,
358 &forcedark_image_behavior_options};
359
360// Do not invert text lighter than this.
361// Range: 0 (do not invert any text) to 256 (invert all text)
362// Can also set to -1 to let Blink's internal settings control the value
363const base::FeatureParam<int> kForceDarkTextLightnessThresholdParam{
364 &kForceWebContentsDarkMode, "text_lightness_threshold", -1};
365
366// Do not invert backgrounds darker than this.
367// Range: 0 (invert all backgrounds) to 256 (invert no backgrounds)
368// Can also set to -1 to let Blink's internal settings control the value
369const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{
370 &kForceWebContentsDarkMode, "background_lightness_threshold", -1};
371
Fernando Serboncinif3186162019-06-10 20:03:47372const base::Feature kCanvasAlwaysDeferral{"CanvasAlwaysDeferral",
373 base::FEATURE_ENABLED_BY_DEFAULT};
374
Adam Rice8e55e802019-06-24 11:58:03375// Use the new C++ implementation of WHATWG Streams. See
376// https://crbug.com/977500.
377const base::Feature kStreamsNative{"StreamsNative",
Adam Rice3c4fc7b2019-08-15 08:51:13378 base::FEATURE_ENABLED_BY_DEFAULT};
Adam Rice8e55e802019-06-24 11:58:03379
Michael Lippautze670df9f2019-07-09 11:39:49380// Blink garbage collection.
381// Enables compaction of backing stores on Blink's heap.
382const base::Feature kBlinkHeapCompaction{"BlinkHeapCompaction",
383 base::FEATURE_ENABLED_BY_DEFAULT};
384// Enables concurrently marking Blink's heap.
385const base::Feature kBlinkHeapConcurrentMarking{
386 "BlinkHeapConcurrentMarking", base::FEATURE_DISABLED_BY_DEFAULT};
Anton Bikineev9b7b3722019-07-09 13:48:39387// Enables concurrently sweeping Blink's heap.
388const base::Feature kBlinkHeapConcurrentSweeping{
Anton Bikineev204cc752019-08-07 00:26:37389 "BlinkHeapConcurrentSweeping", base::FEATURE_ENABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49390// Enables incrementally marking Blink's heap.
391const base::Feature kBlinkHeapIncrementalMarking{
392 "BlinkHeapIncrementalMarking", base::FEATURE_ENABLED_BY_DEFAULT};
393// Enables a marking stress mode that schedules more garbage collections and
394// also adds additional verification passes.
395const base::Feature kBlinkHeapIncrementalMarkingStress{
396 "BlinkHeapIncrementalMarkingStress", base::FEATURE_DISABLED_BY_DEFAULT};
397// Enables unified heap garbage collection scheduling where scheduling is
398// delegated to V8's heap controller.
399const base::Feature kBlinkHeapUnifiedGCScheduling{
400 "BlinkHeapUnifiedGCScheduling", base::FEATURE_ENABLED_BY_DEFAULT};
401
Ben Kelly298d8e02019-07-10 17:37:49402// Enables a delay before BufferingBytesConsumer begins reading from its
403// underlying consumer when instantiated with CreateWithDelay().
404const base::Feature kBufferingBytesConsumerDelay{
Ben Kellyb97951a2019-08-05 19:59:51405 "BufferingBytesConsumerDelay", base::FEATURE_ENABLED_BY_DEFAULT};
Ben Kelly298d8e02019-07-10 17:37:49406const base::FeatureParam<int> kBufferingBytesConsumerDelayMilliseconds{
407 &kBufferingBytesConsumerDelay, "milliseconds", 50};
408
Yoav Weissddfb8d2e2019-07-15 22:34:03409// Enables removing AppCache delays when triggering requests when the HTML was
410// not fetched from AppCache.
411const base::Feature kVerifyHTMLFetchedFromAppCacheBeforeDelay{
412 "VerifyHTMLFetchedFromAppCacheBeforeDelay",
413 base::FEATURE_DISABLED_BY_DEFAULT};
414
Michael Spang8d2303e2019-07-26 01:56:32415// Controls whether we use ThreadPriority::DISPLAY for renderer
416// compositor & IO threads.
417const base::Feature kBlinkCompositorUseDisplayThreadPriority {
418 "BlinkCompositorUseDisplayThreadPriority",
419#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
420 base::FEATURE_ENABLED_BY_DEFAULT
421#else
422 base::FEATURE_DISABLED_BY_DEFAULT
423#endif
424};
425
Yuki Shiinoa812f492019-08-23 06:47:46426// Ignores cross origin windows in the named property interceptor of Window.
427// https://crbug.com/538562
428const base::Feature kIgnoreCrossOriginWindowWhenNamedAccessOnWindow{
429 "IgnoreCrossOriginWindowWhenNamedAccessOnWindow",
430 base::FEATURE_DISABLED_BY_DEFAULT};
431
Tarun Bansal38792462019-09-04 16:08:11432// When enabled, loading priority of JavaScript requests is lowered when they
433// are force deferred by the intervention.
434const base::Feature kLowerJavaScriptPriorityWhenForceDeferred{
435 "LowerJavaScriptPriorityWhenForceDeferred",
436 base::FEATURE_ENABLED_BY_DEFAULT};
437
Matt Falkenhagen5cc652792018-06-21 10:34:33438} // namespace features
439} // namespace blink