lighthouse 9.6.6 → 9.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lighthouse-core/audits/deprecations.js +12 -581
- package/lighthouse-core/audits/lcp-lazy-loaded.js +4 -3
- package/lighthouse-core/audits/network-requests.js +8 -6
- package/lighthouse-core/audits/preload-lcp-image.js +7 -3
- package/lighthouse-core/gather/gatherers/trace-elements.js +32 -13
- package/lighthouse-core/lib/deprecations-strings.js +573 -0
- package/lighthouse-core/lib/network-request.js +5 -0
- package/package.json +4 -4
- package/shared/localization/locales/en-US.json +144 -186
- package/shared/localization/locales/en-XL.json +144 -186
- package/types/artifacts.d.ts +1 -0
- package/changelog.md +0 -6059
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
const Audit = require('./audit.js');
|
|
13
13
|
const JsBundles = require('../computed/js-bundles.js');
|
|
14
14
|
const i18n = require('../lib/i18n/i18n.js');
|
|
15
|
+
const {getIssueDetailDescription} = require('../lib/deprecations-strings.js');
|
|
15
16
|
|
|
16
17
|
/* eslint-disable max-len */
|
|
17
18
|
const UIStrings = {
|
|
@@ -31,572 +32,11 @@ const UIStrings = {
|
|
|
31
32
|
columnDeprecate: 'Deprecation / Warning',
|
|
32
33
|
/** Table column header for line of code (eg. 432) that is using a deprecated API. */
|
|
33
34
|
columnLine: 'Line',
|
|
34
|
-
|
|
35
|
-
/** This links to the chrome feature status page when one exists. */
|
|
36
|
-
feature: 'Check the feature status page for more details.',
|
|
37
|
-
/**
|
|
38
|
-
* @description This links to the chromium dash schedule when a milestone is set.
|
|
39
|
-
* @example {100} milestone
|
|
40
|
-
*/
|
|
41
|
-
milestone: 'This change will go into effect with milestone {milestone}.',
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @description TODO(crbug.com/1318846): Description needed for translation
|
|
45
|
-
*/
|
|
46
|
-
authorizationCoveredByWildcard:
|
|
47
|
-
'Authorization will not be covered by the wildcard symbol (*) in CORS `Access-Control-Allow-Headers` handling.',
|
|
48
|
-
/**
|
|
49
|
-
*@description TODO(crbug.com/1320334): Description needed for translation
|
|
50
|
-
*/
|
|
51
|
-
canRequestURLHTTPContainingNewline:
|
|
52
|
-
'Resource requests whose URLs contained both removed whitespace `(n|r|t)` characters and less-than characters (`<`) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources.',
|
|
53
|
-
/**
|
|
54
|
-
*@description TODO(crbug.com/1320335): Description needed for translation
|
|
55
|
-
*/
|
|
56
|
-
chromeLoadTimesConnectionInfo:
|
|
57
|
-
'`chrome.loadTimes()` is deprecated, instead use standardized API: Navigation Timing 2.',
|
|
58
|
-
/**
|
|
59
|
-
*@description TODO(crbug.com/1320336): Description needed for translation
|
|
60
|
-
*/
|
|
61
|
-
chromeLoadTimesFirstPaintAfterLoadTime:
|
|
62
|
-
'`chrome.loadTimes()` is deprecated, instead use standardized API: Paint Timing.',
|
|
63
|
-
/**
|
|
64
|
-
*@description TODO(crbug.com/1320337): Description needed for translation
|
|
65
|
-
*/
|
|
66
|
-
chromeLoadTimesWasAlternateProtocolAvailable:
|
|
67
|
-
'`chrome.loadTimes()` is deprecated, instead use standardized API: `nextHopProtocol` in Navigation Timing 2.',
|
|
68
|
-
/**
|
|
69
|
-
*@description TODO(crbug.com/1318847): Description needed for translation
|
|
70
|
-
*/
|
|
71
|
-
cookieWithTruncatingChar: 'Cookies containing a `(0|r|n)` character will be rejected instead of truncated.',
|
|
72
|
-
/**
|
|
73
|
-
*@description This warning occurs when a frame accesses another frame's
|
|
74
|
-
* data after having set `document.domain` without having set the
|
|
75
|
-
* `Origin-Agent-Cluster` http header. This is a companion warning to
|
|
76
|
-
* `documentDomainSettingWithoutOriginAgentClusterHeader`, where that
|
|
77
|
-
* warning occurs when `document.domain` is set, and this warning
|
|
78
|
-
* occurs when an access has been made, based on that previous
|
|
79
|
-
* `document.domain` setting.
|
|
80
|
-
*/
|
|
81
|
-
crossOriginAccessBasedOnDocumentDomain:
|
|
82
|
-
'Relaxing the same-origin policy by setting `document.domain` is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting `document.domain`.',
|
|
83
|
-
/**
|
|
84
|
-
*@description TODO(crbug.com/1318850): Description needed for translation
|
|
85
|
-
*/
|
|
86
|
-
crossOriginWindowAlert:
|
|
87
|
-
'Triggering `window.alert` from cross origin iframes has been deprecated and will be removed in the future.',
|
|
88
|
-
/**
|
|
89
|
-
*@description TODO(crbug.com/1318851): Description needed for translation
|
|
90
|
-
*/
|
|
91
|
-
crossOriginWindowConfirm:
|
|
92
|
-
'Triggering `window.confirm` from cross origin iframes has been deprecated and will be removed in the future.',
|
|
93
|
-
/**
|
|
94
|
-
*@description TODO(crbug.com/1320339): Description needed for translation
|
|
95
|
-
*/
|
|
96
|
-
cssSelectorInternalMediaControlsOverlayCastButton:
|
|
97
|
-
'The `disableRemotePlayback` attribute should be used in order to disable the default Cast integration instead of using `-internal-media-controls-overlay-cast-button` selector.',
|
|
98
|
-
/**
|
|
99
|
-
*@description TODO(crbug.com/1320340): Description needed for translation
|
|
100
|
-
*/
|
|
101
|
-
customCursorIntersectsViewport:
|
|
102
|
-
'Custom cursors with size greater than 32x32 DIP intersecting native UI is deprecated and will be removed.',
|
|
103
|
-
/**
|
|
104
|
-
*@description This warning occurs when a script modifies `document.domain`
|
|
105
|
-
* without having set on `Origin-Agent-Cluster` http header. In other
|
|
106
|
-
* words, when a script relies on the default behaviour of
|
|
107
|
-
* `Origin-Agent-Cluster` when setting document.domain.
|
|
108
|
-
*/
|
|
109
|
-
documentDomainSettingWithoutOriginAgentClusterHeader:
|
|
110
|
-
'Relaxing the same-origin policy by setting `document.domain` is deprecated, and will be disabled by default. To continue using this feature, please opt-out of origin-keyed agent clusters by sending an `Origin-Agent-Cluster: ?0` header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details.',
|
|
111
|
-
/**
|
|
112
|
-
*@description Warning displayed to developers when the non-standard `Event.path` API is used to notify them that this API is deprecated.
|
|
113
|
-
*/
|
|
114
|
-
eventPath: '`Event.path` is deprecated and will be removed. Please use `Event.composedPath()` instead.',
|
|
115
|
-
/**
|
|
116
|
-
*@description Warning displayed to developers when the Geolocation API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is no longer supported.
|
|
117
|
-
*/
|
|
118
|
-
geolocationInsecureOrigin:
|
|
119
|
-
'`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.gle/chrome-insecure-origins for more details.',
|
|
120
|
-
/**
|
|
121
|
-
*@description Warning displayed to developers when the Geolocation API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is deprecated.
|
|
122
|
-
*/
|
|
123
|
-
geolocationInsecureOriginDeprecatedNotRemoved:
|
|
124
|
-
'`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.gle/chrome-insecure-origins for more details.',
|
|
125
|
-
/**
|
|
126
|
-
*@description TODO(crbug.com/1318858): Description needed for translation
|
|
127
|
-
*/
|
|
128
|
-
getUserMediaInsecureOrigin:
|
|
129
|
-
'`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.gle/chrome-insecure-origins for more details.',
|
|
130
|
-
/**
|
|
131
|
-
*@description TODO(crbug.com/1320342): Description needed for translation
|
|
132
|
-
*/
|
|
133
|
-
hostCandidateAttributeGetter:
|
|
134
|
-
'`RTCPeerConnectionIceErrorEvent.hostCandidate` is deprecated. Please use `RTCPeerConnectionIceErrorEvent.address` or `RTCPeerConnectionIceErrorEvent.port` instead.',
|
|
135
|
-
/**
|
|
136
|
-
*@description TODO(crbug.com/1320343): Description needed for translation
|
|
137
|
-
*/
|
|
138
|
-
insecurePrivateNetworkSubresourceRequest:
|
|
139
|
-
'The website requested a subresource from a network that it could only access because of its users\' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them.',
|
|
140
|
-
/**
|
|
141
|
-
*@description TODO(crbug.com/1318860): Description needed for translation
|
|
142
|
-
*/
|
|
143
|
-
legacyConstraintGoogCpuOveruseDetection:
|
|
144
|
-
'CPU overuse detection is enabled-by-default and the ability to disable it using `googCpuOveruseDetection` will soon be removed. Please stop using this legacy constraint.',
|
|
145
|
-
/**
|
|
146
|
-
*@description TODO(crbug.com/1318861): Description needed for translation
|
|
147
|
-
*/
|
|
148
|
-
legacyConstraintGoogIPv6:
|
|
149
|
-
'IPv6 is enabled-by-default and the ability to disable it using `googIPv6` will soon be removed. Please stop using this legacy constraint.',
|
|
150
|
-
/**
|
|
151
|
-
*@description TODO(crbug.com/1318863): Description needed for translation
|
|
152
|
-
*/
|
|
153
|
-
legacyConstraintGoogScreencastMinBitrate:
|
|
154
|
-
'Screencast min bitrate is now set to 100 kbps by default and `googScreencastMinBitrate` will soon be ignored in favor of this new default. Please stop using this legacy constraint.',
|
|
155
|
-
/**
|
|
156
|
-
*@description TODO(crbug.com/1318864): Description needed for translation
|
|
157
|
-
*/
|
|
158
|
-
legacyConstraintGoogSuspendBelowMinBitrate:
|
|
159
|
-
'Support for the `googSuspendBelowMinBitrate` constraint is about to be removed. Please stop using this legacy constraint.',
|
|
160
|
-
/**
|
|
161
|
-
*@description TODO(crbug.com/1318865): Description needed for translation
|
|
162
|
-
*/
|
|
163
|
-
localCSSFileExtensionRejected:
|
|
164
|
-
'CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.',
|
|
165
|
-
/**
|
|
166
|
-
*@description TODO(crbug.com/1320344): Description needed for translation
|
|
167
|
-
*/
|
|
168
|
-
mediaElementAudioSourceNode:
|
|
169
|
-
'Creating a `MediaElementAudioSourceNode` on an `OfflineAudioContext` is deprecated and will be removed.',
|
|
170
|
-
/**
|
|
171
|
-
*@description TODO(crbug.com/1320345): Description needed for translation
|
|
172
|
-
*/
|
|
173
|
-
mediaSourceAbortRemove:
|
|
174
|
-
'Using `SourceBuffer.abort()` to abort `remove()`\'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should instead await `updateend`. `abort()` is intended to only abort an asynchronous media append or reset parser state.',
|
|
175
|
-
/**
|
|
176
|
-
*@description TODO(crbug.com/1320346): Description needed for translation
|
|
177
|
-
*/
|
|
178
|
-
mediaSourceDurationTruncatingBuffered:
|
|
179
|
-
'Setting `MediaSource.duration` below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit `remove(newDuration, oldDuration)` on all `sourceBuffers`, where `newDuration < oldDuration`.',
|
|
180
|
-
/**
|
|
181
|
-
*@description TODO(crbug.com/1320347): Description needed for translation
|
|
182
|
-
*/
|
|
183
|
-
noSysexWebMIDIWithoutPermission:
|
|
184
|
-
'Web MIDI will ask a permission to use even if the sysex is not specified in the `MIDIOptions`.',
|
|
185
|
-
/**
|
|
186
|
-
*@description Warning displayed to developers when the Notification API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is no longer supported.
|
|
187
|
-
*/
|
|
188
|
-
notificationInsecureOrigin:
|
|
189
|
-
'The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
|
|
190
|
-
/**
|
|
191
|
-
*@description Warning displayed to developers when permission to use notifications has been requested by a cross-origin iframe, to notify them that this use is no longer supported.
|
|
192
|
-
*/
|
|
193
|
-
notificationPermissionRequestedIframe:
|
|
194
|
-
'Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead.',
|
|
195
|
-
/**
|
|
196
|
-
*@description TODO(crbug.com/1318867): Description needed for translation
|
|
197
|
-
*/
|
|
198
|
-
obsoleteWebRtcCipherSuite:
|
|
199
|
-
'Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed.',
|
|
200
|
-
/**
|
|
201
|
-
*@description TODO(crbug.com/1320349): Description needed for translation
|
|
202
|
-
*/
|
|
203
|
-
paymentRequestBasicCard: 'The `basic-card` payment method is deprecated and will be removed.',
|
|
204
|
-
/**
|
|
205
|
-
*@description TODO(crbug.com/1320350): Description needed for translation
|
|
206
|
-
*/
|
|
207
|
-
paymentRequestShowWithoutGesture:
|
|
208
|
-
'Calling `PaymentRequest.show()` without user activation is deprecated and will be removed.',
|
|
209
|
-
/**
|
|
210
|
-
*@description This issue indicates that a `<source>` element with a `<picture>` parent was using an `src` attribute, which is not valid and is ignored by the browser. The `srcset` attribute should be used instead.
|
|
211
|
-
*/
|
|
212
|
-
pictureSourceSrc:
|
|
213
|
-
'`<source src>` with a `<picture>` parent is invalid and therefore ignored. Please use `<source srcset>` instead.',
|
|
214
|
-
/**
|
|
215
|
-
*@description Warning displayed to developers when the vendor-prefixed method is used rather than the equivalent unprefixed method.
|
|
216
|
-
*/
|
|
217
|
-
prefixedCancelAnimationFrame:
|
|
218
|
-
'`webkitCancelAnimationFrame` is vendor-specific. Please use the standard `cancelAnimationFrame` instead.',
|
|
219
|
-
/**
|
|
220
|
-
*@description Warning displayed to developers when the vendor-prefixed method is used rather than the equivalent unprefixed method.
|
|
221
|
-
*/
|
|
222
|
-
prefixedRequestAnimationFrame:
|
|
223
|
-
'`webkitRequestAnimationFrame` is vendor-specific. Please use the standard `requestAnimationFrame` instead.',
|
|
224
|
-
/**
|
|
225
|
-
*@description TODO(crbug.com/1320351): Description needed for translation
|
|
226
|
-
*/
|
|
227
|
-
prefixedStorageInfo:
|
|
228
|
-
'`window.webkitStorageInfo` is deprecated. Please use `navigator.webkitTemporaryStorage` or `navigator.webkitPersistentStorage` instead.',
|
|
229
|
-
/**
|
|
230
|
-
*@description TODO(crbug.com/1320352): Description needed for translation
|
|
231
|
-
*/
|
|
232
|
-
prefixedVideoDisplayingFullscreen:
|
|
233
|
-
'`HTMLVideoElement.webkitDisplayingFullscreen` is deprecated. Please use `Document.fullscreenElement` instead.',
|
|
234
|
-
/**
|
|
235
|
-
*@description TODO(crbug.com/1320353): Description needed for translation
|
|
236
|
-
*/
|
|
237
|
-
prefixedVideoEnterFullScreen:
|
|
238
|
-
'`HTMLVideoElement.webkitEnterFullScreen()` is deprecated. Please use `Element.requestFullscreen()` instead.',
|
|
239
|
-
/**
|
|
240
|
-
*@description TODO(crbug.com/1320353): Description needed for translation
|
|
241
|
-
*/
|
|
242
|
-
prefixedVideoEnterFullscreen:
|
|
243
|
-
'`HTMLVideoElement.webkitEnterFullscreen()` is deprecated. Please use `Element.requestFullscreen()` instead.',
|
|
244
|
-
/**
|
|
245
|
-
*@description TODO(crbug.com/1320354): Description needed for translation
|
|
246
|
-
*/
|
|
247
|
-
prefixedVideoExitFullScreen:
|
|
248
|
-
'`HTMLVideoElement.webkitExitFullsSreen()` is deprecated. Please use `Document.exitFullscreen()` instead.',
|
|
249
|
-
/**
|
|
250
|
-
*@description TODO(crbug.com/1320354): Description needed for translation
|
|
251
|
-
*/
|
|
252
|
-
prefixedVideoExitFullscreen:
|
|
253
|
-
'`HTMLVideoElement.webkitExitFullscreen()` is deprecated. Please use `Document.exitFullscreen()` instead.',
|
|
254
|
-
/**
|
|
255
|
-
*@description TODO(crbug.com/1320355): Description needed for translation
|
|
256
|
-
*/
|
|
257
|
-
prefixedVideoSupportsFullscreen:
|
|
258
|
-
'`HTMLVideoElement.webkitSupportsFullscreen` is deprecated. Please use `Document.fullscreenEnabled` instead.',
|
|
259
|
-
/**
|
|
260
|
-
*@description TODO(crbug.com/1320356): Description needed for translation
|
|
261
|
-
*/
|
|
262
|
-
rangeExpand: '`Range.expand()` is deprecated. Please use `Selection.modify()` instead.',
|
|
263
|
-
/**
|
|
264
|
-
*@description TODO(crbug.com/1320357): Description needed for translation
|
|
265
|
-
*/
|
|
266
|
-
requestedSubresourceWithEmbeddedCredentials:
|
|
267
|
-
'Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked.',
|
|
268
|
-
/**
|
|
269
|
-
*@description TODO(crbug.com/1318872): Description needed for translation
|
|
270
|
-
*/
|
|
271
|
-
rtcConstraintEnableDtlsSrtpFalse:
|
|
272
|
-
'The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `false` value for this constraint, which is interpreted as an attempt to use the removed `SDES` key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead.',
|
|
273
|
-
/**
|
|
274
|
-
*@description TODO(crbug.com/1318873): Description needed for translation
|
|
275
|
-
*/
|
|
276
|
-
rtcConstraintEnableDtlsSrtpTrue:
|
|
277
|
-
'The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `true` value for this constraint, which had no effect, but you can remove this constraint for tidiness.',
|
|
278
|
-
/**
|
|
279
|
-
*@description TODO(crbug.com/1318874): Description needed for translation
|
|
280
|
-
*/
|
|
281
|
-
rtcPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics:
|
|
282
|
-
'Complex Plan B SDP detected! Chrome will switch the default `sdpSemantics` from `plan-b` to the standardized `unified-plan` format and this peer connection is relying on the default `sdpSemantics`. This SDP is not compatible with Unified Plan and will be rejected by clients expecting Unified Plan. For more information about how to prepare for the switch, see https://webrtc.org/web-apis/chrome/unified-plan/.',
|
|
283
|
-
/**
|
|
284
|
-
*@description TODO(crbug.com/1318875): Description needed for translation
|
|
285
|
-
*/
|
|
286
|
-
rtcPeerConnectionLegacyCreateWithMediaConstraints:
|
|
287
|
-
'The `mediaConstraints` version of `RTCOfferOptions/RTCAnswerOptions` are deprecated and will soon be removed, please migrate to the promise-based `createOffer`/`createAnswer` instead.',
|
|
288
|
-
/**
|
|
289
|
-
*@description TODO(crbug.com/1320358): Description needed for translation
|
|
290
|
-
*/
|
|
291
|
-
rtcPeerConnectionSdpSemanticsPlanB:
|
|
292
|
-
'Plan B SDP semantics, which is used when constructing an `RTCPeerConnection` with `{sdpSemantics:plan-b}`, is a legacy non-standard version of the Session Description Protocol that has been permanently deleted from the Web Platform. It is still available when building with IS_FUCHSIA, but we intend to delete it as soon as possible. Stop depending on it. See https://crbug.com/1302249 for status.',
|
|
293
|
-
/**
|
|
294
|
-
*@description TODO(crbug.com/1320360): Description needed for translation
|
|
295
|
-
*/
|
|
296
|
-
rtcpMuxPolicyNegotiate: 'The `rtcpMuxPolicy` option is deprecated and will be removed.',
|
|
297
|
-
/**
|
|
298
|
-
*@description TODO(crbug.com/1318876): Description needed for translation
|
|
299
|
-
*/
|
|
300
|
-
rtpDataChannel:
|
|
301
|
-
'RTP data channels are no longer supported. The `RtpDataChannels` constraint is currently ignored, and may cause an error at a later date.',
|
|
302
|
-
/**
|
|
303
|
-
*@description TODO(crbug.com/1320361): Description needed for translation
|
|
304
|
-
*/
|
|
305
|
-
selectionAddRangeIntersect:
|
|
306
|
-
'The behavior that `Selection.addRange()` merges existing Range and the specified Range was removed.',
|
|
307
|
-
/**
|
|
308
|
-
*@description TODO(crbug.com/1318878): Description needed for translation
|
|
309
|
-
*/
|
|
310
|
-
sharedArrayBufferConstructedWithoutIsolation:
|
|
311
|
-
'`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.',
|
|
312
|
-
/**
|
|
313
|
-
*@description TODO(crbug.com/1320363): Description needed for translation
|
|
314
|
-
*/
|
|
315
|
-
textToSpeech_DisallowedByAutoplay:
|
|
316
|
-
'`speechSynthesis.speak()` without user activation is deprecated and will be removed.',
|
|
317
|
-
/**
|
|
318
|
-
*@description TODO(crbug.com/1318879): Description needed for translation
|
|
319
|
-
*/
|
|
320
|
-
v8SharedArrayBufferConstructedInExtensionWithoutIsolation:
|
|
321
|
-
'Extensions should opt into cross-origin isolation to continue using `SharedArrayBuffer`. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/.',
|
|
322
|
-
/**
|
|
323
|
-
*@description TODO(crbug.com/1318880): Description needed for translation
|
|
324
|
-
*/
|
|
325
|
-
webCodecsVideoFrameDefaultTimestamp:
|
|
326
|
-
'Constructing a `VideoFrame` without a timestamp is deprecated and support will be removed. Please provide a timestamp via `VideoFrameInit`.',
|
|
327
|
-
/**
|
|
328
|
-
*@description TODO(crbug.com/1318881): Description needed for translation
|
|
329
|
-
*/
|
|
330
|
-
xhrJSONEncodingDetection: 'UTF-16 is not supported by response json in `XMLHttpRequest`',
|
|
331
|
-
/**
|
|
332
|
-
*@description TODO(crbug.com/1318882): Description needed for translation
|
|
333
|
-
*/
|
|
334
|
-
xmlHttpRequestSynchronousInNonWorkerOutsideBeforeUnload:
|
|
335
|
-
'Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user\u2019s experience. For more help, check https://xhr.spec.whatwg.org/.',
|
|
336
|
-
/**
|
|
337
|
-
*@description TODO(crbug.com/1320365): Description needed for translation
|
|
338
|
-
*/
|
|
339
|
-
xrSupportsSession:
|
|
340
|
-
'`supportsSession()` is deprecated. Please use `isSessionSupported()` and check the resolved boolean value instead.',
|
|
341
|
-
/** ... */
|
|
342
|
-
unknownDeprecation: '...',
|
|
343
35
|
};
|
|
344
36
|
/* eslint-enable max-len */
|
|
345
37
|
|
|
346
38
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
347
39
|
|
|
348
|
-
/**
|
|
349
|
-
* @param {LH.Crdp.Audits.DeprecationIssueDetails} deprecation
|
|
350
|
-
*/
|
|
351
|
-
function getMeta(deprecation) {
|
|
352
|
-
let message;
|
|
353
|
-
let feature = 0;
|
|
354
|
-
let milestone = 0;
|
|
355
|
-
// @ts-expect-error
|
|
356
|
-
const legacyMessage = /** @type {string=} */ (deprecation.message);
|
|
357
|
-
|
|
358
|
-
switch (deprecation.type) {
|
|
359
|
-
case 'AuthorizationCoveredByWildcard':
|
|
360
|
-
message = str_(UIStrings.authorizationCoveredByWildcard);
|
|
361
|
-
milestone = 97;
|
|
362
|
-
break;
|
|
363
|
-
case 'CanRequestURLHTTPContainingNewline':
|
|
364
|
-
message = str_(UIStrings.canRequestURLHTTPContainingNewline);
|
|
365
|
-
feature = 5735596811091968;
|
|
366
|
-
break;
|
|
367
|
-
case 'ChromeLoadTimesConnectionInfo':
|
|
368
|
-
message = str_(UIStrings.chromeLoadTimesConnectionInfo);
|
|
369
|
-
feature = 5637885046816768;
|
|
370
|
-
break;
|
|
371
|
-
case 'ChromeLoadTimesFirstPaintAfterLoadTime':
|
|
372
|
-
message = str_(UIStrings.chromeLoadTimesFirstPaintAfterLoadTime);
|
|
373
|
-
feature = 5637885046816768;
|
|
374
|
-
break;
|
|
375
|
-
case 'ChromeLoadTimesWasAlternateProtocolAvailable':
|
|
376
|
-
message = str_(UIStrings.chromeLoadTimesWasAlternateProtocolAvailable);
|
|
377
|
-
feature = 5637885046816768;
|
|
378
|
-
break;
|
|
379
|
-
case 'CookieWithTruncatingChar':
|
|
380
|
-
message = str_(UIStrings.cookieWithTruncatingChar);
|
|
381
|
-
milestone = 103;
|
|
382
|
-
break;
|
|
383
|
-
case 'CrossOriginAccessBasedOnDocumentDomain':
|
|
384
|
-
message = str_(UIStrings.crossOriginAccessBasedOnDocumentDomain);
|
|
385
|
-
milestone = 106;
|
|
386
|
-
break;
|
|
387
|
-
case 'CrossOriginWindowAlert':
|
|
388
|
-
message = str_(UIStrings.crossOriginWindowAlert);
|
|
389
|
-
break;
|
|
390
|
-
case 'CrossOriginWindowConfirm':
|
|
391
|
-
message = str_(UIStrings.crossOriginWindowConfirm);
|
|
392
|
-
break;
|
|
393
|
-
case 'CSSSelectorInternalMediaControlsOverlayCastButton':
|
|
394
|
-
message = str_(UIStrings.cssSelectorInternalMediaControlsOverlayCastButton);
|
|
395
|
-
feature = 5714245488476160;
|
|
396
|
-
break;
|
|
397
|
-
case 'CustomCursorIntersectsViewport':
|
|
398
|
-
message = str_(UIStrings.customCursorIntersectsViewport);
|
|
399
|
-
feature = 5825971391299584;
|
|
400
|
-
milestone = 75;
|
|
401
|
-
break;
|
|
402
|
-
case 'DocumentDomainSettingWithoutOriginAgentClusterHeader':
|
|
403
|
-
message = str_(UIStrings.documentDomainSettingWithoutOriginAgentClusterHeader);
|
|
404
|
-
milestone = 106;
|
|
405
|
-
break;
|
|
406
|
-
case 'EventPath':
|
|
407
|
-
message = str_(UIStrings.eventPath);
|
|
408
|
-
feature = 5726124632965120;
|
|
409
|
-
milestone = 109;
|
|
410
|
-
break;
|
|
411
|
-
case 'GeolocationInsecureOrigin':
|
|
412
|
-
message = str_(UIStrings.geolocationInsecureOrigin);
|
|
413
|
-
break;
|
|
414
|
-
case 'GeolocationInsecureOriginDeprecatedNotRemoved':
|
|
415
|
-
message = str_(UIStrings.geolocationInsecureOriginDeprecatedNotRemoved);
|
|
416
|
-
break;
|
|
417
|
-
case 'GetUserMediaInsecureOrigin':
|
|
418
|
-
message = str_(UIStrings.getUserMediaInsecureOrigin);
|
|
419
|
-
break;
|
|
420
|
-
case 'HostCandidateAttributeGetter':
|
|
421
|
-
message = str_(UIStrings.hostCandidateAttributeGetter);
|
|
422
|
-
break;
|
|
423
|
-
case 'InsecurePrivateNetworkSubresourceRequest':
|
|
424
|
-
message = str_(UIStrings.insecurePrivateNetworkSubresourceRequest);
|
|
425
|
-
feature = 5436853517811712;
|
|
426
|
-
milestone = 92;
|
|
427
|
-
break;
|
|
428
|
-
case 'LegacyConstraintGoogCpuOveruseDetection':
|
|
429
|
-
message = str_(UIStrings.legacyConstraintGoogCpuOveruseDetection);
|
|
430
|
-
milestone = 103;
|
|
431
|
-
break;
|
|
432
|
-
case 'LegacyConstraintGoogIPv6':
|
|
433
|
-
message = str_(UIStrings.legacyConstraintGoogIPv6);
|
|
434
|
-
milestone = 103;
|
|
435
|
-
break;
|
|
436
|
-
case 'LegacyConstraintGoogScreencastMinBitrate':
|
|
437
|
-
message = str_(UIStrings.legacyConstraintGoogScreencastMinBitrate);
|
|
438
|
-
milestone = 103;
|
|
439
|
-
break;
|
|
440
|
-
case 'LegacyConstraintGoogSuspendBelowMinBitrate':
|
|
441
|
-
message = str_(UIStrings.legacyConstraintGoogSuspendBelowMinBitrate);
|
|
442
|
-
milestone = 103;
|
|
443
|
-
break;
|
|
444
|
-
case 'LocalCSSFileExtensionRejected':
|
|
445
|
-
message = str_(UIStrings.localCSSFileExtensionRejected);
|
|
446
|
-
milestone = 64;
|
|
447
|
-
break;
|
|
448
|
-
case 'MediaElementAudioSourceNode':
|
|
449
|
-
message = str_(UIStrings.mediaElementAudioSourceNode);
|
|
450
|
-
feature = 5258622686724096;
|
|
451
|
-
milestone = 71;
|
|
452
|
-
break;
|
|
453
|
-
case 'MediaSourceAbortRemove':
|
|
454
|
-
message = str_(UIStrings.mediaSourceAbortRemove);
|
|
455
|
-
feature = 6107495151960064;
|
|
456
|
-
break;
|
|
457
|
-
case 'MediaSourceDurationTruncatingBuffered':
|
|
458
|
-
message = str_(UIStrings.mediaSourceDurationTruncatingBuffered);
|
|
459
|
-
feature = 6107495151960064;
|
|
460
|
-
break;
|
|
461
|
-
case 'NoSysexWebMIDIWithoutPermission':
|
|
462
|
-
message = str_(UIStrings.noSysexWebMIDIWithoutPermission);
|
|
463
|
-
feature = 5138066234671104;
|
|
464
|
-
milestone = 82;
|
|
465
|
-
break;
|
|
466
|
-
case 'NotificationInsecureOrigin':
|
|
467
|
-
message = str_(UIStrings.notificationInsecureOrigin);
|
|
468
|
-
break;
|
|
469
|
-
case 'NotificationPermissionRequestedIframe':
|
|
470
|
-
message = str_(UIStrings.notificationPermissionRequestedIframe);
|
|
471
|
-
feature = 6451284559265792;
|
|
472
|
-
break;
|
|
473
|
-
case 'ObsoleteWebRtcCipherSuite':
|
|
474
|
-
message = str_(UIStrings.obsoleteWebRtcCipherSuite);
|
|
475
|
-
milestone = 81;
|
|
476
|
-
break;
|
|
477
|
-
case 'PaymentRequestBasicCard':
|
|
478
|
-
message = str_(UIStrings.paymentRequestBasicCard);
|
|
479
|
-
feature = 5730051011117056;
|
|
480
|
-
milestone = 100;
|
|
481
|
-
break;
|
|
482
|
-
case 'PaymentRequestShowWithoutGesture':
|
|
483
|
-
message = str_(UIStrings.paymentRequestShowWithoutGesture);
|
|
484
|
-
feature = 5948593429020672;
|
|
485
|
-
milestone = 102;
|
|
486
|
-
break;
|
|
487
|
-
case 'PictureSourceSrc':
|
|
488
|
-
message = str_(UIStrings.pictureSourceSrc);
|
|
489
|
-
break;
|
|
490
|
-
case 'PrefixedCancelAnimationFrame':
|
|
491
|
-
message = str_(UIStrings.prefixedCancelAnimationFrame);
|
|
492
|
-
break;
|
|
493
|
-
case 'PrefixedRequestAnimationFrame':
|
|
494
|
-
message = str_(UIStrings.prefixedRequestAnimationFrame);
|
|
495
|
-
break;
|
|
496
|
-
case 'PrefixedStorageInfo':
|
|
497
|
-
message = str_(UIStrings.prefixedStorageInfo);
|
|
498
|
-
break;
|
|
499
|
-
case 'PrefixedVideoDisplayingFullscreen':
|
|
500
|
-
message = str_(UIStrings.prefixedVideoDisplayingFullscreen);
|
|
501
|
-
break;
|
|
502
|
-
case 'PrefixedVideoEnterFullScreen':
|
|
503
|
-
message = str_(UIStrings.prefixedVideoEnterFullScreen);
|
|
504
|
-
break;
|
|
505
|
-
case 'PrefixedVideoEnterFullscreen':
|
|
506
|
-
message = str_(UIStrings.prefixedVideoEnterFullscreen);
|
|
507
|
-
break;
|
|
508
|
-
case 'PrefixedVideoExitFullScreen':
|
|
509
|
-
message = str_(UIStrings.prefixedVideoExitFullScreen);
|
|
510
|
-
break;
|
|
511
|
-
case 'PrefixedVideoExitFullscreen':
|
|
512
|
-
message = str_(UIStrings.prefixedVideoExitFullscreen);
|
|
513
|
-
break;
|
|
514
|
-
case 'PrefixedVideoSupportsFullscreen':
|
|
515
|
-
message = str_(UIStrings.prefixedVideoSupportsFullscreen);
|
|
516
|
-
break;
|
|
517
|
-
case 'RangeExpand':
|
|
518
|
-
message = str_(UIStrings.rangeExpand);
|
|
519
|
-
break;
|
|
520
|
-
case 'RequestedSubresourceWithEmbeddedCredentials':
|
|
521
|
-
message = str_(UIStrings.requestedSubresourceWithEmbeddedCredentials);
|
|
522
|
-
feature = 5669008342777856;
|
|
523
|
-
break;
|
|
524
|
-
case 'RTCConstraintEnableDtlsSrtpFalse':
|
|
525
|
-
message = str_(UIStrings.rtcConstraintEnableDtlsSrtpFalse);
|
|
526
|
-
milestone = 97;
|
|
527
|
-
break;
|
|
528
|
-
case 'RTCConstraintEnableDtlsSrtpTrue':
|
|
529
|
-
message = str_(UIStrings.rtcConstraintEnableDtlsSrtpTrue);
|
|
530
|
-
milestone = 97;
|
|
531
|
-
break;
|
|
532
|
-
case 'RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics':
|
|
533
|
-
message = str_(UIStrings.rtcPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics);
|
|
534
|
-
milestone = 72;
|
|
535
|
-
break;
|
|
536
|
-
case 'RTCPeerConnectionLegacyCreateWithMediaConstraints':
|
|
537
|
-
message = str_(UIStrings.rtcPeerConnectionLegacyCreateWithMediaConstraints);
|
|
538
|
-
milestone = 103;
|
|
539
|
-
break;
|
|
540
|
-
case 'RTCPeerConnectionSdpSemanticsPlanB':
|
|
541
|
-
message = str_(UIStrings.rtcPeerConnectionSdpSemanticsPlanB);
|
|
542
|
-
feature = 5823036655665152;
|
|
543
|
-
milestone = 93;
|
|
544
|
-
break;
|
|
545
|
-
case 'RtcpMuxPolicyNegotiate':
|
|
546
|
-
message = str_(UIStrings.rtcpMuxPolicyNegotiate);
|
|
547
|
-
feature = 5654810086866944;
|
|
548
|
-
milestone = 62;
|
|
549
|
-
break;
|
|
550
|
-
case 'RTPDataChannel':
|
|
551
|
-
message = str_(UIStrings.rtpDataChannel);
|
|
552
|
-
milestone = 88;
|
|
553
|
-
break;
|
|
554
|
-
case 'SelectionAddRangeIntersect':
|
|
555
|
-
message = str_(UIStrings.selectionAddRangeIntersect);
|
|
556
|
-
feature = 6680566019653632;
|
|
557
|
-
break;
|
|
558
|
-
case 'SharedArrayBufferConstructedWithoutIsolation':
|
|
559
|
-
message = str_(UIStrings.sharedArrayBufferConstructedWithoutIsolation);
|
|
560
|
-
milestone = 106;
|
|
561
|
-
break;
|
|
562
|
-
case 'TextToSpeech_DisallowedByAutoplay':
|
|
563
|
-
message = str_(UIStrings.textToSpeech_DisallowedByAutoplay);
|
|
564
|
-
feature = 5687444770914304;
|
|
565
|
-
milestone = 71;
|
|
566
|
-
break;
|
|
567
|
-
case 'V8SharedArrayBufferConstructedInExtensionWithoutIsolation':
|
|
568
|
-
message = str_(UIStrings.v8SharedArrayBufferConstructedInExtensionWithoutIsolation);
|
|
569
|
-
milestone = 96;
|
|
570
|
-
break;
|
|
571
|
-
// @ts-expect-error ???
|
|
572
|
-
case 'WebCodecsVideoFrameDefaultTimestamp':
|
|
573
|
-
message = str_(UIStrings.webCodecsVideoFrameDefaultTimestamp);
|
|
574
|
-
feature = 5667793157488640;
|
|
575
|
-
milestone = 99;
|
|
576
|
-
break;
|
|
577
|
-
case 'XHRJSONEncodingDetection':
|
|
578
|
-
message = str_(UIStrings.xhrJSONEncodingDetection);
|
|
579
|
-
milestone = 93;
|
|
580
|
-
break;
|
|
581
|
-
case 'XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload':
|
|
582
|
-
message = str_(UIStrings.xmlHttpRequestSynchronousInNonWorkerOutsideBeforeUnload);
|
|
583
|
-
break;
|
|
584
|
-
case 'XRSupportsSession':
|
|
585
|
-
message = str_(UIStrings.xrSupportsSession);
|
|
586
|
-
milestone = 80;
|
|
587
|
-
break;
|
|
588
|
-
default:
|
|
589
|
-
message = legacyMessage || str_(UIStrings.unknownDeprecation);
|
|
590
|
-
break;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
return {
|
|
594
|
-
message,
|
|
595
|
-
milestone,
|
|
596
|
-
feature,
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
|
|
600
40
|
class Deprecations extends Audit {
|
|
601
41
|
/**
|
|
602
42
|
* @return {LH.Audit.Meta}
|
|
@@ -623,36 +63,27 @@ class Deprecations extends Audit {
|
|
|
623
63
|
.map(deprecation => {
|
|
624
64
|
const {url, lineNumber, columnNumber} = deprecation.sourceCodeLocation;
|
|
625
65
|
const bundle = bundles.find(bundle => bundle.script.src === url);
|
|
626
|
-
const deprecationMeta =
|
|
627
|
-
|
|
628
|
-
const links = [];
|
|
629
|
-
if (deprecationMeta.feature) {
|
|
630
|
-
links.push({
|
|
631
|
-
type: 'link',
|
|
632
|
-
url: `https://chromestatus.com/feature/${deprecationMeta.feature}`,
|
|
633
|
-
text: str_(UIStrings.feature),
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
if (deprecationMeta.milestone) {
|
|
637
|
-
links.push({
|
|
638
|
-
type: 'link',
|
|
639
|
-
url: 'https://chromiumdash.appspot.com/schedule',
|
|
640
|
-
text: str_(UIStrings.milestone, {milestone: deprecationMeta.milestone}),
|
|
641
|
-
});
|
|
642
|
-
}
|
|
66
|
+
const deprecationMeta = getIssueDetailDescription(deprecation);
|
|
643
67
|
|
|
644
68
|
/** @type {LH.Audit.Details.TableSubItems=} */
|
|
645
69
|
let subItems = undefined;
|
|
646
|
-
if (links.length) {
|
|
70
|
+
if (deprecationMeta.links.length) {
|
|
647
71
|
subItems = {
|
|
648
72
|
type: 'subitems',
|
|
649
|
-
items: links
|
|
73
|
+
items: deprecationMeta.links.map(link => ({
|
|
74
|
+
type: 'link',
|
|
75
|
+
url: link.link,
|
|
76
|
+
text: link.linkTitle,
|
|
77
|
+
})),
|
|
650
78
|
};
|
|
651
79
|
}
|
|
652
80
|
|
|
81
|
+
// @ts-expect-error: The english string used to be included on the protocol, but no longer is.
|
|
82
|
+
const legacyMessage = deprecation.message;
|
|
83
|
+
|
|
653
84
|
/** @type {LH.Audit.Details.TableItem} */
|
|
654
85
|
const item = {
|
|
655
|
-
value: deprecationMeta.message ||
|
|
86
|
+
value: deprecationMeta.message || legacyMessage || deprecation.type,
|
|
656
87
|
// Protocol.Audits.SourceCodeLocation.columnNumber is 1-indexed, but we use 0-indexed.
|
|
657
88
|
source: Audit.makeSourceLocation(url, lineNumber, columnNumber - 1, bundle),
|
|
658
89
|
subItems,
|
|
@@ -50,8 +50,9 @@ class LargestContentfulPaintLazyLoaded extends Audit {
|
|
|
50
50
|
* @return {LH.Audit.Product}
|
|
51
51
|
*/
|
|
52
52
|
static audit(artifacts) {
|
|
53
|
-
const lcpElement = artifacts.TraceElements
|
|
54
|
-
|
|
53
|
+
const lcpElement = artifacts.TraceElements.find(element => {
|
|
54
|
+
return element.traceEventType === 'largest-contentful-paint' && element.type === 'image';
|
|
55
|
+
});
|
|
55
56
|
const lcpElementImage = lcpElement ? artifacts.ImageElements.find(elem => {
|
|
56
57
|
return elem.node.devtoolsNodePath === lcpElement.node.devtoolsNodePath;
|
|
57
58
|
}) : undefined;
|
|
@@ -59,7 +60,7 @@ class LargestContentfulPaintLazyLoaded extends Audit {
|
|
|
59
60
|
|
|
60
61
|
if (!lcpElementImage ||
|
|
61
62
|
!this.isImageInViewport(lcpElementImage, artifacts.ViewportDimensions)) {
|
|
62
|
-
return {score:
|
|
63
|
+
return {score: null, notApplicable: true};
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
/** @type {LH.Audit.Details.Table['headings']} */
|