blob: 18a9c4363da84d7c05158df76295aa7c3d4fa6fd [file]
// 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,
// capitalize the first alphabetic character in each sequence of alphabetic
// characters, then remove dashes. I.e. "view-transitions" becomes
// kViewTransitions, canvas-2d-color-management becomes
// kCanvas2DColorManagement, etc. This translation should match the behavior of
// id.title().replace("-", "") in Python or SUBSTITUTE(PROPER(id), "-", "") in
// Google Sheets. 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,
kOBSOLETE_Popover = 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,
kOBSOLETE_CanvasTextBaselines = 94,
kColorMix = 95,
kAriaAttributeReflection = 96,
kAnchorPositioning = 97,
kImageSet = 98,
kStructuredClone = 99,
kSlotAssign = 100,
kMasks = 101,
kDeviceOrientationEvents = 102,
kGamepad = 103,
kScreenWakeLock = 104,
kWebBluetooth = 105,
kWebNfc = 106,
kSerial = 107,
kJsModulesServiceWorkers = 108,
kJsModulesSharedWorkers = 109,
kJsModulesWorkers = 110,
kTwoValueDisplay = 111,
kOverflowShorthand = 112,
kFieldSizing = 113,
kDetailsName = 114,
kOBSOLETE_ElementCheckVisibility = 115,
kKeyboardMap = 116,
kOBSOLETE_HiddenUntilFoundAttribute = 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,
kContextFillStroke = 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,
kClipPathBoxes = 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,
kScrollSnapEvents = 228,
kMoveBefore = 229,
kScrollDrivenAnimations = 230,
kWebAnimations = 231,
kCrossDocumentViewTransitions = 232,
kDisplayAnimation = 233,
kCalcSize = 234,
kInterpolateSize = 235,
kLongAnimationFrames = 236,
kPageVisibilityState = 237,
kArrayFindlast = 238,
kArrayGroup = 239,
kPromiseWithresolvers = 240,
kTransferableArraybuffer = 241,
kAtomicsWaitAsync = 242,
kOBSOLETE_LocaleInfoObsoletedGetters = 243,
kIntlLocaleInfo = 244,
kViewTransitionClass = 245,
kDRAFT_ReferenceTarget = 246,
kFedcm = 247,
kWebOtp = 248,
kPreservesPitch = 249,
kViewportUnitVariants = 250,
kPromiseTry = 251,
kStringReplaceall = 252,
kStringWellformed = 253,
kWeakReferences = 254,
kRemotePlayback = 255,
kVerticalFormControls = 256,
kPdfViewer = 257,
kFileSystemAccess = 258,
kClosewatcher = 259,
kReferrerPolicy = 260,
kUrlCanparse = 261,
kWritingsuggestions = 262,
kInk = 263,
kVirtualKeyboard = 264,
kNonCookieStorageAccess = 265,
kIntlDurationFormat = 266,
kWindowControlsOverlay = 267,
kFetchPriority = 268,
kHighlight = 269,
kIsError = 270,
kClipboardCustomFormat = 271,
kClipboardSvg = 272,
kClipboardSupports = 273,
kBarprop = 274,
kBeforeunload = 275,
kBfcacheBlockingReasons = 276,
kLayoutInstability = 277,
kProfiler = 278,
kAsyncIterableStreams = 279,
kContainerScrollStateQueries = 280,
kViewTransitionsElementScoped = 281,
kAttributionReporting = 282,
kCookieStore = 283,
kFencedframe = 284,
kFontVariantEmoji = 285,
kGethtml = 286,
kLocalFonts = 287,
kMeasureMemory = 288,
kMediaPlaybackQuality = 289,
kWebgpu = 290,
kZstd = 291,
kColumnPseudo = 292,
kInteractivity = 293,
kScrollButtons = 294,
kScrollMarkers = 295,
kPopoverHint = 296,
kRegexpEscape = 297,
kFloat16Array = 298,
kAppFileHandlers = 299,
kAppProtocolHandlers = 300,
kBadging = 301,
kManifest = 302,
kBeforeinstallprompt = 303,
kAppShareTargets = 304,
kAppShortcuts = 305,
kFetchlater = 306,
kDRAFT_WasmBranchHinting = 307,
kExplicitResourceManagement = 308,
kAppLaunchHandler = 309,
kFunction = 310,
kIf = 311,
kDRAFT_WebAppManifestUpdate = 312,
kReadingFlow = 313,
kComposedRanges = 314,
kCompressionDictionaryTransport = 315,
kHttp3 = 316,
kSpeculationRules = 317,
kTextBox = 318,
kScrollInitialTarget = 319,
kHasSlotted = 320,
kElementCapture = 321,
kRegionCapture = 322,
kRequestAnimationFrame = 323,
kRequestAnimationFrameWorkers= 324,
kIframeCredentialless = 325,
kUrlpattern = 326,
kWebauthnPublicKeyEasy = 327,
kIntlDisplayNames = 328,
kState = 329,
kPrintColorAdjust = 330,
kTextUnderlineOffset = 331,
kWindowManagement = 332,
kRequestclose = 333,
kUint8ArrayBase64Hex = 334,
kLineBreak = 335,
kOverflowClip = 336,
kLightDark = 337,
kRequestidlecallback = 338,
kClearSiteData = 339,
kLinkRelExpect = 340,
kUaClientHints = 341,
kCustomizableSelect = 342,
kNot = 343,
kScripting = 344,
kAlignContentBlock = 345,
kSizesAuto = 346,
kWasmSimd = 347,
kObservable = 348,
kMetaApplicationTitle = 349,
kDialogClosedby = 350,
kFontFamilyMath = 351,
kAutofill = 352,
kFontMetricOverrides = 353,
kDetailsContent = 354,
kTimeRelativeSelectors = 355,
kWasmExceptionHandling = 356,
kWasmExtendedConstantExpressions = 357,
kWasmGarbageCollection = 358,
kWasmMultiMemory = 359,
kWasmReferenceTypes = 360,
kWasmSimdRelaxed = 361,
kWasmTailCallOptimization = 362,
kWasmThreads = 363,
kWasmStringBuiltins = 364,
kWasmTypedFunRefs = 365,
kWasmMemory64 = 366,
kWasmExnrefExceptions = 367,
kWasmMultiValue = 368,
kWasmBulkMemory = 369,
kWasmMutableGlobals = 370,
kWasmNonTrappingFloatToInt = 371,
kWasmSignExtensionOperators = 372,
kDRAFT_IncomingCallNotifications = 373,
kPopover = 374,
kDRAFT_WebInstallAPI = 375,
kTopLevelAwait = 376,
kAtomicsPause = 377,
kLogicalAssignments = 378,
kNullishCoalescing = 379,
kDRAFT_CrashReportStorageAPIInitialize = 380,
kExtTextureCompressionBptc = 381,
kExtTextureCompressionRgtc = 382,
kExtTextureNorm16 = 383,
kOesFboRenderMipmap = 384,
kWebglColorManagement = 385,
kWebglCompressedTexturePvrtc = 386,
kWebglDesynchronized = 387,
kWebglMultiDraw = 388,
kWebglOesDrawBuffersIndexed = 389,
kWebgl2ColorManagement = 390,
kWebgl2Desynchronized = 391,
kRegexpCompile = 392,
kWith = 393,
kHtmlWrapperMethods = 394,
kRegexpStaticProperties = 395,
kJsonModules = 396,
kDRAFT_WasmCustomDescriptors = 397,
kFetchRequestStreams = 398,
kTransferableStreams = 399,
kReadableByteStreams = 400,
kDevicePosture = 401,
kWebxrAnchors = 402,
kWebxrAr = 403,
kWebxrCamera = 404,
kWebxrDepthSensing = 405,
kWebxrDomOverlays = 406,
kWebxrHandInput = 407,
kWebxrHitTest = 408,
kWebxrLightingEstimation = 409,
kReporting = 410,
kFontLanguageOverride = 411,
kWebnn = 412,
kTextDetect = 413,
kTextJustify = 414,
kSummarizer = 415,
kTranslationApi = 416,
kDRAFT_MetaTextScale = 417,
kJpegxl = 418,
kPartitionedCookies = 419,
kPrompt = 420,
kProofreader = 421,
kRewriter = 422,
kWriter = 423,
// 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/metadata/blink/enums.xml:WebDXFeatureObserver)