chrome-devtools-frontend 1.0.996044 → 1.0.997598
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/AUTHORS +2 -0
- package/front_end/core/i18n/locales/en-US.json +102 -0
- package/front_end/core/i18n/locales/en-XL.json +102 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +158 -33
- package/front_end/core/sdk/CSSMetadata.ts +1 -8
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -2
- package/front_end/generated/InspectorBackendCommands.js +33 -3
- package/front_end/generated/protocol.ts +47 -24
- package/front_end/models/bindings/BreakpointManager.ts +12 -3
- package/front_end/models/issues_manager/DeprecationIssue.ts +281 -24
- package/front_end/panels/changes/ChangesView.ts +25 -10
- package/front_end/panels/css_overview/cssOverview.css +4 -0
- package/front_end/panels/elements/ElementsPanel.ts +7 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +55 -21
- package/front_end/panels/elements/components/adornerSettingsPane.css +5 -0
- package/front_end/panels/elements/stylesSectionTree.css +5 -4
- package/front_end/panels/elements/stylesSidebarPane.css +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +6 -2
- package/front_end/panels/sources/SourcesPanel.ts +22 -6
- package/front_end/panels/sources/sources-legacy.ts +1 -1
- package/front_end/panels/sources/sources-meta.ts +61 -7
- package/front_end/ui/components/diff_view/diffView.css +2 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +18 -7
- package/front_end/ui/legacy/SplitWidget.ts +17 -7
- package/front_end/ui/legacy/Toolbar.ts +5 -0
- package/front_end/ui/legacy/softDropDownButton.css +4 -0
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/inline_type_imports.js +158 -0
- package/scripts/eslint_rules/tests/inline_type_imports_test.js +106 -0
- package/scripts/javascript_natives/index.js +1 -2
@@ -32,6 +32,31 @@ const UIStrings = {
|
|
32
32
|
*/
|
33
33
|
authorizationCoveredByWildcard:
|
34
34
|
'Authorization will not be covered by the wildcard symbol (*) in CORS `Access-Control-Allow-Headers` handling.',
|
35
|
+
/**
|
36
|
+
*@description Warning displayed to developers when the Battery Status 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 and will soon be unsupported.
|
37
|
+
*/
|
38
|
+
batteryStatusInsecureOrigin:
|
39
|
+
'Using the Battery Status API (e.g. `navigator.getBattery()`) in insecure origins like HTTP is deprecated and will be removed.',
|
40
|
+
/**
|
41
|
+
*@description TODO(crbug.com/1320334): Description needed for translation
|
42
|
+
*/
|
43
|
+
canRequestURLHTTPContainingNewline:
|
44
|
+
'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.',
|
45
|
+
/**
|
46
|
+
*@description TODO(crbug.com/1320335): Description needed for translation
|
47
|
+
*/
|
48
|
+
chromeLoadTimesConnectionInfo:
|
49
|
+
'`chrome.loadTimes()` is deprecated, instead use standardized API: Navigation Timing 2.',
|
50
|
+
/**
|
51
|
+
*@description TODO(crbug.com/1320336): Description needed for translation
|
52
|
+
*/
|
53
|
+
chromeLoadTimesFirstPaintAfterLoadTime:
|
54
|
+
'`chrome.loadTimes()` is deprecated, instead use standardized API: Paint Timing.',
|
55
|
+
/**
|
56
|
+
*@description TODO(crbug.com/1320337): Description needed for translation
|
57
|
+
*/
|
58
|
+
chromeLoadTimesWasAlternateProtocolAvailable:
|
59
|
+
'`chrome.loadTimes()` is deprecated, instead use standardized API: `nextHopProtocol` in Navigation Timing 2.',
|
35
60
|
/**
|
36
61
|
*@description TODO(crbug.com/1318847): Description needed for translation
|
37
62
|
*/
|
@@ -51,6 +76,16 @@ const UIStrings = {
|
|
51
76
|
*/
|
52
77
|
crossOriginWindowConfirm:
|
53
78
|
'Triggering `window.confirm` from cross origin iframes has been deprecated and will be removed in the future.',
|
79
|
+
/**
|
80
|
+
*@description TODO(crbug.com/1320339): Description needed for translation
|
81
|
+
*/
|
82
|
+
cssSelectorInternalMediaControlsOverlayCastButton:
|
83
|
+
'The `disableRemotePlayback` attribute should be used in order to disable the default Cast integration instead of using `-internal-media-controls-overlay-cast-button` selector.',
|
84
|
+
/**
|
85
|
+
*@description TODO(crbug.com/1320340): Description needed for translation
|
86
|
+
*/
|
87
|
+
customCursorIntersectsViewport:
|
88
|
+
'Custom cursors with size greater than 32x32 DIP intersecting native UI is deprecated and will be removed.',
|
54
89
|
/**
|
55
90
|
*@description This message is shown when the example deprecated feature is used
|
56
91
|
*/
|
@@ -61,12 +96,16 @@ const UIStrings = {
|
|
61
96
|
documentDomainSettingWithoutOriginAgentClusterHeader:
|
62
97
|
'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.',
|
63
98
|
/**
|
64
|
-
*@description TODO(crbug.com/
|
99
|
+
*@description TODO(crbug.com/1320338): Description needed for translation
|
100
|
+
*/
|
101
|
+
eventPath: '`Event.path` is deprecated and will be removed. Please use `Event.composedPath()` instead.',
|
102
|
+
/**
|
103
|
+
*@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.
|
65
104
|
*/
|
66
105
|
geolocationInsecureOrigin:
|
67
106
|
'`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.',
|
68
107
|
/**
|
69
|
-
*@description
|
108
|
+
*@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.
|
70
109
|
*/
|
71
110
|
geolocationInsecureOriginDeprecatedNotRemoved:
|
72
111
|
'`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.',
|
@@ -75,6 +114,16 @@ const UIStrings = {
|
|
75
114
|
*/
|
76
115
|
getUserMediaInsecureOrigin:
|
77
116
|
'`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.',
|
117
|
+
/**
|
118
|
+
*@description TODO(crbug.com/1320342): Description needed for translation
|
119
|
+
*/
|
120
|
+
hostCandidateAttributeGetter:
|
121
|
+
'`RTCPeerConnectionIceErrorEvent.hostCandidate` is deprecated. Please use `RTCPeerConnectionIceErrorEvent.address` or `RTCPeerConnectionIceErrorEvent.port` instead.',
|
122
|
+
/**
|
123
|
+
*@description TODO(crbug.com/1320343): Description needed for translation
|
124
|
+
*/
|
125
|
+
insecurePrivateNetworkSubresourceRequest:
|
126
|
+
'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.',
|
78
127
|
/**
|
79
128
|
*@description TODO(crbug.com/1318860): Description needed for translation
|
80
129
|
*/
|
@@ -100,15 +149,49 @@ const UIStrings = {
|
|
100
149
|
*/
|
101
150
|
localCSSFileExtensionRejected: 'CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.',
|
102
151
|
/**
|
103
|
-
*@description TODO(crbug.com/
|
152
|
+
*@description TODO(crbug.com/1320344): Description needed for translation
|
153
|
+
*/
|
154
|
+
mediaElementAudioSourceNode:
|
155
|
+
'Creating a `MediaElementAudioSourceNode` on an `OfflineAudioContext` is deprecated and will be removed.',
|
156
|
+
/**
|
157
|
+
*@description TODO(crbug.com/1320345): Description needed for translation
|
158
|
+
*/
|
159
|
+
mediaSourceAbortRemove:
|
160
|
+
'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.',
|
161
|
+
/**
|
162
|
+
*@description TODO(crbug.com/1320346): Description needed for translation
|
163
|
+
*/
|
164
|
+
mediaSourceDurationTruncatingBuffered:
|
165
|
+
'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`.',
|
166
|
+
/**
|
167
|
+
*@description TODO(crbug.com/1320347): Description needed for translation
|
168
|
+
*/
|
169
|
+
noSysexWebMIDIWithoutPermission:
|
170
|
+
'Web MIDI will ask a permission to use even if the sysex is not specified in the `MIDIOptions`.',
|
171
|
+
/**
|
172
|
+
*@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.
|
104
173
|
*/
|
105
174
|
notificationInsecureOrigin:
|
106
175
|
'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.gl/rStTGz for more details.',
|
176
|
+
/**
|
177
|
+
*@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.
|
178
|
+
*/
|
179
|
+
notificationPermissionRequestedIframe:
|
180
|
+
'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.',
|
107
181
|
/**
|
108
182
|
*@description TODO(crbug.com/1318867): Description needed for translation
|
109
183
|
*/
|
110
184
|
obsoleteWebRtcCipherSuite:
|
111
185
|
'Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed.',
|
186
|
+
/**
|
187
|
+
*@description TODO(crbug.com/1320349): Description needed for translation
|
188
|
+
*/
|
189
|
+
paymentRequestBasicCard: 'The `basic-card` payment method is deprecated and will be removed.',
|
190
|
+
/**
|
191
|
+
*@description TODO(crbug.com/1320350): Description needed for translation
|
192
|
+
*/
|
193
|
+
paymentRequestShowWithoutGesture:
|
194
|
+
'Calling `PaymentRequest.show()` without user activation is deprecated and will be removed.',
|
112
195
|
/**
|
113
196
|
*@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.
|
114
197
|
*/
|
@@ -124,11 +207,54 @@ const UIStrings = {
|
|
124
207
|
*/
|
125
208
|
prefixedRequestAnimationFrame:
|
126
209
|
'`webkitRequestAnimationFrame` is vendor-specific. Please use the standard `requestAnimationFrame` instead.',
|
210
|
+
/**
|
211
|
+
*@description TODO(crbug.com/1320351): Description needed for translation
|
212
|
+
*/
|
213
|
+
prefixedStorageInfo:
|
214
|
+
'`window.webkitStorageInfo` is deprecated. Please use `navigator.webkitTemporaryStorage` or `navigator.webkitPersistentStorage` instead.',
|
215
|
+
/**
|
216
|
+
*@description TODO(crbug.com/1320352): Description needed for translation
|
217
|
+
*/
|
218
|
+
prefixedVideoDisplayingFullscreen:
|
219
|
+
'`HTMLVideoElement.webkitDisplayingFullscreen` is deprecated. Please use `Document.fullscreenElement` instead.',
|
220
|
+
/**
|
221
|
+
*@description TODO(crbug.com/1320353): Description needed for translation
|
222
|
+
*/
|
223
|
+
prefixedVideoEnterFullScreen:
|
224
|
+
'`HTMLVideoElement.webkitEnterFullScreen()` is deprecated. Please use `Element.requestFullscreen()` instead.',
|
225
|
+
/**
|
226
|
+
*@description TODO(crbug.com/1320353): Description needed for translation
|
227
|
+
*/
|
228
|
+
prefixedVideoEnterFullscreen:
|
229
|
+
'`HTMLVideoElement.webkitEnterFullscreen()` is deprecated. Please use `Element.requestFullscreen()` instead.',
|
230
|
+
/**
|
231
|
+
*@description TODO(crbug.com/1320354): Description needed for translation
|
232
|
+
*/
|
233
|
+
prefixedVideoExitFullScreen:
|
234
|
+
'`HTMLVideoElement.webkitExitFullsSreen()` is deprecated. Please use `Document.exitFullscreen()` instead.',
|
235
|
+
/**
|
236
|
+
*@description TODO(crbug.com/1320354): Description needed for translation
|
237
|
+
*/
|
238
|
+
prefixedVideoExitFullscreen:
|
239
|
+
'`HTMLVideoElement.webkitExitFullscreen()` is deprecated. Please use `Document.exitFullscreen()` instead.',
|
240
|
+
/**
|
241
|
+
*@description TODO(crbug.com/1320355): Description needed for translation
|
242
|
+
*/
|
243
|
+
prefixedVideoSupportsFullscreen:
|
244
|
+
'`HTMLVideoElement.webkitSupportsFullscreen` is deprecated. Please use `Document.fullscreenEnabled` instead.',
|
245
|
+
/**
|
246
|
+
*@description TODO(crbug.com/1320356): Description needed for translation
|
247
|
+
*/
|
248
|
+
rangeExpand: '`Range.expand()` is deprecated. Please use `Selection.modify()` instead.',
|
249
|
+
/**
|
250
|
+
*@description TODO(crbug.com/1320357): Description needed for translation
|
251
|
+
*/
|
252
|
+
requestedSubresourceWithEmbeddedCredentials:
|
253
|
+
'Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked.',
|
127
254
|
/**
|
128
255
|
*@description TODO(crbug.com/1318872): Description needed for translation
|
129
256
|
*/
|
130
|
-
rtcConstraintEnableDtlsSrtpFalse:
|
131
|
-
'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.',
|
257
|
+
rtcConstraintEnableDtlsSrtpFalse: '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.',
|
132
258
|
/**
|
133
259
|
*@description TODO(crbug.com/1318873): Description needed for translation
|
134
260
|
*/
|
@@ -144,16 +270,35 @@ const UIStrings = {
|
|
144
270
|
*/
|
145
271
|
rtcPeerConnectionLegacyCreateWithMediaConstraints:
|
146
272
|
'The `mediaConstraints` version of `RTCOfferOptions/RTCAnswerOptions` are deprecated and will soon be removed, please migrate to the promise-based `createOffer`/`createAnswer` instead.',
|
273
|
+
/**
|
274
|
+
*@description TODO(crbug.com/1320358): Description needed for translation
|
275
|
+
*/
|
276
|
+
rtcPeerConnectionSdpSemanticsPlanB:
|
277
|
+
'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.',
|
278
|
+
/**
|
279
|
+
*@description TODO(crbug.com/1320360): Description needed for translation
|
280
|
+
*/
|
281
|
+
rtcpMuxPolicyNegotiate: 'The `rtcpMuxPolicy` option is deprecated and will be removed.',
|
147
282
|
/**
|
148
283
|
*@description TODO(crbug.com/1318876): Description needed for translation
|
149
284
|
*/
|
150
285
|
rtpDataChannel:
|
151
286
|
'RTP data channels are no longer supported. The `RtpDataChannels` constraint is currently ignored, and may cause an error at a later date.',
|
287
|
+
/**
|
288
|
+
*@description TODO(crbug.com/1320361): Description needed for translation
|
289
|
+
*/
|
290
|
+
selectionAddRangeIntersect:
|
291
|
+
'The behavior that `Selection.addRange()` merges existing Range and the specified Range was removed.',
|
152
292
|
/**
|
153
293
|
*@description TODO(crbug.com/1318878): Description needed for translation
|
154
294
|
*/
|
155
295
|
sharedArrayBufferConstructedWithoutIsolation:
|
156
296
|
'`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.',
|
297
|
+
/**
|
298
|
+
*@description TODO(crbug.com/1320363): Description needed for translation
|
299
|
+
*/
|
300
|
+
textToSpeech_DisallowedByAutoplay:
|
301
|
+
'`speechSynthesis.speak()` without user activation is deprecated and will be removed.',
|
157
302
|
/**
|
158
303
|
*@description TODO(crbug.com/1318879): Description needed for translation
|
159
304
|
*/
|
@@ -173,6 +318,11 @@ const UIStrings = {
|
|
173
318
|
*/
|
174
319
|
xmlHttpRequestSynchronousInNonWorkerOutsideBeforeUnload:
|
175
320
|
'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/.',
|
321
|
+
/**
|
322
|
+
*@description TODO(crbug.com/1320365): Description needed for translation
|
323
|
+
*/
|
324
|
+
xrSupportsSession:
|
325
|
+
'`supportsSession()` is deprecated. Please use `isSessionSupported()` and check the resolved boolean value instead.',
|
176
326
|
};
|
177
327
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/DeprecationIssue.ts', UIStrings);
|
178
328
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
@@ -181,14 +331,9 @@ export class DeprecationIssue extends Issue {
|
|
181
331
|
#issueDetails: Protocol.Audits.DeprecationIssueDetails;
|
182
332
|
|
183
333
|
constructor(issueDetails: Protocol.Audits.DeprecationIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
184
|
-
let typeCode = String(issueDetails.type);
|
185
|
-
// TODO(crbug.com/1264960): Remove legacy type when issues are translated.
|
186
|
-
if (issueDetails.type === Protocol.Audits.DeprecationIssueType.Untranslated) {
|
187
|
-
typeCode = String(issueDetails.deprecationType);
|
188
|
-
}
|
189
334
|
const issueCode = [
|
190
335
|
Protocol.Audits.InspectorIssueCode.DeprecationIssue,
|
191
|
-
|
336
|
+
issueDetails.type,
|
192
337
|
].join('::');
|
193
338
|
super({code: issueCode, umaCode: 'DeprecationIssue'}, issuesModel);
|
194
339
|
this.#issueDetails = issueDetails;
|
@@ -212,6 +357,27 @@ export class DeprecationIssue extends Issue {
|
|
212
357
|
messageFunction = i18nLazyString(UIStrings.authorizationCoveredByWildcard);
|
213
358
|
milestone = 97;
|
214
359
|
break;
|
360
|
+
case Protocol.Audits.DeprecationIssueType.BatteryStatusInsecureOrigin:
|
361
|
+
messageFunction = i18nLazyString(UIStrings.batteryStatusInsecureOrigin);
|
362
|
+
feature = 4878376799043584;
|
363
|
+
milestone = 103;
|
364
|
+
break;
|
365
|
+
case Protocol.Audits.DeprecationIssueType.CanRequestURLHTTPContainingNewline:
|
366
|
+
messageFunction = i18nLazyString(UIStrings.canRequestURLHTTPContainingNewline);
|
367
|
+
feature = 5735596811091968;
|
368
|
+
break;
|
369
|
+
case Protocol.Audits.DeprecationIssueType.ChromeLoadTimesConnectionInfo:
|
370
|
+
messageFunction = i18nLazyString(UIStrings.chromeLoadTimesConnectionInfo);
|
371
|
+
feature = 5637885046816768;
|
372
|
+
break;
|
373
|
+
case Protocol.Audits.DeprecationIssueType.ChromeLoadTimesFirstPaintAfterLoadTime:
|
374
|
+
messageFunction = i18nLazyString(UIStrings.chromeLoadTimesFirstPaintAfterLoadTime);
|
375
|
+
feature = 5637885046816768;
|
376
|
+
break;
|
377
|
+
case Protocol.Audits.DeprecationIssueType.ChromeLoadTimesWasAlternateProtocolAvailable:
|
378
|
+
messageFunction = i18nLazyString(UIStrings.chromeLoadTimesWasAlternateProtocolAvailable);
|
379
|
+
feature = 5637885046816768;
|
380
|
+
break;
|
215
381
|
case Protocol.Audits.DeprecationIssueType.CookieWithTruncatingChar:
|
216
382
|
messageFunction = i18nLazyString(UIStrings.cookieWithTruncatingChar);
|
217
383
|
milestone = 103;
|
@@ -226,6 +392,15 @@ export class DeprecationIssue extends Issue {
|
|
226
392
|
case Protocol.Audits.DeprecationIssueType.CrossOriginWindowConfirm:
|
227
393
|
messageFunction = i18nLazyString(UIStrings.crossOriginWindowConfirm);
|
228
394
|
break;
|
395
|
+
case Protocol.Audits.DeprecationIssueType.CSSSelectorInternalMediaControlsOverlayCastButton:
|
396
|
+
messageFunction = i18nLazyString(UIStrings.cssSelectorInternalMediaControlsOverlayCastButton);
|
397
|
+
feature = 5714245488476160;
|
398
|
+
break;
|
399
|
+
case Protocol.Audits.DeprecationIssueType.CustomCursorIntersectsViewport:
|
400
|
+
messageFunction = i18nLazyString(UIStrings.customCursorIntersectsViewport);
|
401
|
+
feature = 5825971391299584;
|
402
|
+
milestone = 75;
|
403
|
+
break;
|
229
404
|
case Protocol.Audits.DeprecationIssueType.DeprecationExample:
|
230
405
|
messageFunction = i18nLazyString(UIStrings.deprecationExample);
|
231
406
|
feature = 5684289032159232;
|
@@ -235,6 +410,11 @@ export class DeprecationIssue extends Issue {
|
|
235
410
|
messageFunction = i18nLazyString(UIStrings.documentDomainSettingWithoutOriginAgentClusterHeader);
|
236
411
|
milestone = 106;
|
237
412
|
break;
|
413
|
+
case Protocol.Audits.DeprecationIssueType.EventPath:
|
414
|
+
messageFunction = i18nLazyString(UIStrings.eventPath);
|
415
|
+
feature = 5726124632965120;
|
416
|
+
milestone = 109;
|
417
|
+
break;
|
238
418
|
case Protocol.Audits.DeprecationIssueType.GeolocationInsecureOrigin:
|
239
419
|
messageFunction = i18nLazyString(UIStrings.geolocationInsecureOrigin);
|
240
420
|
break;
|
@@ -244,6 +424,14 @@ export class DeprecationIssue extends Issue {
|
|
244
424
|
case Protocol.Audits.DeprecationIssueType.GetUserMediaInsecureOrigin:
|
245
425
|
messageFunction = i18nLazyString(UIStrings.getUserMediaInsecureOrigin);
|
246
426
|
break;
|
427
|
+
case Protocol.Audits.DeprecationIssueType.HostCandidateAttributeGetter:
|
428
|
+
messageFunction = i18nLazyString(UIStrings.hostCandidateAttributeGetter);
|
429
|
+
break;
|
430
|
+
case Protocol.Audits.DeprecationIssueType.InsecurePrivateNetworkSubresourceRequest:
|
431
|
+
messageFunction = i18nLazyString(UIStrings.insecurePrivateNetworkSubresourceRequest);
|
432
|
+
feature = 5436853517811712;
|
433
|
+
milestone = 92;
|
434
|
+
break;
|
247
435
|
case Protocol.Audits.DeprecationIssueType.LegacyConstraintGoogCpuOveruseDetection:
|
248
436
|
messageFunction = i18nLazyString(UIStrings.legacyConstraintGoogCpuOveruseDetection);
|
249
437
|
milestone = 103;
|
@@ -264,13 +452,45 @@ export class DeprecationIssue extends Issue {
|
|
264
452
|
messageFunction = i18nLazyString(UIStrings.localCSSFileExtensionRejected);
|
265
453
|
milestone = 64;
|
266
454
|
break;
|
455
|
+
case Protocol.Audits.DeprecationIssueType.MediaElementAudioSourceNode:
|
456
|
+
messageFunction = i18nLazyString(UIStrings.mediaElementAudioSourceNode);
|
457
|
+
feature = 5258622686724096;
|
458
|
+
milestone = 71;
|
459
|
+
break;
|
460
|
+
case Protocol.Audits.DeprecationIssueType.MediaSourceAbortRemove:
|
461
|
+
messageFunction = i18nLazyString(UIStrings.mediaSourceAbortRemove);
|
462
|
+
feature = 6107495151960064;
|
463
|
+
break;
|
464
|
+
case Protocol.Audits.DeprecationIssueType.MediaSourceDurationTruncatingBuffered:
|
465
|
+
messageFunction = i18nLazyString(UIStrings.mediaSourceDurationTruncatingBuffered);
|
466
|
+
feature = 6107495151960064;
|
467
|
+
break;
|
468
|
+
case Protocol.Audits.DeprecationIssueType.NoSysexWebMIDIWithoutPermission:
|
469
|
+
messageFunction = i18nLazyString(UIStrings.noSysexWebMIDIWithoutPermission);
|
470
|
+
feature = 5138066234671104;
|
471
|
+
milestone = 82;
|
472
|
+
break;
|
267
473
|
case Protocol.Audits.DeprecationIssueType.NotificationInsecureOrigin:
|
268
474
|
messageFunction = i18nLazyString(UIStrings.notificationInsecureOrigin);
|
269
475
|
break;
|
476
|
+
case Protocol.Audits.DeprecationIssueType.NotificationPermissionRequestedIframe:
|
477
|
+
messageFunction = i18nLazyString(UIStrings.notificationPermissionRequestedIframe);
|
478
|
+
feature = 6451284559265792;
|
479
|
+
break;
|
270
480
|
case Protocol.Audits.DeprecationIssueType.ObsoleteWebRtcCipherSuite:
|
271
481
|
messageFunction = i18nLazyString(UIStrings.obsoleteWebRtcCipherSuite);
|
272
482
|
milestone = 81;
|
273
483
|
break;
|
484
|
+
case Protocol.Audits.DeprecationIssueType.PaymentRequestBasicCard:
|
485
|
+
messageFunction = i18nLazyString(UIStrings.paymentRequestBasicCard);
|
486
|
+
feature = 5730051011117056;
|
487
|
+
milestone = 100;
|
488
|
+
break;
|
489
|
+
case Protocol.Audits.DeprecationIssueType.PaymentRequestShowWithoutGesture:
|
490
|
+
messageFunction = i18nLazyString(UIStrings.paymentRequestShowWithoutGesture);
|
491
|
+
feature = 5948593429020672;
|
492
|
+
milestone = 102;
|
493
|
+
break;
|
274
494
|
case Protocol.Audits.DeprecationIssueType.PictureSourceSrc:
|
275
495
|
messageFunction = i18nLazyString(UIStrings.pictureSourceSrc);
|
276
496
|
break;
|
@@ -280,6 +500,34 @@ export class DeprecationIssue extends Issue {
|
|
280
500
|
case Protocol.Audits.DeprecationIssueType.PrefixedRequestAnimationFrame:
|
281
501
|
messageFunction = i18nLazyString(UIStrings.prefixedRequestAnimationFrame);
|
282
502
|
break;
|
503
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedStorageInfo:
|
504
|
+
messageFunction = i18nLazyString(UIStrings.prefixedStorageInfo);
|
505
|
+
break;
|
506
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedVideoDisplayingFullscreen:
|
507
|
+
messageFunction = i18nLazyString(UIStrings.prefixedVideoDisplayingFullscreen);
|
508
|
+
break;
|
509
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedVideoEnterFullScreen:
|
510
|
+
messageFunction = i18nLazyString(UIStrings.prefixedVideoEnterFullScreen);
|
511
|
+
break;
|
512
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedVideoEnterFullscreen:
|
513
|
+
messageFunction = i18nLazyString(UIStrings.prefixedVideoEnterFullscreen);
|
514
|
+
break;
|
515
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedVideoExitFullScreen:
|
516
|
+
messageFunction = i18nLazyString(UIStrings.prefixedVideoExitFullScreen);
|
517
|
+
break;
|
518
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedVideoExitFullscreen:
|
519
|
+
messageFunction = i18nLazyString(UIStrings.prefixedVideoExitFullscreen);
|
520
|
+
break;
|
521
|
+
case Protocol.Audits.DeprecationIssueType.PrefixedVideoSupportsFullscreen:
|
522
|
+
messageFunction = i18nLazyString(UIStrings.prefixedVideoSupportsFullscreen);
|
523
|
+
break;
|
524
|
+
case Protocol.Audits.DeprecationIssueType.RangeExpand:
|
525
|
+
messageFunction = i18nLazyString(UIStrings.rangeExpand);
|
526
|
+
break;
|
527
|
+
case Protocol.Audits.DeprecationIssueType.RequestedSubresourceWithEmbeddedCredentials:
|
528
|
+
messageFunction = i18nLazyString(UIStrings.requestedSubresourceWithEmbeddedCredentials);
|
529
|
+
feature = 5669008342777856;
|
530
|
+
break;
|
283
531
|
case Protocol.Audits.DeprecationIssueType.RTCConstraintEnableDtlsSrtpFalse:
|
284
532
|
messageFunction = i18nLazyString(UIStrings.rtcConstraintEnableDtlsSrtpFalse);
|
285
533
|
milestone = 97;
|
@@ -296,17 +544,32 @@ export class DeprecationIssue extends Issue {
|
|
296
544
|
messageFunction = i18nLazyString(UIStrings.rtcPeerConnectionLegacyCreateWithMediaConstraints);
|
297
545
|
milestone = 103;
|
298
546
|
break;
|
547
|
+
case Protocol.Audits.DeprecationIssueType.RTCPeerConnectionSdpSemanticsPlanB:
|
548
|
+
messageFunction = i18nLazyString(UIStrings.rtcPeerConnectionSdpSemanticsPlanB);
|
549
|
+
feature = 5823036655665152;
|
550
|
+
milestone = 93;
|
551
|
+
break;
|
552
|
+
case Protocol.Audits.DeprecationIssueType.RtcpMuxPolicyNegotiate:
|
553
|
+
messageFunction = i18nLazyString(UIStrings.rtcpMuxPolicyNegotiate);
|
554
|
+
feature = 5654810086866944;
|
555
|
+
milestone = 62;
|
556
|
+
break;
|
299
557
|
case Protocol.Audits.DeprecationIssueType.RTPDataChannel:
|
300
558
|
messageFunction = i18nLazyString(UIStrings.rtpDataChannel);
|
301
559
|
milestone = 88;
|
302
560
|
break;
|
561
|
+
case Protocol.Audits.DeprecationIssueType.SelectionAddRangeIntersect:
|
562
|
+
messageFunction = i18nLazyString(UIStrings.selectionAddRangeIntersect);
|
563
|
+
feature = 6680566019653632;
|
564
|
+
break;
|
303
565
|
case Protocol.Audits.DeprecationIssueType.SharedArrayBufferConstructedWithoutIsolation:
|
304
566
|
messageFunction = i18nLazyString(UIStrings.sharedArrayBufferConstructedWithoutIsolation);
|
305
567
|
milestone = 106;
|
306
568
|
break;
|
307
|
-
|
308
|
-
|
309
|
-
|
569
|
+
case Protocol.Audits.DeprecationIssueType.TextToSpeech_DisallowedByAutoplay:
|
570
|
+
messageFunction = i18nLazyString(UIStrings.textToSpeech_DisallowedByAutoplay);
|
571
|
+
feature = 5687444770914304;
|
572
|
+
milestone = 71;
|
310
573
|
break;
|
311
574
|
case Protocol.Audits.DeprecationIssueType.V8SharedArrayBufferConstructedInExtensionWithoutIsolation:
|
312
575
|
messageFunction = i18nLazyString(UIStrings.v8SharedArrayBufferConstructedInExtensionWithoutIsolation);
|
@@ -324,6 +587,10 @@ export class DeprecationIssue extends Issue {
|
|
324
587
|
case Protocol.Audits.DeprecationIssueType.XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload:
|
325
588
|
messageFunction = i18nLazyString(UIStrings.xmlHttpRequestSynchronousInNonWorkerOutsideBeforeUnload);
|
326
589
|
break;
|
590
|
+
case Protocol.Audits.DeprecationIssueType.XRSupportsSession:
|
591
|
+
messageFunction = i18nLazyString(UIStrings.xrSupportsSession);
|
592
|
+
milestone = 80;
|
593
|
+
break;
|
327
594
|
}
|
328
595
|
const links = [];
|
329
596
|
if (feature !== 0) {
|
@@ -370,16 +637,6 @@ export class DeprecationIssue extends Issue {
|
|
370
637
|
console.warn('Deprecation issue without details received.');
|
371
638
|
return [];
|
372
639
|
}
|
373
|
-
if (details.type !== Protocol.Audits.DeprecationIssueType.Untranslated &&
|
374
|
-
(details.deprecationType || details.message)) {
|
375
|
-
console.warn('Translated deprecation issue with malformed details received.');
|
376
|
-
return [];
|
377
|
-
}
|
378
|
-
if (details.type === Protocol.Audits.DeprecationIssueType.Untranslated &&
|
379
|
-
(!details.deprecationType || !details.message)) {
|
380
|
-
console.warn('Untranslated deprecation issue with malformed details received.');
|
381
|
-
return [];
|
382
|
-
}
|
383
640
|
return [new DeprecationIssue(details, issuesModel)];
|
384
641
|
}
|
385
642
|
}
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
8
|
import * as Root from '../../core/root/root.js';
|
9
|
+
import type * as Formatter from '../../models/formatter/formatter.js';
|
9
10
|
import {formatCSSChangesFromDiff} from '../../panels/utils/utils.js';
|
10
11
|
import * as Diff from '../../third_party/diff/diff.js';
|
11
12
|
import * as DiffView from '../../ui/components/diff_view/diff_view.js';
|
@@ -72,6 +73,7 @@ export class ChangesView extends UI.Widget.VBox {
|
|
72
73
|
private readonly workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl;
|
73
74
|
readonly changesSidebar: ChangesSidebar;
|
74
75
|
private selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null;
|
76
|
+
#selectedSourceCodeFormattedMapping?: Formatter.ScriptFormatter.FormatterSourceMapping;
|
75
77
|
private readonly diffContainer: HTMLElement;
|
76
78
|
private readonly toolbar: UI.Toolbar.Toolbar;
|
77
79
|
private readonly diffStats: UI.Toolbar.ToolbarText;
|
@@ -167,16 +169,27 @@ export class ChangesView extends UI.Widget.VBox {
|
|
167
169
|
if (!this.selectedUISourceCode) {
|
168
170
|
return;
|
169
171
|
}
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
172
|
+
|
173
|
+
for (const target of event.composedPath()) {
|
174
|
+
if (!(target instanceof HTMLElement)) {
|
175
|
+
continue;
|
176
|
+
}
|
177
|
+
const selection = target.ownerDocument.getSelection();
|
178
|
+
if (selection?.toString()) {
|
179
|
+
// We abort source revelation when user has text selection.
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
if (target.classList.contains('diff-line-content') && target.hasAttribute('data-line-number')) {
|
183
|
+
let lineNumber = Number(target.dataset.lineNumber) - 1;
|
184
|
+
// Unfortunately, caretRangeFromPoint is broken in shadow
|
185
|
+
// roots, which makes determining the character offset more
|
186
|
+
// work than justified here.
|
187
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.PRECISE_CHANGES) &&
|
188
|
+
this.#selectedSourceCodeFormattedMapping) {
|
189
|
+
lineNumber = this.#selectedSourceCodeFormattedMapping.formattedToOriginal(lineNumber, 0)[0];
|
179
190
|
}
|
191
|
+
void Common.Revealer.reveal(this.selectedUISourceCode.uiLocation(lineNumber, 0), false);
|
192
|
+
event.consume(true);
|
180
193
|
break;
|
181
194
|
} else if (target.classList.contains('diff-listing')) {
|
182
195
|
break;
|
@@ -220,10 +233,12 @@ export class ChangesView extends UI.Widget.VBox {
|
|
220
233
|
return;
|
221
234
|
}
|
222
235
|
const diffResponse = await this.workspaceDiff.requestDiff(
|
223
|
-
uiSourceCode,
|
236
|
+
uiSourceCode,
|
237
|
+
{shouldFormatDiff: Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.PRECISE_CHANGES)});
|
224
238
|
if (this.selectedUISourceCode !== uiSourceCode) {
|
225
239
|
return;
|
226
240
|
}
|
241
|
+
this.#selectedSourceCodeFormattedMapping = diffResponse?.formattedCurrentMapping;
|
227
242
|
this.renderDiffRows(diffResponse?.diff);
|
228
243
|
}
|
229
244
|
|
@@ -878,18 +878,19 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
878
878
|
return node;
|
879
879
|
}
|
880
880
|
|
881
|
-
async revealAndSelectNode(
|
881
|
+
async revealAndSelectNode(nodeToReveal: SDK.DOMModel.DOMNode, focus: boolean, omitHighlight?: boolean):
|
882
|
+
Promise<void> {
|
882
883
|
this.omitDefaultSelection = true;
|
883
884
|
|
884
|
-
node = Common.Settings.Settings.instance().moduleSetting('showUAShadowDOM').get() ?
|
885
|
-
|
886
|
-
this.leaveUserAgentShadowDOM(
|
885
|
+
const node = Common.Settings.Settings.instance().moduleSetting('showUAShadowDOM').get() ?
|
886
|
+
nodeToReveal :
|
887
|
+
this.leaveUserAgentShadowDOM(nodeToReveal);
|
887
888
|
if (!omitHighlight) {
|
888
889
|
node.highlightForTwoSeconds();
|
889
890
|
}
|
890
891
|
|
891
892
|
if (this.accessibilityTreeView) {
|
892
|
-
void this.accessibilityTreeView.revealAndSelectNode(
|
893
|
+
void this.accessibilityTreeView.revealAndSelectNode(nodeToReveal);
|
893
894
|
}
|
894
895
|
|
895
896
|
await UI.ViewManager.ViewManager.instance().showView('elements', false, !focus);
|
@@ -1029,7 +1030,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
1029
1030
|
};
|
1030
1031
|
|
1031
1032
|
this.sidebarPaneView = UI.ViewManager.ViewManager.instance().createTabbedLocation(
|
1032
|
-
() => UI.ViewManager.ViewManager.instance().showView('elements'));
|
1033
|
+
() => UI.ViewManager.ViewManager.instance().showView('elements'), 'Styles-pane-sidebar', false, true);
|
1033
1034
|
const tabbedPane = this.sidebarPaneView.tabbedPane();
|
1034
1035
|
if (this.splitMode !== _splitMode.Vertical) {
|
1035
1036
|
this.splitWidget.installResizer(tabbedPane.headerElement());
|