blob: 818c56f7ac2f8e4e41f71ff58facde5fbf443eb5 [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
Scott Haseley8eefdcd2018-08-22 16:50:197#include "build/build_config.h"
8
Matt Falkenhagen5cc652792018-06-21 10:34:339namespace blink {
10namespace features {
11
Fabio Tirelo9b423c7b2018-08-15 14:32:1812const base::Feature kAutofillPreviewStyleExperiment{
13 "AutofillPreviewStyleExperiment", base::FEATURE_DISABLED_BY_DEFAULT};
14
Stephen Chenneyde6e5c82019-01-21 01:56:0415// Enable defer commits a bit to avoid flash.
16const base::Feature kAvoidFlashBetweenNavigation{
17 "AvoidFlashBetweenNavigation", base::FEATURE_DISABLED_BY_DEFAULT};
18
Matt Falkenhagenc25fea42018-07-17 07:13:5219// Enable eagerly setting up a CacheStorage interface pointer and
20// passing it to service workers on startup as an optimization.
21const base::Feature kEagerCacheStorageSetupForServiceWorkers{
22 "EagerCacheStorageSetupForServiceWorkers",
23 base::FEATURE_ENABLED_BY_DEFAULT};
24
Eric Karl0623ec72018-10-30 19:43:2625// Controls the user-specified viewport restriction for GPU Rasterization on
26// mobile. See https://crbug.com/899399
27const base::Feature kEnableGpuRasterizationViewportRestriction{
28 "EnableGpuRasterizationViewportRestriction",
29 base::FEATURE_ENABLED_BY_DEFAULT};
30
Peter Kvitek197eaf72018-12-04 19:14:5631// Controls script streaming.
32const base::Feature kScriptStreaming{"ScriptStreaming",
33 base::FEATURE_ENABLED_BY_DEFAULT};
34
Liquan(Max) Gu4e243fc2018-11-17 00:13:0235// Enable FCP++ by experiment. See https://crbug.com/869924
36const base::Feature kFirstContentfulPaintPlusPlus{
37 "FirstContentfulPaintPlusPlus", base::FEATURE_DISABLED_BY_DEFAULT};
38
Makoto Shimazu172eec02018-11-29 06:21:4439// Tracks "jank" from layout objects changing their visual location between
40// animation frames (see crbug.com/581518).
41const base::Feature kJankTracking{"JankTracking",
42 base::FEATURE_DISABLED_BY_DEFAULT};
43
Steve Kobesaa9c7c22019-01-21 18:24:1344const base::Feature kJankTrackingSweepLine{"JankTrackingSweepLine",
45 base::FEATURE_DISABLED_BY_DEFAULT};
46
Philip Rogers63481332018-12-01 22:16:5147// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
48// generates the compositor property trees. See: https://crbug.com/836884.
49const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
50 base::FEATURE_DISABLED_BY_DEFAULT};
51
Ian Kilpatricke68ef11a2018-07-04 03:52:1052// Enable LayoutNG.
53const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
54
Makoto Shimazu172eec02018-11-29 06:21:4455const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
56 base::FEATURE_DISABLED_BY_DEFAULT};
57
Marijn Kruisselbrinkcde64632018-06-22 22:45:1658// Enable mojo Blob URL interface and better blob URL lifetime management.
59// Can be enabled independently of NetworkService.
60const base::Feature kMojoBlobURLs{"MojoBlobURLs",
61 base::FEATURE_DISABLED_BY_DEFAULT};
62
Tarun Bansal422f9012019-01-23 16:55:5863// Used to control the collection of anchor element metrics (crbug.com/856683).
64// If kNavigationPredictor is enabled, then metrics of anchor elements
65// in the first viewport after the page load and the metrics of the clicked
66// anchor element will be extracted and recorded. Additionally, navigation
67// predictor may preconnect/prefetch to resources/origins to make the
68// future navigations faster.
69const base::Feature kNavigationPredictor{"NavigationPredictor",
70 base::FEATURE_DISABLED_BY_DEFAULT};
71
Hiroki Nakagawadf83a6f2019-01-28 06:07:4672// Enable off-the-main-thread dedicated worker script fetch.
73// (https://crbug.com/835717)
74const base::Feature kOffMainThreadDedicatedWorkerScriptFetch{
75 "OffMainThreadDedicatedWorkerScriptFetch",
76 base::FEATURE_DISABLED_BY_DEFAULT};
77
Daniel Murphy80ce3022018-10-18 07:28:0778// Onion souping for all DOMStorage. https://crbug.com/781870
Daniel Murphy95792ef2018-10-04 01:29:5579const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage",
Daniel Murphyb584e222019-01-31 01:09:3880 base::FEATURE_DISABLED_BY_DEFAULT};
Daniel Murphy95792ef2018-10-04 01:29:5581
Hiroki Nakagawa61ee0042019-01-22 06:30:2682// Enable browser-initiated dedicated worker script loading
83// (PlzDedicatedWorker). https://crbug.com/906991
84const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
85 base::FEATURE_DISABLED_BY_DEFAULT};
86
Daniel Murphy95792ef2018-10-04 01:29:5587// Enable Portals. https://crbug.com/865123.
88const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
89
David Bokan911bded2018-11-27 23:23:3290// Enable Implicit Root Scroller. https://crbug.com/903260.
91const base::Feature kImplicitRootScroller{"ImplicitRootScroller",
David Bokan5173a502019-01-11 22:06:4892 base::FEATURE_ENABLED_BY_DEFAULT};
David Bokan911bded2018-11-27 23:23:3293
Makoto Shimazu172eec02018-11-29 06:21:4494// Enables usage of getDisplayMedia() that allows capture of web content, see
95// https://crbug.com/865060.
96const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
97 base::FEATURE_ENABLED_BY_DEFAULT};
98
99// Changes the default RTCPeerConnection constructor behavior to use Unified
100// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
101// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
102// argument).
103const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:56104 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44105
Johannes Kronad5a4532019-01-09 11:17:46106// Determines if the SDP attrbute extmap-allow-mixed should be offered by
107// default or not. The default value can be overridden by passing
108// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
109// constructor.
110const base::Feature kRTCOfferExtmapAllowMixed{
111 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
112
Makoto Shimazufc82e992018-12-05 07:14:28113// Enables to load the response body through Mojo data pipe passed by
114// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
115// WebURLLoaderClient::DidReceiveData().
116const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
Makoto Shimazu8d98fb52019-02-04 06:22:07117 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazufc82e992018-12-05 07:14:28118
momohattfc352292018-08-29 05:12:36119const base::Feature kServiceWorkerImportedScriptUpdateCheck{
120 "ServiceWorkerImportedScriptUpdateCheck",
121 base::FEATURE_DISABLED_BY_DEFAULT};
122
Ben Kellye20dc402018-09-18 01:55:42123// Enables reading a subresource's body data and side data in parallel.
124const base::Feature kServiceWorkerParallelSideDataReading{
125 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
126
Kenichi Ishibashi42f883d2019-01-11 08:26:14127const base::Feature kServiceWorkerAggressiveCodeCache{
128 "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};
129
Matt Falkenhagen5cc652792018-06-21 10:34:33130// Enable new service worker glue for NetworkService. Can be
131// enabled independently of NetworkService.
132const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:44133 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33134
Scott Haseley8eefdcd2018-08-22 16:50:19135// Freeze scheduler task queues in background after allowed grace time.
136// "stop" is a legacy name.
137const base::Feature kStopInBackground {
138 "stop-in-background",
139#if defined(OS_ANDROID)
140 base::FEATURE_ENABLED_BY_DEFAULT
141#else
142 base::FEATURE_DISABLED_BY_DEFAULT
143#endif
144};
145
Shubhie Panicker60bd4b02018-09-26 00:02:15146// Freeze non-timer task queues in background, after allowed grace time.
147// "stop" is a legacy name.
148const base::Feature kStopNonTimersInBackground {
149 "stop-non-timers-in-background",
150#if defined(OS_ANDROID)
151 base::FEATURE_ENABLED_BY_DEFAULT
152#else
153 base::FEATURE_DISABLED_BY_DEFAULT
154#endif
155};
Scott Haseley7757f6c2018-08-03 14:33:23156
Bill Budge4d028f12018-11-20 15:05:12157// Enables the site isolated Wasm code cache that is keyed on the resource URL
158// and the origin lock of the renderer that is requesting the resource. When
159// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
160const base::Feature kWasmCodeCache = {"WasmCodeCache",
161 base::FEATURE_DISABLED_BY_DEFAULT};
162
Makoto Shimazu172eec02018-11-29 06:21:44163// Writable files and native filesystem access. https://crbug.com/853326
164const base::Feature kWritableFilesAPI{"WritableFilesAPI",
165 base::FEATURE_DISABLED_BY_DEFAULT};
166
kdillon66bf5b522019-01-02 22:08:30167// Allows for synchronous XHR requests during page dismissal
168const base::Feature kForbidSyncXHRInPageDismissal{
169 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
170
Fabio Tirelo9b423c7b2018-08-15 14:32:18171const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
172
173const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
174
Carlos ILd3be52b2018-10-08 17:57:18175const char kMixedContentAutoupgradeModeParamName[] = "mode";
176const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
177const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
178 "optionally-blockable";
179
Madeleine Barowsky45be21a42018-12-07 18:39:30180// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
181// in the image decode cache. See crbug.com/900264 for details on the feature.
182const base::Feature kDecodeLossyWebPImagesToYUV{
183 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
184
Aaron Krajeskif2f827d422019-01-08 15:08:34185// Use accelerated canvases whenever possible see https://crbug.com/909937
186const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
187 base::FEATURE_DISABLED_BY_DEFAULT};
188
Takashi Toyoshima67bee392019-01-29 11:30:36189// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
190const base::Feature kWebFontsCacheAwareTimeoutAdaption{
191 "WebFontsCacheAwareTimeoutAdaption", base::FEATURE_ENABLED_BY_DEFAULT};
192
Matt Falkenhagen5cc652792018-06-21 10:34:33193} // namespace features
194} // namespace blink