chrome-devtools-frontend 1.0.1001476 → 1.0.1002543

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.
Files changed (73) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -6
  2. package/front_end/core/common/ParsedURL.ts +3 -3
  3. package/front_end/core/host/InspectorFrontendHost.ts +30 -1
  4. package/front_end/core/i18n/locales/en-US.json +6 -30
  5. package/front_end/core/i18n/locales/en-XL.json +6 -30
  6. package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
  7. package/front_end/core/root/Runtime.ts +7 -3
  8. package/front_end/core/sdk/ServiceWorkerManager.ts +6 -5
  9. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +14 -0
  10. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +491 -0
  11. package/front_end/entrypoints/formatter_worker/Substitute.ts +4 -440
  12. package/front_end/entrypoints/formatter_worker/formatter_worker.ts +2 -0
  13. package/front_end/generated/InspectorBackendCommands.js +38 -10
  14. package/front_end/generated/protocol-mapping.d.ts +5 -1
  15. package/front_end/generated/protocol-proxy-api.d.ts +4 -1
  16. package/front_end/generated/protocol.ts +50 -10
  17. package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
  18. package/front_end/models/issues_manager/AttributionReportingIssue.ts +5 -36
  19. package/front_end/models/issues_manager/DeprecationIssue.ts +0 -69
  20. package/front_end/models/issues_manager/Issue.ts +8 -4
  21. package/front_end/models/timeline_model/TimelineModel.ts +0 -48
  22. package/front_end/panels/application/AppManifestView.ts +3 -3
  23. package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -1
  24. package/front_end/panels/application/ApplicationPanelSidebar.ts +11 -6
  25. package/front_end/panels/application/ApplicationPanelTreeElement.ts +2 -2
  26. package/front_end/panels/application/BackgroundServiceView.ts +5 -4
  27. package/front_end/panels/application/ResourcesPanel.ts +1 -1
  28. package/front_end/panels/console/ConsoleViewMessage.ts +6 -3
  29. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +3 -2
  30. package/front_end/panels/elements/StylePropertyTreeElement.ts +19 -13
  31. package/front_end/panels/elements/StylesSidebarPane.ts +53 -0
  32. package/front_end/panels/issues/AffectedResourcesView.ts +4 -3
  33. package/front_end/panels/issues/AffectedSourcesView.ts +2 -1
  34. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -43
  35. package/front_end/panels/issues/IssueView.ts +1 -1
  36. package/front_end/panels/lighthouse/LighthouseController.ts +5 -3
  37. package/front_end/panels/lighthouse/LighthouseReporterTypes.ts +2 -1
  38. package/front_end/panels/lighthouse/lighthousePanel.css +4 -0
  39. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +2 -2
  40. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -1
  41. package/front_end/panels/profiler/ProfileDataGrid.ts +1 -1
  42. package/front_end/panels/security/SecurityPanel.ts +6 -5
  43. package/front_end/panels/settings/SettingsScreen.ts +2 -3
  44. package/front_end/panels/timeline/PerformanceModel.ts +2 -6
  45. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -14
  46. package/front_end/panels/timeline/TimelineUIUtils.ts +14 -12
  47. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1036 -1088
  48. package/front_end/third_party/lighthouse/locales/en-US.json +241 -4
  49. package/front_end/third_party/lighthouse/locales/en-XL.json +241 -4
  50. package/front_end/third_party/lighthouse/report/bundle.d.ts +2 -0
  51. package/front_end/third_party/lighthouse/report/bundle.js +18 -12
  52. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  53. package/front_end/ui/components/docs/linkifier/simple-url.ts +2 -1
  54. package/front_end/ui/components/docs/panel_feedback/basic.ts +3 -2
  55. package/front_end/ui/components/docs/panel_feedback/button.ts +2 -1
  56. package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -3
  57. package/front_end/ui/components/linkifier/LinkifierUtils.ts +2 -3
  58. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -6
  59. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +5 -4
  60. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +3 -3
  61. package/front_end/ui/legacy/EmptyWidget.ts +2 -1
  62. package/front_end/ui/legacy/UIUtils.ts +4 -4
  63. package/front_end/ui/legacy/XLink.ts +12 -13
  64. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -4
  65. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +1 -1
  66. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -2
  67. package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -7
  68. package/front_end/ui/legacy/components/utils/Linkifier.ts +23 -23
  69. package/front_end/ui/legacy/toolbar.css +1 -1
  70. package/package.json +1 -1
  71. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceEventId.md +0 -3
  72. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md +0 -4
  73. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md +0 -4
@@ -963,11 +963,9 @@ export namespace Audits {
963
963
 
964
964
  export const enum AttributionReportingIssueType {
965
965
  PermissionPolicyDisabled = 'PermissionPolicyDisabled',
966
- InvalidAttributionSourceEventId = 'InvalidAttributionSourceEventId',
967
966
  AttributionSourceUntrustworthyOrigin = 'AttributionSourceUntrustworthyOrigin',
968
967
  AttributionUntrustworthyOrigin = 'AttributionUntrustworthyOrigin',
969
- InvalidAttributionSourceExpiry = 'InvalidAttributionSourceExpiry',
970
- InvalidAttributionSourcePriority = 'InvalidAttributionSourcePriority',
968
+ InvalidHeader = 'InvalidHeader',
971
969
  }
972
970
 
973
971
  /**
@@ -1038,10 +1036,7 @@ export namespace Audits {
1038
1036
  GetUserMediaInsecureOrigin = 'GetUserMediaInsecureOrigin',
1039
1037
  HostCandidateAttributeGetter = 'HostCandidateAttributeGetter',
1040
1038
  InsecurePrivateNetworkSubresourceRequest = 'InsecurePrivateNetworkSubresourceRequest',
1041
- LegacyConstraintGoogCpuOveruseDetection = 'LegacyConstraintGoogCpuOveruseDetection',
1042
1039
  LegacyConstraintGoogIPv6 = 'LegacyConstraintGoogIPv6',
1043
- LegacyConstraintGoogScreencastMinBitrate = 'LegacyConstraintGoogScreencastMinBitrate',
1044
- LegacyConstraintGoogSuspendBelowMinBitrate = 'LegacyConstraintGoogSuspendBelowMinBitrate',
1045
1040
  LocalCSSFileExtensionRejected = 'LocalCSSFileExtensionRejected',
1046
1041
  MediaElementAudioSourceNode = 'MediaElementAudioSourceNode',
1047
1042
  MediaSourceAbortRemove = 'MediaSourceAbortRemove',
@@ -1068,16 +1063,13 @@ export namespace Audits {
1068
1063
  RTCConstraintEnableDtlsSrtpTrue = 'RTCConstraintEnableDtlsSrtpTrue',
1069
1064
  RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics =
1070
1065
  'RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics',
1071
- RTCPeerConnectionLegacyCreateWithMediaConstraints = 'RTCPeerConnectionLegacyCreateWithMediaConstraints',
1072
1066
  RTCPeerConnectionSdpSemanticsPlanB = 'RTCPeerConnectionSdpSemanticsPlanB',
1073
1067
  RtcpMuxPolicyNegotiate = 'RtcpMuxPolicyNegotiate',
1074
1068
  RTPDataChannel = 'RTPDataChannel',
1075
- SelectionAddRangeIntersect = 'SelectionAddRangeIntersect',
1076
1069
  SharedArrayBufferConstructedWithoutIsolation = 'SharedArrayBufferConstructedWithoutIsolation',
1077
1070
  TextToSpeech_DisallowedByAutoplay = 'TextToSpeech_DisallowedByAutoplay',
1078
1071
  V8SharedArrayBufferConstructedInExtensionWithoutIsolation =
1079
1072
  'V8SharedArrayBufferConstructedInExtensionWithoutIsolation',
1080
- WebCodecsVideoFrameDefaultTimestamp = 'WebCodecsVideoFrameDefaultTimestamp',
1081
1073
  XHRJSONEncodingDetection = 'XHRJSONEncodingDetection',
1082
1074
  XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload = 'XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload',
1083
1075
  XRSupportsSession = 'XRSupportsSession',
@@ -4939,6 +4931,8 @@ export namespace DOMSnapshot {
4939
4931
  */
4940
4932
  export namespace DOMStorage {
4941
4933
 
4934
+ export type SerializedStorageKey = string;
4935
+
4942
4936
  /**
4943
4937
  * DOM Storage identifier.
4944
4938
  */
@@ -4946,7 +4940,11 @@ export namespace DOMStorage {
4946
4940
  /**
4947
4941
  * Security origin for the storage.
4948
4942
  */
4949
- securityOrigin: string;
4943
+ securityOrigin?: string;
4944
+ /**
4945
+ * Represents a key by which DOM Storage keys its CachedStorageAreas
4946
+ */
4947
+ storageKey?: SerializedStorageKey;
4950
4948
  /**
4951
4949
  * Whether the storage is local storage (not session storage).
4952
4950
  */
@@ -4981,6 +4979,14 @@ export namespace DOMStorage {
4981
4979
  value: string;
4982
4980
  }
4983
4981
 
4982
+ export interface GetStorageKeyForFrameRequest {
4983
+ frameId: Page.FrameId;
4984
+ }
4985
+
4986
+ export interface GetStorageKeyForFrameResponse extends ProtocolResponseWithError {
4987
+ storageKey: SerializedStorageKey;
4988
+ }
4989
+
4984
4990
  export interface DomStorageItemAddedEvent {
4985
4991
  storageId: StorageId;
4986
4992
  key: string;
@@ -10978,6 +10984,38 @@ export namespace Page {
10978
10984
  */
10979
10985
  export const enum PrerenderFinalStatus {
10980
10986
  Activated = 'Activated',
10987
+ Destroyed = 'Destroyed',
10988
+ LowEndDevice = 'LowEndDevice',
10989
+ CrossOriginRedirect = 'CrossOriginRedirect',
10990
+ CrossOriginNavigation = 'CrossOriginNavigation',
10991
+ InvalidSchemeRedirect = 'InvalidSchemeRedirect',
10992
+ InvalidSchemeNavigation = 'InvalidSchemeNavigation',
10993
+ InProgressNavigation = 'InProgressNavigation',
10994
+ NavigationRequestBlockedByCsp = 'NavigationRequestBlockedByCsp',
10995
+ MainFrameNavigation = 'MainFrameNavigation',
10996
+ MojoBinderPolicy = 'MojoBinderPolicy',
10997
+ RendererProcessCrashed = 'RendererProcessCrashed',
10998
+ RendererProcessKilled = 'RendererProcessKilled',
10999
+ Download = 'Download',
11000
+ TriggerDestroyed = 'TriggerDestroyed',
11001
+ NavigationNotCommitted = 'NavigationNotCommitted',
11002
+ NavigationBadHttpStatus = 'NavigationBadHttpStatus',
11003
+ ClientCertRequested = 'ClientCertRequested',
11004
+ NavigationRequestNetworkError = 'NavigationRequestNetworkError',
11005
+ MaxNumOfRunningPrerendersExceeded = 'MaxNumOfRunningPrerendersExceeded',
11006
+ CancelAllHostsForTesting = 'CancelAllHostsForTesting',
11007
+ DidFailLoad = 'DidFailLoad',
11008
+ Stop = 'Stop',
11009
+ SslCertificateError = 'SslCertificateError',
11010
+ LoginAuthRequested = 'LoginAuthRequested',
11011
+ UaChangeRequiresReload = 'UaChangeRequiresReload',
11012
+ BlockedByClient = 'BlockedByClient',
11013
+ AudioOutputDeviceRequested = 'AudioOutputDeviceRequested',
11014
+ MixedContent = 'MixedContent',
11015
+ TriggerBackgrounded = 'TriggerBackgrounded',
11016
+ EmbedderTriggeredAndSameOriginRedirected = 'EmbedderTriggeredAndSameOriginRedirected',
11017
+ EmbedderTriggeredAndCrossOriginRedirected = 'EmbedderTriggeredAndCrossOriginRedirected',
11018
+ EmbedderTriggeredAndDestroyed = 'EmbedderTriggeredAndDestroyed',
10981
11019
  }
10982
11020
 
10983
11021
  export interface AddScriptToEvaluateOnLoadRequest {
@@ -12661,6 +12699,8 @@ export namespace ServiceWorker {
12661
12699
 
12662
12700
  export namespace Storage {
12663
12701
 
12702
+ export type SerializedStorageKey = string;
12703
+
12664
12704
  /**
12665
12705
  * Enum of possible storage types.
12666
12706
  */
@@ -124,7 +124,7 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
124
124
  await this.#debuggerWorkspaceBinding.updateLocations(script);
125
125
  }
126
126
 
127
- static uiSourceCodeOrigin(uiSourceCode: Workspace.UISourceCode.UISourceCode): string[] {
127
+ static uiSourceCodeOrigin(uiSourceCode: Workspace.UISourceCode.UISourceCode): Platform.DevToolsPath.UrlString[] {
128
128
  const binding = uiSourceCodeToBinding.get(uiSourceCode);
129
129
  if (binding) {
130
130
  return binding.getReferringSourceMaps().map((sourceMap: SDK.SourceMap.SourceMap) => sourceMap.compiledURL());
@@ -10,31 +10,25 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
10
10
 
11
11
  export const enum IssueCode {
12
12
  PermissionPolicyDisabled = 'AttributionReportingIssue::PermissionPolicyDisabled',
13
- InvalidAttributionSourceEventId = 'AttributionReportingIssue::InvalidAttributionSourceEventId',
14
13
  AttributionSourceUntrustworthyFrameOrigin = 'AttributionReportingIssue::AttributionSourceUntrustworthyFrameOrigin',
15
14
  AttributionSourceUntrustworthyOrigin = 'AttributionReportingIssue::AttributionSourceUntrustworthyOrigin',
16
15
  AttributionUntrustworthyFrameOrigin = 'AttributionReportingIssue::AttributionUntrustworthyFrameOrigin',
17
16
  AttributionUntrustworthyOrigin = 'AttributionReportingIssue::AttributionUntrustworthyOrigin',
18
- InvalidAttributionSourceExpiry = 'AttributionReportingIssue::InvalidAttributionSourceExpiry',
19
- InvalidAttributionSourcePriority = 'AttributionReportingIssue::InvalidAttributionSourcePriority',
17
+ InvalidHeader = 'AttributionReportingIssue::InvalidHeader',
20
18
  }
21
19
 
22
20
  function getIssueCode(details: Protocol.Audits.AttributionReportingIssueDetails): IssueCode {
23
21
  switch (details.violationType) {
24
22
  case Protocol.Audits.AttributionReportingIssueType.PermissionPolicyDisabled:
25
23
  return IssueCode.PermissionPolicyDisabled;
26
- case Protocol.Audits.AttributionReportingIssueType.InvalidAttributionSourceEventId:
27
- return IssueCode.InvalidAttributionSourceEventId;
28
24
  case Protocol.Audits.AttributionReportingIssueType.AttributionSourceUntrustworthyOrigin:
29
25
  return details.frame !== undefined ? IssueCode.AttributionSourceUntrustworthyFrameOrigin :
30
26
  IssueCode.AttributionSourceUntrustworthyOrigin;
31
27
  case Protocol.Audits.AttributionReportingIssueType.AttributionUntrustworthyOrigin:
32
28
  return details.frame !== undefined ? IssueCode.AttributionUntrustworthyFrameOrigin :
33
29
  IssueCode.AttributionUntrustworthyOrigin;
34
- case Protocol.Audits.AttributionReportingIssueType.InvalidAttributionSourceExpiry:
35
- return IssueCode.InvalidAttributionSourceExpiry;
36
- case Protocol.Audits.AttributionReportingIssueType.InvalidAttributionSourcePriority:
37
- return IssueCode.InvalidAttributionSourcePriority;
30
+ case Protocol.Audits.AttributionReportingIssueType.InvalidHeader:
31
+ return IssueCode.InvalidHeader;
38
32
  }
39
33
  }
40
34
 
@@ -58,15 +52,6 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
58
52
  file: 'arPermissionPolicyDisabled.md',
59
53
  links: [],
60
54
  };
61
- case IssueCode.InvalidAttributionSourceEventId:
62
- return {
63
- file: 'arInvalidAttributionSourceEventId.md',
64
- links: [{
65
- link:
66
- 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourceeventid-required',
67
- linkTitle: 'attributionsourceeventid attribute',
68
- }],
69
- };
70
55
  case IssueCode.AttributionSourceUntrustworthyFrameOrigin:
71
56
  return {
72
57
  file: 'arAttributionSourceUntrustworthyFrameOrigin.md',
@@ -98,24 +83,8 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
98
83
  file: 'arAttributionUntrustworthyOrigin.md',
99
84
  links: [],
100
85
  };
101
- case IssueCode.InvalidAttributionSourceExpiry:
102
- return {
103
- file: 'arInvalidAttributionSourceExpiry.md',
104
- links: [{
105
- link:
106
- 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionexpiry',
107
- linkTitle: 'attributionexpiry attribute',
108
- }],
109
- };
110
- case IssueCode.InvalidAttributionSourcePriority:
111
- return {
112
- file: 'arInvalidAttributionSourcePriority.md',
113
- links: [{
114
- link:
115
- 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourcepriority',
116
- linkTitle: 'attributionsourcepriority attribute',
117
- }],
118
- };
86
+ case IssueCode.InvalidHeader:
87
+ return null;
119
88
  }
120
89
  }
121
90
 
@@ -129,15 +129,6 @@ const UIStrings = {
129
129
  */
130
130
  insecurePrivateNetworkSubresourceRequest:
131
131
  '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.',
132
- /**
133
- *@description A deprecation warning shown in the DevTools Issues tab.
134
- * It's shown when a video conferencing website attempts to turn off
135
- * CPU overuse detection with a non-standard API. CPU overuse
136
- * detection is used to adjust video quality based on available CPU
137
- * resources.
138
- */
139
- legacyConstraintGoogCpuOveruseDetection:
140
- '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.',
141
132
  /**
142
133
  *@description A deprecation warning shown in the DevTools Issues tab.
143
134
  * It's shown when a video conferencing website attempts to disable
@@ -145,21 +136,6 @@ const UIStrings = {
145
136
  */
146
137
  legacyConstraintGoogIPv6:
147
138
  'IPv6 is enabled-by-default and the ability to disable it using `googIPv6` will soon be removed. Please stop using this legacy constraint.',
148
- /**
149
- *@description A deprecation warning shown in the DevTools Issues tab.
150
- * It's shown when a video conferencing website attempts to adjust
151
- * bitrate settings for screeen sharing with a non-standard API.
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 A deprecation warning shown in the DevTools Issues tab.
157
- * It's shown when a video conferencing website attempts to change the
158
- * default settings for how the browser should act when bitrate is
159
- * low.
160
- */
161
- legacyConstraintGoogSuspendBelowMinBitrate:
162
- 'Support for the `googSuspendBelowMinBitrate` constraint is about to be removed. Please stop using this legacy constraint.',
163
139
  /**
164
140
  *@description TODO(crbug.com/1318865): Description needed for translation
165
141
  */
@@ -296,16 +272,6 @@ const UIStrings = {
296
272
  */
297
273
  rtcPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics:
298
274
  '`Complex Plan B SDP` detected. This dialect of the `Session Description Protocol` is no longer supported. Please use `Unified Plan SDP` instead.',
299
- /**
300
- *@description A deprecation warning shown in the DevTools Issues tab.
301
- * It's shown when a video conferencing website uses a non-standard
302
- * version of an API to exchange an `offer` or an `answer`. `Offers`
303
- * and `answers` are exchanged between endpoints in order to configure
304
- * what media should be sent and/or received. The app should make use
305
- * of the standard API instead, which will have the desired effect.
306
- */
307
- rtcPeerConnectionLegacyCreateWithMediaConstraints:
308
- 'The `mediaConstraints` version of `RTCOfferOptions/RTCAnswerOptions` are deprecated and will soon be removed, please migrate to the promise-based `createOffer`/`createAnswer` instead.',
309
275
  /**
310
276
  *@description A deprecation warning shown in the DevTools Issues tab.
311
277
  * The `Session Description Protocol`, or `SDP` for short, is a
@@ -334,11 +300,6 @@ const UIStrings = {
334
300
  */
335
301
  rtpDataChannel:
336
302
  '`RTP data channels` are no longer supported. The `RtpDataChannels` constraint is currently ignored, and may cause an error at a later date.',
337
- /**
338
- *@description TODO(crbug.com/1320361): Description needed for translation
339
- */
340
- selectionAddRangeIntersect:
341
- 'The behavior that `Selection.addRange()` merges existing Range and the specified Range was removed.',
342
303
  /**
343
304
  *@description TODO(crbug.com/1318878): Description needed for translation
344
305
  */
@@ -356,11 +317,6 @@ const UIStrings = {
356
317
  */
357
318
  v8SharedArrayBufferConstructedInExtensionWithoutIsolation:
358
319
  'Extensions should opt into cross-origin isolation to continue using `SharedArrayBuffer`. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/.',
359
- /**
360
- *@description TODO(crbug.com/1318880): Description needed for translation
361
- */
362
- webCodecsVideoFrameDefaultTimestamp:
363
- 'Constructing a `VideoFrame` without a timestamp is deprecated and support will be removed. Please provide a timestamp via `VideoFrameInit`.',
364
320
  /**
365
321
  *@description TODO(crbug.com/1318881): Description needed for translation
366
322
  */
@@ -485,22 +441,10 @@ export class DeprecationIssue extends Issue {
485
441
  feature = 5436853517811712;
486
442
  milestone = 92;
487
443
  break;
488
- case Protocol.Audits.DeprecationIssueType.LegacyConstraintGoogCpuOveruseDetection:
489
- messageFunction = i18nLazyString(UIStrings.legacyConstraintGoogCpuOveruseDetection);
490
- milestone = 103;
491
- break;
492
444
  case Protocol.Audits.DeprecationIssueType.LegacyConstraintGoogIPv6:
493
445
  messageFunction = i18nLazyString(UIStrings.legacyConstraintGoogIPv6);
494
446
  milestone = 103;
495
447
  break;
496
- case Protocol.Audits.DeprecationIssueType.LegacyConstraintGoogScreencastMinBitrate:
497
- messageFunction = i18nLazyString(UIStrings.legacyConstraintGoogScreencastMinBitrate);
498
- milestone = 103;
499
- break;
500
- case Protocol.Audits.DeprecationIssueType.LegacyConstraintGoogSuspendBelowMinBitrate:
501
- messageFunction = i18nLazyString(UIStrings.legacyConstraintGoogSuspendBelowMinBitrate);
502
- milestone = 103;
503
- break;
504
448
  case Protocol.Audits.DeprecationIssueType.LocalCSSFileExtensionRejected:
505
449
  messageFunction = i18nLazyString(UIStrings.localCSSFileExtensionRejected);
506
450
  milestone = 64;
@@ -593,10 +537,6 @@ export class DeprecationIssue extends Issue {
593
537
  messageFunction = i18nLazyString(UIStrings.rtcPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics);
594
538
  milestone = 72;
595
539
  break;
596
- case Protocol.Audits.DeprecationIssueType.RTCPeerConnectionLegacyCreateWithMediaConstraints:
597
- messageFunction = i18nLazyString(UIStrings.rtcPeerConnectionLegacyCreateWithMediaConstraints);
598
- milestone = 103;
599
- break;
600
540
  case Protocol.Audits.DeprecationIssueType.RTCPeerConnectionSdpSemanticsPlanB:
601
541
  messageFunction = i18nLazyString(UIStrings.rtcPeerConnectionSdpSemanticsPlanB);
602
542
  feature = 5823036655665152;
@@ -611,10 +551,6 @@ export class DeprecationIssue extends Issue {
611
551
  messageFunction = i18nLazyString(UIStrings.rtpDataChannel);
612
552
  milestone = 88;
613
553
  break;
614
- case Protocol.Audits.DeprecationIssueType.SelectionAddRangeIntersect:
615
- messageFunction = i18nLazyString(UIStrings.selectionAddRangeIntersect);
616
- feature = 6680566019653632;
617
- break;
618
554
  case Protocol.Audits.DeprecationIssueType.SharedArrayBufferConstructedWithoutIsolation:
619
555
  messageFunction = i18nLazyString(UIStrings.sharedArrayBufferConstructedWithoutIsolation);
620
556
  milestone = 106;
@@ -628,11 +564,6 @@ export class DeprecationIssue extends Issue {
628
564
  messageFunction = i18nLazyString(UIStrings.v8SharedArrayBufferConstructedInExtensionWithoutIsolation);
629
565
  milestone = 96;
630
566
  break;
631
- case Protocol.Audits.DeprecationIssueType.WebCodecsVideoFrameDefaultTimestamp:
632
- messageFunction = i18nLazyString(UIStrings.webCodecsVideoFrameDefaultTimestamp);
633
- feature = 5667793157488640;
634
- milestone = 99;
635
- break;
636
567
  case Protocol.Audits.DeprecationIssueType.XHRJSONEncodingDetection:
637
568
  messageFunction = i18nLazyString(UIStrings.xhrJSONEncodingDetection);
638
569
  milestone = 93;
@@ -5,6 +5,7 @@
5
5
  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
+ import type * as Platform from '../../core/platform/platform.js';
8
9
  import type * as SDK from '../../core/sdk/sdk.js';
9
10
  import type * as Protocol from '../../generated/protocol.js';
10
11
 
@@ -204,14 +205,17 @@ export abstract class Issue<IssueCode extends string = string> {
204
205
  }
205
206
  }
206
207
 
207
- export function toZeroBasedLocation(location: Protocol.Audits.SourceCodeLocation|undefined):
208
- {url: string, scriptId: Protocol.Runtime.ScriptId|undefined, lineNumber: number, columnNumber: number|undefined}|
209
- undefined {
208
+ export function toZeroBasedLocation(location: Protocol.Audits.SourceCodeLocation|undefined): {
209
+ url: Platform.DevToolsPath.UrlString,
210
+ scriptId: Protocol.Runtime.ScriptId|undefined,
211
+ lineNumber: number,
212
+ columnNumber: number|undefined,
213
+ }|undefined {
210
214
  if (!location) {
211
215
  return undefined;
212
216
  }
213
217
  return {
214
- url: location.url,
218
+ url: location.url as Platform.DevToolsPath.UrlString,
215
219
  scriptId: location.scriptId,
216
220
  lineNumber: location.lineNumber,
217
221
  columnNumber: location.columnNumber === 0 ? undefined : location.columnNumber - 1,
@@ -98,7 +98,6 @@ export class TimelineModelImpl {
98
98
  private lastRecalculateStylesEvent!: SDK.TracingModel.Event|null;
99
99
  private currentScriptEvent!: SDK.TracingModel.Event|null;
100
100
  private eventStack!: SDK.TracingModel.Event[];
101
- private knownInputEvents!: Set<string>;
102
101
  private browserFrameTracking!: boolean;
103
102
  private persistentIds!: boolean;
104
103
  private legacyCurrentPage!: any;
@@ -573,7 +572,6 @@ export class TimelineModelImpl {
573
572
  this.lastRecalculateStylesEvent = null;
574
573
  this.currentScriptEvent = null;
575
574
  this.eventStack = [];
576
- this.knownInputEvents = new Set();
577
575
  this.browserFrameTracking = false;
578
576
  this.persistentIds = false;
579
577
  this.legacyCurrentPage = null;
@@ -833,44 +831,6 @@ export class TimelineModelImpl {
833
831
  group(TrackType.Animation).push(asyncEvent);
834
832
  continue;
835
833
  }
836
-
837
- if (asyncEvent.hasCategory(TimelineModelImpl.Category.LatencyInfo) ||
838
- asyncEvent.name === RecordType.ImplSideFling) {
839
- const lastStep = asyncEvent.steps[asyncEvent.steps.length - 1];
840
- if (!lastStep) {
841
- throw new Error('AsyncEvent.steps access is out of bounds.');
842
- }
843
- if (lastStep.phase !== SDK.TracingModel.Phase.NestableAsyncEnd) {
844
- continue;
845
- }
846
- const chromeLatencyInfo = asyncEvent.args['chrome_latency_info'];
847
-
848
- const data = chromeLatencyInfo?.['component_info'];
849
- asyncEvent.causedFrame =
850
- Boolean(data?.some((c: any) => c['component_type'] === 'COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP'));
851
- if (asyncEvent.hasCategory(TimelineModelImpl.Category.LatencyInfo)) {
852
- if (lastStep.id && !this.knownInputEvents.has(chromeLatencyInfo.trace_id)) {
853
- continue;
854
- }
855
- if (asyncEvent.name === RecordType.InputLatencyMouseMove && !asyncEvent.causedFrame) {
856
- continue;
857
- }
858
- // Coalesced events are not really been processed, no need to track them.
859
- if (!data || data['is_coalesced']) {
860
- continue;
861
- }
862
-
863
- const rendererMain =
864
- data?.find((c: any) => c['component_type'] === 'COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN');
865
- if (rendererMain) {
866
- const time = rendererMain['time_us'] / 1000;
867
- TimelineData.forEvent(asyncEvent.steps[0]).timeWaitingForMainThread =
868
- time - asyncEvent.steps[0].startTime;
869
- }
870
- }
871
- group(TrackType.Input).push(asyncEvent);
872
- continue;
873
- }
874
834
  }
875
835
  }
876
836
 
@@ -1210,13 +1170,6 @@ export class TimelineModelImpl {
1210
1170
  }
1211
1171
 
1212
1172
  private processBrowserEvent(event: SDK.TracingModel.Event): void {
1213
- if (event.name === RecordType.LatencyInfoFlow) {
1214
- if (event.args.chrome_latency_info?.trace_id) {
1215
- this.knownInputEvents.add(event.args.chrome_latency_info.trace_id);
1216
- }
1217
- return;
1218
- }
1219
-
1220
1173
  if (event.name === RecordType.ResourceWillSendRequest) {
1221
1174
  const requestId = event.args?.data?.requestId;
1222
1175
  if (typeof requestId === 'string') {
@@ -1715,7 +1668,6 @@ export class Track {
1715
1668
  export enum TrackType {
1716
1669
  MainThread = 'MainThread',
1717
1670
  Worker = 'Worker',
1718
- Input = 'Input',
1719
1671
  Animation = 'Animation',
1720
1672
  Timings = 'Timings',
1721
1673
  Console = 'Console',
@@ -433,7 +433,7 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
433
433
  .addChangeListener(this.updateManifest.bind(this, true));
434
434
 
435
435
  this.emptyView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noManifestDetected));
436
- this.emptyView.appendLink('https://web.dev/add-manifest/');
436
+ this.emptyView.appendLink('https://web.dev/add-manifest/' as Platform.DevToolsPath.UrlString);
437
437
 
438
438
  this.emptyView.show(this.contentElement);
439
439
  this.emptyView.hideWidget();
@@ -693,7 +693,7 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
693
693
  this.newNoteUrlField.parentElement?.classList.toggle('hidden', !hasNewNoteUrl);
694
694
  this.newNoteUrlField.removeChildren();
695
695
  if (hasNewNoteUrl) {
696
- const completeURL = (Common.ParsedURL.ParsedURL.completeURL(url, newNoteUrl) as string);
696
+ const completeURL = (Common.ParsedURL.ParsedURL.completeURL(url, newNoteUrl) as Platform.DevToolsPath.UrlString);
697
697
  const link = Components.Linkifier.Linkifier.linkifyURL(
698
698
  completeURL, ({text: newNoteUrl} as Components.Linkifier.LinkifyURLOptions));
699
699
  link.tabIndex = 0;
@@ -763,7 +763,7 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
763
763
  shortcutSection.appendFlexedField('Description', shortcut.description);
764
764
  }
765
765
  const urlField = shortcutSection.appendFlexedField('URL');
766
- const shortcutUrl = (Common.ParsedURL.ParsedURL.completeURL(url, shortcut.url) as string);
766
+ const shortcutUrl = Common.ParsedURL.ParsedURL.completeURL(url, shortcut.url) as Platform.DevToolsPath.UrlString;
767
767
  const link = Components.Linkifier.Linkifier.linkifyURL(
768
768
  shortcutUrl, ({text: shortcut.url} as Components.Linkifier.LinkifyURLOptions));
769
769
  link.tabIndex = 0;
@@ -41,7 +41,9 @@ export class ServiceWorkerCacheTreeElement extends ExpandableApplicationPanelTre
41
41
  constructor(resourcesPanel: ResourcesPanel) {
42
42
  super(resourcesPanel, i18nString(UIStrings.cacheStorage), 'CacheStorage');
43
43
  const icon = UI.Icon.Icon.create('mediumicon-database', 'resource-tree-item');
44
- this.setLink('https://developer.chrome.com/docs/devtools/storage/cache/?utm_source=devtools');
44
+ this.setLink(
45
+ 'https://developer.chrome.com/docs/devtools/storage/cache/?utm_source=devtools' as
46
+ Platform.DevToolsPath.UrlString);
45
47
  this.setLeadingIcons([icon]);
46
48
  this.swCacheModel = null;
47
49
  this.swCacheTreeElements = new Set();
@@ -243,7 +243,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
243
243
  this.localStorageListTreeElement =
244
244
  new ExpandableApplicationPanelTreeElement(panel, i18nString(UIStrings.localStorage), 'LocalStorage');
245
245
  this.localStorageListTreeElement.setLink(
246
- 'https://developer.chrome.com/docs/devtools/storage/localstorage/?utm_source=devtools');
246
+ 'https://developer.chrome.com/docs/devtools/storage/localstorage/?utm_source=devtools' as
247
+ Platform.DevToolsPath.UrlString);
247
248
  const localStorageIcon = UI.Icon.Icon.create('mediumicon-table', 'resource-tree-item');
248
249
  this.localStorageListTreeElement.setLeadingIcons([localStorageIcon]);
249
250
 
@@ -251,19 +252,22 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
251
252
  this.sessionStorageListTreeElement =
252
253
  new ExpandableApplicationPanelTreeElement(panel, i18nString(UIStrings.sessionStorage), 'SessionStorage');
253
254
  this.sessionStorageListTreeElement.setLink(
254
- 'https://developer.chrome.com/docs/devtools/storage/sessionstorage/?utm_source=devtools');
255
+ 'https://developer.chrome.com/docs/devtools/storage/sessionstorage/?utm_source=devtools' as
256
+ Platform.DevToolsPath.UrlString);
255
257
  const sessionStorageIcon = UI.Icon.Icon.create('mediumicon-table', 'resource-tree-item');
256
258
  this.sessionStorageListTreeElement.setLeadingIcons([sessionStorageIcon]);
257
259
 
258
260
  storageTreeElement.appendChild(this.sessionStorageListTreeElement);
259
261
  this.indexedDBListTreeElement = new IndexedDBTreeElement(panel);
260
262
  this.indexedDBListTreeElement.setLink(
261
- 'https://developer.chrome.com/docs/devtools/storage/indexeddb/?utm_source=devtools');
263
+ 'https://developer.chrome.com/docs/devtools/storage/indexeddb/?utm_source=devtools' as
264
+ Platform.DevToolsPath.UrlString);
262
265
  storageTreeElement.appendChild(this.indexedDBListTreeElement);
263
266
  this.databasesListTreeElement =
264
267
  new ExpandableApplicationPanelTreeElement(panel, i18nString(UIStrings.webSql), 'Databases');
265
268
  this.databasesListTreeElement.setLink(
266
- 'https://developer.chrome.com/docs/devtools/storage/websql/?utm_source=devtools');
269
+ 'https://developer.chrome.com/docs/devtools/storage/websql/?utm_source=devtools' as
270
+ Platform.DevToolsPath.UrlString);
267
271
  const databaseIcon = UI.Icon.Icon.create('mediumicon-database', 'resource-tree-item');
268
272
  this.databasesListTreeElement.setLeadingIcons([databaseIcon]);
269
273
 
@@ -271,7 +275,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
271
275
  this.cookieListTreeElement =
272
276
  new ExpandableApplicationPanelTreeElement(panel, i18nString(UIStrings.cookies), 'Cookies');
273
277
  this.cookieListTreeElement.setLink(
274
- 'https://developer.chrome.com/docs/devtools/storage/cookies/?utm_source=devtools');
278
+ 'https://developer.chrome.com/docs/devtools/storage/cookies/?utm_source=devtools' as
279
+ Platform.DevToolsPath.UrlString);
275
280
  const cookieIcon = UI.Icon.Icon.create('mediumicon-cookie', 'resource-tree-item');
276
281
  this.cookieListTreeElement.setLeadingIcons([cookieIcon]);
277
282
  storageTreeElement.appendChild(this.cookieListTreeElement);
@@ -1505,7 +1510,7 @@ export class StorageCategoryView extends UI.Widget.VBox {
1505
1510
  this.emptyWidget.text = text;
1506
1511
  }
1507
1512
 
1508
- setLink(link: string|null): void {
1513
+ setLink(link: Platform.DevToolsPath.UrlString|null): void {
1509
1514
  if (link && !this.linkElement) {
1510
1515
  this.linkElement = this.emptyWidget.appendLink(link);
1511
1516
  }
@@ -47,7 +47,7 @@ export class ApplicationPanelTreeElement extends UI.TreeOutline.TreeElement {
47
47
  export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeElement {
48
48
  protected readonly expandedSetting: Common.Settings.Setting<boolean>;
49
49
  protected readonly categoryName: string;
50
- protected categoryLink: string|null;
50
+ protected categoryLink: Platform.DevToolsPath.UrlString|null;
51
51
 
52
52
  constructor(resourcesPanel: ResourcesPanel, categoryName: string, settingsKey: string, settingsDefault = false) {
53
53
  super(resourcesPanel, categoryName, false);
@@ -61,7 +61,7 @@ export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeE
61
61
  return 'category://' + this.categoryName as Platform.DevToolsPath.UrlString;
62
62
  }
63
63
 
64
- setLink(link: string): void {
64
+ setLink(link: Platform.DevToolsPath.UrlString): void {
65
65
  this.categoryLink = link;
66
66
  }
67
67
 
@@ -2,17 +2,18 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- // eslint-disable-next-line rulesdir/es_modules_import
6
- import emptyWidgetStyles from '../../ui/legacy/emptyWidget.css.js';
7
- import backgroundServiceViewStyles from './backgroundServiceView.css.js';
8
5
  import type * as Common from '../../core/common/common.js';
9
6
  import * as i18n from '../../core/i18n/i18n.js';
10
7
  import * as Platform from '../../core/platform/platform.js';
11
8
  import * as SDK from '../../core/sdk/sdk.js';
9
+ import * as Protocol from '../../generated/protocol.js';
12
10
  import * as Bindings from '../../models/bindings/bindings.js';
13
11
  import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
12
+ // eslint-disable-next-line rulesdir/es_modules_import
13
+ import emptyWidgetStyles from '../../ui/legacy/emptyWidget.css.js';
14
14
  import * as UI from '../../ui/legacy/legacy.js';
15
- import * as Protocol from '../../generated/protocol.js';
15
+
16
+ import backgroundServiceViewStyles from './backgroundServiceView.css.js';
16
17
 
17
18
  import type {BackgroundServiceModel} from './BackgroundServiceModel.js';
18
19
  import {Events} from './BackgroundServiceModel.js';
@@ -140,7 +140,7 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
140
140
  return view;
141
141
  }
142
142
 
143
- showCategoryView(categoryName: string, categoryLink: string|null): void {
143
+ showCategoryView(categoryName: string, categoryLink: Platform.DevToolsPath.UrlString|null): void {
144
144
  if (!this.categoryView) {
145
145
  this.categoryView = new StorageCategoryView();
146
146
  }
@@ -1439,7 +1439,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
1439
1439
  }
1440
1440
 
1441
1441
  // SyntaxErrors might not populate the URL field. Try to resolve it via scriptId.
1442
- const url = exceptionDetails.url || debuggerModel.scriptForId(scriptId)?.sourceURL;
1442
+ const url =
1443
+ exceptionDetails.url as Platform.DevToolsPath.UrlString || debuggerModel.scriptForId(scriptId)?.sourceURL;
1443
1444
  if (!url) {
1444
1445
  return;
1445
1446
  }
@@ -1531,7 +1532,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
1531
1532
  }
1532
1533
 
1533
1534
  private linkifyWithCustomLinkifier(
1534
- string: string, linkifier: (arg0: string, arg1: string, arg2?: number, arg3?: number) => Node): DocumentFragment {
1535
+ string: string,
1536
+ linkifier: (arg0: string, arg1: Platform.DevToolsPath.UrlString, arg2?: number, arg3?: number) => Node):
1537
+ DocumentFragment {
1535
1538
  if (string.length > getMaxTokenizableStringLength()) {
1536
1539
  const propertyValue = new ObjectUI.ObjectPropertiesSection.ExpandableTextPropertyValue(
1537
1540
  document.createElement('span'), string, getLongStringVisibleLength());
@@ -1563,7 +1566,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
1563
1566
  if (splitResult) {
1564
1567
  linkNode = linkifier(token.text, sourceURL, splitResult.lineNumber, splitResult.columnNumber);
1565
1568
  } else {
1566
- linkNode = linkifier(token.text, '');
1569
+ linkNode = linkifier(token.text, Platform.DevToolsPath.EmptyUrlString);
1567
1570
  }
1568
1571
  container.appendChild(linkNode);
1569
1572
  break;
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
+ import type * as Platform from '../../../core/platform/platform.js';
6
7
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
7
8
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
8
9
  import * as PanelFeedback from '../../../ui/components/panel_feedback/panel_feedback.js';
@@ -43,8 +44,8 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
43
44
 
44
45
  const {render, html} = LitHtml;
45
46
 
46
- const FEEDBACK_LINK = 'https://g.co/devtools/css-overview-feedback';
47
- const DOC_LINK = 'https://developer.chrome.com/docs/devtools/css-overview';
47
+ const FEEDBACK_LINK = 'https://g.co/devtools/css-overview-feedback' as Platform.DevToolsPath.UrlString;
48
+ const DOC_LINK = 'https://developer.chrome.com/docs/devtools/css-overview' as Platform.DevToolsPath.UrlString;
48
49
  export class OverviewStartRequestedEvent extends Event {
49
50
  static readonly eventName = 'overviewstartrequested';
50
51