forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebdx_feature.mojom
315 lines (309 loc) · 9.01 KB
/
webdx_feature.mojom
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module blink.mojom;
// ============ Definition for WebDXFeature used for UseCounter ===========
//
// Do not change assigned numbers of existing items: add new features
// to the end of the list.
//
// If you want to mark an item as no-longer-used, simply rename it, prefixing
// "kOBSOLETE_" before the existing name.
// E.g. kFrobulate becomes kOBSOLETE_Frobulate.
//
// A WebDXFeature counter represents actual usage of a high level feature (as
// defined in https://github.com/web-platform-dx/web-features). A WebDXFeature
// can be a JS API, an HTML element, CSS, etc. Generally, we want these counters
// to count usage of a feature by a web developer on a page. I.e. aim to count
// along the following principles:
//
// * JS invocable API: Call on invocation of central entry points
// (i.e. constructor, main API method implementations, or other central
// code paths not likely to be triggered by feature detection or
// fingerprinting on a web page), or triggered by internal usage in the
// renderer.
//
// * HTML: Count when an element is observed, either by being parsed or
// constructed by script.
//
// * CSS: Count when a feature is actually used by the page when reasonable,
// not just present in a loaded CSS file.
//
// The names of features in this enum should map to the identifiers (i.e. .yml
// file names) used by the WebDX community group at the W3C
// (https://github.com/web-platform-dx/web-features/tree/main/features).
// Those identifiers are all lower case alphanumeric identifiers, with dashes
// (-) as word separators. To translate those identifier names to enum names
// here, start with a lower case 'k', then camelcase the name and remove the
// dashes. I.e. "view-transitions" becomes kViewTransitions. More discussion
// about WebDX feature identifier naming can be found at
// https://github.com/web-platform-dx/web-features/tree/main/docs#identifiers
//
// In the event that you're adding a use counter for a feature that is yet to be
// defined by the WebDX community group, file an issue at
// https://github.com/web-platform-dx/web-features/issues/new?assignees=&labels=feature+definition&projects=&template=new-feature.yml,
// pick a name that you feel is likely to become the name that is used as the
// identifier once agreed upon by the WebDX community group, and prefix the name
// with DRAFT_. I.e. if the likely identifier name is sprocket, name your use
// counter kDRAFT_Sprocket. Once the community group has agreed on the
// identifier name, remove DRAFT_ from the use counter name here, and update the
// name itself if necessary.
//
// LINT.IfChange(WebDXFeature)
enum WebDXFeature {
kPageVisits = 0,
kCompressionStreams = 1,
kViewTransitions = 2,
kPopover = 3,
kSubgrid = 4,
kCascadeLayers = 5,
kAccentColor = 6,
kAnimationComposition = 7,
kAppearance = 8,
kAspectRatio = 9,
kAvif = 10,
kBackdropFilter = 11,
kBlockingRender = 12,
kBorderImage = 13,
kBroadcastChannel = 14,
kCanvasContextLost = 15,
kColorScheme = 16,
kComputePressure = 17,
kConstructedStylesheets = 18,
kContainerQueries = 19,
kContainerStyleQueries = 20,
kContainIntrinsicSize = 21,
kCounterStyle = 22,
kCssModules = 23,
kDeclarativeShadowDom = 24,
kDialog = 25,
kDocumentPictureInPicture = 26,
kFlexboxGap = 27,
kFlexbox = 28,
kFocusVisible = 29,
kFontOpticalSizing = 30,
kFontPaletteAnimation = 31,
kFontPalette = 32,
kFontSynthesisSmallCaps = 33,
kFontSynthesisStyle = 34,
kFontSynthesisWeight = 35,
kFontSynthesis = 36,
kFontVariantAlternates = 37,
kGrid = 38,
kHas = 39,
kHyphens = 40,
kIdleDetection = 41,
kImportMaps = 42,
kIndividualTransforms = 43,
kIntersectionObserverV2 = 44,
kIntersectionObserver = 45,
kIs = 46,
kJsModules = 47,
kMediaSession = 48,
kOffscreenCanvas = 49,
kOriginPrivateFileSystem = 50,
kPictureInPicture = 51,
kPointerLock = 52,
kRelativeColor = 53,
kScope = 54,
kScrollbarColor = 55,
kScrollbarGutter = 56,
kScrollbarWidth = 57,
kScrollend = 58,
kScrollSnap = 59,
kScrollToTextFragment = 60,
kShowPickerInput = 61,
kSlot = 62,
kSpeechRecognition = 63,
kSpeechSynthesis = 64,
kStorageAccess = 65,
kStorageBuckets = 66,
kTargetText = 67,
kTemplate = 68,
kTextIndent = 69,
kTextSpacingTrim = 70,
kTextWrapBalance = 71,
kTextWrapPretty = 72,
kTransitionBehavior = 73,
kTrustedTypes = 74,
kUserPseudos = 75,
kWebcodecs = 76,
kWebhid = 77,
kWebLocks = 78,
kWebp = 79,
kWebtransport = 80,
kWebusb = 81,
kWebvtt = 82,
kWhere = 83,
kDatalist = 84,
kDirPseudo = 85,
kHiddenUntilFound = 86,
kWillChange = 87,
kAbortsignalAny = 88,
kNavigation = 89,
kMathml = 90,
kCanvasCreateconicgradient = 91,
kCanvasReset = 92,
kCanvasRoundrect = 93,
kCanvasTextBaselines = 94,
kColorMix = 95,
kAriaAttributeReflection = 96,
kAnchorPositioning = 97,
kImageSet = 98,
kStructuredClone = 99,
kSlotAssign = 100,
kMasks = 101,
kDeviceOrientationEvents = 102,
kDRAFT_Gamepad = 103,
kScreenWakeLock = 104,
kWebBluetooth = 105,
kWebNfc = 106,
kDRAFT_Serial = 107,
kJsModulesServiceWorkers = 108,
kJsModulesSharedWorkers = 109,
kJsModulesWorkers = 110,
kTwoValueDisplay = 111,
kOverflowShorthand = 112,
kFieldSizing = 113,
kDetailsName = 114,
kElementCheckVisibility = 115,
kKeyboardMap = 116,
kHiddenUntilFoundAttribute = 117,
kScheduler = 118,
kKeyboardLock = 119,
kSearch = 120,
kAsyncClipboard = 121,
kParseHtmlUnsafe = 122,
kClipboardUnsanitizedFormats = 123,
kAborting = 124,
kEditContext = 125,
kPaintOrder = 126,
kShowPickerSelect = 127,
kInert = 128,
kIntlSegmenter = 129,
kEyedropper = 130,
kBackgroundClipText = 131,
kContainInlineSize = 132,
kCheckVisibility = 133,
kOverlay = 134,
kOBSOLETE_CanvasElement = 135,
kOBSOLETE_CanvasFillText = 136,
kOBSOLETE_CanvasMeasureText = 137,
kOBSOLETE_Canvas2D = 138,
kOBSOLETE_CanvasAlpha = 139,
kOBSOLETE_CanvasColorManagement = 140,
kOBSOLETE_CanvasDesynchronized = 141,
kOBSOLETE_WillReadFrequently = 142,
kStartingStyle = 143,
kDocumentCaretpositionfrompoint = 144,
kMediaQueryRangeSyntax = 145,
kRegisteredCustomProperties = 146,
kAccelerometer = 147,
kContentVisibility = 148,
kCounterSet = 149,
kWebAudio = 150,
kOfflineAudioContext = 151,
kAudioWorklet = 152,
kWebMidi = 153,
kRequestVideoFrameCallback = 154,
kSvgContextFillOrStroke = 155,
kObjectViewBox = 156,
kCap = 157,
kRcap = 158,
kIc = 159,
kRic = 160,
kLh = 161,
kRlh = 162,
kNesting = 163,
kNthChildOf = 164,
kForcedColors = 165,
kWhiteSpaceCollapse = 166,
kImageOrientation = 167,
kLogicalProperties = 168,
kColorFunction = 169,
kOklab = 170,
kLab = 171,
kHwb = 172,
kRevertValue = 173,
kPrefersContrast = 174,
kPrefersReducedTransparency = 175,
kRoundModRem = 176,
kTrigFunctions = 177,
kGradientInterpolation = 178,
kFontVariantPosition = 179,
kTextEmphasis = 180,
kTextWrap = 181,
kTextWrapStyle = 182,
kCalcConstants = 183,
kExpFunctions = 184,
kFileSelectorButton = 185,
kLinearEasing = 186,
kModal = 187,
kMotionPath = 188,
kOutline = 189,
kOverflow = 190,
kRex = 191,
kSpellingGrammarError = 192,
kTextDecorationSelection = 193,
kTransformBox = 194,
kUpdate = 195,
kWordBreakAutoPhrase = 196,
kMarker = 197,
kDynamicRange = 198,
kDisplayMode = 199,
kCanvas = 200,
kCanvas2d = 201,
kCanvas2dAlpha = 202,
kCanvas2dColorManagement = 203,
kCanvas2dDesynchronized = 204,
kCanvas2dWillreadfrequently = 205,
kCh = 206,
kRch = 207,
kRubyAlign = 208,
kRubyPosition = 209,
kInitialLetter = 210,
kHyphenateCharacter = 211,
kHyphenateLimitChars = 212,
kQuotes = 213,
kBaselineSource = 214,
kClipPathGeometryBox = 215,
kClipPath = 216,
kActiveViewTransition = 217,
kBoxDecorationBreak = 218,
kPageOrientation = 219,
kFontSizeAdjust = 220,
kResizableBuffers = 221,
kOBSOLETE_V8GrowableSharedArrayBuffer = 222,
kArrayByCopy = 223,
kArrayFromasync = 224,
kIteratorMethods = 225,
kPromiseAny = 226,
kSetMethods = 227,
kScrollSnapEvent = 228,
kMoveBeforeAPI = 229,
kScrollDrivenAnimations = 230,
kWebAnimations = 231,
kCrossDocumentViewTransition = 232,
kDisplayAnimation = 233,
kCalcSize = 234,
kInterpolateSize = 235,
kLongAnimationFrames = 236,
kPageVisibilityState = 237,
kArrayFindlast = 238,
kArrayGroup = 239,
kPromiseWithresolvers = 240,
kTransferableArraybuffer = 241,
kAtomicsWaitAsync = 242,
kLocaleInfoObsoletedGetters = 243,
kLocaleInfoFunctions = 244,
kViewTransitionClass = 245,
kDRAFT_ReferenceTarget = 246,
kFedcm = 247,
kWebOtp = 248,
kPreservesPitch = 249,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
// Also, run update_use_counter_feature_enum.py in
// chromium/src/tools/metrics/histograms/ to update the UMA mapping.
};
// LINT.ThenChange(//tools/metrics/histograms/enums.xml:WebDXFeatureObserver)