String UseCounter::deprecationMessage(Feature feature) { switch (feature) { // Quota case PrefixedStorageInfo: return "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead."; // Keyboard Event (DOM Level 3) case KeyboardEventKeyLocation: return replacedBy("KeyboardEvent.keyLocation", "KeyboardEvent.location"); case ConsoleMarkTimeline: return replacedBy("console.markTimeline", "console.timeStamp"); case FileError: return "FileError is deprecated. Please use the 'name' or 'message' attributes of DOMError rather than 'code'."; case ShowModalDialog: return "showModalDialog is deprecated. Please use window.open and postMessage instead."; case CSSStyleSheetInsertRuleOptionalArg: return "Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."; case PrefixedVideoSupportsFullscreen: return "'HTMLVideoElement.webkitSupportsFullscreen' is deprecated. Its value is true if the video is loaded."; case PrefixedVideoDisplayingFullscreen: return "'HTMLVideoElement.webkitDisplayingFullscreen' is deprecated. Please use the 'fullscreenchange' event instead."; case PrefixedVideoEnterFullscreen: return replacedBy("HTMLVideoElement.webkitEnterFullscreen()", "Element.requestFullscreen()"); case PrefixedVideoExitFullscreen: return replacedBy("HTMLVideoElement.webkitExitFullscreen()", "Document.exitFullscreen()"); case PrefixedVideoEnterFullScreen: return replacedBy("HTMLVideoElement.webkitEnterFullScreen()", "Element.requestFullscreen()"); case PrefixedVideoExitFullScreen: return replacedBy("HTMLVideoElement.webkitExitFullScreen()", "Document.exitFullscreen()"); case PrefixedIndexedDB: return replacedBy("webkitIndexedDB", "indexedDB"); case PrefixedIDBCursorConstructor: return replacedBy("webkitIDBCursor", "IDBCursor"); case PrefixedIDBDatabaseConstructor: return replacedBy("webkitIDBDatabase", "IDBDatabase"); case PrefixedIDBFactoryConstructor: return replacedBy("webkitIDBFactory", "IDBFactory"); case PrefixedIDBIndexConstructor: return replacedBy("webkitIDBIndex", "IDBIndex"); case PrefixedIDBKeyRangeConstructor: return replacedBy("webkitIDBKeyRange", "IDBKeyRange"); case PrefixedIDBObjectStoreConstructor: return replacedBy("webkitIDBObjectStore", "IDBObjectStore"); case PrefixedIDBRequestConstructor: return replacedBy("webkitIDBRequest", "IDBRequest"); case PrefixedIDBTransactionConstructor: return replacedBy("webkitIDBTransaction", "IDBTransaction"); case PrefixedRequestAnimationFrame: return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead."; case PrefixedCancelAnimationFrame: return "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case PrefixedCancelRequestAnimationFrame: return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case NodeIteratorDetach: return "'NodeIterator.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-nodeiterator-detach)."; case RangeDetach: return "'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach)."; case OverflowChangedEvent: return "The 'overflowchanged' event is deprecated and may be removed. Please do not use it."; case SyncXHRWithCredentials: return "Setting 'XMLHttpRequest.withCredentials' for synchronous requests is deprecated."; case EventSourceURL: return replacedBy("EventSource.URL", "EventSource.url"); case WebSocketURL: return replacedBy("WebSocket.URL", "WebSocket.url"); case HTMLTableElementVspace: return "The 'vspace' attribute on table is deprecated. Please use CSS margin-top and margin-bottom property instead."; case HTMLTableElementHspace: return "The 'hspace' attribute on table is deprecated. Please use CSS margin-left and margin-right property instead."; case PictureSourceSrc: return "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."; case XHRProgressEventPosition: return "The XMLHttpRequest progress event property 'position' is deprecated. Please use 'loaded' instead."; case XHRProgressEventTotalSize: return "The XMLHttpRequest progress event property 'totalSize' is deprecated. Please use 'total' instead."; case ConsoleTimeline: return replacedBy("console.timeline", "console.time"); case ConsoleTimelineEnd: return replacedBy("console.timelineEnd", "console.timeEnd"); case XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: return "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/."; case DOMImplementationHasFeatureReturnFalse: return "'DOMImplementation.hasFeature()' returning false is deprecated. Please do not use it, as per DOM it should always return true (https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature)."; case GetMatchedCSSRules: return "'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2"; case DocumentSetCharset: return "Setting 'Document.charset' is deprecated. Please use '<meta charset=\"UTF-8\">' instead."; case PrefixedImageSmoothingEnabled: return replacedBy("CanvasRenderingContext2D.webkitImageSmoothingEnabled", "CanvasRenderingContext2D.imageSmoothingEnabled"); case AudioListenerDopplerFactor: return "dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSpeedOfSound: return "speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSetVelocity: return "setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed"; case ShadowRootGetElementsByClassName: return "ShadowRoot.getElementsByClassName() is deprecated. Please use 'querySelectorAll' instead"; case ShadowRootGetElementsByTagName: return "ShadowRoot.getElementsByTagName() is deprecated. Please use 'querySelectorAll' instead"; case ShadowRootGetElementsByTagNameNS: return "ShadowRoot.getElementsByTagNameNS() is deprecated. Please use 'querySelectorAll' instead"; case PrefixedWindowURL: return replacedBy("webkitURL", "URL"); case PrefixedAudioContext: return replacedBy("webkitAudioContext", "AudioContext"); case PrefixedOfflineAudioContext: return replacedBy("webkitOfflineAudioContext", "OfflineAudioContext"); case RangeCompareNode: return replacedBy("Range.compareNode()", "Range.compareBoundaryPoints()"); case RangeExpand: return replacedBy("Range.expand()", "Selection.modify()"); // Features that aren't deprecated don't have a deprecation message. default: return String(); } }
String UseCounter::deprecationMessage(Feature feature) { switch (feature) { // Quota case PrefixedStorageInfo: return replacedBy("'window.webkitStorageInfo'", "'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage'"); // Keyboard Event (DOM Level 3) case KeyboardEventKeyLocation: return replacedWillBeRemoved("'KeyboardEvent.keyLocation'", "'KeyboardEvent.location'", 50, "4997403308457984"); case ConsoleMarkTimeline: return replacedBy("'console.markTimeline'", "'console.timeStamp'"); case FileError: return "FileError is deprecated. Please use the 'name' or 'message' attributes of DOMError rather than 'code'."; case CSSStyleSheetInsertRuleOptionalArg: return "Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."; case PrefixedVideoSupportsFullscreen: return replacedBy("'HTMLVideoElement.webkitSupportsFullscreen'", "'Document.fullscreenEnabled'"); case PrefixedVideoDisplayingFullscreen: return replacedBy("'HTMLVideoElement.webkitDisplayingFullscreen'", "'Document.fullscreenElement'"); case PrefixedVideoEnterFullscreen: return replacedBy("'HTMLVideoElement.webkitEnterFullscreen()'", "'Element.requestFullscreen()'"); case PrefixedVideoExitFullscreen: return replacedBy("'HTMLVideoElement.webkitExitFullscreen()'", "'Document.exitFullscreen()'"); case PrefixedVideoEnterFullScreen: return replacedBy("'HTMLVideoElement.webkitEnterFullScreen()'", "'Element.requestFullscreen()'"); case PrefixedVideoExitFullScreen: return replacedBy("'HTMLVideoElement.webkitExitFullScreen()'", "'Document.exitFullscreen()'"); case PrefixedIndexedDB: return replacedBy("'webkitIndexedDB'", "'indexedDB'"); case PrefixedIDBCursorConstructor: return replacedBy("'webkitIDBCursor'", "'IDBCursor'"); case PrefixedIDBDatabaseConstructor: return replacedBy("'webkitIDBDatabase'", "'IDBDatabase'"); case PrefixedIDBFactoryConstructor: return replacedBy("'webkitIDBFactory'", "'IDBFactory'"); case PrefixedIDBIndexConstructor: return replacedBy("'webkitIDBIndex'", "'IDBIndex'"); case PrefixedIDBKeyRangeConstructor: return replacedBy("'webkitIDBKeyRange'", "'IDBKeyRange'"); case PrefixedIDBObjectStoreConstructor: return replacedBy("'webkitIDBObjectStore'", "'IDBObjectStore'"); case PrefixedIDBRequestConstructor: return replacedBy("'webkitIDBRequest'", "'IDBRequest'"); case PrefixedIDBTransactionConstructor: return replacedBy("'webkitIDBTransaction'", "'IDBTransaction'"); case PrefixedRequestAnimationFrame: return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead."; case PrefixedCancelAnimationFrame: return "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case PrefixedCancelRequestAnimationFrame: return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case SyncXHRWithCredentials: return "Setting 'XMLHttpRequest.withCredentials' for synchronous requests is deprecated."; case PictureSourceSrc: return "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."; case XHRProgressEventPosition: return replacedWillBeRemoved("The XMLHttpRequest progress event property 'position'", "'loaded'", 50, "5044837464145920"); case XHRProgressEventTotalSize: return replacedWillBeRemoved("The XMLHttpRequest progress event property 'totalSize'", "'total'", 50, "5044837464145920"); case ConsoleTimeline: return replacedBy("'console.timeline'", "'console.time'"); case ConsoleTimelineEnd: return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); case XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: return "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."; case GetMatchedCSSRules: return "'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2"; case PrefixedImageSmoothingEnabled: return replacedBy("'CanvasRenderingContext2D.webkitImageSmoothingEnabled'", "'CanvasRenderingContext2D.imageSmoothingEnabled'"); case AudioListenerDopplerFactor: return "dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSpeedOfSound: return "speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSetVelocity: return "setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed"; case PrefixedWindowURL: return replacedBy("'webkitURL'", "'URL'"); case PrefixedAudioContext: return replacedBy("'webkitAudioContext'", "'AudioContext'"); case PrefixedOfflineAudioContext: return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); case RangeExpand: return replacedBy("'Range.expand()'", "'Selection.modify()'"); case PrefixedMediaAddKey: case PrefixedMediaGenerateKeyRequest: case PrefixedMediaCancelKeyRequest: return "The prefixed Encrypted Media Extensions APIs are deprecated. Please use 'navigator.requestMediaKeySystemAccess()' instead."; case CanPlayTypeKeySystem: return replacedBy("canPlayType()'s 'keySystem' parameter", "'navigator.requestMediaKeySystemAccess()'"); // Powerful features on insecure origins (https://goo.gl/rStTGz) case DeviceMotionInsecureOrigin: return "The devicemotion event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case DeviceOrientationInsecureOrigin: return "The deviceorientation event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case DeviceOrientationAbsoluteInsecureOrigin: return "The deviceorientationabsolute event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case GeolocationInsecureOrigin: // TODO(jww): This message should be made less ambigous after WebView // is fixed so geolocation can be removed there. After that, this // should be updated to read similarly to GetUserMediaInsecureOrigin's // message. return "getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case GetUserMediaInsecureOrigin: return "getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case EncryptedMediaInsecureOrigin: return "requestMediaKeySystemAccess() is deprecated on insecure origins in the specification. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case ElementCreateShadowRootMultiple: return "Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case ElementCreateShadowRootMultipleWithUserAgentShadowRoot: return "Calling Element.createShadowRoot() for an element which already hosts a user-agent shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case CSSDeepCombinator: return "/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case CSSSelectorPseudoShadow: return "::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case SVGSMILElementInDocument: case SVGSMILAnimationInImageRegardlessOfCache: return "SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead."; case PrefixedPerformanceClearResourceTimings: return replacedBy("'Performance.webkitClearResourceTimings'", "'Performance.clearResourceTimings'"); case PrefixedPerformanceSetResourceTimingBufferSize: return replacedBy("'Performance.webkitSetResourceTimingBufferSize'", "'Performance.setResourceTimingBufferSize'"); case PrefixedPerformanceResourceTimingBufferFull: return replacedBy("'Performance.onwebkitresourcetimingbufferfull'", "'Performance.onresourcetimingbufferfull'"); case BluetoothDeviceInstanceId: return replacedBy("'BluetoothDevice.instanceID'", "'BluetoothDevice.id'"); case V8SVGElement_OffsetParent_AttributeGetter: return willBeRemoved("'SVGElement.offsetParent'", 50, "5724912467574784"); case V8SVGElement_OffsetTop_AttributeGetter: return willBeRemoved("'SVGElement.offsetTop'", 50, "5724912467574784"); case V8SVGElement_OffsetLeft_AttributeGetter: return willBeRemoved("'SVGElement.offsetLeft'", 50, "5724912467574784"); case V8SVGElement_OffsetWidth_AttributeGetter: return willBeRemoved("'SVGElement.offsetWidth'", 50, "5724912467574784"); case V8SVGElement_OffsetHeight_AttributeGetter: return willBeRemoved("'SVGElement.offsetHeight'", 50, "5724912467574784"); case MediaStreamTrackGetSources: return "MediaStreamTrack.getSources is deprecated. See https://www.chromestatus.com/feature/4765305641369600 for more details."; case DocumentDefaultCharset: return willBeRemoved("'Document.defaultCharset'", 50, "6217124578066432"); case V8TouchEvent_InitTouchEvent_Method: return replacedWillBeRemoved("'TouchEvent.initTouchEvent'", "the TouchEvent constructor", 53, "5730982598541312"); case RTCPeerConnectionCreateAnswerLegacyNoFailureCallback: return "RTCPeerConnection.CreateAnswer without a failure callback is deprecated. The failure callback will be a required parameter in M50. See https://www.chromestatus.com/feature/5663288008376320 for more details"; case RTCPeerConnectionCreateOfferLegacyNoFailureCallback: return "RTCPeerConnection.CreateOffer without a failure callback is deprecated. The failure callback will be a required parameter in M50. See https://www.chromestatus.com/feature/5663288008376320 for more details"; case ObjectObserve: return willBeRemoved("'Object.observe'", 50, "6147094632988672"); // Features that aren't deprecated don't have a deprecation message. default: return String(); } }
String UseCounter::deprecationMessage(Feature feature) { switch (feature) { // Quota case PrefixedStorageInfo: return "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead."; // Keyboard Event (DOM Level 3) case KeyboardEventKeyLocation: return replacedBy("KeyboardEvent.keyLocation", "KeyboardEvent.location"); case ConsoleMarkTimeline: return replacedBy("console.markTimeline", "console.timeStamp"); case FileError: return "FileError is deprecated. Please use the 'name' or 'message' attributes of DOMError rather than 'code'."; case CSSStyleSheetInsertRuleOptionalArg: return "Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."; case PrefixedVideoSupportsFullscreen: return "'HTMLVideoElement.webkitSupportsFullscreen' is deprecated. Its value is true if the video is loaded."; case PrefixedVideoDisplayingFullscreen: return "'HTMLVideoElement.webkitDisplayingFullscreen' is deprecated. Please use the 'fullscreenchange' event instead."; case PrefixedVideoEnterFullscreen: return replacedBy("HTMLVideoElement.webkitEnterFullscreen()", "Element.requestFullscreen()"); case PrefixedVideoExitFullscreen: return replacedBy("HTMLVideoElement.webkitExitFullscreen()", "Document.exitFullscreen()"); case PrefixedVideoEnterFullScreen: return replacedBy("HTMLVideoElement.webkitEnterFullScreen()", "Element.requestFullscreen()"); case PrefixedVideoExitFullScreen: return replacedBy("HTMLVideoElement.webkitExitFullScreen()", "Document.exitFullscreen()"); case PrefixedIndexedDB: return replacedBy("webkitIndexedDB", "indexedDB"); case PrefixedIDBCursorConstructor: return replacedBy("webkitIDBCursor", "IDBCursor"); case PrefixedIDBDatabaseConstructor: return replacedBy("webkitIDBDatabase", "IDBDatabase"); case PrefixedIDBFactoryConstructor: return replacedBy("webkitIDBFactory", "IDBFactory"); case PrefixedIDBIndexConstructor: return replacedBy("webkitIDBIndex", "IDBIndex"); case PrefixedIDBKeyRangeConstructor: return replacedBy("webkitIDBKeyRange", "IDBKeyRange"); case PrefixedIDBObjectStoreConstructor: return replacedBy("webkitIDBObjectStore", "IDBObjectStore"); case PrefixedIDBRequestConstructor: return replacedBy("webkitIDBRequest", "IDBRequest"); case PrefixedIDBTransactionConstructor: return replacedBy("webkitIDBTransaction", "IDBTransaction"); case PrefixedRequestAnimationFrame: return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead."; case PrefixedCancelAnimationFrame: return "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case PrefixedCancelRequestAnimationFrame: return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case NodeIteratorDetach: return "'NodeIterator.detach' is now a no-op, as per DOM (https://dom.spec.whatwg.org/#dom-nodeiterator-detach)."; case RangeDetach: return "'Range.detach' is now a no-op, as per DOM (https://dom.spec.whatwg.org/#dom-range-detach)."; case SyncXHRWithCredentials: return "Setting 'XMLHttpRequest.withCredentials' for synchronous requests is deprecated."; case PictureSourceSrc: return "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."; case XHRProgressEventPosition: return "The XMLHttpRequest progress event property 'position' is deprecated. Please use 'loaded' instead."; case XHRProgressEventTotalSize: return "The XMLHttpRequest progress event property 'totalSize' is deprecated. Please use 'total' instead."; case ConsoleTimeline: return replacedBy("console.timeline", "console.time"); case ConsoleTimelineEnd: return replacedBy("console.timelineEnd", "console.timeEnd"); case XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: return "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."; case GetMatchedCSSRules: return "'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2"; case PrefixedImageSmoothingEnabled: return replacedBy("CanvasRenderingContext2D.webkitImageSmoothingEnabled", "CanvasRenderingContext2D.imageSmoothingEnabled"); case AudioListenerDopplerFactor: return "dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSpeedOfSound: return "speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSetVelocity: return "setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed"; case PrefixedWindowURL: return replacedBy("webkitURL", "URL"); case PrefixedAudioContext: return replacedBy("webkitAudioContext", "AudioContext"); case PrefixedOfflineAudioContext: return replacedBy("webkitOfflineAudioContext", "OfflineAudioContext"); case RangeExpand: return replacedBy("Range.expand()", "Selection.modify()"); case PrefixedMediaAddKey: case PrefixedMediaGenerateKeyRequest: case PrefixedMediaCancelKeyRequest: return "The prefixed Encrypted Media Extensions APIs are deprecated. Please use 'navigator.requestMediaKeySystemAccess()' instead."; case CanPlayTypeKeySystem: return "canPlayType()'s 'keySystem' parameter is deprecated. Please use 'navigator.requestMediaKeySystemAccess()' instead."; case SVGSVGElementForceRedraw: return "'SVGSVGElement.forceRedraw()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__forceRedraw)."; case SVGSVGElementSuspendRedraw: return "'SVGSVGElement.suspendRedraw()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__suspendRedraw)."; case SVGSVGElementUnsuspendRedraw: return "'SVGSVGElement.unsuspendRedraw()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__unsuspendRedraw)."; case SVGSVGElementUnsuspendRedrawAll: return "'SVGSVGElement.unsuspendRedrawAll()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__unsuspendRedrawAll)."; // Powerful features on insecure origins (https://goo.gl/rStTGz) case DeviceMotionInsecureOrigin: return "The devicemotion event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case DeviceOrientationInsecureOrigin: return "The deviceorientation event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case DeviceOrientationAbsoluteInsecureOrigin: return "The deviceorientationabsolute event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case GeolocationInsecureOrigin: return "getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case GetUserMediaInsecureOrigin: return "getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case EncryptedMediaInsecureOrigin: return "requestMediaKeySystemAccess() is deprecated on insecure origins in the specification. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case ElementCreateShadowRootMultiple: return "Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case ElementCreateShadowRootMultipleWithUserAgentShadowRoot: return "Calling Element.createShadowRoot() for an element which already hosts a user-agent shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case CSSDeepCombinator: return "/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case CSSSelectorPseudoShadow: return "::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case PrefixedMouseEventMovementX: return replacedBy("webkitMovementX", "movementX"); case PrefixedMouseEventMovementY: return replacedBy("webkitMovementY", "movementY"); case SVGSMILElementInDocument: case SVGSMILAnimationInImageRegardlessOfCache: return "SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead."; case PrefixedPerformanceClearResourceTimings: return replacedBy("Performance.webkitClearResourceTimings", "Performance.clearResourceTimings"); case PrefixedPerformanceSetResourceTimingBufferSize: return replacedBy("Performance.webkitSetResourceTimingBufferSize", "Performance.setResourceTimingBufferSize"); case PrefixedPerformanceResourceTimingBufferFull: return replacedBy("Performance.onwebkitresourcetimingbufferfull", "Performance.onresourcetimingbufferfull"); case FetchAPIRequestContext: return "Request.context is deprecated and will be removed in M46 (see: https://www.chromestatus.com/feature/5534702526005248)."; case HeaderValueNotMatchingRFC7230: return "Header values not matching to RFC 7230, will be deprecated (see: https://www.chromestatus.com/feature/6457425448140800)."; case BluetoothDeviceInstanceId: return replacedBy("BluetoothDevice.instanceID", "BluetoothDevice.id"); case V8SVGElement_OffsetParent_AttributeGetter: return "'SVGElement.offsetParent' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details."; case V8SVGElement_OffsetTop_AttributeGetter: return "'SVGElement.offsetTop' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details."; case V8SVGElement_OffsetLeft_AttributeGetter: return "'SVGElement.offsetLeft' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details."; case V8SVGElement_OffsetWidth_AttributeGetter: return "'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details."; case V8SVGElement_OffsetHeight_AttributeGetter: return "'SVGElement.offsetHeight' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details."; case MediaStreamTrackGetSources: return "MediaStreamTrack.getSources is deprecated. See https://www.chromestatus.com/feature/4765305641369600 for more details."; // Features that aren't deprecated don't have a deprecation message. default: return String(); } }
String UseCounter::deprecationMessage(Feature feature) { switch (feature) { // Quota case PrefixedStorageInfo: return "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead."; // Keyboard Event (DOM Level 3) case KeyboardEventKeyLocation: return replacedBy("KeyboardEvent.keyLocation", "KeyboardEvent.location"); case ConsoleMarkTimeline: return replacedBy("console.markTimeline", "console.timeStamp"); case FileError: return "FileError is deprecated. Please use the 'name' or 'message' attributes of DOMError rather than 'code'."; case CSSStyleSheetInsertRuleOptionalArg: return "Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."; case PrefixedVideoSupportsFullscreen: return "'HTMLVideoElement.webkitSupportsFullscreen' is deprecated. Its value is true if the video is loaded."; case PrefixedVideoDisplayingFullscreen: return "'HTMLVideoElement.webkitDisplayingFullscreen' is deprecated. Please use the 'fullscreenchange' event instead."; case PrefixedVideoEnterFullscreen: return replacedBy("HTMLVideoElement.webkitEnterFullscreen()", "Element.requestFullscreen()"); case PrefixedVideoExitFullscreen: return replacedBy("HTMLVideoElement.webkitExitFullscreen()", "Document.exitFullscreen()"); case PrefixedVideoEnterFullScreen: return replacedBy("HTMLVideoElement.webkitEnterFullScreen()", "Element.requestFullscreen()"); case PrefixedVideoExitFullScreen: return replacedBy("HTMLVideoElement.webkitExitFullScreen()", "Document.exitFullscreen()"); case PrefixedIndexedDB: return replacedBy("webkitIndexedDB", "indexedDB"); case PrefixedIDBCursorConstructor: return replacedBy("webkitIDBCursor", "IDBCursor"); case PrefixedIDBDatabaseConstructor: return replacedBy("webkitIDBDatabase", "IDBDatabase"); case PrefixedIDBFactoryConstructor: return replacedBy("webkitIDBFactory", "IDBFactory"); case PrefixedIDBIndexConstructor: return replacedBy("webkitIDBIndex", "IDBIndex"); case PrefixedIDBKeyRangeConstructor: return replacedBy("webkitIDBKeyRange", "IDBKeyRange"); case PrefixedIDBObjectStoreConstructor: return replacedBy("webkitIDBObjectStore", "IDBObjectStore"); case PrefixedIDBRequestConstructor: return replacedBy("webkitIDBRequest", "IDBRequest"); case PrefixedIDBTransactionConstructor: return replacedBy("webkitIDBTransaction", "IDBTransaction"); case PrefixedRequestAnimationFrame: return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead."; case PrefixedCancelAnimationFrame: return "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case PrefixedCancelRequestAnimationFrame: return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case NodeIteratorDetach: return "'NodeIterator.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-nodeiterator-detach)."; case RangeDetach: return "'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach)."; case OverflowChangedEvent: return "The 'overflowchanged' event is deprecated and may be removed. Please do not use it."; case SyncXHRWithCredentials: return "Setting 'XMLHttpRequest.withCredentials' for synchronous requests is deprecated."; case HTMLTableElementVspace: return "The 'vspace' attribute on table is deprecated. Please use CSS margin-top and margin-bottom property instead."; case HTMLTableElementHspace: return "The 'hspace' attribute on table is deprecated. Please use CSS margin-left and margin-right property instead."; case PictureSourceSrc: return "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."; case XHRProgressEventPosition: return "The XMLHttpRequest progress event property 'position' is deprecated. Please use 'loaded' instead."; case XHRProgressEventTotalSize: return "The XMLHttpRequest progress event property 'totalSize' is deprecated. Please use 'total' instead."; case ConsoleTimeline: return replacedBy("console.timeline", "console.time"); case ConsoleTimelineEnd: return replacedBy("console.timelineEnd", "console.timeEnd"); case CanvasRenderingContext2DCompositeOperationDarker: return replacedBy("darker", "darken"); case XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: return "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/."; case GetMatchedCSSRules: return "'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2"; case DocumentSetCharset: return "Setting 'Document.charset' is deprecated. Please use '<meta charset=\"UTF-8\">' instead."; case PrefixedImageSmoothingEnabled: return replacedBy("CanvasRenderingContext2D.webkitImageSmoothingEnabled", "CanvasRenderingContext2D.imageSmoothingEnabled"); case AudioListenerDopplerFactor: return "dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSpeedOfSound: return "speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed"; case AudioListenerSetVelocity: return "setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed"; case PrefixedWindowURL: return replacedBy("webkitURL", "URL"); case PrefixedAudioContext: return replacedBy("webkitAudioContext", "AudioContext"); case PrefixedOfflineAudioContext: return replacedBy("webkitOfflineAudioContext", "OfflineAudioContext"); case RangeCompareNode: return replacedBy("Range.compareNode()", "Range.compareBoundaryPoints()"); case RangeExpand: return replacedBy("Range.expand()", "Selection.modify()"); case PrefixedMediaAddKey: case PrefixedMediaGenerateKeyRequest: case PrefixedMediaCancelKeyRequest: return "The prefixed Encrypted Media Extensions APIs are deprecated and will be removed in M46 (beta around September 2015). Please use 'navigator.requestMediaKeySystemAccess()' instead."; case CanPlayTypeKeySystem: return "canPlayType()'s 'keySystem' parameter is deprecated and will be ignored in M46 (beta around September 2015). Please use 'navigator.requestMediaKeySystemAccess()' instead."; case SVGSVGElementForceRedraw: return "'SVGSVGElement.forceRedraw()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__forceRedraw)."; case SVGSVGElementSuspendRedraw: return "'SVGSVGElement.suspendRedraw()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__suspendRedraw)."; case SVGSVGElementUnsuspendRedraw: return "'SVGSVGElement.unsuspendRedraw()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__unsuspendRedraw)."; case SVGSVGElementUnsuspendRedrawAll: return "'SVGSVGElement.unsuspendRedrawAll()' is deprecated, please do not use it. It is a no-op, as per SVG2 (https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__unsuspendRedrawAll)."; case ServiceWorkerClientPostMessage: return "'Client.postMessage()' is an experimental API and may change. See https://github.com/slightlyoff/ServiceWorker/issues/609."; case AttrChildAccess: case AttrChildChange: return "Attr child nodes are deprecated and will be removed in M45, around August 2015. Please use 'Attr.value' instead."; case CSSKeyframesRuleInsertRule: return "'CSSKeyframesRule.insertRule()' is deprecated and will be removed in M45, around August 2015. Please use 'CSSKeyframesRule.appendRule()' instead."; // Powerful features on insecure origins (https://goo.gl/rStTGz) case GeolocationInsecureOrigin: return "getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case GetUserMediaInsecureOrigin: return "getUserMedia() is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case FullscreenInsecureOrigin: return "requestFullscreen() is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case EncryptedMediaInsecureOrigin: return "requestMediaKeySystemAccess() is deprecated on insecure origins in the specification. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case PushSubscriptionId: return "'PushSubscription.subscriptionId' is deprecated and is now included in 'PushSubscription.endpoint'. It will be removed in Chrome 45, around August 2015."; case DocumentGetCSSCanvasContext: return "The -webkit-canvas CSS feature is deprecated. Please use a positioned <canvas> element instead."; case VideoFullscreenAllowedExemption: return "Entering fullscreen in an <iframe> with no allowfullscreen attribute is deprecated and will stop working in M46, around October 2015. Please use the allowfullscreen attribute."; case PermissionStatusStatus: return "PermissionStatus.status is deprecated and will be removed in M47, around November 2015. Please use PermissionStatus.state instead."; // Features that aren't deprecated don't have a deprecation message. default: return String(); } }
String Deprecation::deprecationMessage(UseCounter::Feature feature) { switch (feature) { // Quota case UseCounter::PrefixedStorageInfo: return replacedBy("'window.webkitStorageInfo'", "'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage'"); case UseCounter::ConsoleMarkTimeline: return replacedBy("'console.markTimeline'", "'console.timeStamp'"); case UseCounter::FileError: return "FileError is deprecated. Please use the 'name' or 'message' attributes of DOMError rather than 'code'."; case UseCounter::CSSStyleSheetInsertRuleOptionalArg: return "Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."; case UseCounter::PrefixedVideoSupportsFullscreen: return replacedBy("'HTMLVideoElement.webkitSupportsFullscreen'", "'Document.fullscreenEnabled'"); case UseCounter::PrefixedVideoDisplayingFullscreen: return replacedBy("'HTMLVideoElement.webkitDisplayingFullscreen'", "'Document.fullscreenElement'"); case UseCounter::PrefixedVideoEnterFullscreen: return replacedBy("'HTMLVideoElement.webkitEnterFullscreen()'", "'Element.requestFullscreen()'"); case UseCounter::PrefixedVideoExitFullscreen: return replacedBy("'HTMLVideoElement.webkitExitFullscreen()'", "'Document.exitFullscreen()'"); case UseCounter::PrefixedVideoEnterFullScreen: return replacedBy("'HTMLVideoElement.webkitEnterFullScreen()'", "'Element.requestFullscreen()'"); case UseCounter::PrefixedVideoExitFullScreen: return replacedBy("'HTMLVideoElement.webkitExitFullScreen()'", "'Document.exitFullscreen()'"); case UseCounter::PrefixedIndexedDB: return replacedBy("'webkitIndexedDB'", "'indexedDB'"); case UseCounter::PrefixedIDBCursorConstructor: return replacedBy("'webkitIDBCursor'", "'IDBCursor'"); case UseCounter::PrefixedIDBDatabaseConstructor: return replacedBy("'webkitIDBDatabase'", "'IDBDatabase'"); case UseCounter::PrefixedIDBFactoryConstructor: return replacedBy("'webkitIDBFactory'", "'IDBFactory'"); case UseCounter::PrefixedIDBIndexConstructor: return replacedBy("'webkitIDBIndex'", "'IDBIndex'"); case UseCounter::PrefixedIDBKeyRangeConstructor: return replacedBy("'webkitIDBKeyRange'", "'IDBKeyRange'"); case UseCounter::PrefixedIDBObjectStoreConstructor: return replacedBy("'webkitIDBObjectStore'", "'IDBObjectStore'"); case UseCounter::PrefixedIDBRequestConstructor: return replacedBy("'webkitIDBRequest'", "'IDBRequest'"); case UseCounter::PrefixedIDBTransactionConstructor: return replacedBy("'webkitIDBTransaction'", "'IDBTransaction'"); case UseCounter::PrefixedRequestAnimationFrame: return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead."; case UseCounter::PrefixedCancelAnimationFrame: return "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case UseCounter::PrefixedCancelRequestAnimationFrame: return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case UseCounter::SyncXHRWithCredentials: return "Setting 'XMLHttpRequest.withCredentials' for synchronous requests is deprecated."; case UseCounter::PictureSourceSrc: return "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."; case UseCounter::ConsoleTimeline: return replacedBy("'console.timeline'", "'console.time'"); case UseCounter::ConsoleTimelineEnd: return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: return "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."; case UseCounter::GetMatchedCSSRules: return "'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2"; case UseCounter::PrefixedImageSmoothingEnabled: return replacedBy("'CanvasRenderingContext2D.webkitImageSmoothingEnabled'", "'CanvasRenderingContext2D.imageSmoothingEnabled'"); case UseCounter::AudioListenerDopplerFactor: return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", 55, "5238926818148352"); case UseCounter::AudioListenerSpeedOfSound: return dopplerWillBeRemoved("'AudioListener.speedOfSound'", 55, "5238926818148352"); case UseCounter::AudioListenerSetVelocity: return dopplerWillBeRemoved("'AudioListener.setVelocity()'", 55, "5238926818148352"); case UseCounter::PannerNodeSetVelocity: return dopplerWillBeRemoved("'PannerNode.setVelocity()'", 55, "5238926818148352"); case UseCounter::PrefixedWindowURL: return replacedBy("'webkitURL'", "'URL'"); case UseCounter::PrefixedAudioContext: return replacedBy("'webkitAudioContext'", "'AudioContext'"); case UseCounter::PrefixedOfflineAudioContext: return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); case UseCounter::RangeExpand: return replacedBy("'Range.expand()'", "'Selection.modify()'"); // Powerful features on insecure origins (https://goo.gl/rStTGz) case UseCounter::DeviceMotionInsecureOrigin: return "The devicemotion event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::DeviceOrientationInsecureOrigin: return "The deviceorientation event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::DeviceOrientationAbsoluteInsecureOrigin: return "The deviceorientationabsolute event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::GeolocationInsecureOrigin: case UseCounter::GeolocationInsecureOriginIframe: return "getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::GeolocationInsecureOriginDeprecatedNotRemoved: case UseCounter::GeolocationInsecureOriginIframeDeprecatedNotRemoved: return "getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::GetUserMediaInsecureOrigin: case UseCounter::GetUserMediaInsecureOriginIframe: return "getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::EncryptedMediaInsecureOrigin: return "requestMediaKeySystemAccess() is deprecated on insecure origins in the specification. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::ApplicationCacheManifestSelectInsecureOrigin: case UseCounter::ApplicationCacheAPIInsecureOrigin: return "Use of the Application Cache is deprecated on insecure origins. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::ElementCreateShadowRootMultiple: return "Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case UseCounter::CSSDeepCombinator: return "/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case UseCounter::CSSSelectorPseudoShadow: return "::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case UseCounter::SVGSMILElementInDocument: case UseCounter::SVGSMILAnimationInImageRegardlessOfCache: return "SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead."; case UseCounter::PrefixedPerformanceClearResourceTimings: return replacedBy("'Performance.webkitClearResourceTimings'", "'Performance.clearResourceTimings'"); case UseCounter::PrefixedPerformanceSetResourceTimingBufferSize: return replacedBy("'Performance.webkitSetResourceTimingBufferSize'", "'Performance.setResourceTimingBufferSize'"); case UseCounter::PrefixedPerformanceResourceTimingBufferFull: return replacedBy("'Performance.onwebkitresourcetimingbufferfull'", "'Performance.onresourcetimingbufferfull'"); case UseCounter::BluetoothDeviceInstanceId: return replacedBy("'BluetoothDevice.instanceID'", "'BluetoothDevice.id'"); case UseCounter::BluetoothDeviceConnectGATT: return replacedWillBeRemoved("'BluetoothDevice.connectGATT'", "'BluetoothDevice.gatt.connect'", 52, "5264933985976320"); case UseCounter::MediaStreamTrackGetSources: return "MediaStreamTrack.getSources is deprecated. See https://www.chromestatus.com/feature/4765305641369600 for more details."; case UseCounter::V8TouchEvent_InitTouchEvent_Method: return replacedWillBeRemoved("'TouchEvent.initTouchEvent'", "the TouchEvent constructor", 53, "5730982598541312"); case UseCounter::ObjectObserve: return willBeRemoved("'Object.observe'", 50, "6147094632988672"); case UseCounter::SVGZoomEvent: return willBeRemoved("'SVGZoomEvent'", 52, "5760883808534528"); case UseCounter::WebAnimationHyphenatedProperty: return "Hyphenated property names in Web Animations keyframes are invalid and therefore ignored. Please use camelCase instead."; case UseCounter::HTMLKeygenElement: return willBeRemoved("The <keygen> element", 54, "5716060992962560"); case UseCounter::ResultsAttribute: return willBeRemoved("'results' attribute", 53, "5738199536107520"); case UseCounter::WebAnimationsEasingAsFunctionLinear: return String::format("Specifying animation easing as a function is deprecated and all support will be removed in %s, at which point this will throw a TypeError. This warning may have been triggered by the Web Animations or Polymer polyfills. See http://crbug.com/601672 for details.", milestoneString(54)); case UseCounter::WindowPostMessageWithLegacyTargetOriginArgument: return replacedWillBeRemoved("'window.postMessage(message, transferables, targetOrigin)'", "'window.postMessage(message, targetOrigin, transferables)'", 54, "5719033043222528"); case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs: return "contentType strings without codecs will not be supported by requestMediaKeySystemAccess() in the future. Please specify the desired codec(s) as part of the contentType."; case UseCounter::V8KeyboardEvent_KeyIdentifier_AttributeGetter: return willBeRemoved("'KeyboardEvent.keyIdentifier'", 53, "5316065118650368"); case UseCounter::During_Microtask_Alert: return willBeRemoved("Invoking 'alert()' during microtask execution", 53, "5647113010544640"); case UseCounter::During_Microtask_Confirm: return willBeRemoved("Invoking 'confirm()' during microtask execution", 53, "5647113010544640"); case UseCounter::During_Microtask_Print: return willBeRemoved("Invoking 'print()' during microtask execution", 53, "5647113010544640"); case UseCounter::During_Microtask_Prompt: return willBeRemoved("Invoking 'prompt()' during microtask execution", 53, "5647113010544640"); case UseCounter::During_Microtask_SyncXHR: return willBeRemoved("Invoking 'send()' on a sync XHR during microtask execution", 53, "5647113010544640"); case UseCounter::MediaStreamOnEnded: return replacedWillBeRemoved("The MediaStream 'ended' event", "the MediaStream 'inactive' event", 53, "5730404371791872"); // Features that aren't deprecated don't have a deprecation message. default: return String(); } }
String Deprecation::deprecationMessage(UseCounter::Feature feature) { switch (feature) { // Quota case UseCounter::PrefixedStorageInfo: return replacedBy("'window.webkitStorageInfo'", "'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage'"); case UseCounter::ConsoleMarkTimeline: return replacedBy("'console.markTimeline'", "'console.timeStamp'"); case UseCounter::FileError: return "FileError is deprecated. Please use the 'name' or 'message' attributes of DOMError rather than 'code'."; case UseCounter::CSSStyleSheetInsertRuleOptionalArg: return "Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."; case UseCounter::PrefixedVideoSupportsFullscreen: return replacedBy("'HTMLVideoElement.webkitSupportsFullscreen'", "'Document.fullscreenEnabled'"); case UseCounter::PrefixedVideoDisplayingFullscreen: return replacedBy("'HTMLVideoElement.webkitDisplayingFullscreen'", "'Document.fullscreenElement'"); case UseCounter::PrefixedVideoEnterFullscreen: return replacedBy("'HTMLVideoElement.webkitEnterFullscreen()'", "'Element.requestFullscreen()'"); case UseCounter::PrefixedVideoExitFullscreen: return replacedBy("'HTMLVideoElement.webkitExitFullscreen()'", "'Document.exitFullscreen()'"); case UseCounter::PrefixedVideoEnterFullScreen: return replacedBy("'HTMLVideoElement.webkitEnterFullScreen()'", "'Element.requestFullscreen()'"); case UseCounter::PrefixedVideoExitFullScreen: return replacedBy("'HTMLVideoElement.webkitExitFullScreen()'", "'Document.exitFullscreen()'"); case UseCounter::PrefixedIndexedDB: return replacedBy("'webkitIndexedDB'", "'indexedDB'"); case UseCounter::PrefixedIDBCursorConstructor: return replacedBy("'webkitIDBCursor'", "'IDBCursor'"); case UseCounter::PrefixedIDBDatabaseConstructor: return replacedBy("'webkitIDBDatabase'", "'IDBDatabase'"); case UseCounter::PrefixedIDBFactoryConstructor: return replacedBy("'webkitIDBFactory'", "'IDBFactory'"); case UseCounter::PrefixedIDBIndexConstructor: return replacedBy("'webkitIDBIndex'", "'IDBIndex'"); case UseCounter::PrefixedIDBKeyRangeConstructor: return replacedBy("'webkitIDBKeyRange'", "'IDBKeyRange'"); case UseCounter::PrefixedIDBObjectStoreConstructor: return replacedBy("'webkitIDBObjectStore'", "'IDBObjectStore'"); case UseCounter::PrefixedIDBRequestConstructor: return replacedBy("'webkitIDBRequest'", "'IDBRequest'"); case UseCounter::PrefixedIDBTransactionConstructor: return replacedBy("'webkitIDBTransaction'", "'IDBTransaction'"); case UseCounter::PrefixedRequestAnimationFrame: return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead."; case UseCounter::PrefixedCancelAnimationFrame: return "'webkitCancelAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case UseCounter::PrefixedCancelRequestAnimationFrame: return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead."; case UseCounter::SyncXHRWithCredentials: return "Setting 'XMLHttpRequest.withCredentials' for synchronous requests is deprecated."; case UseCounter::PictureSourceSrc: return "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."; case UseCounter::ConsoleTimeline: return replacedBy("'console.timeline'", "'console.time'"); case UseCounter::ConsoleTimelineEnd: return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: return "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."; case UseCounter::GetMatchedCSSRules: return "'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2"; case UseCounter::PrefixedImageSmoothingEnabled: return replacedBy("'CanvasRenderingContext2D.webkitImageSmoothingEnabled'", "'CanvasRenderingContext2D.imageSmoothingEnabled'"); case UseCounter::AudioListenerDopplerFactor: return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", 55, "5238926818148352"); case UseCounter::AudioListenerSpeedOfSound: return dopplerWillBeRemoved("'AudioListener.speedOfSound'", 55, "5238926818148352"); case UseCounter::AudioListenerSetVelocity: return dopplerWillBeRemoved("'AudioListener.setVelocity()'", 55, "5238926818148352"); case UseCounter::PannerNodeSetVelocity: return dopplerWillBeRemoved("'PannerNode.setVelocity()'", 55, "5238926818148352"); case UseCounter::PrefixedWindowURL: return replacedBy("'webkitURL'", "'URL'"); case UseCounter::PrefixedAudioContext: return replacedBy("'webkitAudioContext'", "'AudioContext'"); case UseCounter::PrefixedOfflineAudioContext: return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); case UseCounter::RangeExpand: return replacedBy("'Range.expand()'", "'Selection.modify()'"); // Powerful features on insecure origins (https://goo.gl/rStTGz) case UseCounter::DeviceMotionInsecureOrigin: return "The devicemotion event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::DeviceOrientationInsecureOrigin: return "The deviceorientation event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::DeviceOrientationAbsoluteInsecureOrigin: return "The deviceorientationabsolute event is deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::GeolocationInsecureOrigin: case UseCounter::GeolocationInsecureOriginIframe: // TODO(jww): This message should be made less ambigous after WebView // is fixed so geolocation can be removed there. After that, this // should be updated to read similarly to GetUserMediaInsecureOrigin's // message. return "getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::GetUserMediaInsecureOrigin: case UseCounter::GetUserMediaInsecureOriginIframe: return "getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::EncryptedMediaInsecureOrigin: return "requestMediaKeySystemAccess() is deprecated on insecure origins in the specification. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::ApplicationCacheManifestSelectInsecureOrigin: case UseCounter::ApplicationCacheAPIInsecureOrigin: return "Use of the Application Cache is deprecated on insecure origins. Support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."; case UseCounter::ElementCreateShadowRootMultiple: return "Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case UseCounter::ElementCreateShadowRootMultipleWithUserAgentShadowRoot: return "Calling Element.createShadowRoot() for an element which already hosts a user-agent shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details."; case UseCounter::CSSDeepCombinator: return "/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case UseCounter::CSSSelectorPseudoShadow: return "::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details."; case UseCounter::SVGSMILElementInDocument: case UseCounter::SVGSMILAnimationInImageRegardlessOfCache: return "SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead."; case UseCounter::PrefixedPerformanceClearResourceTimings: return replacedBy("'Performance.webkitClearResourceTimings'", "'Performance.clearResourceTimings'"); case UseCounter::PrefixedPerformanceSetResourceTimingBufferSize: return replacedBy("'Performance.webkitSetResourceTimingBufferSize'", "'Performance.setResourceTimingBufferSize'"); case UseCounter::PrefixedPerformanceResourceTimingBufferFull: return replacedBy("'Performance.onwebkitresourcetimingbufferfull'", "'Performance.onresourcetimingbufferfull'"); case UseCounter::BluetoothDeviceInstanceId: return replacedBy("'BluetoothDevice.instanceID'", "'BluetoothDevice.id'"); case UseCounter::BluetoothDeviceConnectGATT: return replacedWillBeRemoved("'BluetoothDevice.connectGATT'", "'BluetoothDevice.gatt.connect'", 52, "5264933985976320"); case UseCounter::MediaStreamTrackGetSources: return "MediaStreamTrack.getSources is deprecated. See https://www.chromestatus.com/feature/4765305641369600 for more details."; case UseCounter::V8TouchEvent_InitTouchEvent_Method: return replacedWillBeRemoved("'TouchEvent.initTouchEvent'", "the TouchEvent constructor", 53, "5730982598541312"); case UseCounter::ObjectObserve: return willBeRemoved("'Object.observe'", 50, "6147094632988672"); case UseCounter::SVGZoomEvent: return willBeRemoved("'SVGZoomEvent'", 52, "5760883808534528"); case UseCounter::BorderImageWithBorderStyleNone: return "Elements using the 'border-image' CSS property with no 'border-style' set should have no border, but currently do. Setting 'border-style' will be required in M51, around May 2016. See https://www.chromestatus.com/features/5542503914668032 for more details."; case UseCounter::WebAnimationHyphenatedProperty: return "Hyphenated property names in Web Animations keyframes are invalid and therefore ignored. Please use camelCase instead."; case UseCounter::PresentationConnectionStateChangeEventListener: return replacedWillBeRemoved("'PresentationConnection.onstateachange'", "'PresentationConnection.on{connect,close,terminate}'", 51, "5662456714100736"); case UseCounter::HTMLKeygenElement: return willBeRemoved("The <keygen> element", 54, "5716060992962560"); case UseCounter::ResultsAttribute: return willBeRemoved("'results' attribute", 53, "5738199536107520"); // Features that aren't deprecated don't have a deprecation message. default: return String(); } }