| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 2012 Google, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| 11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
| 12 * | 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY |
| 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef UseCounter_h | 26 #ifndef UseCounter_h |
| 27 #define UseCounter_h | 27 #define UseCounter_h |
| 28 | 28 |
| 29 #include "core/CSSPropertyNames.h" | 29 #include "core/CSSPropertyNames.h" |
| 30 #include "core/UseCounterGenerated.h" |
| 30 #include "wtf/BitVector.h" | 31 #include "wtf/BitVector.h" |
| 31 #include "wtf/Noncopyable.h" | 32 #include "wtf/Noncopyable.h" |
| 32 #include "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
| 33 #include "wtf/PassOwnPtr.h" | 34 #include "wtf/PassOwnPtr.h" |
| 34 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 35 #include <v8.h> | 36 #include <v8.h> |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class CSSStyleSheet; | 40 class CSSStyleSheet; |
| 40 class Document; | 41 class Document; |
| 41 class ExecutionContext; | 42 class ExecutionContext; |
| 42 class Frame; | 43 class Frame; |
| 43 class LocalFrame; | 44 class LocalFrame; |
| 44 class StyleSheetContents; | 45 class StyleSheetContents; |
| 45 | 46 |
| 46 // UseCounter is used for counting the number of times features of | 47 // UseCounter is used for counting the number of times features of |
| 47 // Blink are used on real web pages and help us know commonly | 48 // Blink are used on real web pages and help us know commonly |
| 48 // features are used and thus when it's safe to remove or change them. | 49 // features are used and thus when it's safe to remove or change them. |
| 49 // | 50 // |
| 50 // The Chromium Content layer controls what is done with this data. | 51 // The Chromium Content layer controls what is done with this data. |
| 51 // For instance, in Google Chrome, these counts are submitted | 52 // For instance, in Google Chrome, these counts are submitted |
| 52 // anonymously through the Histogram recording system in Chrome | 53 // anonymously through the Histogram recording system in Chrome |
| 53 // for users who opt-in to "Usage Statistics" submission | 54 // for users who opt-in to "Usage Statistics" submission |
| 54 // during their install of Google Chrome: | 55 // during their install of Google Chrome: |
| 55 // http://www.google.com/chrome/intl/en/privacy.html | 56 // http://www.google.com/chrome/intl/en/privacy.html |
| 56 | 57 |
| 57 class UseCounter { | 58 class UseCounter : public UseCounterGenerated { |
| 58 WTF_MAKE_NONCOPYABLE(UseCounter); | 59 WTF_MAKE_NONCOPYABLE(UseCounter); |
| 59 public: | 60 public: |
| 60 UseCounter(); | 61 UseCounter(); |
| 61 ~UseCounter(); | 62 ~UseCounter(); |
| 62 | 63 |
| 63 enum Feature { | |
| 64 // Do not change assigned numbers of existing items: add new features | |
| 65 // to the end of the list. | |
| 66 PageDestruction = 0, | |
| 67 PrefixedIndexedDB = 3, | |
| 68 WorkerStart = 4, | |
| 69 SharedWorkerStart = 5, | |
| 70 UnprefixedIndexedDB = 9, | |
| 71 OpenWebDatabase = 10, | |
| 72 UnprefixedRequestAnimationFrame = 13, | |
| 73 PrefixedRequestAnimationFrame = 14, | |
| 74 ContentSecurityPolicy = 15, | |
| 75 ContentSecurityPolicyReportOnly = 16, | |
| 76 PrefixedTransitionEndEvent = 18, | |
| 77 UnprefixedTransitionEndEvent = 19, | |
| 78 PrefixedAndUnprefixedTransitionEndEvent = 20, | |
| 79 AutoFocusAttribute = 21, | |
| 80 DataListElement = 23, | |
| 81 FormAttribute = 24, | |
| 82 IncrementalAttribute = 25, | |
| 83 InputTypeColor = 26, | |
| 84 InputTypeDate = 27, | |
| 85 InputTypeDateTimeFallback = 29, | |
| 86 InputTypeDateTimeLocal = 30, | |
| 87 InputTypeEmail = 31, | |
| 88 InputTypeMonth = 32, | |
| 89 InputTypeNumber = 33, | |
| 90 InputTypeRange = 34, | |
| 91 InputTypeSearch = 35, | |
| 92 InputTypeTel = 36, | |
| 93 InputTypeTime = 37, | |
| 94 InputTypeURL = 38, | |
| 95 InputTypeWeek = 39, | |
| 96 InputTypeWeekFallback = 40, | |
| 97 ListAttribute = 41, | |
| 98 MaxAttribute = 42, | |
| 99 MinAttribute = 43, | |
| 100 PatternAttribute = 44, | |
| 101 PlaceholderAttribute = 45, | |
| 102 PrefixedDirectoryAttribute = 47, | |
| 103 RequiredAttribute = 49, | |
| 104 ResultsAttribute = 50, | |
| 105 StepAttribute = 51, | |
| 106 PageVisits = 52, | |
| 107 HTMLMarqueeElement = 53, | |
| 108 Reflection = 55, | |
| 109 PrefixedStorageInfo = 57, | |
| 110 XFrameOptions = 58, | |
| 111 XFrameOptionsSameOrigin = 59, | |
| 112 XFrameOptionsSameOriginWithBadAncestorChain = 60, | |
| 113 DeprecatedFlexboxWebContent = 61, | |
| 114 DeprecatedFlexboxChrome = 62, | |
| 115 DeprecatedFlexboxChromeExtension = 63, | |
| 116 UnprefixedPerformanceTimeline = 65, | |
| 117 UnprefixedUserTiming = 67, | |
| 118 WindowEvent = 69, | |
| 119 ContentSecurityPolicyWithBaseElement = 70, | |
| 120 PrefixedMediaAddKey = 71, | |
| 121 PrefixedMediaGenerateKeyRequest = 72, | |
| 122 DocumentClear = 74, | |
| 123 SVGFontElement = 76, | |
| 124 XMLDocument = 77, | |
| 125 XSLProcessingInstruction = 78, | |
| 126 XSLTProcessor = 79, | |
| 127 SVGSwitchElement = 80, | |
| 128 DocumentAll = 83, | |
| 129 FormElement = 84, | |
| 130 DemotedFormElement = 85, | |
| 131 SVGAnimationElement = 90, | |
| 132 KeyboardEventKeyLocation = 91, | |
| 133 LineClamp = 96, | |
| 134 SubFrameBeforeUnloadRegistered = 97, | |
| 135 SubFrameBeforeUnloadFired = 98, | |
| 136 TextReplaceWholeText = 100, | |
| 137 ConsoleMarkTimeline = 102, | |
| 138 ElementGetAttributeNode = 107, // Removed from DOM4. | |
| 139 ElementSetAttributeNode = 108, // Removed from DOM4. | |
| 140 ElementRemoveAttributeNode = 109, // Removed from DOM4. | |
| 141 ElementGetAttributeNodeNS = 110, // Removed from DOM4. | |
| 142 DocumentCreateAttribute = 111, // Removed from DOM4. | |
| 143 DocumentCreateAttributeNS = 112, // Removed from DOM4. | |
| 144 DocumentCreateCDATASection = 113, // Removed from DOM4. | |
| 145 DocumentInputEncoding = 114, // Removed from DOM4. | |
| 146 DocumentXMLEncoding = 115, // Removed from DOM4. | |
| 147 DocumentXMLStandalone = 116, // Removed from DOM4. | |
| 148 DocumentXMLVersion = 117, // Removed from DOM4. | |
| 149 NodeIsSameNode = 118, // Removed from DOM4. | |
| 150 NodeNamespaceURI = 120, // Removed from DOM4. | |
| 151 NodeLocalName = 122, // Removed from DOM4. | |
| 152 NavigatorProductSub = 123, | |
| 153 NavigatorVendor = 124, | |
| 154 NavigatorVendorSub = 125, | |
| 155 FileError = 126, | |
| 156 DocumentCharset = 127, // Documented as IE extensions = 0, from KHTML da
ys. | |
| 157 PrefixedAnimationEndEvent = 128, | |
| 158 UnprefixedAnimationEndEvent = 129, | |
| 159 PrefixedAndUnprefixedAnimationEndEvent = 130, | |
| 160 PrefixedAnimationStartEvent = 131, | |
| 161 UnprefixedAnimationStartEvent = 132, | |
| 162 PrefixedAndUnprefixedAnimationStartEvent = 133, | |
| 163 PrefixedAnimationIterationEvent = 134, | |
| 164 UnprefixedAnimationIterationEvent = 135, | |
| 165 PrefixedAndUnprefixedAnimationIterationEvent = 136, | |
| 166 EventReturnValue = 137, // Legacy IE extension. | |
| 167 SVGSVGElement = 138, | |
| 168 InsertAdjacentText = 140, | |
| 169 InsertAdjacentElement = 141, | |
| 170 HasAttributes = 142, // Removed from DOM4. | |
| 171 DOMSubtreeModifiedEvent = 143, | |
| 172 DOMNodeInsertedEvent = 144, | |
| 173 DOMNodeRemovedEvent = 145, | |
| 174 DOMNodeRemovedFromDocumentEvent = 146, | |
| 175 DOMNodeInsertedIntoDocumentEvent = 147, | |
| 176 DOMCharacterDataModifiedEvent = 148, | |
| 177 DocumentAllLegacyCall = 150, | |
| 178 HTMLAppletElementLegacyCall = 151, // Removed | |
| 179 HTMLEmbedElementLegacyCall = 152, | |
| 180 HTMLObjectElementLegacyCall = 153, | |
| 181 GetMatchedCSSRules = 155, | |
| 182 SVGFontInCSS = 156, | |
| 183 AttributeOwnerElement = 160, // Removed in DOM4. | |
| 184 AttributeSpecified = 162, // Removed in DOM4. | |
| 185 PrefixedAudioDecodedByteCount = 164, | |
| 186 PrefixedVideoDecodedByteCount = 165, | |
| 187 PrefixedVideoSupportsFullscreen = 166, | |
| 188 PrefixedVideoDisplayingFullscreen = 167, | |
| 189 PrefixedVideoEnterFullscreen = 168, | |
| 190 PrefixedVideoExitFullscreen = 169, | |
| 191 PrefixedVideoEnterFullScreen = 170, | |
| 192 PrefixedVideoExitFullScreen = 171, | |
| 193 PrefixedVideoDecodedFrameCount = 172, | |
| 194 PrefixedVideoDroppedFrameCount = 173, | |
| 195 PrefixedElementRequestFullscreen = 176, | |
| 196 PrefixedElementRequestFullScreen = 177, | |
| 197 BarPropLocationbar = 178, | |
| 198 BarPropMenubar = 179, | |
| 199 BarPropPersonalbar = 180, | |
| 200 BarPropScrollbars = 181, | |
| 201 BarPropStatusbar = 182, | |
| 202 BarPropToolbar = 183, | |
| 203 InputTypeEmailMultiple = 184, | |
| 204 InputTypeEmailMaxLength = 185, | |
| 205 InputTypeEmailMultipleMaxLength = 186, | |
| 206 InputTypeText = 190, | |
| 207 InputTypeTextMaxLength = 191, | |
| 208 InputTypePassword = 192, | |
| 209 InputTypePasswordMaxLength = 193, | |
| 210 ShowModalDialog = 195, | |
| 211 PrefixedPageVisibility = 196, | |
| 212 CSSStyleSheetInsertRuleOptionalArg = 198, // Inconsistent with the speci
fication and other browsers. | |
| 213 DocumentBeforeUnloadRegistered = 200, | |
| 214 DocumentBeforeUnloadFired = 201, | |
| 215 DocumentUnloadRegistered = 202, | |
| 216 DocumentUnloadFired = 203, | |
| 217 SVGLocatableNearestViewportElement = 204, | |
| 218 SVGLocatableFarthestViewportElement = 205, | |
| 219 OverflowChangedEvent = 208, | |
| 220 SVGPointMatrixTransform = 209, | |
| 221 DOMFocusInOutEvent = 211, | |
| 222 FileGetLastModifiedDate = 212, | |
| 223 HTMLElementInnerText = 213, | |
| 224 HTMLElementOuterText = 214, | |
| 225 ReplaceDocumentViaJavaScriptURL = 215, | |
| 226 ElementSetAttributeNodeNS = 216, // Removed from DOM4. | |
| 227 ElementPrefixedMatchesSelector = 217, | |
| 228 CSSStyleSheetRules = 219, | |
| 229 CSSStyleSheetAddRule = 220, | |
| 230 CSSStyleSheetRemoveRule = 221, | |
| 231 // The above items are available in M33 branch. | |
| 232 | |
| 233 InitMessageEvent = 222, | |
| 234 CSSStyleDeclarationGetPropertyCSSValue = 225, | |
| 235 PrefixedMediaCancelKeyRequest = 229, | |
| 236 DOMImplementationHasFeature = 230, | |
| 237 DOMImplementationHasFeatureReturnFalse = 231, | |
| 238 CanPlayTypeKeySystem = 232, | |
| 239 PrefixedDevicePixelRatioMediaFeature = 233, | |
| 240 PrefixedMaxDevicePixelRatioMediaFeature = 234, | |
| 241 PrefixedMinDevicePixelRatioMediaFeature = 235, | |
| 242 PrefixedTransform3dMediaFeature = 237, | |
| 243 PrefixedStorageQuota = 240, | |
| 244 ContentSecurityPolicyReportOnlyInMeta = 241, | |
| 245 ResetReferrerPolicy = 243, | |
| 246 CaseInsensitiveAttrSelectorMatch = 244, // Case-insensitivity dropped fr
om specification. | |
| 247 FormNameAccessForImageElement = 246, | |
| 248 FormNameAccessForPastNamesMap = 247, | |
| 249 FormAssociationByParser = 248, | |
| 250 SVGSVGElementInDocument = 250, | |
| 251 SVGDocumentRootElement = 251, | |
| 252 MediaErrorEncrypted = 253, | |
| 253 EventSourceURL = 254, | |
| 254 WebSocketURL = 255, | |
| 255 WorkerSubjectToCSP = 257, | |
| 256 WorkerAllowedByChildBlockedByScript = 258, | |
| 257 DeprecatedWebKitGradient = 260, | |
| 258 DeprecatedWebKitLinearGradient = 261, | |
| 259 DeprecatedWebKitRepeatingLinearGradient = 262, | |
| 260 DeprecatedWebKitRadialGradient = 263, | |
| 261 DeprecatedWebKitRepeatingRadialGradient = 264, | |
| 262 PrefixedImageSmoothingEnabled = 267, | |
| 263 UnprefixedImageSmoothingEnabled = 268, | |
| 264 // The above items are available in M34 branch. | |
| 265 | |
| 266 TextAutosizing = 274, | |
| 267 HTMLAnchorElementPingAttribute = 276, | |
| 268 InsertAdjacentHTML = 278, | |
| 269 SVGClassName = 279, | |
| 270 HTMLAppletElement = 280, | |
| 271 HTMLMediaElementSeekToFragmentStart = 281, | |
| 272 HTMLMediaElementPauseAtFragmentEnd = 282, | |
| 273 PrefixedWindowURL = 283, | |
| 274 PrefixedWorkerURL = 284, // This didn't work because of crbug.com/376039
. Available since M37. | |
| 275 WindowOrientation = 285, | |
| 276 DOMStringListContains = 286, | |
| 277 DocumentCaptureEvents = 287, | |
| 278 DocumentReleaseEvents = 288, | |
| 279 WindowCaptureEvents = 289, | |
| 280 WindowReleaseEvents = 290, | |
| 281 PrefixedGamepad = 291, | |
| 282 ElementAnimateKeyframeListEffectObjectTiming = 292, | |
| 283 ElementAnimateKeyframeListEffectDoubleTiming = 293, | |
| 284 ElementAnimateKeyframeListEffectNoTiming = 294, | |
| 285 DocumentXPathCreateExpression = 295, | |
| 286 DocumentXPathCreateNSResolver = 296, | |
| 287 DocumentXPathEvaluate = 297, | |
| 288 AttrGetValue = 298, | |
| 289 AttrSetValue = 299, | |
| 290 AnimationConstructorKeyframeListEffectObjectTiming = 300, | |
| 291 AnimationConstructorKeyframeListEffectDoubleTiming = 301, | |
| 292 AnimationConstructorKeyframeListEffectNoTiming = 302, | |
| 293 AttrSetValueWithElement = 303, | |
| 294 PrefixedCancelAnimationFrame = 304, | |
| 295 PrefixedCancelRequestAnimationFrame = 305, | |
| 296 NamedNodeMapGetNamedItem = 306, | |
| 297 NamedNodeMapSetNamedItem = 307, | |
| 298 NamedNodeMapRemoveNamedItem = 308, | |
| 299 NamedNodeMapItem = 309, | |
| 300 NamedNodeMapGetNamedItemNS = 310, | |
| 301 NamedNodeMapSetNamedItemNS = 311, | |
| 302 NamedNodeMapRemoveNamedItemNS = 312, | |
| 303 XHRProgressEventPosition = 316, | |
| 304 XHRProgressEventTotalSize = 317, | |
| 305 PrefixedDocumentIsFullscreen = 318, | |
| 306 PrefixedDocumentCurrentFullScreenElement = 320, | |
| 307 PrefixedDocumentCancelFullScreen = 321, | |
| 308 PrefixedDocumentFullscreenEnabled = 322, | |
| 309 PrefixedDocumentFullscreenElement = 323, | |
| 310 PrefixedDocumentExitFullscreen = 324, | |
| 311 // The above items are available in M35 branch. | |
| 312 | |
| 313 SVGForeignObjectElement = 325, | |
| 314 SelectionSetPosition = 327, | |
| 315 AnimationPlayerFinishEvent = 328, | |
| 316 SVGSVGElementInXMLDocument = 329, | |
| 317 CanvasRenderingContext2DSetAlpha = 330, | |
| 318 CanvasRenderingContext2DSetCompositeOperation = 331, | |
| 319 CanvasRenderingContext2DSetLineWidth = 332, | |
| 320 CanvasRenderingContext2DSetLineCap = 333, | |
| 321 CanvasRenderingContext2DSetLineJoin = 334, | |
| 322 CanvasRenderingContext2DSetMiterLimit = 335, | |
| 323 CanvasRenderingContext2DClearShadow = 336, | |
| 324 CanvasRenderingContext2DSetStrokeColor = 337, | |
| 325 CanvasRenderingContext2DSetFillColor = 338, | |
| 326 CanvasRenderingContext2DDrawImageFromRect = 339, | |
| 327 CanvasRenderingContext2DSetShadow = 340, | |
| 328 PrefixedPerformanceClearResourceTimings = 341, | |
| 329 PrefixedPerformanceSetResourceTimingBufferSize = 342, | |
| 330 EventSrcElement = 343, | |
| 331 EventCancelBubble = 344, | |
| 332 EventPath = 345, | |
| 333 EventClipboardData = 346, | |
| 334 NodeIteratorDetach = 347, | |
| 335 AttrNodeValue = 348, | |
| 336 AttrTextContent = 349, | |
| 337 EventGetReturnValueTrue = 350, | |
| 338 EventGetReturnValueFalse = 351, | |
| 339 EventSetReturnValueTrue = 352, | |
| 340 EventSetReturnValueFalse = 353, | |
| 341 NodeIteratorExpandEntityReferences = 354, | |
| 342 TreeWalkerExpandEntityReferences = 355, | |
| 343 WindowOffscreenBuffering = 356, | |
| 344 WindowDefaultStatus = 357, | |
| 345 WindowDefaultstatus = 358, | |
| 346 PrefixedTransitionEventConstructor = 361, | |
| 347 PrefixedMutationObserverConstructor = 362, | |
| 348 PrefixedIDBCursorConstructor = 363, | |
| 349 PrefixedIDBDatabaseConstructor = 364, | |
| 350 PrefixedIDBFactoryConstructor = 365, | |
| 351 PrefixedIDBIndexConstructor = 366, | |
| 352 PrefixedIDBKeyRangeConstructor = 367, | |
| 353 PrefixedIDBObjectStoreConstructor = 368, | |
| 354 PrefixedIDBRequestConstructor = 369, | |
| 355 PrefixedIDBTransactionConstructor = 370, | |
| 356 NotificationPermission = 371, | |
| 357 RangeDetach = 372, | |
| 358 HTMLTableElementVspace = 374, | |
| 359 HTMLTableElementHspace = 375, | |
| 360 PrefixedTouchRadiusX = 378, | |
| 361 PrefixedTouchRadiusY = 379, | |
| 362 PrefixedTouchRotationAngle = 380, | |
| 363 PrefixedTouchForce = 381, | |
| 364 PrefixedMouseEventMovementX = 382, | |
| 365 PrefixedMouseEventMovementY = 383, | |
| 366 PrefixedFileRelativePath = 386, | |
| 367 DocumentCaretRangeFromPoint = 387, | |
| 368 DocumentGetCSSCanvasContext = 388, | |
| 369 ElementScrollIntoViewIfNeeded = 389, | |
| 370 RangeCompareNode = 392, | |
| 371 RangeExpand = 393, | |
| 372 HTMLImageElementX = 396, | |
| 373 HTMLImageElementY = 397, | |
| 374 SelectionBaseNode = 400, | |
| 375 SelectionBaseOffset = 401, | |
| 376 SelectionExtentNode = 402, | |
| 377 SelectionExtentOffset = 403, | |
| 378 SelectionType = 404, | |
| 379 SelectionModify = 405, | |
| 380 SelectionSetBaseAndExtent = 406, | |
| 381 SelectionEmpty = 407, | |
| 382 VTTCue = 409, | |
| 383 VTTCueRender = 410, | |
| 384 VTTCueRenderVertical = 411, | |
| 385 VTTCueRenderSnapToLinesFalse = 412, | |
| 386 VTTCueRenderLineNotAuto = 413, | |
| 387 VTTCueRenderPositionNot50 = 414, | |
| 388 VTTCueRenderSizeNot100 = 415, | |
| 389 VTTCueRenderAlignNotMiddle = 416, | |
| 390 // The above items are available in M36 branch. | |
| 391 | |
| 392 ElementRequestPointerLock = 417, | |
| 393 VTTCueRenderRtl = 418, | |
| 394 PostMessageFromSecureToInsecure = 419, | |
| 395 PostMessageFromInsecureToSecure = 420, | |
| 396 DocumentExitPointerLock = 421, | |
| 397 DocumentPointerLockElement = 422, | |
| 398 PrefixedCursorZoomIn = 424, | |
| 399 PrefixedCursorZoomOut = 425, | |
| 400 CSSCharsetRuleEncoding = 426, | |
| 401 DocumentSetCharset = 427, | |
| 402 DocumentDefaultCharset = 428, | |
| 403 TextEncoderConstructor = 429, | |
| 404 TextEncoderEncode = 430, | |
| 405 TextDecoderConstructor = 431, | |
| 406 TextDecoderDecode = 432, | |
| 407 FocusInOutEvent = 433, | |
| 408 MouseEventMovementX = 434, | |
| 409 MouseEventMovementY = 435, | |
| 410 MixedContentRaw = 437, | |
| 411 MixedContentImage = 438, | |
| 412 MixedContentMedia = 439, | |
| 413 DocumentFonts = 440, | |
| 414 MixedContentFormsSubmitted = 441, | |
| 415 FormsSubmitted = 442, | |
| 416 TextInputEventOnInput = 443, | |
| 417 TextInputEventOnTextArea = 444, | |
| 418 TextInputEventOnContentEditable = 445, | |
| 419 TextInputEventOnNotNode = 446, | |
| 420 WebkitBeforeTextInsertedOnInput = 447, | |
| 421 WebkitBeforeTextInsertedOnTextArea = 448, | |
| 422 WebkitBeforeTextInsertedOnContentEditable = 449, | |
| 423 WebkitBeforeTextInsertedOnNotNode = 450, | |
| 424 WebkitEditableContentChangedOnInput = 451, | |
| 425 WebkitEditableContentChangedOnTextArea = 452, | |
| 426 WebkitEditableContentChangedOnContentEditable = 453, | |
| 427 WebkitEditableContentChangedOnNotNode = 454, | |
| 428 HTMLImports = 455, | |
| 429 ElementCreateShadowRoot = 456, | |
| 430 DocumentRegisterElement = 457, | |
| 431 EditingAppleInterchangeNewline = 458, | |
| 432 EditingAppleConvertedSpace = 459, | |
| 433 EditingApplePasteAsQuotation = 460, | |
| 434 EditingAppleStyleSpanClass = 461, | |
| 435 EditingAppleTabSpanClass = 462, | |
| 436 HTMLImportsAsyncAttribute = 463, | |
| 437 FontFaceSetReady = 464, | |
| 438 XMLHttpRequestSynchronous = 465, | |
| 439 CSSSelectorPseudoUnresolved = 466, | |
| 440 CSSSelectorPseudoShadow = 467, | |
| 441 CSSSelectorPseudoContent = 468, | |
| 442 CSSSelectorPseudoHost = 469, | |
| 443 CSSSelectorPseudoHostContext = 470, | |
| 444 CSSDeepCombinator = 471, | |
| 445 SyncXHRWithCredentials = 472, | |
| 446 // The above items are available in M37 branch. | |
| 447 | |
| 448 UseAsm = 473, | |
| 449 DOMWindowOpen = 475, | |
| 450 DOMWindowOpenFeatures = 476, | |
| 451 MediaStreamTrackGetSources = 478, | |
| 452 AspectRatioFlexItem = 479, | |
| 453 DetailsElement = 480, | |
| 454 DialogElement = 481, | |
| 455 MapElement = 482, | |
| 456 MeterElement = 483, | |
| 457 ProgressElement = 484, | |
| 458 VideoFullscreenAllowedExemption = 485, | |
| 459 PrefixedHTMLElementDropzone = 490, | |
| 460 WheelEventWheelDeltaX = 491, | |
| 461 WheelEventWheelDeltaY = 492, | |
| 462 WheelEventWheelDelta = 493, | |
| 463 SendBeacon = 494, | |
| 464 SendBeaconQuotaExceeded = 495, | |
| 465 SVGSMILElementInDocument = 501, | |
| 466 MouseEventOffsetX = 502, | |
| 467 MouseEventOffsetY = 503, | |
| 468 MouseEventX = 504, | |
| 469 MouseEventY = 505, | |
| 470 MouseEventFromElement = 506, | |
| 471 MouseEventToElement = 507, | |
| 472 RequestFileSystem = 508, | |
| 473 RequestFileSystemWorker = 509, | |
| 474 RequestFileSystemSyncWorker = 510, | |
| 475 UIEventLayerX = 511, | |
| 476 UIEventLayerY = 512, | |
| 477 UIEventPageX = 513, | |
| 478 UIEventPageY = 514, | |
| 479 BgPropertiesFixed = 515, | |
| 480 DevToolsConsoleTimeline = 517, | |
| 481 DevToolsConsoleProfile = 518, | |
| 482 SVGStyleElementTitle = 519, | |
| 483 PictureSourceSrc = 520, | |
| 484 // The above items are available in M38 branch. | |
| 485 | |
| 486 Picture = 521, | |
| 487 Sizes = 522, | |
| 488 SrcsetXDescriptor = 523, | |
| 489 SrcsetWDescriptor = 524, | |
| 490 SelectionContainsNode = 525, | |
| 491 MediaStreamEnded = 526, | |
| 492 MixedContentPrivateIPInPublicWebsitePassive = 527, | |
| 493 MixedContentPrivateIPInPublicWebsiteActive = 528, | |
| 494 XMLExternalResourceLoad = 529, | |
| 495 MixedContentPrivateHostnameInPublicHostname = 530, | |
| 496 LegacyProtocolEmbeddedAsSubresource = 531, | |
| 497 RequestedSubresourceWithEmbeddedCredentials = 532, | |
| 498 NotificationCreated = 533, | |
| 499 NotificationClosed = 534, | |
| 500 NotificationPermissionRequested = 535, | |
| 501 MediaStreamLabel = 536, | |
| 502 MediaStreamStop = 537, | |
| 503 ConsoleTimeline = 538, | |
| 504 ConsoleTimelineEnd = 539, | |
| 505 SRIElementWithMatchingIntegrityAttribute = 540, | |
| 506 SRIElementWithNonMatchingIntegrityAttribute = 541, | |
| 507 SRIElementWithUnparsableIntegrityAttribute = 542, | |
| 508 SRIElementWithIntegrityAttributeAndInsecureOrigin = 543, | |
| 509 SRIElementWithIntegrityAttributeAndInsecureResource = 544, | |
| 510 AnimationPlayerGetStartTime = 545, | |
| 511 AnimationPlayerSetStartTime = 546, | |
| 512 AnimationPlayerGetCurrentTime = 547, | |
| 513 AnimationPlayerSetCurrentTime = 548, | |
| 514 AnimationPlayerGetPlaybackRate = 549, | |
| 515 AnimationPlayerSetPlaybackRate = 550, | |
| 516 AnimationPlayerGetPlayState = 551, | |
| 517 AnimationPlayerFinish = 552, | |
| 518 AnimationPlayerPlay = 553, | |
| 519 AnimationPlayerPause = 554, | |
| 520 AnimationPlayerReverse = 555, | |
| 521 // The above items are available in M39 branch. | |
| 522 | |
| 523 BreakIterator = 556, | |
| 524 ScreenOrientationAngle = 557, | |
| 525 ScreenOrientationType = 558, | |
| 526 ScreenOrientationLock = 559, | |
| 527 ScreenOrientationUnlock = 560, | |
| 528 GeolocationSecureOrigin = 561, | |
| 529 GeolocationInsecureOrigin = 562, | |
| 530 NotificationSecureOrigin = 563, | |
| 531 NotificationInsecureOrigin = 564, | |
| 532 NotificationShowEvent = 565, | |
| 533 CSSXGetComputedStyleQueries = 566, | |
| 534 SVG1DOM = 567, | |
| 535 SVGPathSegDOM = 568, | |
| 536 SVGTransformListConsolidate = 569, | |
| 537 SVGAnimatedTransformListBaseVal = 570, | |
| 538 QuotedAnimationName = 571, | |
| 539 QuotedKeyframesRule = 572, | |
| 540 SrcsetDroppedCandidate = 573, | |
| 541 WindowPostMessage = 574, | |
| 542 WindowPostMessageWithLegacyTargetOriginArgument = 575, | |
| 543 RenderRuby = 576, | |
| 544 CanvasRenderingContext2DCompositeOperationDarker = 577, | |
| 545 ScriptElementWithInvalidTypeHasSrc = 578, | |
| 546 TimelineStart = 579, | |
| 547 ElementBaseURIFromXMLBase = 580, | |
| 548 XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload = 581, | |
| 549 CSSSelectorPseudoScrollbar = 582, | |
| 550 CSSSelectorPseudoScrollbarButton = 583, | |
| 551 CSSSelectorPseudoScrollbarThumb = 584, | |
| 552 CSSSelectorPseudoScrollbarTrack = 585, | |
| 553 CSSSelectorPseudoScrollbarTrackPiece = 586, | |
| 554 LangAttribute = 587, | |
| 555 LangAttributeOnHTML = 588, | |
| 556 LangAttributeOnBody = 589, | |
| 557 LangAttributeDoesNotMatchToUILocale = 590, | |
| 558 InputTypeSubmit = 591, | |
| 559 InputTypeSubmitWithValue = 592, | |
| 560 // The above items are available in M40 branch. | |
| 561 | |
| 562 SetReferrerPolicy = 593, | |
| 563 DOMImplementationHasFeatureReturnFalseInternal = 594, | |
| 564 MouseEventWhich = 595, | |
| 565 UIEventCharCode = 596, | |
| 566 UIEventKeyCode = 597, | |
| 567 UIEventWhich = 598, | |
| 568 | |
| 569 // Add new features immediately above this line. Don't change assigned | |
| 570 // numbers of any item, and don't reuse removed slots. | |
| 571 // Also, run update_use_counter_feature_enum.py in chromium/src/tools/me
trics/histograms/ | |
| 572 // to update the UMA mapping. | |
| 573 NumberOfFeatures, // This enum value must be last. | |
| 574 }; | |
| 575 | |
| 576 // "count" sets the bit for this feature to 1. Repeated calls are ignored. | 64 // "count" sets the bit for this feature to 1. Repeated calls are ignored. |
| 577 static void count(const Frame*, Feature); | 65 static void count(const Frame*, Feature); |
| 578 static void count(const Document&, Feature); | 66 static void count(const Document&, Feature); |
| 579 // This doesn't count for ExecutionContexts for shared workers and service | 67 // This doesn't count for ExecutionContexts for shared workers and service |
| 580 // workers. | 68 // workers. |
| 581 static void count(const ExecutionContext*, Feature); | 69 static void count(const ExecutionContext*, Feature); |
| 582 // Use countIfNotPrivateScript() instead of count() if you don't want | 70 // Use countIfNotPrivateScript() instead of count() if you don't want |
| 583 // to count metrics in private scripts. You should use | 71 // to count metrics in private scripts. You should use |
| 584 // countIfNotPrivateScript() in a binding layer. | 72 // countIfNotPrivateScript() in a binding layer. |
| 585 static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature); | 73 static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 129 |
| 642 void updateMeasurements(); | 130 void updateMeasurements(); |
| 643 | 131 |
| 644 OwnPtr<BitVector> m_countBits; | 132 OwnPtr<BitVector> m_countBits; |
| 645 BitVector m_CSSFeatureBits; | 133 BitVector m_CSSFeatureBits; |
| 646 }; | 134 }; |
| 647 | 135 |
| 648 } // namespace blink | 136 } // namespace blink |
| 649 | 137 |
| 650 #endif // UseCounter_h | 138 #endif // UseCounter_h |
| OLD | NEW |