chrome-devtools-frontend 1.0.1001476 → 1.0.1003469

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 (88) hide show
  1. package/config/gni/devtools_grd_files.gni +5 -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/host/InspectorFrontendHostAPI.ts +1 -0
  5. package/front_end/core/host/UserMetrics.ts +17 -1
  6. package/front_end/core/i18n/locales/en-US.json +24 -63
  7. package/front_end/core/i18n/locales/en-XL.json +24 -63
  8. package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
  9. package/front_end/core/root/Runtime.ts +7 -3
  10. package/front_end/core/sdk/ServiceWorkerManager.ts +6 -5
  11. package/front_end/core/sdk/TracingModel.ts +5 -4
  12. package/front_end/devtools_compatibility.js +1 -0
  13. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +14 -0
  14. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +491 -0
  15. package/front_end/entrypoints/formatter_worker/Substitute.ts +4 -440
  16. package/front_end/entrypoints/formatter_worker/formatter_worker.ts +2 -0
  17. package/front_end/entrypoints/main/MainImpl.ts +1 -0
  18. package/front_end/generated/InspectorBackendCommands.js +42 -12
  19. package/front_end/generated/SupportedCSSProperties.js +3 -5
  20. package/front_end/generated/protocol-mapping.d.ts +5 -1
  21. package/front_end/generated/protocol-proxy-api.d.ts +4 -1
  22. package/front_end/generated/protocol.ts +68 -14
  23. package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
  24. package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -34
  25. package/front_end/models/issues_manager/DeprecationIssue.ts +84 -172
  26. package/front_end/models/issues_manager/Issue.ts +8 -4
  27. package/front_end/models/issues_manager/descriptions/arInvalidHeader.md +3 -0
  28. package/front_end/models/persistence/NetworkPersistenceManager.ts +20 -0
  29. package/front_end/models/timeline_model/TimelineModel.ts +2 -49
  30. package/front_end/panels/application/AppManifestView.ts +3 -3
  31. package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -1
  32. package/front_end/panels/application/ApplicationPanelSidebar.ts +11 -6
  33. package/front_end/panels/application/ApplicationPanelTreeElement.ts +2 -2
  34. package/front_end/panels/application/BackgroundServiceView.ts +5 -4
  35. package/front_end/panels/application/ResourcesPanel.ts +1 -1
  36. package/front_end/panels/console/ConsoleViewMessage.ts +6 -3
  37. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +3 -2
  38. package/front_end/panels/elements/StylePropertyTreeElement.ts +19 -13
  39. package/front_end/panels/elements/StylesSidebarPane.ts +74 -5
  40. package/front_end/panels/elements/stylesSidebarPane.css +3 -0
  41. package/front_end/panels/issues/AffectedResourcesView.ts +4 -3
  42. package/front_end/panels/issues/AffectedSourcesView.ts +2 -1
  43. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +9 -38
  44. package/front_end/panels/issues/IssueView.ts +1 -1
  45. package/front_end/panels/lighthouse/LighthouseController.ts +6 -3
  46. package/front_end/panels/lighthouse/LighthouseReporterTypes.ts +2 -1
  47. package/front_end/panels/lighthouse/lighthousePanel.css +4 -0
  48. package/front_end/panels/network/NetworkLogView.ts +32 -0
  49. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +2 -2
  50. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -1
  51. package/front_end/panels/profiler/ProfileDataGrid.ts +1 -1
  52. package/front_end/panels/security/SecurityPanel.ts +6 -5
  53. package/front_end/panels/settings/SettingsScreen.ts +2 -3
  54. package/front_end/panels/sources/SourcesNavigator.ts +1 -1
  55. package/front_end/panels/sources/SourcesPanel.ts +1 -1
  56. package/front_end/panels/timeline/PerformanceModel.ts +2 -6
  57. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -26
  58. package/front_end/panels/timeline/TimelineUIUtils.ts +14 -12
  59. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1036 -1088
  60. package/front_end/third_party/lighthouse/locales/en-US.json +244 -4
  61. package/front_end/third_party/lighthouse/locales/en-XL.json +244 -4
  62. package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -22
  63. package/front_end/third_party/lighthouse/report/bundle.js +23 -366
  64. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  65. package/front_end/ui/components/docs/linkifier/simple-url.ts +2 -1
  66. package/front_end/ui/components/docs/panel_feedback/basic.ts +3 -2
  67. package/front_end/ui/components/docs/panel_feedback/button.ts +2 -1
  68. package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -3
  69. package/front_end/ui/components/linkifier/LinkifierUtils.ts +2 -3
  70. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -6
  71. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +5 -4
  72. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +3 -3
  73. package/front_end/ui/components/text_editor/javascript.ts +6 -15
  74. package/front_end/ui/legacy/EmptyWidget.ts +2 -1
  75. package/front_end/ui/legacy/InspectorView.ts +29 -0
  76. package/front_end/ui/legacy/UIUtils.ts +4 -4
  77. package/front_end/ui/legacy/XLink.ts +12 -13
  78. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -4
  79. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +1 -1
  80. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -2
  81. package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -7
  82. package/front_end/ui/legacy/components/utils/Linkifier.ts +23 -23
  83. package/front_end/ui/legacy/toolbar.css +1 -1
  84. package/package.json +1 -1
  85. package/scripts/whitespaces.txt +1 -0
  86. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceEventId.md +0 -3
  87. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md +0 -4
  88. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md +0 -4
@@ -24,24 +24,13 @@ const UIStrings = {
24
24
  */
25
25
  element: 'Element',
26
26
  /**
27
- * @description Noun, label for the column showing the associated network request in the issue details table.
28
- */
29
- request: 'Request',
30
- /**
31
- * @description Label for the column showing the invalid value used as the 'attributionsourceeventid' attribute
32
- * on an anchor HTML element ("a link").
33
- */
34
- invalidSourceEventId: 'Invalid `attributionsourceeventid`',
35
- /**
36
- * @description Label for the column showing the invalid value used as the 'attributionexpiry' attribute
37
- * on an anchor HTML element ("a link").
27
+ * @description Noun, label for the column showing the invalid header value in the issue details table.
38
28
  */
39
- invalidSourceExpiry: 'Invalid `attributionexpiry`',
29
+ invalidHeaderValue: 'Invalid Header Value',
40
30
  /**
41
- * @description Label for the column showing the invalid value used as the 'attributionpriority' attribute
42
- * on an anchor HTML element ("a link").
31
+ * @description Noun, label for the column showing the associated network request in the issue details table.
43
32
  */
44
- invalidSourcePriority: 'Invalid `attributionsourcepriority`',
33
+ request: 'Request',
45
34
  /**
46
35
  * @description Label for the column showing the invalid URL used in an HTML anchor element ("a link").
47
36
  * A origin is (roughly said) the front part of a URL.
@@ -89,20 +78,10 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
89
78
  this.appendColumnTitle(header, i18nString(UIStrings.element));
90
79
  this.appendColumnTitle(header, i18nString(UIStrings.untrustworthyOrigin));
91
80
  break;
92
- case IssuesManager.AttributionReportingIssue.IssueCode.InvalidAttributionSourceEventId:
93
- this.appendColumnTitle(header, i18nString(UIStrings.frame));
94
- this.appendColumnTitle(header, i18nString(UIStrings.element));
95
- this.appendColumnTitle(header, i18nString(UIStrings.invalidSourceEventId));
96
- break;
97
- case IssuesManager.AttributionReportingIssue.IssueCode.InvalidAttributionSourceExpiry:
98
- this.appendColumnTitle(header, i18nString(UIStrings.frame));
99
- this.appendColumnTitle(header, i18nString(UIStrings.element));
100
- this.appendColumnTitle(header, i18nString(UIStrings.invalidSourceExpiry));
101
- break;
102
- case IssuesManager.AttributionReportingIssue.IssueCode.InvalidAttributionSourcePriority:
81
+ case IssuesManager.AttributionReportingIssue.IssueCode.InvalidHeader:
103
82
  this.appendColumnTitle(header, i18nString(UIStrings.frame));
104
- this.appendColumnTitle(header, i18nString(UIStrings.element));
105
- this.appendColumnTitle(header, i18nString(UIStrings.invalidSourcePriority));
83
+ this.appendColumnTitle(header, i18nString(UIStrings.request));
84
+ this.appendColumnTitle(header, i18nString(UIStrings.invalidHeaderValue));
106
85
  break;
107
86
  case IssuesManager.AttributionReportingIssue.IssueCode.PermissionPolicyDisabled:
108
87
  this.appendColumnTitle(header, i18nString(UIStrings.frame));
@@ -129,11 +108,6 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
129
108
  const details = issue.issueDetails;
130
109
 
131
110
  switch (issueCode) {
132
- case IssuesManager.AttributionReportingIssue.IssueCode.AttributionUntrustworthyFrameOrigin:
133
- this.#appendFrameOrEmptyCell(element, issue);
134
- this.#appendRequestOrEmptyCell(element, details.request);
135
- this.appendIssueDetailCell(element, details.invalidParameter || '');
136
- break;
137
111
  case IssuesManager.AttributionReportingIssue.IssueCode.AttributionSourceUntrustworthyOrigin:
138
112
  await this.#appendElementOrEmptyCell(element, issue);
139
113
  this.appendIssueDetailCell(element, details.invalidParameter || '');
@@ -142,12 +116,9 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
142
116
  this.#appendRequestOrEmptyCell(element, details.request);
143
117
  this.appendIssueDetailCell(element, details.invalidParameter || '');
144
118
  break;
145
- case IssuesManager.AttributionReportingIssue.IssueCode.AttributionSourceUntrustworthyFrameOrigin:
146
- case IssuesManager.AttributionReportingIssue.IssueCode.InvalidAttributionSourceEventId:
147
- case IssuesManager.AttributionReportingIssue.IssueCode.InvalidAttributionSourceExpiry:
148
- case IssuesManager.AttributionReportingIssue.IssueCode.InvalidAttributionSourcePriority:
119
+ case IssuesManager.AttributionReportingIssue.IssueCode.InvalidHeader:
149
120
  this.#appendFrameOrEmptyCell(element, issue);
150
- await this.#appendElementOrEmptyCell(element, issue);
121
+ this.#appendRequestOrEmptyCell(element, details.request);
151
122
  this.appendIssueDetailCell(element, details.invalidParameter || '');
152
123
  break;
153
124
  case IssuesManager.AttributionReportingIssue.IssueCode.PermissionPolicyDisabled:
@@ -181,7 +181,7 @@ class AffectedMixedContentView extends AffectedResourcesView {
181
181
  },
182
182
  }));
183
183
  } else {
184
- const filename = extractShortPath(mixedContent.insecureURL);
184
+ const filename = extractShortPath(mixedContent.insecureURL as Platform.DevToolsPath.UrlString);
185
185
  const cell = this.appendIssueDetailCell(element, filename, 'affected-resource-mixed-content-info');
186
186
  cell.title = mixedContent.insecureURL;
187
187
  }
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import type * as Platform from '../../core/platform/platform.js';
7
8
  import * as SDK from '../../core/sdk/sdk.js';
8
9
  import * as Protocol from '../../generated/protocol.js';
9
10
 
@@ -508,7 +509,8 @@ export const RuntimeSettings: RuntimeSetting[] = [
508
509
  value: 'snapshot',
509
510
  },
510
511
  ],
511
- learnMore: 'https://web.dev/lighthouse-user-flows/',
512
+ learnMore: 'https://github.com/GoogleChrome/lighthouse/blob/HEAD/docs/user-flows.md' as
513
+ Platform.DevToolsPath.UrlString,
512
514
  },
513
515
  {
514
516
  // This setting is disabled, but we keep it around to show in the UI.
@@ -517,7 +519,8 @@ export const RuntimeSettings: RuntimeSetting[] = [
517
519
  title: i18nLazyString(UIStrings.simulatedThrottling),
518
520
  // We will disable this when we have a Lantern trace viewer within DevTools.
519
521
  learnMore:
520
- 'https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#devtools-lighthouse-panel-throttling',
522
+ 'https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#devtools-lighthouse-panel-throttling' as
523
+ Platform.DevToolsPath.UrlString,
521
524
  description: i18nLazyString(UIStrings.simulateASlowerPageLoadBasedOn),
522
525
  setFlags: (flags: Flags, value: string|boolean): void => {
523
526
  flags.throttlingMethod = value ? 'simulate' : 'devtools';
@@ -600,5 +603,5 @@ export interface RuntimeSetting {
600
603
  tooltip?: () => Common.UIString.LocalizedString,
601
604
  }[];
602
605
  title?: () => Common.UIString.LocalizedString;
603
- learnMore?: string;
606
+ learnMore?: Platform.DevToolsPath.UrlString;
604
607
  }
@@ -2,6 +2,7 @@
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
+ import type * as Platform from '../../core/platform/platform.js';
5
6
  import type * as SDK from '../../core/sdk/sdk.js';
6
7
 
7
8
  export class LighthouseReportGenerator {
@@ -80,7 +81,7 @@ export interface NodeDetailsJSON {
80
81
  snippet?: string;
81
82
  }
82
83
  export interface SourceLocationDetailsJSON {
83
- sourceUrl?: string;
84
+ sourceUrl?: Platform.DevToolsPath.UrlString;
84
85
  sourceLine?: string;
85
86
  sourceColumn?: string;
86
87
  }
@@ -50,3 +50,7 @@ button.view-trace {
50
50
  .lighthouse-toolbar-container > :first-child {
51
51
  flex: 1 1 auto;
52
52
  }
53
+
54
+ .lh-devtools .lh-element-screenshot__overlay {
55
+ position: absolute;
56
+ }
@@ -42,8 +42,10 @@ import * as Bindings from '../../models/bindings/bindings.js';
42
42
  import * as HAR from '../../models/har/har.js';
43
43
  import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
44
44
  import * as Logs from '../../models/logs/logs.js';
45
+ import * as Persistence from '../../models/persistence/persistence.js';
45
46
  import * as TextUtils from '../../models/text_utils/text_utils.js';
46
47
  import * as NetworkForward from '../../panels/network/forward/forward.js';
48
+ import * as Sources from '../../panels/sources/sources.js';
47
49
  import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
48
50
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
49
51
  import * as Components from '../../ui/legacy/components/utils/utils.js';
@@ -346,6 +348,11 @@ const UIStrings = {
346
348
  *@description Text in Network Log View of the Network panel
347
349
  */
348
350
  areYouSureYouWantToClearBrowserCookies: 'Are you sure you want to clear browser cookies?',
351
+ /**
352
+ *@description A context menu item in the Network Log View of the Network panel
353
+ * for creating a header override
354
+ */
355
+ createResponseHeaderOverride: 'Create response header override',
349
356
  };
350
357
  const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkLogView.ts', UIStrings);
351
358
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -1576,6 +1583,10 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1576
1583
 
1577
1584
  contextMenu.saveSection().appendItem(i18nString(UIStrings.saveAllAsHarWithContent), this.exportAll.bind(this));
1578
1585
 
1586
+ contextMenu.editSection().appendItem(
1587
+ i18nString(UIStrings.createResponseHeaderOverride),
1588
+ this.#handleCreateResponseHeaderOverrideClick.bind(this, request));
1589
+ contextMenu.editSection().appendSeparator();
1579
1590
  contextMenu.editSection().appendItem(i18nString(UIStrings.clearBrowserCache), this.clearBrowserCache.bind(this));
1580
1591
  contextMenu.editSection().appendItem(
1581
1592
  i18nString(UIStrings.clearBrowserCookies), this.clearBrowserCookies.bind(this));
@@ -1691,6 +1702,27 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1691
1702
  void stream.close();
1692
1703
  }
1693
1704
 
1705
+ async #handleCreateResponseHeaderOverrideClick(request: SDK.NetworkRequest.NetworkRequest): Promise<void> {
1706
+ if (Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project()) {
1707
+ await this.#revealHeaderOverrideEditor(request);
1708
+ } else { // If folder for local overrides has not been provided yet
1709
+ UI.InspectorView.InspectorView.instance().displaySelectOverrideFolderInfobar(async(): Promise<void> => {
1710
+ await Sources.SourcesNavigator.OverridesNavigatorView.instance().setupNewWorkspace();
1711
+ await this.#revealHeaderOverrideEditor(request);
1712
+ });
1713
+ }
1714
+ }
1715
+
1716
+ async #revealHeaderOverrideEditor(request: SDK.NetworkRequest.NetworkRequest): Promise<void> {
1717
+ const networkPersistanceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();
1718
+ const uiSourceCode = await networkPersistanceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());
1719
+ if (uiSourceCode) {
1720
+ const sourcesPanel = Sources.SourcesPanel.SourcesPanel.instance();
1721
+ sourcesPanel.showUISourceCode(uiSourceCode);
1722
+ sourcesPanel.revealInNavigator(uiSourceCode);
1723
+ }
1724
+ }
1725
+
1694
1726
  private clearBrowserCache(): void {
1695
1727
  if (confirm(i18nString(UIStrings.areYouSureYouWantToClearBrowser))) {
1696
1728
  SDK.NetworkManager.MultitargetNetworkManager.instance().clearBrowserCache();
@@ -1299,8 +1299,8 @@ export class AllocationGridNode extends HeapSnapshotGridNode {
1299
1299
  const linkifier = (this.dataGridInternal as AllocationDataGrid).linkifier;
1300
1300
  const urlElement = linkifier.linkifyScriptLocation(
1301
1301
  heapProfilerModel ? heapProfilerModel.target() : null,
1302
- String(allocationNode.scriptId) as Protocol.Runtime.ScriptId, allocationNode.scriptName,
1303
- allocationNode.line - 1, {
1302
+ String(allocationNode.scriptId) as Protocol.Runtime.ScriptId,
1303
+ allocationNode.scriptName as Platform.DevToolsPath.UrlString, allocationNode.line - 1, {
1304
1304
  columnNumber: allocationNode.column - 1,
1305
1305
  inlineFrameIndex: 0,
1306
1306
  className: 'profile-node-file',
@@ -1904,7 +1904,8 @@ export class HeapAllocationStackView extends UI.Widget.Widget {
1904
1904
  const target = this.heapProfilerModel ? this.heapProfilerModel.target() : null;
1905
1905
  const options = {columnNumber: frame.column - 1, inlineFrameIndex: 0};
1906
1906
  const urlElement = this.linkifier.linkifyScriptLocation(
1907
- target, String(frame.scriptId) as Protocol.Runtime.ScriptId, frame.scriptName, frame.line - 1, options);
1907
+ target, String(frame.scriptId) as Protocol.Runtime.ScriptId,
1908
+ frame.scriptName as Platform.DevToolsPath.UrlString, frame.line - 1, options);
1908
1909
  frameDiv.appendChild(urlElement);
1909
1910
  stackFrameToURLElement.set(frameDiv, urlElement);
1910
1911
  frameDiv.addEventListener('contextmenu', this.onContextMenu.bind(this, urlElement));
@@ -65,7 +65,7 @@ export class ProfileDataGridNode extends DataGrid.DataGrid.DataGridNode<unknown>
65
65
  total: number;
66
66
  functionName: string;
67
67
  readonly deoptReason: string;
68
- url: string;
68
+ url: Platform.DevToolsPath.UrlString;
69
69
  linkElement: Element|null;
70
70
  populated: boolean;
71
71
  savedSelf?: number;
@@ -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 * as SDK from '../../core/sdk/sdk.js';
9
10
  import * as Protocol from '../../generated/protocol.js';
10
11
  import * as NetworkForward from '../../panels/network/forward/forward.js';
@@ -513,7 +514,7 @@ export class SecurityPanel extends UI.Panel.PanelWithSidebar implements
513
514
  return certificateButton;
514
515
  }
515
516
 
516
- static createHighlightedUrl(url: string, securityState: string): Element {
517
+ static createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
517
518
  const schemeSeparator = '://';
518
519
  const index = url.indexOf(schemeSeparator);
519
520
 
@@ -548,7 +549,7 @@ export class SecurityPanel extends UI.Panel.PanelWithSidebar implements
548
549
  // The sidebar element will trigger displaying the main view. Rather than making a redundant call to display the main view, we rely on this.
549
550
  this.sidebarMainViewElement.select(true);
550
551
  }
551
- showOrigin(origin: string): void {
552
+ showOrigin(origin: Platform.DevToolsPath.UrlString): void {
552
553
  const originState = this.origins.get(origin);
553
554
  if (!originState) {
554
555
  return;
@@ -820,7 +821,7 @@ export class SecurityPanelSidebarTree extends UI.TreeOutline.TreeOutlineInShadow
820
821
  }
821
822
  }
822
823
 
823
- addOrigin(origin: string, securityState: Protocol.Security.SecurityState): void {
824
+ addOrigin(origin: Platform.DevToolsPath.UrlString, securityState: Protocol.Security.SecurityState): void {
824
825
  const originElement = new SecurityPanelSidebarTreeElement(
825
826
  SecurityPanel.createHighlightedUrl(origin, securityState), this.showOriginInPanel.bind(this, origin),
826
827
  'security-sidebar-tree-item', 'security-property');
@@ -1394,7 +1395,7 @@ export class SecurityMainView extends UI.Widget.VBox {
1394
1395
  export class SecurityOriginView extends UI.Widget.VBox {
1395
1396
  private readonly panel: SecurityPanel;
1396
1397
  private readonly originLockIcon: HTMLElement;
1397
- constructor(panel: SecurityPanel, origin: string, originState: OriginState) {
1398
+ constructor(panel: SecurityPanel, origin: Platform.DevToolsPath.UrlString, originState: OriginState) {
1398
1399
  super();
1399
1400
  this.panel = panel;
1400
1401
  this.setMinimumSize(200, 100);
@@ -1657,4 +1658,4 @@ export interface OriginState {
1657
1658
  originView?: SecurityOriginView|null;
1658
1659
  }
1659
1660
 
1660
- export type Origin = string;
1661
+ export type Origin = Platform.DevToolsPath.UrlString;
@@ -511,9 +511,8 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
511
511
  return true;
512
512
  // TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
513
513
  case 'settings.documentation':
514
- Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(
515
- UI.UIUtils.addReferrerToURL('https://developer.chrome.com/docs/devtools/') as
516
- Platform.DevToolsPath.UrlString);
514
+ Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(UI.UIUtils.addReferrerToURL(
515
+ 'https://developer.chrome.com/docs/devtools/' as Platform.DevToolsPath.UrlString));
517
516
  return true;
518
517
  case 'settings.shortcuts':
519
518
  void SettingsScreen.showSettingsScreen({name: 'keybinds', focusTabHeader: true});
@@ -278,7 +278,7 @@ export class OverridesNavigatorView extends NavigatorView {
278
278
  this.toolbar.appendToolbarItem(setupButton);
279
279
  }
280
280
 
281
- private async setupNewWorkspace(): Promise<void> {
281
+ async setupNewWorkspace(): Promise<void> {
282
282
  const fileSystem =
283
283
  await Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem('overrides');
284
284
  if (!fileSystem) {
@@ -528,7 +528,7 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
528
528
  this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber, omitFocus);
529
529
  }
530
530
 
531
- private revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): void {
531
+ revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): void {
532
532
  for (const navigator of registeredNavigatorViews) {
533
533
  const navigatorView = navigator.navigatorView();
534
534
  const viewId = navigator.viewId;
@@ -75,18 +75,14 @@ export class PerformanceModel extends Common.ObjectWrapper.ObjectWrapper<EventTy
75
75
  this.tracingModelInternal = model;
76
76
  this.timelineModelInternal.setEvents(model);
77
77
 
78
- let inputEvents: SDK.TracingModel.AsyncEvent[]|null = null;
79
78
  let animationEvents: SDK.TracingModel.AsyncEvent[]|null = null;
80
79
  for (const track of this.timelineModelInternal.tracks()) {
81
- if (track.type === TimelineModel.TimelineModel.TrackType.Input) {
82
- inputEvents = track.asyncEvents;
83
- }
84
80
  if (track.type === TimelineModel.TimelineModel.TrackType.Animation) {
85
81
  animationEvents = track.asyncEvents;
86
82
  }
87
83
  }
88
- if (inputEvents || animationEvents) {
89
- this.irModel.populate(inputEvents || [], animationEvents || []);
84
+ if (animationEvents) {
85
+ this.irModel.populate([], animationEvents || []);
90
86
  }
91
87
 
92
88
  const mainTracks = this.timelineModelInternal.tracks().filter(
@@ -54,10 +54,6 @@ const UIStrings = {
54
54
  */
55
55
  onIgnoreList: 'On ignore list',
56
56
  /**
57
- *@description Text in Timeline Flame Chart Data Provider of the Performance panel
58
- */
59
- input: 'Input',
60
- /**
61
57
  *@description Text that refers to the animation of the web page
62
58
  */
63
59
  animation: 'Animation',
@@ -109,10 +105,6 @@ const UIStrings = {
109
105
  */
110
106
  experience: 'Experience',
111
107
  /**
112
- *@description Text in Timeline Flame Chart Data Provider of the Performance panel
113
- */
114
- interactions: 'Interactions',
115
- /**
116
108
  *@description Text for rendering frames
117
109
  */
118
110
  frames: 'Frames',
@@ -182,8 +174,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
182
174
  private readonly collapsibleTimingsHeader: PerfUI.FlameChart.GroupStyle;
183
175
  private readonly timingsHeader: PerfUI.FlameChart.GroupStyle;
184
176
  private readonly screenshotsHeader: PerfUI.FlameChart.GroupStyle;
185
- private readonly interactionsHeaderLevel1: PerfUI.FlameChart.GroupStyle;
186
- private readonly interactionsHeaderLevel2: PerfUI.FlameChart.GroupStyle;
177
+ private readonly animationsHeader: PerfUI.FlameChart.GroupStyle;
187
178
  private readonly experienceHeader: PerfUI.FlameChart.GroupStyle;
188
179
  private readonly flowEventIndexById: Map<string, number>;
189
180
  private entryData!: TimelineFlameChartEntry[];
@@ -243,8 +234,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
243
234
  this.buildGroupStyle({shareHeaderLine: true, useFirstLineForOverview: true, collapsible: false});
244
235
  this.screenshotsHeader =
245
236
  this.buildGroupStyle({useFirstLineForOverview: true, nestingLevel: 1, collapsible: false, itemsHeight: 150});
246
- this.interactionsHeaderLevel1 = this.buildGroupStyle({useFirstLineForOverview: true});
247
- this.interactionsHeaderLevel2 = this.buildGroupStyle({padding: 2, nestingLevel: 1});
237
+ this.animationsHeader = this.buildGroupStyle({useFirstLineForOverview: false});
248
238
  this.experienceHeader = this.buildGroupStyle({collapsible: false});
249
239
 
250
240
  ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {
@@ -256,8 +246,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
256
246
  this.collapsibleTimingsHeader,
257
247
  this.timingsHeader,
258
248
  this.screenshotsHeader,
259
- this.interactionsHeaderLevel1,
260
- this.interactionsHeaderLevel2,
249
+ this.animationsHeader,
261
250
  this.experienceHeader,
262
251
  ];
263
252
  for (const header of headers) {
@@ -428,10 +417,8 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
428
417
 
429
418
  const eventEntryType = EntryType.Event;
430
419
 
431
- const weight = (track: TimelineModel.TimelineModel.Track): 0|1|2|3|4|5|6|7|8|9|10|- 1 => {
420
+ const weight = (track: TimelineModel.TimelineModel.Track): 1|2|3|4|5|6|7|8|9|10|- 1 => {
432
421
  switch (track.type) {
433
- case TimelineModel.TimelineModel.TrackType.Input:
434
- return 0;
435
422
  case TimelineModel.TimelineModel.TrackType.Animation:
436
423
  return 1;
437
424
  case TimelineModel.TimelineModel.TrackType.Timings:
@@ -464,16 +451,9 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
464
451
  let rasterCount = 0;
465
452
  for (const track of tracks) {
466
453
  switch (track.type) {
467
- case TimelineModel.TimelineModel.TrackType.Input: {
468
- this.appendAsyncEventsGroup(
469
- track, i18nString(UIStrings.input), track.asyncEvents, this.interactionsHeaderLevel2, eventEntryType,
470
- false /* selectable */);
471
- break;
472
- }
473
-
474
454
  case TimelineModel.TimelineModel.TrackType.Animation: {
475
455
  this.appendAsyncEventsGroup(
476
- track, i18nString(UIStrings.animation), track.asyncEvents, this.interactionsHeaderLevel2, eventEntryType,
456
+ track, i18nString(UIStrings.animation), track.asyncEvents, this.animationsHeader, eventEntryType,
477
457
  false /* selectable */);
478
458
  break;
479
459
  }
@@ -765,7 +745,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
765
745
  if (!interactionRecords.length) {
766
746
  return;
767
747
  }
768
- this.appendHeader(i18nString(UIStrings.interactions), this.interactionsHeaderLevel1, false /* selectable */);
769
748
  for (const segment of interactionRecords) {
770
749
  const index = this.entryData.length;
771
750
  this.entryData.push((segment.data as TimelineModel.TimelineIRModel.Phases));
@@ -1918,7 +1918,8 @@ export class TimelineUIUtils {
1918
1918
  null {
1919
1919
  const options =
1920
1920
  {columnNumber, showColumnNumber: true, inlineFrameIndex: 0, className: 'timeline-details', tabStop: true};
1921
- return linkifier.linkifyScriptLocation(target, scriptId, url, lineNumber, options);
1921
+ return linkifier.linkifyScriptLocation(
1922
+ target, scriptId, url as Platform.DevToolsPath.UrlString, lineNumber, options);
1922
1923
  }
1923
1924
 
1924
1925
  function linkifyTopCallFrame(): Element|null {
@@ -1931,7 +1932,7 @@ export class TimelineUIUtils {
1931
1932
  }
1932
1933
 
1933
1934
  static buildDetailsNodeForPerformanceEvent(event: SDK.TracingModel.Event): Element {
1934
- let link: string = 'https://web.dev/user-centric-performance-metrics/';
1935
+ let link = 'https://web.dev/user-centric-performance-metrics/';
1935
1936
  let name = 'page performance metrics';
1936
1937
  const recordType = TimelineModel.TimelineModel.RecordType;
1937
1938
  switch (event.name) {
@@ -2029,7 +2030,7 @@ export class TimelineUIUtils {
2029
2030
  const eventData = event.args['data'];
2030
2031
  const timelineData = TimelineModel.TimelineModel.TimelineData.forEvent(event);
2031
2032
  const initiator = timelineData.initiator();
2032
- let url: (string|null)|null = null;
2033
+ let url: Platform.DevToolsPath.UrlString|null = null;
2033
2034
 
2034
2035
  if (timelineData.warning) {
2035
2036
  contentHelper.appendWarningRow(event);
@@ -2137,7 +2138,7 @@ export class TimelineUIUtils {
2137
2138
  }
2138
2139
 
2139
2140
  case recordTypes.CompileScript: {
2140
- url = eventData && eventData['url'];
2141
+ url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
2141
2142
  if (url) {
2142
2143
  contentHelper.appendLocationRow(
2143
2144
  i18nString(UIStrings.script), url, eventData['lineNumber'], eventData['columnNumber']);
@@ -2154,7 +2155,7 @@ export class TimelineUIUtils {
2154
2155
  }
2155
2156
 
2156
2157
  case recordTypes.CacheModule: {
2157
- url = eventData && eventData['url'];
2158
+ url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
2158
2159
  contentHelper.appendTextRow(
2159
2160
  i18nString(UIStrings.compilationCacheSize),
2160
2161
  Platform.NumberUtilities.bytesToString(eventData['producedCacheSize']));
@@ -2162,7 +2163,7 @@ export class TimelineUIUtils {
2162
2163
  }
2163
2164
 
2164
2165
  case recordTypes.CacheScript: {
2165
- url = eventData && eventData['url'];
2166
+ url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
2166
2167
  if (url) {
2167
2168
  contentHelper.appendLocationRow(
2168
2169
  i18nString(UIStrings.script), url, eventData['lineNumber'], eventData['columnNumber']);
@@ -2174,7 +2175,7 @@ export class TimelineUIUtils {
2174
2175
  }
2175
2176
 
2176
2177
  case recordTypes.EvaluateScript: {
2177
- url = eventData && eventData['url'];
2178
+ url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
2178
2179
  if (url) {
2179
2180
  contentHelper.appendLocationRow(
2180
2181
  i18nString(UIStrings.script), url, eventData['lineNumber'], eventData['columnNumber']);
@@ -2188,7 +2189,7 @@ export class TimelineUIUtils {
2188
2189
  case recordTypes.WasmModuleCacheHit:
2189
2190
  case recordTypes.WasmModuleCacheInvalid: {
2190
2191
  if (eventData) {
2191
- url = event.args['url'];
2192
+ url = event.args['url'] as Platform.DevToolsPath.UrlString;
2192
2193
  if (url) {
2193
2194
  contentHelper.appendTextRow(i18nString(UIStrings.url), url);
2194
2195
  }
@@ -2242,7 +2243,7 @@ export class TimelineUIUtils {
2242
2243
  }
2243
2244
 
2244
2245
  case recordTypes.ParseAuthorStyleSheet: {
2245
- url = eventData['styleSheetUrl'];
2246
+ url = eventData['styleSheetUrl'] as Platform.DevToolsPath.UrlString;
2246
2247
  if (url) {
2247
2248
  const options = {
2248
2249
  tabStop: true,
@@ -2911,7 +2912,7 @@ export class TimelineUIUtils {
2911
2912
  }
2912
2913
  const imageURLPromise = snapshotWithRect.snapshot.replay();
2913
2914
  snapshotWithRect.snapshot.release();
2914
- const imageURL = await imageURLPromise;
2915
+ const imageURL = await imageURLPromise as Platform.DevToolsPath.UrlString;
2915
2916
  if (!imageURL) {
2916
2917
  return null;
2917
2918
  }
@@ -3662,14 +3663,15 @@ export class TimelineDetailsContentHelper {
3662
3663
  showColumnNumber: true,
3663
3664
  inlineFrameIndex: 0,
3664
3665
  };
3665
- const link = this.linkifierInternal.maybeLinkifyScriptLocation(this.target, null, url, startLine, options);
3666
+ const link = this.linkifierInternal.maybeLinkifyScriptLocation(
3667
+ this.target, null, url as Platform.DevToolsPath.UrlString, startLine, options);
3666
3668
  if (!link) {
3667
3669
  return;
3668
3670
  }
3669
3671
  this.appendElementRow(title, link);
3670
3672
  }
3671
3673
 
3672
- appendLocationRange(title: string, url: string, startLine: number, endLine?: number): void {
3674
+ appendLocationRange(title: string, url: Platform.DevToolsPath.UrlString, startLine: number, endLine?: number): void {
3673
3675
  if (!this.linkifierInternal || !this.target) {
3674
3676
  return;
3675
3677
  }