chrome-devtools-frontend 1.0.970302 → 1.0.971727

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 (100) hide show
  1. package/config/gni/devtools_grd_files.gni +11 -7
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/ic_changes.svg +5 -0
  4. package/front_end/core/common/ParsedURL.ts +33 -4
  5. package/front_end/core/host/UserMetrics.ts +4 -1
  6. package/front_end/core/i18n/locales/en-US.json +21 -3
  7. package/front_end/core/i18n/locales/en-XL.json +21 -3
  8. package/front_end/core/platform/UserVisibleError.ts +28 -0
  9. package/front_end/core/platform/platform.ts +2 -0
  10. package/front_end/core/sdk/CSSModel.ts +21 -0
  11. package/front_end/core/sdk/CSSStyleSheetHeader.ts +10 -10
  12. package/front_end/core/sdk/ChildTargetManager.ts +0 -1
  13. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +6 -4
  14. package/front_end/core/sdk/DOMDebuggerModel.ts +4 -3
  15. package/front_end/core/sdk/DebuggerModel.ts +21 -16
  16. package/front_end/core/sdk/NetworkManager.ts +17 -3
  17. package/front_end/core/sdk/NetworkRequest.ts +16 -5
  18. package/front_end/core/sdk/Resource.ts +10 -10
  19. package/front_end/core/sdk/ResourceTreeModel.ts +18 -13
  20. package/front_end/core/sdk/Script.ts +10 -10
  21. package/front_end/core/sdk/SourceMap.ts +3 -1
  22. package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +15 -6
  23. package/front_end/entrypoints/main/MainImpl.ts +8 -0
  24. package/front_end/generated/InspectorBackendCommands.js +14 -8
  25. package/front_end/generated/SupportedCSSProperties.js +2 -0
  26. package/front_end/generated/protocol-mapping.d.ts +5 -0
  27. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  28. package/front_end/generated/protocol.ts +20 -12
  29. package/front_end/models/bindings/BreakpointManager.ts +7 -5
  30. package/front_end/models/bindings/CSSWorkspaceBinding.ts +21 -0
  31. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -1
  32. package/front_end/models/bindings/ResourceMapping.ts +2 -1
  33. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
  34. package/front_end/models/bindings/StylesSourceMapping.ts +2 -1
  35. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +12 -12
  36. package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataHttpNotFound.md → federatedAuthRequestClientMetadataHttpNotFound.md} +0 -0
  37. package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataInvalidResponse.md → federatedAuthRequestClientMetadataInvalidResponse.md} +0 -0
  38. package/front_end/models/issues_manager/descriptions/{federatedAuthRequestClientIdMetadataNoResponse.md → federatedAuthRequestClientMetadataNoResponse.md} +0 -0
  39. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  40. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  41. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  42. package/front_end/models/persistence/Automapping.ts +3 -33
  43. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +12 -10
  44. package/front_end/models/persistence/IsolatedFileSystem.ts +26 -22
  45. package/front_end/models/persistence/NetworkPersistenceManager.ts +8 -4
  46. package/front_end/models/persistence/PersistenceActions.ts +1 -4
  47. package/front_end/models/persistence/PlatformFileSystem.ts +6 -5
  48. package/front_end/{panels/sources/SourceMapNamesResolver.ts → models/source_map_scopes/NamesResolver.ts} +5 -5
  49. package/front_end/models/source_map_scopes/source_map_scopes.ts +7 -0
  50. package/front_end/models/text_utils/ContentProvider.ts +2 -1
  51. package/front_end/models/text_utils/StaticContentProvider.ts +5 -4
  52. package/front_end/models/workspace/UISourceCode.ts +18 -21
  53. package/front_end/models/workspace/WorkspaceImpl.ts +3 -1
  54. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  55. package/front_end/panels/browser_debugger/categorizedBreakpointsSidebarPane.css +0 -1
  56. package/front_end/panels/console/ConsolePrompt.ts +25 -2
  57. package/front_end/panels/console/ConsoleViewMessage.ts +41 -8
  58. package/front_end/panels/coverage/CoverageModel.ts +1 -1
  59. package/front_end/panels/elements/ElementsPanel.ts +25 -11
  60. package/front_end/panels/elements/ElementsTreeElement.ts +0 -6
  61. package/front_end/panels/elements/StylesSidebarPane.ts +214 -41
  62. package/front_end/panels/elements/elementsTreeOutline.css +0 -1
  63. package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
  64. package/front_end/panels/issues/AffectedSourcesView.ts +1 -1
  65. package/front_end/panels/lighthouse/LighthouseController.ts +30 -0
  66. package/front_end/panels/lighthouse/LighthousePanel.ts +7 -1
  67. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +6 -1
  68. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +0 -5
  69. package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
  70. package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +39 -0
  71. package/front_end/panels/network/NetworkDataGridNode.ts +1 -1
  72. package/front_end/panels/profiler/CPUProfileView.ts +1 -1
  73. package/front_end/panels/profiler/HeapProfileView.ts +0 -2
  74. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +0 -1
  75. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -3
  76. package/front_end/panels/sensors/sensors.css +0 -1
  77. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +5 -5
  78. package/front_end/panels/snippets/SnippetsQuickOpen.ts +1 -1
  79. package/front_end/panels/sources/DebuggerPlugin.ts +5 -4
  80. package/front_end/panels/sources/NavigatorView.ts +10 -6
  81. package/front_end/panels/sources/ScopeChainSidebarPane.ts +6 -3
  82. package/front_end/panels/sources/SourcesNavigator.ts +7 -1
  83. package/front_end/panels/sources/TabbedEditorContainer.ts +9 -0
  84. package/front_end/panels/sources/sources-legacy.ts +5 -16
  85. package/front_end/panels/sources/sources.ts +0 -2
  86. package/front_end/panels/sources/sourcesView.css +0 -4
  87. package/front_end/panels/timeline/TimelineUIUtils.ts +4 -47
  88. package/front_end/ui/legacy/ViewManager.ts +2 -1
  89. package/front_end/ui/legacy/closeButton.css +0 -1
  90. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -1
  91. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
  92. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +2 -3
  93. package/front_end/ui/legacy/components/utils/Linkifier.ts +20 -59
  94. package/front_end/ui/legacy/tabbedPane.css +0 -3
  95. package/front_end/ui/legacy/toolbar.css +28 -3
  96. package/package.json +1 -1
  97. package/scripts/npm_test.js +1 -1
  98. package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownHttpNotFound.md +0 -1
  99. package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownInvalidResponse.md +0 -1
  100. package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownNoResponse.md +0 -1
@@ -77,7 +77,7 @@ export class SnippetsQuickOpen extends QuickOpen.FilteredListWidget.Provider {
77
77
  }
78
78
 
79
79
  renderItem(itemIndex: number, query: string, titleElement: Element, _subtitleElement: Element): void {
80
- titleElement.textContent = unescape(this.snippets[itemIndex].name());
80
+ titleElement.textContent = this.snippets[itemIndex].name();
81
81
  titleElement.classList.add('monospace');
82
82
  QuickOpen.FilteredListWidget.FilteredListWidget.highlightRanges(titleElement, query, true);
83
83
  }
@@ -36,6 +36,7 @@ import * as Root from '../../core/root/root.js';
36
36
  import * as SDK from '../../core/sdk/sdk.js';
37
37
  import * as Protocol from '../../generated/protocol.js';
38
38
  import * as Bindings from '../../models/bindings/bindings.js';
39
+ import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
39
40
  import * as TextUtils from '../../models/text_utils/text_utils.js';
40
41
  import * as Workspace from '../../models/workspace/workspace.js';
41
42
  import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
@@ -48,7 +49,6 @@ import {AddSourceMapURLDialog} from './AddSourceMapURLDialog.js';
48
49
  import {BreakpointEditDialog, LogpointPrefix} from './BreakpointEditDialog.js';
49
50
  import {Plugin} from './Plugin.js';
50
51
  import {ScriptFormatterEditorAction} from './ScriptFormatterEditorAction.js';
51
- import {resolveExpression, resolveScopeInObject} from './SourceMapNamesResolver.js';
52
52
  import {SourcesPanel} from './SourcesPanel.js';
53
53
  import {getRegisteredEditorActions} from './SourcesView.js';
54
54
 
@@ -476,7 +476,7 @@ export class DebuggerPlugin extends Plugin {
476
476
  if (!url) {
477
477
  return;
478
478
  }
479
- scriptFile.addSourceMapURL(url);
479
+ scriptFile.addSourceMapURL(url as Platform.DevToolsPath.UrlString);
480
480
  }
481
481
 
482
482
  if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Network &&
@@ -650,7 +650,7 @@ export class DebuggerPlugin extends Plugin {
650
650
  }|{
651
651
  error: string,
652
652
  }|null> {
653
- const resolvedText = await resolveExpression(
653
+ const resolvedText = await SourceMapScopes.NamesResolver.resolveExpression(
654
654
  selectedCallFrame, evaluationText, uiSourceCode, highlightLine.number - 1,
655
655
  highlightRange.from - highlightLine.from, highlightRange.to - highlightLine.from);
656
656
  return await selectedCallFrame.evaluate({
@@ -887,7 +887,8 @@ export class DebuggerPlugin extends Plugin {
887
887
  return null;
888
888
  }
889
889
 
890
- const {properties} = await resolveScopeInObject(localScope).getAllProperties(false, false);
890
+ const {properties} =
891
+ await SourceMapScopes.NamesResolver.resolveScopeInObject(localScope).getAllProperties(false, false);
891
892
  if (!properties || !properties.length || properties.length > 500) {
892
893
  return null;
893
894
  }
@@ -428,9 +428,12 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
428
428
  const isFromSourceMap = uiSourceCode.contentType().isFromSourceMap();
429
429
  let path;
430
430
  if (uiSourceCode.project().type() === Workspace.Workspace.projectTypes.FileSystem) {
431
- path = Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(uiSourceCode).slice(0, -1);
431
+ path =
432
+ Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(uiSourceCode).slice(0, -1) as
433
+ Platform.DevToolsPath.EncodedPathString[];
432
434
  } else {
433
- path = Common.ParsedURL.ParsedURL.extractPath(uiSourceCode.url()).split('/').slice(1, -1);
435
+ path = Common.ParsedURL.ParsedURL.extractPath(uiSourceCode.url()).split('/').slice(1, -1) as
436
+ Platform.DevToolsPath.EncodedPathString[];
434
437
  }
435
438
 
436
439
  const project = uiSourceCode.project();
@@ -503,7 +506,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
503
506
  const commonPrefix = reversedIndex.longestPrefix(reversedPath, false /* fullWordOnly */);
504
507
  reversedIndex.add(reversedPath);
505
508
  const prefixPath = reversedPath.substring(0, commonPrefix.length + 1);
506
- const path = encoder.decode(Platform.StringUtilities.reverse(prefixPath));
509
+ const path = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(
510
+ encoder.decode(Platform.StringUtilities.reverse(prefixPath)) as Platform.DevToolsPath.EncodedPathString);
507
511
 
508
512
  const fileSystemNode = this.rootNode.child(project.id());
509
513
  if (fileSystemNode) {
@@ -539,7 +543,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
539
543
  private folderNode(
540
544
  uiSourceCode: Workspace.UISourceCode.UISourceCode, project: Workspace.Workspace.Project,
541
545
  target: SDK.Target.Target|null, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null, projectOrigin: string,
542
- path: string[], fromSourceMap: boolean): NavigatorTreeNode {
546
+ path: Platform.DevToolsPath.EncodedPathString[], fromSourceMap: boolean): NavigatorTreeNode {
543
547
  if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode)) {
544
548
  return this.rootNode;
545
549
  }
@@ -568,7 +572,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
568
572
  if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {
569
573
  type = Types.FileSystemFolder;
570
574
  }
571
- const name = path[path.length - 1];
575
+ const name = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(path[path.length - 1]);
572
576
 
573
577
  folderNode = new NavigatorFolderTreeNode(this, project, folderId, type, folderPath, name);
574
578
  this.subfolderNodes.set(folderId, folderNode);
@@ -1360,7 +1364,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
1360
1364
  this.treeElement.title = titleText;
1361
1365
  this.treeElement.updateIcon();
1362
1366
 
1363
- let tooltip = this.uiSourceCodeInternal.url();
1367
+ let tooltip: string = this.uiSourceCodeInternal.url();
1364
1368
  if (this.uiSourceCodeInternal.contentType().isFromSourceMap()) {
1365
1369
  tooltip = i18nString(UIStrings.sFromSourceMap, {PH1: this.uiSourceCodeInternal.displayName()});
1366
1370
  }
@@ -34,13 +34,13 @@ import * as i18n from '../../core/i18n/i18n.js';
34
34
  import * as SDK from '../../core/sdk/sdk.js';
35
35
  import * as Protocol from '../../generated/protocol.js';
36
36
  import * as Bindings from '../../models/bindings/bindings.js';
37
+ import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
37
38
  import * as LinearMemoryInspector from '../../ui/components/linear_memory_inspector/linear_memory_inspector.js';
38
39
  import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
39
40
  import * as Components from '../../ui/legacy/components/utils/utils.js';
40
41
  import * as UI from '../../ui/legacy/legacy.js';
41
42
 
42
43
  import scopeChainSidebarPaneStyles from './scopeChainSidebarPane.css.js';
43
- import {resolveScopeChain, resolveScopeInObject, resolveThisObject} from './SourceMapNamesResolver.js';
44
44
 
45
45
  const UIStrings = {
46
46
  /**
@@ -168,7 +168,10 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
168
168
 
169
169
  const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);
170
170
  this.setScopeSourceMapSubscription(callFrame);
171
- const [thisObject, scopeChain] = await Promise.all([resolveThisObject(callFrame), resolveScopeChain(callFrame)]);
171
+ const [thisObject, scopeChain] = await Promise.all([
172
+ SourceMapScopes.NamesResolver.resolveThisObject(callFrame),
173
+ SourceMapScopes.NamesResolver.resolveScopeChain(callFrame),
174
+ ]);
172
175
  // By now the developer might have moved on, and we don't want to show stale
173
176
  // scope information, so check again that we're still on the same CallFrame.
174
177
  if (callFrame === UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame)) {
@@ -243,7 +246,7 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
243
246
  titleElement.createChild('div', 'scope-chain-sidebar-pane-section-title').textContent = title;
244
247
 
245
248
  const section = new ObjectUI.ObjectPropertiesSection.RootElement(
246
- resolveScopeInObject(scope), this.linkifier, emptyPlaceholder,
249
+ SourceMapScopes.NamesResolver.resolveScopeInObject(scope), this.linkifier, emptyPlaceholder,
247
250
  ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.All, extraProperties);
248
251
  section.title = titleElement;
249
252
  section.listItemElement.classList.add('scope-chain-sidebar-pane-section');
@@ -33,6 +33,7 @@ import * as Host from '../../core/host/host.js';
33
33
  import * as i18n from '../../core/i18n/i18n.js';
34
34
  import * as SDK from '../../core/sdk/sdk.js';
35
35
  import * as Persistence from '../../models/persistence/persistence.js';
36
+ import type * as Platform from '../../core/platform/platform.js';
36
37
  import * as Workspace from '../../models/workspace/workspace.js';
37
38
  import * as UI from '../../ui/legacy/legacy.js';
38
39
  import * as Snippets from '../snippets/snippets.js';
@@ -378,9 +379,14 @@ export class SnippetsNavigatorView extends NavigatorView {
378
379
  private async handleSaveAs(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<void> {
379
380
  uiSourceCode.commitWorkingCopy();
380
381
  const {content} = await uiSourceCode.requestContent();
381
- void Workspace.FileManager.FileManager.instance().save(uiSourceCode.url(), content || '', true);
382
+ void Workspace.FileManager.FileManager.instance().save(
383
+ this.addJSExtension(uiSourceCode.url()), content || '', true);
382
384
  Workspace.FileManager.FileManager.instance().close(uiSourceCode.url());
383
385
  }
386
+
387
+ private addJSExtension(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {
388
+ return Common.ParsedURL.ParsedURL.concatenate(url, '.js');
389
+ }
384
390
  }
385
391
 
386
392
  let actionDelegateInstance: ActionDelegate;
@@ -584,6 +584,15 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
584
584
  const uiSourceCode = event.data;
585
585
  this.updateFileTitle(uiSourceCode);
586
586
  this.updateHistory();
587
+
588
+ // Remove from map under old url if it has changed.
589
+ for (const [k, v] of this.uriToUISourceCode) {
590
+ if (v === uiSourceCode && k !== v.url()) {
591
+ this.uriToUISourceCode.delete(k);
592
+ }
593
+ }
594
+ // Ensure it is mapped under current url.
595
+ this.canonicalUISourceCode(uiSourceCode);
587
596
  }
588
597
 
589
598
  private uiSourceCodeWorkingCopyChanged(
@@ -4,6 +4,8 @@
4
4
 
5
5
  // @ts-nocheck
6
6
 
7
+ import * as SourceMapScopesModule from '../../models/source_map_scopes/source_map_scopes.js';
8
+
7
9
  import * as SourcesModule from './sources.js';
8
10
 
9
11
  self.Sources = self.Sources || {};
@@ -139,26 +141,13 @@ Sources.SnippetsPlugin = SourcesModule.SnippetsPlugin.SnippetsPlugin;
139
141
 
140
142
  Sources.SourceMapNamesResolver = {};
141
143
 
142
- Sources.SourceMapNamesResolver.setScopeResolvedForTest = SourcesModule.SourceMapNamesResolver.setScopeResolvedForTest;
143
-
144
144
  // Tests can override this global symbol and therefore can't be exported
145
145
  Object.defineProperty(Sources.SourceMapNamesResolver, '_scopeResolvedForTest', {
146
- get: SourcesModule.SourceMapNamesResolver.getScopeResolvedForTest,
147
- set: SourcesModule.SourceMapNamesResolver.setScopeResolvedForTest,
146
+ get: SourceMapScopesModule.NamesResolver.getScopeResolvedForTest,
147
+ set: SourceMapScopesModule.NamesResolver.setScopeResolvedForTest,
148
148
  });
149
149
 
150
- Sources.SourceMapNamesResolver._scopeIdentifiers = SourcesModule.SourceMapNamesResolver.scopeIdentifiers;
151
- Sources.SourceMapNamesResolver._resolveScope = SourcesModule.SourceMapNamesResolver.resolveScope;
152
- Sources.SourceMapNamesResolver._allVariablesInCallFrame = SourcesModule.SourceMapNamesResolver.allVariablesInCallFrame;
153
- Sources.SourceMapNamesResolver.resolveExpression = SourcesModule.SourceMapNamesResolver.resolveExpression;
154
- Sources.SourceMapNamesResolver.resolveThisObject = SourcesModule.SourceMapNamesResolver.resolveThisObject;
155
- Sources.SourceMapNamesResolver.resolveScopeInObject = SourcesModule.SourceMapNamesResolver.resolveScopeInObject;
156
-
157
- /** @constructor */
158
- Sources.SourceMapNamesResolver.Identifier = SourcesModule.SourceMapNamesResolver.Identifier;
159
-
160
- /** @constructor */
161
- Sources.SourceMapNamesResolver.RemoteObject = SourcesModule.SourceMapNamesResolver.RemoteObject;
150
+ Sources.SourceMapNamesResolver.resolveExpression = SourceMapScopesModule.NamesResolver.resolveExpression;
162
151
 
163
152
  /** @constructor */
164
153
  Sources.NetworkNavigatorView = SourcesModule.SourcesNavigator.NetworkNavigatorView;
@@ -24,7 +24,6 @@ import * as ScriptFormatterEditorAction from './ScriptFormatterEditorAction.js';
24
24
  import * as ScriptOriginPlugin from './ScriptOriginPlugin.js';
25
25
  import * as SearchSourcesView from './SearchSourcesView.js';
26
26
  import * as SnippetsPlugin from './SnippetsPlugin.js';
27
- import * as SourceMapNamesResolver from './SourceMapNamesResolver.js';
28
27
  import * as SourcesNavigator from './SourcesNavigator.js';
29
28
  import * as SourcesPanel from './SourcesPanel.js';
30
29
  import * as SourcesSearchScope from './SourcesSearchScope.js';
@@ -57,7 +56,6 @@ export {
57
56
  ScriptOriginPlugin,
58
57
  SearchSourcesView,
59
58
  SnippetsPlugin,
60
- SourceMapNamesResolver,
61
59
  SourcesNavigator,
62
60
  SourcesPanel,
63
61
  SourcesSearchScope,
@@ -45,10 +45,6 @@
45
45
  z-index: 0;
46
46
  }
47
47
 
48
- .sources-toolbar .toolbar {
49
- cursor: default;
50
- }
51
-
52
48
  .source-frame-debugger-script {
53
49
  --override-debugger-background-tint: rgb(255 255 194 / 50%);
54
50
 
@@ -1871,15 +1871,8 @@ export class TimelineUIUtils {
1871
1871
  if (url) {
1872
1872
  const options = {
1873
1873
  tabStop: true,
1874
- className: undefined,
1875
- columnNumber: undefined,
1876
1874
  showColumnNumber: false,
1877
1875
  inlineFrameIndex: 0,
1878
- text: undefined,
1879
- lineNumber: undefined,
1880
- preventClick: undefined,
1881
- maxLength: undefined,
1882
- bypassURLTrimming: undefined,
1883
1876
  };
1884
1877
  details = Components.Linkifier.Linkifier.linkifyURL(url, options);
1885
1878
  }
@@ -2126,15 +2119,8 @@ export class TimelineUIUtils {
2126
2119
  if (url) {
2127
2120
  const options = {
2128
2121
  tabStop: true,
2129
- className: undefined,
2130
- columnNumber: undefined,
2131
2122
  showColumnNumber: false,
2132
2123
  inlineFrameIndex: 0,
2133
- lineNumber: undefined,
2134
- text: undefined,
2135
- preventClick: undefined,
2136
- maxLength: undefined,
2137
- bypassURLTrimming: undefined,
2138
2124
  };
2139
2125
  contentHelper.appendElementRow(
2140
2126
  i18nString(UIStrings.resource), Components.Linkifier.Linkifier.linkifyURL(url, options));
@@ -2264,15 +2250,8 @@ export class TimelineUIUtils {
2264
2250
  if (url) {
2265
2251
  const options = {
2266
2252
  tabStop: true,
2267
- className: undefined,
2268
- columnNumber: undefined,
2269
2253
  showColumnNumber: false,
2270
- lineNumber: undefined,
2271
2254
  inlineFrameIndex: 0,
2272
- text: undefined,
2273
- preventClick: undefined,
2274
- maxLength: undefined,
2275
- bypassURLTrimming: undefined,
2276
2255
  };
2277
2256
  contentHelper.appendElementRow(
2278
2257
  i18nString(UIStrings.imageUrl), Components.Linkifier.Linkifier.linkifyURL(url, options));
@@ -2285,15 +2264,8 @@ export class TimelineUIUtils {
2285
2264
  if (url) {
2286
2265
  const options = {
2287
2266
  tabStop: true,
2288
- className: undefined,
2289
- columnNumber: undefined,
2290
2267
  showColumnNumber: false,
2291
2268
  inlineFrameIndex: 0,
2292
- lineNumber: undefined,
2293
- text: undefined,
2294
- preventClick: undefined,
2295
- maxLength: undefined,
2296
- bypassURLTrimming: undefined,
2297
2269
  };
2298
2270
  contentHelper.appendElementRow(
2299
2271
  i18nString(UIStrings.stylesheetUrl), Components.Linkifier.Linkifier.linkifyURL(url, options));
@@ -2641,15 +2613,8 @@ export class TimelineUIUtils {
2641
2613
  if (request.url) {
2642
2614
  const options = {
2643
2615
  tabStop: true,
2644
- className: undefined,
2645
- columnNumber: undefined,
2646
2616
  showColumnNumber: false,
2647
- text: undefined,
2648
2617
  inlineFrameIndex: 0,
2649
- lineNumber: undefined,
2650
- preventClick: undefined,
2651
- maxLength: undefined,
2652
- bypassURLTrimming: undefined,
2653
2618
  };
2654
2619
  contentHelper.appendElementRow(
2655
2620
  i18n.i18n.lockedString('URL'), Components.Linkifier.Linkifier.linkifyURL(request.url, options));
@@ -2711,7 +2676,7 @@ export class TimelineUIUtils {
2711
2676
  const topFrame = TimelineModel.TimelineModel.TimelineData.forEvent(sendRequest).topFrame();
2712
2677
  if (topFrame) {
2713
2678
  const link = linkifier.maybeLinkifyConsoleCallFrame(
2714
- target, topFrame, {tabStop: true, className: undefined, inlineFrameIndex: 0, showColumnNumber: true});
2679
+ target, topFrame, {tabStop: true, inlineFrameIndex: 0, showColumnNumber: true});
2715
2680
  if (link) {
2716
2681
  contentHelper.appendElementRow(title, link);
2717
2682
  }
@@ -2720,9 +2685,8 @@ export class TimelineUIUtils {
2720
2685
  if (initiator) {
2721
2686
  const initiatorURL = TimelineModel.TimelineModel.TimelineData.forEvent(initiator).url;
2722
2687
  if (initiatorURL) {
2723
- const link = linkifier.maybeLinkifyScriptLocation(
2724
- target, null, initiatorURL, 0,
2725
- {tabStop: true, className: undefined, inlineFrameIndex: 0, columnNumber: undefined});
2688
+ const link =
2689
+ linkifier.maybeLinkifyScriptLocation(target, null, initiatorURL, 0, {tabStop: true, inlineFrameIndex: 0});
2726
2690
  if (link) {
2727
2691
  contentHelper.appendElementRow(title, link);
2728
2692
  }
@@ -3714,15 +3678,9 @@ export class TimelineDetailsContentHelper {
3714
3678
 
3715
3679
  const options = {
3716
3680
  tabStop: true,
3717
- className: undefined,
3718
3681
  columnNumber: startColumn,
3719
3682
  showColumnNumber: true,
3720
3683
  inlineFrameIndex: 0,
3721
- text: undefined,
3722
- lineNumber: undefined,
3723
- preventClick: undefined,
3724
- maxLength: undefined,
3725
- bypassURLTrimming: undefined,
3726
3684
  };
3727
3685
  const link = this.linkifierInternal.maybeLinkifyScriptLocation(this.target, null, url, startLine, options);
3728
3686
  if (!link) {
@@ -3737,8 +3695,7 @@ export class TimelineDetailsContentHelper {
3737
3695
  }
3738
3696
  const locationContent = document.createElement('span');
3739
3697
  const link = this.linkifierInternal.maybeLinkifyScriptLocation(
3740
- this.target, null, url, startLine,
3741
- {tabStop: true, className: undefined, inlineFrameIndex: 0, columnNumber: undefined});
3698
+ this.target, null, url, startLine, {tabStop: true, inlineFrameIndex: 0});
3742
3699
  if (!link) {
3743
3700
  return;
3744
3701
  }
@@ -423,7 +423,7 @@ export class _ExpandableContainerWidget extends VBox {
423
423
 
424
424
  this.titleElement = document.createElement('div');
425
425
  this.titleElement.classList.add('expandable-view-title');
426
- ARIAUtils.markAsButton(this.titleElement);
426
+ ARIAUtils.markAsTab(this.titleElement);
427
427
  this.titleExpandIcon = Icon.create('smallicon-triangle-right', 'title-expand-icon');
428
428
  this.titleElement.appendChild(this.titleExpandIcon);
429
429
  const titleText = view.title();
@@ -847,6 +847,7 @@ class _StackLocation extends Location implements ViewLocation {
847
847
  const vbox = new VBox();
848
848
  super(manager, vbox, revealCallback);
849
849
  this.vbox = vbox;
850
+ ARIAUtils.markAsTablist(vbox.element);
850
851
 
851
852
  this.expandableContainers = new Map();
852
853
 
@@ -7,7 +7,6 @@
7
7
  .close-button {
8
8
  width: 14px;
9
9
  height: 14px;
10
- cursor: default;
11
10
  display: flex;
12
11
  align-items: center;
13
12
  justify-content: center;
@@ -51,7 +51,7 @@ const UIStrings = {
51
51
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/FontView.ts', UIStrings);
52
52
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
53
53
  export class FontView extends UI.View.SimpleView {
54
- private readonly url: string;
54
+ private readonly url: Platform.DevToolsPath.UrlString;
55
55
  private readonly mimeType: string;
56
56
  private readonly contentProvider: TextUtils.ContentProvider.ContentProvider;
57
57
  private readonly mimeTypeLabel: UI.Toolbar.ToolbarText;
@@ -84,7 +84,7 @@ const UIStrings = {
84
84
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/ImageView.ts', UIStrings);
85
85
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
86
86
  export class ImageView extends UI.View.SimpleView {
87
- private url: string;
87
+ private url: Platform.DevToolsPath.UrlString;
88
88
  private parsedURL: Common.ParsedURL.ParsedURL;
89
89
  private readonly mimeType: string;
90
90
  private readonly contentProvider: TextUtils.ContentProvider.ContentProvider;
@@ -120,9 +120,8 @@ export function buildStackTraceRows(
120
120
  const rowCountHide = regularRowCount > 30 && stackTrace.callFrames.length > 31;
121
121
  let ignoreListHide = false;
122
122
  const functionName = UI.UIUtils.beautifyFunctionName(stackFrame.functionName);
123
- const link = linkifier.maybeLinkifyConsoleCallFrame(
124
- target, stackFrame,
125
- {tabStop: Boolean(tabStops), className: undefined, columnNumber: undefined, inlineFrameIndex: 0});
123
+ const link =
124
+ linkifier.maybeLinkifyConsoleCallFrame(target, stackFrame, {tabStop: Boolean(tabStops), inlineFrameIndex: 0});
126
125
  if (link) {
127
126
  link.addEventListener('contextmenu', populateContextMenu.bind(null, link));
128
127
  // TODO(crbug.com/1183325): fix race condition with uiLocation still being null here
@@ -195,17 +195,14 @@ export class Linkifier implements SDK.TargetManager.Observer {
195
195
  target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null, sourceURL: string,
196
196
  lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement|null {
197
197
  let fallbackAnchor: HTMLElement|null = null;
198
- const linkifyURLOptions = {
198
+ const linkifyURLOptions: LinkifyURLOptions = {
199
199
  lineNumber,
200
200
  maxLength: this.maxLength,
201
- columnNumber: options ? options.columnNumber : undefined,
201
+ columnNumber: options?.columnNumber,
202
202
  showColumnNumber: Boolean(options?.showColumnNumber),
203
- className: options ? options.className : undefined,
204
- tabStop: options ? options.tabStop : undefined,
205
- inlineFrameIndex: options ? options.inlineFrameIndex : 0,
206
- text: undefined,
207
- preventClick: undefined,
208
- bypassURLTrimming: undefined,
203
+ className: options?.className,
204
+ tabStop: options?.tabStop,
205
+ inlineFrameIndex: options?.inlineFrameIndex ?? 0,
209
206
  };
210
207
  const {columnNumber, className = ''} = linkifyURLOptions;
211
208
  if (sourceURL) {
@@ -230,13 +227,8 @@ export class Linkifier implements SDK.TargetManager.Observer {
230
227
  return fallbackAnchor;
231
228
  }
232
229
 
233
- const createLinkOptions = {
234
- maxLength: undefined,
235
- title: undefined,
236
- href: undefined,
237
- preventClick: undefined,
238
- bypassURLTrimming: undefined,
239
- tabStop: options ? options.tabStop : undefined,
230
+ const createLinkOptions: _CreateLinkOptions = {
231
+ tabStop: options?.tabStop,
240
232
  };
241
233
  // Not initialising the anchor element with 'zero width space' (\u200b) causes a crash
242
234
  // in the layout engine.
@@ -275,17 +267,14 @@ export class Linkifier implements SDK.TargetManager.Observer {
275
267
  target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null, sourceURL: string,
276
268
  lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement {
277
269
  const scriptLink = this.maybeLinkifyScriptLocation(target, scriptId, sourceURL, lineNumber, options);
278
- const linkifyURLOptions = {
270
+ const linkifyURLOptions: LinkifyURLOptions = {
279
271
  lineNumber,
280
272
  maxLength: this.maxLength,
281
- className: options ? options.className : undefined,
282
- columnNumber: options ? options.columnNumber : undefined,
273
+ className: options?.className,
274
+ columnNumber: options?.columnNumber,
283
275
  showColumnNumber: Boolean(options?.showColumnNumber),
284
- inlineFrameIndex: options ? options.inlineFrameIndex : 0,
285
- tabStop: options ? options.tabStop : undefined,
286
- text: undefined,
287
- preventClick: undefined,
288
- bypassURLTrimming: undefined,
276
+ inlineFrameIndex: options?.inlineFrameIndex ?? 0,
277
+ tabStop: options?.tabStop,
289
278
  };
290
279
 
291
280
  return scriptLink || Linkifier.linkifyURL(sourceURL, linkifyURLOptions);
@@ -296,7 +285,6 @@ export class Linkifier implements SDK.TargetManager.Observer {
296
285
  rawLocation.debuggerModel.target(), rawLocation.scriptId, fallbackUrl, rawLocation.lineNumber, {
297
286
  columnNumber: rawLocation.columnNumber,
298
287
  className,
299
- tabStop: undefined,
300
288
  inlineFrameIndex: rawLocation.inlineFrameIndex,
301
289
  });
302
290
  }
@@ -304,12 +292,12 @@ export class Linkifier implements SDK.TargetManager.Observer {
304
292
  maybeLinkifyConsoleCallFrame(
305
293
  target: SDK.Target.Target|null, callFrame: Protocol.Runtime.CallFrame, options?: LinkifyOptions): HTMLElement
306
294
  |null {
307
- const linkifyOptions = {
295
+ const linkifyOptions: LinkifyOptions = {
308
296
  columnNumber: callFrame.columnNumber,
309
297
  showColumnNumber: Boolean(options?.showColumnNumber),
310
- inlineFrameIndex: options ? options.inlineFrameIndex : 0,
311
- tabStop: options ? options.tabStop : undefined,
312
- className: options ? options.className : undefined,
298
+ inlineFrameIndex: options?.inlineFrameIndex ?? 0,
299
+ tabStop: options?.tabStop,
300
+ className: options?.className,
313
301
  };
314
302
  return this.maybeLinkifyScriptLocation(
315
303
  target, callFrame.scriptId, callFrame.url, callFrame.lineNumber, linkifyOptions);
@@ -327,10 +315,7 @@ export class Linkifier implements SDK.TargetManager.Observer {
327
315
  showColumnNumber: false,
328
316
  inlineFrameIndex: 0,
329
317
  maxLength: this.maxLength,
330
- text: undefined,
331
318
  preventClick: true,
332
- tabStop: undefined,
333
- bypassURLTrimming: undefined,
334
319
  });
335
320
 
336
321
  // The contract is that disposed targets don't have a LiveLocationPool
@@ -373,12 +358,7 @@ export class Linkifier implements SDK.TargetManager.Observer {
373
358
  }
374
359
 
375
360
  linkifyCSSLocation(rawLocation: SDK.CSSModel.CSSLocation, classes?: string): Element {
376
- const createLinkOptions = {
377
- maxLength: undefined,
378
- title: undefined,
379
- href: undefined,
380
- preventClick: undefined,
381
- bypassURLTrimming: undefined,
361
+ const createLinkOptions: _CreateLinkOptions = {
382
362
  tabStop: true,
383
363
  };
384
364
  // Not initialising the anchor element with 'zero width space' (\u200b) causes a crash
@@ -454,7 +434,7 @@ export class Linkifier implements SDK.TargetManager.Observer {
454
434
  const text = uiLocation.linkText(true /* skipTrim */, options.showColumnNumber);
455
435
  Linkifier.setTrimmedText(anchor, text, this.maxLength);
456
436
 
457
- let titleText = uiLocation.uiSourceCode.url();
437
+ let titleText: string = uiLocation.uiSourceCode.url();
458
438
  if (uiLocation.uiSourceCode.mimeType() === 'application/wasm') {
459
439
  // For WebAssembly locations, we follow the conventions described in
460
440
  // github.com/WebAssembly/design/blob/master/Web.md#developer-facing-display-conventions
@@ -497,16 +477,8 @@ export class Linkifier implements SDK.TargetManager.Observer {
497
477
 
498
478
  static linkifyURL(url: string, options?: LinkifyURLOptions): HTMLElement {
499
479
  options = options || {
500
- text: undefined,
501
- className: undefined,
502
- lineNumber: undefined,
503
- columnNumber: undefined,
504
480
  showColumnNumber: false,
505
481
  inlineFrameIndex: 0,
506
- preventClick: undefined,
507
- maxLength: undefined,
508
- tabStop: undefined,
509
- bypassURLTrimming: undefined,
510
482
  };
511
483
  const text = options.text;
512
484
  const className = options.className || '';
@@ -547,29 +519,18 @@ export class Linkifier implements SDK.TargetManager.Observer {
547
519
  static linkifyRevealable(
548
520
  revealable: Object, text: string|HTMLElement, fallbackHref?: string, title?: string,
549
521
  className?: string): HTMLElement {
550
- const createLinkOptions = {
522
+ const createLinkOptions: _CreateLinkOptions = {
551
523
  maxLength: UI.UIUtils.MaxLengthForDisplayedURLs,
552
524
  href: fallbackHref,
553
525
  title,
554
- preventClick: undefined,
555
- tabStop: undefined,
556
- bypassURLTrimming: undefined,
557
526
  };
558
527
  const {link, linkInfo} = Linkifier.createLink(text, className || '', createLinkOptions);
559
528
  linkInfo.revealable = revealable;
560
529
  return link;
561
530
  }
562
531
 
563
- private static createLink(text: string|HTMLElement, className: string, options?: _CreateLinkOptions):
532
+ private static createLink(text: string|HTMLElement, className: string, options: _CreateLinkOptions = {}):
564
533
  {link: HTMLElement, linkInfo: _LinkInfo} {
565
- options = options || {
566
- maxLength: undefined,
567
- title: undefined,
568
- href: undefined,
569
- preventClick: undefined,
570
- tabStop: undefined,
571
- bypassURLTrimming: undefined,
572
- };
573
534
  const {maxLength, title, href, preventClick, tabStop, bypassURLTrimming} = options;
574
535
  const link = document.createElement('span');
575
536
  if (className) {
@@ -117,7 +117,6 @@
117
117
  height: 26px;
118
118
  line-height: 16px;
119
119
  white-space: nowrap;
120
- cursor: default;
121
120
  display: flex;
122
121
  align-items: center;
123
122
  color: var(--color-text-secondary);
@@ -194,7 +193,6 @@
194
193
  .tabbed-pane-header-tabs-drop-down-container {
195
194
  float: left;
196
195
  opacity: 80%;
197
- cursor: pointer;
198
196
  display: flex;
199
197
  align-items: center;
200
198
  height: 100%;
@@ -347,7 +345,6 @@
347
345
 
348
346
  width: 14px;
349
347
  height: 14px;
350
- cursor: default;
351
348
  display: flex;
352
349
  align-items: center;
353
350
  justify-content: center;