summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/common/features.cc
blob: 0c0ea5ae8d979e867a6b9feaecd82ce012e39a46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/public/common/features.h"

#include "build/build_config.h"

namespace blink {
namespace features {

const base::Feature kAutofillPreviewStyleExperiment{
    "AutofillPreviewStyleExperiment", base::FEATURE_DISABLED_BY_DEFAULT};

// Enable defer commits a bit to avoid flash.
const base::Feature kAvoidFlashBetweenNavigation{
    "AvoidFlashBetweenNavigation", base::FEATURE_DISABLED_BY_DEFAULT};

// Enable eagerly setting up a CacheStorage interface pointer and
// passing it to service workers on startup as an optimization.
const base::Feature kEagerCacheStorageSetupForServiceWorkers{
    "EagerCacheStorageSetupForServiceWorkers",
    base::FEATURE_ENABLED_BY_DEFAULT};

// Controls the user-specified viewport restriction for GPU Rasterization on
// mobile. See https://crbug.com/899399
const base::Feature kEnableGpuRasterizationViewportRestriction{
    "EnableGpuRasterizationViewportRestriction",
    base::FEATURE_ENABLED_BY_DEFAULT};

// Controls script streaming.
const base::Feature kScriptStreaming{"ScriptStreaming",
                                     base::FEATURE_ENABLED_BY_DEFAULT};

// Enable FCP++ by experiment. See https://crbug.com/869924
const base::Feature kFirstContentfulPaintPlusPlus{
    "FirstContentfulPaintPlusPlus", base::FEATURE_DISABLED_BY_DEFAULT};

// Tracks "jank" from layout objects changing their visual location between
// animation frames (see crbug.com/581518).
const base::Feature kJankTracking{"JankTracking",
                                  base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kJankTrackingSweepLine{"JankTrackingSweepLine",
                                           base::FEATURE_DISABLED_BY_DEFAULT};

// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
// generates the compositor property trees. See: https://crbug.com/836884.
const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
                                           base::FEATURE_DISABLED_BY_DEFAULT};

// Enable LayoutNG.
const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
                                             base::FEATURE_DISABLED_BY_DEFAULT};

// Enable mojo Blob URL interface and better blob URL lifetime management.
// Can be enabled independently of NetworkService.
const base::Feature kMojoBlobURLs{"MojoBlobURLs",
                                  base::FEATURE_DISABLED_BY_DEFAULT};

// Used to control the collection of anchor element metrics (crbug.com/856683).
// If kNavigationPredictor is enabled, then metrics of anchor elements
// in the first viewport after the page load and the metrics of the clicked
// anchor element will be extracted and recorded. Additionally, navigation
// predictor may preconnect/prefetch to resources/origins to make the
// future navigations faster.
const base::Feature kNavigationPredictor{"NavigationPredictor",
                                         base::FEATURE_DISABLED_BY_DEFAULT};

// Onion souping for all DOMStorage. https://crbug.com/781870
const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage",
                                         base::FEATURE_DISABLED_BY_DEFAULT};

// Enable browser-initiated dedicated worker script loading
// (PlzDedicatedWorker). https://crbug.com/906991
const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
                                        base::FEATURE_DISABLED_BY_DEFAULT};

// Enable Portals. https://crbug.com/865123.
const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};

// Enable Implicit Root Scroller. https://crbug.com/903260.
const base::Feature kImplicitRootScroller{"ImplicitRootScroller",
                                          base::FEATURE_ENABLED_BY_DEFAULT};

// Enables usage of getDisplayMedia() that allows capture of web content, see
// https://crbug.com/865060.
const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
                                        base::FEATURE_ENABLED_BY_DEFAULT};

// Changes the default RTCPeerConnection constructor behavior to use Unified
// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
// argument).
const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
                                             base::FEATURE_ENABLED_BY_DEFAULT};

// Determines if the SDP attrbute extmap-allow-mixed should be offered by
// default or not. The default value can be overridden by passing
// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
// constructor.
const base::Feature kRTCOfferExtmapAllowMixed{
    "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};

// Enables to load the response body through Mojo data pipe passed by
// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
// WebURLLoaderClient::DidReceiveData().
const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
                                             base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kServiceWorkerImportedScriptUpdateCheck{
    "ServiceWorkerImportedScriptUpdateCheck",
    base::FEATURE_DISABLED_BY_DEFAULT};

// Enables reading a subresource's body data and side data in parallel.
const base::Feature kServiceWorkerParallelSideDataReading{
    "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kServiceWorkerAggressiveCodeCache{
    "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};

// Enable new service worker glue for NetworkService. Can be
// enabled independently of NetworkService.
const base::Feature kServiceWorkerServicification{
    "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};

// Freeze scheduler task queues in background after allowed grace time.
// "stop" is a legacy name.
const base::Feature kStopInBackground {
  "stop-in-background",
#if defined(OS_ANDROID)
      base::FEATURE_ENABLED_BY_DEFAULT
#else
      base::FEATURE_DISABLED_BY_DEFAULT
#endif
};

// Freeze non-timer task queues in background, after allowed grace time.
// "stop" is a legacy name.
const base::Feature kStopNonTimersInBackground {
  "stop-non-timers-in-background",
#if defined(OS_ANDROID)
      base::FEATURE_ENABLED_BY_DEFAULT
#else
      base::FEATURE_DISABLED_BY_DEFAULT
#endif
};

// Enables the site isolated Wasm code cache that is keyed on the resource URL
// and the origin lock of the renderer that is requesting the resource. When
// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
const base::Feature kWasmCodeCache = {"WasmCodeCache",
                                      base::FEATURE_DISABLED_BY_DEFAULT};

// Writable files and native filesystem access. https://crbug.com/853326
const base::Feature kWritableFilesAPI{"WritableFilesAPI",
                                      base::FEATURE_DISABLED_BY_DEFAULT};

// Allows for synchronous XHR requests during page dismissal
const base::Feature kForbidSyncXHRInPageDismissal{
    "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};

const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";

const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";

const char kMixedContentAutoupgradeModeParamName[] = "mode";
const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
    "optionally-blockable";

// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
// in the image decode cache. See crbug.com/900264 for details on the feature.
const base::Feature kDecodeLossyWebPImagesToYUV{
    "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};

// Use accelerated canvases whenever possible see https://crbug.com/909937
const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
                                            base::FEATURE_DISABLED_BY_DEFAULT};

// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
const base::Feature kWebFontsCacheAwareTimeoutAdaption{
    "WebFontsCacheAwareTimeoutAdaption", base::FEATURE_ENABLED_BY_DEFAULT};

}  // namespace features
}  // namespace blink