chrome-devtools-frontend 1.0.938150 → 1.0.939277

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 (125) hide show
  1. package/.stylelintrc.json +15 -11
  2. package/config/gni/all_devtools_files.gni +0 -1
  3. package/config/gni/devtools_grd_files.gni +0 -1
  4. package/front_end/Images/whatsnew.avif +0 -0
  5. package/front_end/Tests.js +30 -29
  6. package/front_end/core/host/InspectorFrontendHost.ts +16 -30
  7. package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
  8. package/front_end/core/host/UserMetrics.ts +25 -0
  9. package/front_end/core/i18n/locales/en-US.json +4 -1
  10. package/front_end/core/i18n/locales/en-XL.json +4 -1
  11. package/front_end/core/sdk/CSSModel.ts +64 -50
  12. package/front_end/core/sdk/EmulationModel.ts +11 -0
  13. package/front_end/core/sdk/sdk-meta.ts +30 -1
  14. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -1
  15. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +9 -2
  16. package/front_end/entrypoints/inspector_main/renderingOptions.css +2 -2
  17. package/front_end/entrypoints/main/MainImpl.ts +14 -0
  18. package/front_end/entrypoints/main/main-meta.ts +0 -2
  19. package/front_end/entrypoints/node_main/nodeConnectionsPanel.css +2 -2
  20. package/front_end/entrypoints/worker_app/worker_app.json +0 -1
  21. package/front_end/legacy_test_runner/test_runner/test_runner.js +2 -4
  22. package/front_end/models/persistence/editFileSystemView.css +1 -1
  23. package/front_end/models/persistence/workspaceSettingsTab.css +1 -1
  24. package/front_end/panels/accessibility/accessibilityNode.css +2 -2
  25. package/front_end/panels/accessibility/axBreadcrumbs.css +1 -1
  26. package/front_end/panels/animation/animationTimeline.css +5 -5
  27. package/front_end/panels/application/components/frameDetailsReportView.css +1 -1
  28. package/front_end/panels/application/resourcesPanel.css +1 -1
  29. package/front_end/panels/application/resourcesSidebar.css +1 -1
  30. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +0 -3
  31. package/front_end/panels/browser_debugger/xhrBreakpointsSidebarPane.css +2 -5
  32. package/front_end/panels/changes/changesSidebar.css +1 -1
  33. package/front_end/panels/changes/changesView.css +2 -2
  34. package/front_end/panels/console/consolePrompt.css +1 -1
  35. package/front_end/panels/console/consoleSidebar.css +4 -4
  36. package/front_end/panels/console/consoleView.css +2 -2
  37. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -1
  38. package/front_end/panels/css_overview/cssOverviewCompletedView.css +8 -8
  39. package/front_end/panels/elements/classesPaneWidget.css +1 -1
  40. package/front_end/panels/elements/components/adornerSettingsPane.css +1 -1
  41. package/front_end/panels/elements/computedStyleWidgetTree.css +1 -1
  42. package/front_end/panels/elements/elementsPanel.css +1 -1
  43. package/front_end/panels/elements/elementsTreeOutline.css +1 -1
  44. package/front_end/panels/elements/layoutPane.css +1 -1
  45. package/front_end/panels/elements/platformFontsWidget.css +1 -1
  46. package/front_end/panels/elements/stylesSectionTree.css +1 -1
  47. package/front_end/panels/event_listeners/EventListenersView.ts +5 -4
  48. package/front_end/panels/event_listeners/eventListenersView.css +3 -2
  49. package/front_end/panels/help/ReleaseNoteText.ts +28 -0
  50. package/front_end/panels/issues/IssueKindView.ts +0 -6
  51. package/front_end/panels/issues/IssueView.ts +19 -27
  52. package/front_end/panels/issues/components/HideIssuesMenu.ts +7 -11
  53. package/front_end/panels/issues/components/hideIssuesMenu.css +8 -0
  54. package/front_end/panels/issues/issuesTree.css +17 -5
  55. package/front_end/panels/lighthouse/lighthouseStartView.css +2 -2
  56. package/front_end/panels/media/playerListView.css +1 -1
  57. package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +1 -1
  58. package/front_end/panels/network/NetworkLogView.ts +13 -0
  59. package/front_end/panels/network/NetworkSearchScope.ts +3 -1
  60. package/front_end/panels/network/blockedURLsPane.css +1 -1
  61. package/front_end/panels/network/networkConfigView.css +1 -1
  62. package/front_end/panels/network/networkLogView.css +3 -3
  63. package/front_end/panels/profiler/profileLauncherView.css +3 -3
  64. package/front_end/panels/security/mainView.css +2 -2
  65. package/front_end/panels/security/originView.css +1 -1
  66. package/front_end/panels/sensors/sensors.css +2 -2
  67. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -1
  68. package/front_end/panels/settings/emulation/devicesSettingsTab.css +4 -4
  69. package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +1 -1
  70. package/front_end/panels/settings/settingsScreen.css +2 -2
  71. package/front_end/panels/sources/CoveragePlugin.ts +7 -2
  72. package/front_end/panels/sources/JavaScriptBreakpointsSidebarPane.ts +14 -17
  73. package/front_end/panels/sources/callStackSidebarPane.css +1 -1
  74. package/front_end/panels/sources/dialog.css +1 -1
  75. package/front_end/panels/sources/javaScriptBreakpointsSidebarPane.css +19 -45
  76. package/front_end/panels/sources/navigatorTree.css +4 -4
  77. package/front_end/panels/sources/sourcesPanel.css +2 -2
  78. package/front_end/panels/sources/threadsSidebarPane.css +1 -1
  79. package/front_end/panels/timeline/components/WebVitalsTooltip.css +1 -1
  80. package/front_end/panels/timeline/historyToolbarButton.css +1 -1
  81. package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
  82. package/front_end/panels/webauthn/webauthnPane.css +2 -2
  83. package/front_end/ui/components/adorners/adorner.css +1 -1
  84. package/front_end/ui/components/expandable_list/expandableList.css +1 -1
  85. package/front_end/ui/components/linear_memory_inspector/valueInterpreterDisplay.css +1 -2
  86. package/front_end/ui/components/linear_memory_inspector/valueInterpreterSettings.css +1 -1
  87. package/front_end/ui/components/report_view/reportKey.css +1 -1
  88. package/front_end/ui/components/report_view/reportValue.css +1 -1
  89. package/front_end/ui/components/settings/settingCheckbox.css +5 -0
  90. package/front_end/ui/legacy/ContextMenu.ts +10 -3
  91. package/front_end/ui/legacy/SoftContextMenu.ts +9 -2
  92. package/front_end/ui/legacy/checkboxTextLabel.css +5 -1
  93. package/front_end/ui/legacy/components/color_picker/spectrum.css +9 -9
  94. package/front_end/ui/legacy/components/data_grid/dataGrid.css +2 -2
  95. package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -3
  96. package/front_end/ui/legacy/components/inline_editor/cssLength.css +1 -1
  97. package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +1 -1
  98. package/front_end/ui/legacy/components/inline_editor/fontEditor.css +1 -1
  99. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -2
  100. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +13 -7
  101. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
  102. package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
  103. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +6 -14
  104. package/front_end/ui/legacy/emptyWidget.css +1 -1
  105. package/front_end/ui/legacy/filter.css +1 -1
  106. package/front_end/ui/legacy/infobar.css +2 -2
  107. package/front_end/ui/legacy/inspectorCommon.css +49 -45
  108. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +3 -3
  109. package/front_end/ui/legacy/inspectorViewTabbedPane.css +1 -1
  110. package/front_end/ui/legacy/searchableView.css +1 -1
  111. package/front_end/ui/legacy/softContextMenu.css +11 -1
  112. package/front_end/ui/legacy/textPrompt.css +1 -1
  113. package/front_end/ui/legacy/themeColors.css +1 -0
  114. package/front_end/ui/legacy/toolbar.css +8 -8
  115. package/front_end/ui/legacy/treeoutline.css +4 -4
  116. package/inspector_overlay/common.css +2 -2
  117. package/inspector_overlay/tool_highlight.css +1 -1
  118. package/inspector_overlay/tool_paused.css +2 -2
  119. package/package.json +1 -1
  120. package/scripts/eslint_rules/lib/es_modules_import.js +21 -20
  121. package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -3
  122. package/scripts/eslint_rules/lib/migrate_create_shadow_root_with_styles.js +2 -2
  123. package/scripts/eslint_rules/lib/migrate_register_required_css.js +1 -1
  124. package/scripts/eslint_rules/tests/es_modules_import_test.js +3 -2
  125. package/front_end/panels/browser_debugger/module.json +0 -3
@@ -35,6 +35,34 @@ function getLocalizedReleaseNoteURL(url: string): string {
35
35
  }
36
36
 
37
37
  export const releaseNoteText: ReleaseNote[] = [
38
+ {
39
+ version: 39,
40
+ header: 'Highlights from the Chrome 97 update',
41
+ highlights: [
42
+ {
43
+ title: 'New preview feature: Recorder panel',
44
+ subtitle: 'Record, replay and measure user flows with options to export to Puppeteer script and more.',
45
+ link: getLocalizedReleaseNoteURL('https://developer.chrome.com/blog/new-in-devtools-97/#recorder'),
46
+ },
47
+ {
48
+ title: 'Enhanced "Edit as HTML" with code completion',
49
+ subtitle: 'Edit as HTML in the Elements panel now supports code completion, syntax highlights and more.',
50
+ link: getLocalizedReleaseNoteURL('https://developer.chrome.com/blog/new-in-devtools-97/#code-completion'),
51
+ },
52
+ {
53
+ title: 'Refresh device list in Device Mode',
54
+ subtitle: 'New devices are added in the device list.',
55
+ link: getLocalizedReleaseNoteURL('https://developer.chrome.com/blog/new-in-devtools-97/#device'),
56
+ },
57
+ {
58
+ title: 'Improved code debugging experience',
59
+ subtitle:
60
+ 'Include column number in the Console stack trace, improved breakpoints display in the Sources panel and more.',
61
+ link: getLocalizedReleaseNoteURL('https://developer.chrome.com/blog/new-in-devtools-97/#debugging'),
62
+ },
63
+ ],
64
+ link: getLocalizedReleaseNoteURL('https://developer.chrome.com/blog/new-in-devtools-97'),
65
+ },
38
66
  {
39
67
  version: 38,
40
68
  header: 'Highlights from the Chrome 96 update',
@@ -110,12 +110,6 @@ export class IssueKindView extends UI.TreeOutline.TreeElement {
110
110
  header.appendChild(countAdorner);
111
111
  header.appendChild(title);
112
112
  header.appendChild(hideAvailableIssuesBtn);
113
- header.addEventListener('mouseenter', () => {
114
- hideAvailableIssuesBtn.setVisible(true);
115
- });
116
- header.addEventListener('mouseleave', () => {
117
- hideAvailableIssuesBtn.setVisible(false);
118
- });
119
113
 
120
114
  this.listItemElement.appendChild(header);
121
115
  }
@@ -222,7 +222,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
222
222
  private hasBeenExpandedBefore: boolean;
223
223
  private throttle: Common.Throttler.Throttler;
224
224
  private needsUpdateOnExpand = true;
225
- private hiddenIssuesMenu: Components.HideIssuesMenu.HideIssuesMenu;
225
+ private hiddenIssuesMenu?: Components.HideIssuesMenu.HideIssuesMenu;
226
226
  private contentCreated: boolean = false;
227
227
 
228
228
  constructor(issue: AggregatedIssue, description: IssuesManager.MarkdownIssueDescription.IssueDescription) {
@@ -256,8 +256,9 @@ export class IssueView extends UI.TreeOutline.TreeElement {
256
256
  new WasmCrossOriginModuleSharingAffectedResourcesView(this, this.issue),
257
257
  new AffectedRawCookieLinesView(this, this.issue),
258
258
  ];
259
-
260
- this.hiddenIssuesMenu = new Components.HideIssuesMenu.HideIssuesMenu();
259
+ if (Root.Runtime.experiments.isEnabled('hideIssuesFeature')) {
260
+ this.hiddenIssuesMenu = new Components.HideIssuesMenu.HideIssuesMenu();
261
+ }
261
262
  this.aggregatedIssuesCount = null;
262
263
  this.hasBeenExpandedBefore = false;
263
264
  }
@@ -318,10 +319,6 @@ export class IssueView extends UI.TreeOutline.TreeElement {
318
319
 
319
320
  private appendHeader(): void {
320
321
  const header = document.createElement('div');
321
- if (Root.Runtime.experiments.isEnabled('hideIssuesFeature')) {
322
- header.addEventListener('mouseenter', this.showHiddenIssuesMenu.bind(this));
323
- header.addEventListener('mouseleave', this.hideHiddenIssuesMenu.bind(this));
324
- }
325
322
  header.classList.add('header');
326
323
  this.issueKindIcon = new IconButton.Icon.Icon();
327
324
  this.issueKindIcon.classList.add('leading-issue-icon');
@@ -339,19 +336,12 @@ export class IssueView extends UI.TreeOutline.TreeElement {
339
336
  title.classList.add('title');
340
337
  title.textContent = this.description.title;
341
338
  header.appendChild(title);
342
- if (Root.Runtime.experiments.isEnabled('hideIssuesFeature')) {
339
+ if (this.hiddenIssuesMenu) {
343
340
  header.appendChild(this.hiddenIssuesMenu);
344
341
  }
345
342
  this.updateFromIssue();
346
343
  this.listItemElement.appendChild(header);
347
344
  }
348
- private showHiddenIssuesMenu(): void {
349
- this.hiddenIssuesMenu?.setVisible(true);
350
- }
351
-
352
- private hideHiddenIssuesMenu(): void {
353
- this.hiddenIssuesMenu?.setVisible(false);
354
- }
355
345
 
356
346
  onexpand(): void {
357
347
  Host.userMetrics.issuesPanelIssueExpanded(this.issue.getCategory());
@@ -378,18 +368,20 @@ export class IssueView extends UI.TreeOutline.TreeElement {
378
368
  this.aggregatedIssuesCount.textContent = `${this.issue.getAggregatedIssuesCount()}`;
379
369
  }
380
370
  this.listItemElement.classList.toggle('hidden-issue', this.issue.isHidden());
381
- const data: HiddenIssuesMenuData = {
382
- menuItemLabel: this.issue.isHidden() ? i18nString(UIStrings.unhideIssuesLikeThis) :
383
- i18nString(UIStrings.hideIssuesLikeThis),
384
- menuItemAction: () => {
385
- const setting = IssuesManager.IssuesManager.getHideIssueByCodeSetting();
386
- const values = setting.get();
387
- values[this.issue.code()] = this.issue.isHidden() ? IssuesManager.IssuesManager.IssueStatus.Unhidden :
388
- IssuesManager.IssuesManager.IssueStatus.Hidden;
389
- setting.set(values);
390
- },
391
- };
392
- this.hiddenIssuesMenu.data = data;
371
+ if (this.hiddenIssuesMenu) {
372
+ const data: HiddenIssuesMenuData = {
373
+ menuItemLabel: this.issue.isHidden() ? i18nString(UIStrings.unhideIssuesLikeThis) :
374
+ i18nString(UIStrings.hideIssuesLikeThis),
375
+ menuItemAction: () => {
376
+ const setting = IssuesManager.IssuesManager.getHideIssueByCodeSetting();
377
+ const values = setting.get();
378
+ values[this.issue.code()] = this.issue.isHidden() ? IssuesManager.IssuesManager.IssueStatus.Unhidden :
379
+ IssuesManager.IssuesManager.IssueStatus.Hidden;
380
+ setting.set(values);
381
+ },
382
+ };
383
+ this.hiddenIssuesMenu.data = data;
384
+ }
393
385
  }
394
386
 
395
387
  updateAffectedResourceVisibility(): void {
@@ -30,7 +30,6 @@ export interface HiddenIssuesMenuData {
30
30
  export class HideIssuesMenu extends HTMLElement {
31
31
  static readonly litTagName = LitHtml.literal`devtools-hide-issues-menu`;
32
32
  private readonly shadow: ShadowRoot = this.attachShadow({mode: 'open'});
33
- private visible: boolean = false;
34
33
  private menuItemLabel: Common.UIString.LocalizedString = Common.UIString.LocalizedEmptyString;
35
34
  private menuItemAction: () => void = () => {};
36
35
 
@@ -44,23 +43,20 @@ export class HideIssuesMenu extends HTMLElement {
44
43
  this.shadow.adoptedStyleSheets = [hideIssuesMenuStyles];
45
44
  }
46
45
 
47
- setVisible(x: boolean): void {
48
- if (this.visible === x) {
49
- return;
50
- }
51
- this.visible = x;
52
- this.render();
53
- }
54
-
55
46
  onMenuOpen(event: Event): void {
56
47
  event.stopPropagation();
57
- const contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});
48
+ const contextMenu = new UI.ContextMenu.ContextMenu(event, {
49
+ useSoftMenu: true,
50
+ onSoftMenuClosed: (): void => {
51
+ this.classList.toggle('has-context-menu-opened', false);
52
+ },
53
+ });
58
54
  contextMenu.headerSection().appendItem(this.menuItemLabel, () => this.menuItemAction());
59
55
  contextMenu.show();
56
+ this.classList.toggle('has-context-menu-opened', true);
60
57
  }
61
58
 
62
59
  private render(): void {
63
- this.classList.toggle('hidden', !this.visible);
64
60
  // Disabled until https://crbug.com/1079231 is fixed.
65
61
  // clang-format off
66
62
  LitHtml.render(LitHtml.html`
@@ -16,4 +16,12 @@
16
16
  border-radius: 0;
17
17
  cursor: pointer;
18
18
  border: none;
19
+
20
+ --icon-color: var(--color-text-primary);
21
+
22
+ opacity: 50%;
23
+ }
24
+
25
+ .hide-issues-menu-btn:hover {
26
+ opacity: 100%;
19
27
  }
@@ -51,7 +51,7 @@
51
51
 
52
52
  .issue-category.hidden-issues.parent.expanded,
53
53
  .issue-kind.parent.expanded {
54
- border-width: 0 0 1px 0;
54
+ border-width: 0 0 1px;
55
55
  background-color: var(--color-background-elevation-1);
56
56
  }
57
57
 
@@ -95,6 +95,18 @@ p {
95
95
  width: 100%;
96
96
  }
97
97
 
98
+ .header devtools-hide-issues-menu {
99
+ display: none;
100
+ }
101
+
102
+ .header:hover devtools-hide-issues-menu {
103
+ display: block;
104
+ }
105
+
106
+ .header devtools-hide-issues-menu.has-context-menu-opened {
107
+ display: block;
108
+ }
109
+
98
110
  .issue-category .header,
99
111
  .issue-kind .header {
100
112
  line-height: 24px;
@@ -131,7 +143,7 @@ p {
131
143
 
132
144
  /* Show a colored border on the left side of opened issues. */
133
145
  .body::before {
134
- content: '';
146
+ content: "";
135
147
  display: block;
136
148
  position: absolute;
137
149
  left: calc(var(--issue-indent) + 23px);
@@ -181,7 +193,7 @@ devtools-icon.leading-issue-icon {
181
193
  }
182
194
 
183
195
  .separator::before {
184
- content: '·';
196
+ content: "·";
185
197
  padding-left: 1ex;
186
198
  padding-right: 1ex;
187
199
  }
@@ -250,7 +262,7 @@ ul > li.plain-enum::before {
250
262
  }
251
263
 
252
264
  .affected-resources-label + .affected-resources {
253
- padding: 3px 0 0 0;
265
+ padding: 3px 0 0;
254
266
  position: relative;
255
267
  user-select: text;
256
268
  }
@@ -382,7 +394,7 @@ ul > li.plain-enum::before {
382
394
 
383
395
  .affected-resources > .parent {
384
396
  margin-top: 0;
385
- padding: 2px 5px 0 5px;
397
+ padding: 2px 5px 0;
386
398
  }
387
399
 
388
400
  .affected-resources > .parent.expanded {
@@ -52,7 +52,7 @@
52
52
  }
53
53
 
54
54
  .lighthouse-form-section-label {
55
- margin: 7px 0 7px;
55
+ margin: 7px 0;
56
56
  font-weight: 500;
57
57
  }
58
58
 
@@ -129,6 +129,6 @@ input[type="radio"]:focus {
129
129
  }
130
130
 
131
131
  .lighthouse-warning-text::before {
132
- content: '';
132
+ content: "";
133
133
  margin-right: 10px;
134
134
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  li.storage-group-list-item {
13
- padding: 10px 8px 6px 8px;
13
+ padding: 10px 8px 6px;
14
14
  }
15
15
 
16
16
  li.storage-group-list-item:not(:first-child) {
@@ -30,7 +30,7 @@
30
30
  }
31
31
 
32
32
  .conditions-list-item {
33
- padding: 3px 5px 3px 5px;
33
+ padding: 3px 5px;
34
34
  height: 30px;
35
35
  display: flex;
36
36
  align-items: center;
@@ -958,11 +958,24 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
958
958
  (initiatorLink as HTMLElement).focus();
959
959
  }
960
960
  }
961
+
961
962
  if (isEnterOrSpaceKey(event)) {
962
963
  this.dispatchEventToListeners(Events.RequestActivated, {showPanel: true, takeFocus: true});
963
964
  event.consume(true);
964
965
  }
965
966
  });
967
+ this.dataGrid.element.addEventListener('keyup', event => {
968
+ if ((event.key === 'r' || event.key === 'R') && this.dataGrid.selectedNode) {
969
+ const request = (this.dataGrid.selectedNode as NetworkNode).request();
970
+ if (!request) {
971
+ return;
972
+ }
973
+
974
+ if (SDK.NetworkManager.NetworkManager.canReplayRequest(request)) {
975
+ SDK.NetworkManager.NetworkManager.replayRequest(request);
976
+ }
977
+ }
978
+ });
966
979
  this.dataGrid.element.addEventListener('focus', this.onDataGridFocus.bind(this), true);
967
980
  this.dataGrid.element.addEventListener('blur', this.onDataGridBlur.bind(this), true);
968
981
  return this.dataGrid;
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import * as Platform from '../../core/platform/platform.js';
7
8
  import type * as SDK from '../../core/sdk/sdk.js';
8
9
  import * as Logs from '../../models/logs/logs.js';
9
10
  import type * as TextUtils from '../../models/text_utils/text_utils.js';
@@ -89,7 +90,8 @@ export class NetworkSearchScope implements Search.SearchConfig.SearchScope {
89
90
 
90
91
  function stringMatchesQuery(string: string): boolean {
91
92
  const flags = searchConfig.ignoreCase() ? 'i' : '';
92
- const regExps = searchConfig.queries().map(query => new RegExp(query, flags));
93
+ const regExps =
94
+ searchConfig.queries().map(query => new RegExp(Platform.StringUtilities.escapeForRegExp(query), flags));
93
95
  let pos = 0;
94
96
  for (const regExp of regExps) {
95
97
  const match = string.substr(pos).match(regExp);
@@ -66,7 +66,7 @@
66
66
  flex: none;
67
67
  display: flex;
68
68
  flex-direction: row;
69
- margin: 7px 5px 0 5px;
69
+ margin: 7px 5px 0;
70
70
  align-items: center;
71
71
  }
72
72
 
@@ -72,7 +72,7 @@
72
72
  width: calc(100% - 20px);
73
73
  }
74
74
 
75
- .network-config-ua input[type=text],
75
+ .network-config-ua input[type="text"],
76
76
  .network-config-ua .chrome-select {
77
77
  margin-top: 8px;
78
78
  }
@@ -62,7 +62,7 @@
62
62
  border-bottom: 0;
63
63
  }
64
64
 
65
- .network-summary-bar span[is=dt-icon-label] {
65
+ .network-summary-bar span[is="dt-icon-label"] {
66
66
  margin-right: 6px;
67
67
  }
68
68
 
@@ -243,7 +243,7 @@
243
243
  filter: brightness(0) invert(1);
244
244
  }
245
245
 
246
- .network-log-grid.data-grid:focus .data-grid-data-grid-node.selected [is=ui-icon].icon-mask {
246
+ .network-log-grid.data-grid:focus .data-grid-data-grid-node.selected [is="ui-icon"].icon-mask {
247
247
  --network-grid-selected-color: #dadce0;
248
248
  --override-icon-mask-background-color: var(--network-grid-selected-color);
249
249
  }
@@ -446,7 +446,7 @@
446
446
  background-color: canvas;
447
447
  }
448
448
 
449
- .network-waterfall-header:hover .sort-order-icon-container [is=ui-icon].icon-mask {
449
+ .network-waterfall-header:hover .sort-order-icon-container [is="ui-icon"].icon-mask {
450
450
  background-color: HighlightText;
451
451
  }
452
452
  }
@@ -16,10 +16,10 @@
16
16
  .profile-launcher-view-content h1 {
17
17
  font-size: 15px;
18
18
  font-weight: normal;
19
- margin: 6px 0 10px 0;
19
+ margin: 6px 0 10px;
20
20
  }
21
21
 
22
- .profile-launcher-view-content [is=dt-radio] {
22
+ .profile-launcher-view-content [is="dt-radio"] {
23
23
  font-size: 13px;
24
24
  }
25
25
 
@@ -29,7 +29,7 @@
29
29
  margin-left: 22px;
30
30
  }
31
31
 
32
- .profile-launcher-view-content p [is=dt-checkbox] {
32
+ .profile-launcher-view-content p [is="dt-checkbox"] {
33
33
  display: flex;
34
34
  }
35
35
 
@@ -35,7 +35,7 @@
35
35
  flex: none;
36
36
  width: 16px;
37
37
  height: 16px;
38
- margin: 0 0;
38
+ margin: 0;
39
39
  }
40
40
  /* Separate the middle icon from the other two. */
41
41
 
@@ -65,7 +65,7 @@
65
65
 
66
66
  .triangle-pointer-container {
67
67
  margin: 8px 24px 0;
68
- padding: 0 0;
68
+ padding: 0;
69
69
  }
70
70
 
71
71
  .triangle-pointer-wrapper {
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  .title-section {
8
- padding: 16px 0 24px 0;
8
+ padding: 16px 0 24px;
9
9
  border-bottom: 1px solid var(--color-background-elevation-2);
10
10
  }
11
11
 
@@ -185,7 +185,7 @@
185
185
  .orientation-left::after,
186
186
  .orientation-right::before,
187
187
  .orientation-right::after {
188
- content: '';
188
+ content: "";
189
189
  width: 8px;
190
190
  height: 6px;
191
191
  }
@@ -242,7 +242,7 @@
242
242
  .orientation-top::after,
243
243
  .orientation-bottom::before,
244
244
  .orientation-bottom::after {
245
- content: '';
245
+ content: "";
246
246
  width: 8px;
247
247
  height: 8px;
248
248
  }
@@ -127,7 +127,7 @@
127
127
  border: 1px solid;
128
128
  }
129
129
 
130
- .tree-title[aria-disabled='true'] {
130
+ .tree-title[aria-disabled="true"] {
131
131
  color: GrayText;
132
132
  }
133
133
  }
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .devices-list-item {
32
- padding: 3px 5px 3px 5px;
32
+ padding: 3px 5px;
33
33
  height: 30px;
34
34
  display: flex;
35
35
  align-items: center;
@@ -104,7 +104,7 @@ li .devices-edit-client-hints-heading {
104
104
 
105
105
  .devices-edit-fields input {
106
106
  flex: auto;
107
- margin: 8px 5px 0 5px;
107
+ margin: 8px 5px 0;
108
108
  }
109
109
 
110
110
  li.devices-edit-client-hints-field {
@@ -114,7 +114,7 @@ li.devices-edit-client-hints-field {
114
114
 
115
115
  .devices-edit-client-hints-field input {
116
116
  flex: auto;
117
- margin: 8px 5px 0 5px;
117
+ margin: 8px 5px 0;
118
118
  }
119
119
 
120
120
  .devices-edit-fields .device-edit-fixed {
@@ -122,5 +122,5 @@ li.devices-edit-client-hints-field {
122
122
  }
123
123
 
124
124
  .devices-edit-fields select {
125
- margin: 8px 5px 0 5px;
125
+ margin: 8px 5px 0;
126
126
  }
@@ -47,7 +47,7 @@
47
47
  }
48
48
 
49
49
  .ignore-list-item {
50
- padding: 3px 5px 3px 5px;
50
+ padding: 3px 5px;
51
51
  height: 30px;
52
52
  display: flex;
53
53
  align-items: center;
@@ -7,7 +7,7 @@
7
7
  .settings-window-main {
8
8
  color: var(--color-text-primary);
9
9
  background-color: var(--color-background);
10
- padding: 11px 0 0 0;
10
+ padding: 11px 0 0;
11
11
  }
12
12
 
13
13
  .settings-content {
@@ -101,7 +101,7 @@ fieldset {
101
101
  color: inherit;
102
102
  }
103
103
 
104
- .settings-content input[type=checkbox] {
104
+ .settings-content input[type="checkbox"] {
105
105
  margin: 1px 7px 1px 2px;
106
106
  }
107
107
 
@@ -25,7 +25,7 @@ const UIStrings = {
25
25
  *@description Text to show in the status bar if coverage data is available
26
26
  *@example {12.3} PH1
27
27
  */
28
- coverageS: 'Coverage: {PH1} %',
28
+ coverageS: 'Coverage: {PH1}',
29
29
  /**
30
30
  *@description Text to be shown in the status bar if no coverage data is available
31
31
  */
@@ -96,7 +96,12 @@ export class CoveragePlugin extends Plugin {
96
96
  private updateStats(): void {
97
97
  if (this.coverage) {
98
98
  this.infoInToolbar.setTitle(i18nString(UIStrings.showDetails));
99
- this.infoInToolbar.setText(i18nString(UIStrings.coverageS, {PH1: this.coverage.usedPercentage().toFixed(1)}));
99
+ const formatter = new Intl.NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, {
100
+ style: 'percent',
101
+ maximumFractionDigits: 1,
102
+ });
103
+ this.infoInToolbar.setText(
104
+ i18nString(UIStrings.coverageS, {PH1: formatter.format(this.coverage.usedPercentage())}));
100
105
  } else {
101
106
  this.infoInToolbar.setTitle(i18nString(UIStrings.clickToShowCoveragePanel));
102
107
  this.infoInToolbar.setText(i18nString(UIStrings.coverageNa));
@@ -10,8 +10,8 @@ import * as Bindings from '../../models/bindings/bindings.js';
10
10
  import * as TextUtils from '../../models/text_utils/text_utils.js';
11
11
  import * as Workspace from '../../models/workspace/workspace.js';
12
12
  import * as UI from '../../ui/legacy/legacy.js';
13
-
14
13
  import {LogpointPrefix} from './BreakpointEditDialog.js';
14
+
15
15
  import javaScriptBreakpointsSidebarPaneStyles from './javaScriptBreakpointsSidebarPane.css.js';
16
16
 
17
17
  const UIStrings = {
@@ -288,31 +288,38 @@ export class JavaScriptBreakpointsSidebarPane extends UI.ThrottledWidget.Throttl
288
288
  element.tabIndex = this.list.selectedItem() === item ? 0 : -1;
289
289
  element.addEventListener('contextmenu', this.breakpointContextMenu.bind(this), true);
290
290
  element.addEventListener('click', this.revealLocation.bind(this, element), false);
291
- const checkboxLabel = UI.UIUtils.CheckboxLabel.create('');
292
291
 
292
+ const hasLogpoint = item.locations.some(location => location.breakpoint.condition().includes(LogpointPrefix));
293
+ const hasConditional = item.locations.some(location => Boolean(location.breakpoint.condition()));
294
+ const lineElement = element.createChild('div', 'decoration-and-content');
295
+ if (hasLogpoint) {
296
+ lineElement.classList.add('logpoint');
297
+ } else if (hasConditional) {
298
+ lineElement.classList.add('breakpoint-conditional');
299
+ }
300
+
301
+ const checkboxLabel = UI.UIUtils.CheckboxLabel.create('');
293
302
  const uiLocation = item.locations[0].uiLocation;
294
303
  const hasEnabled = item.locations.some(location => location.breakpoint.enabled());
295
304
  const hasDisabled = item.locations.some(location => !location.breakpoint.enabled());
296
- const hasLogpoint = item.locations.some(location => location.breakpoint.condition().includes(LogpointPrefix));
297
- const hasConditional = item.locations.some(location => Boolean(location.breakpoint.condition()));
298
305
  checkboxLabel.textElement.textContent = uiLocation.linkText() +
299
306
  (item.showColumn && typeof uiLocation.columnNumber === 'number' ? ':' + (uiLocation.columnNumber + 1) : '');
300
307
  checkboxLabel.checkboxElement.checked = hasEnabled;
301
308
  checkboxLabel.checkboxElement.indeterminate = hasEnabled && hasDisabled;
302
309
  checkboxLabel.checkboxElement.tabIndex = -1;
303
310
  checkboxLabel.addEventListener('click', this.breakpointCheckboxClicked.bind(this), false);
304
- element.appendChild(checkboxLabel);
311
+ lineElement.appendChild(checkboxLabel);
305
312
  let checkedDescription: Common.UIString.LocalizedString =
306
313
  hasEnabled ? i18nString(UIStrings.checked) : i18nString(UIStrings.unchecked);
307
314
  if (hasEnabled && hasDisabled) {
308
315
  checkedDescription = i18nString(UIStrings.mixed);
309
316
  }
310
317
  if (item.isSelected) {
311
- UI.ARIAUtils.setDescription(element, i18nString(UIStrings.sBreakpointHit, {PH1: checkedDescription}));
318
+ UI.ARIAUtils.setDescription(lineElement, i18nString(UIStrings.sBreakpointHit, {PH1: checkedDescription}));
312
319
  element.classList.add('breakpoint-hit');
313
320
  this.setDefaultFocusedElement(element);
314
321
  } else {
315
- UI.ARIAUtils.setDescription(element, checkedDescription);
322
+ UI.ARIAUtils.setDescription(lineElement, checkedDescription);
316
323
  }
317
324
 
318
325
  element.addEventListener('keydown', event => {
@@ -322,16 +329,6 @@ export class JavaScriptBreakpointsSidebarPane extends UI.ThrottledWidget.Throttl
322
329
  }
323
330
  });
324
331
 
325
- const lineElement = element.createChild('div', 'decoration-and-source');
326
- const decorationElement = lineElement.createChild('span', 'breakpoint');
327
- if (hasDisabled) {
328
- decorationElement.classList.add('disabled');
329
- }
330
- if (hasLogpoint) {
331
- decorationElement.classList.add('logpoint');
332
- } else if (hasConditional) {
333
- decorationElement.classList.add('breakpoint-conditional');
334
- }
335
332
  const snippetElement = lineElement.createChild('div', 'source-text monospace');
336
333
  const lineNumber = uiLocation.lineNumber;
337
334
 
@@ -87,7 +87,7 @@
87
87
  .call-frame-location {
88
88
  color: var(--color-text-secondary);
89
89
  margin-left: auto;
90
- padding: 0 10px 0 10px;
90
+ padding: 0 10px;
91
91
  }
92
92
 
93
93
  .async-header::before {
@@ -16,7 +16,7 @@ label {
16
16
  white-space: nowrap;
17
17
  }
18
18
 
19
- input[type=text].add-source-map {
19
+ input[type="text"].add-source-map {
20
20
  box-shadow: 0 0 0 1px var(--box-shadow-outline-color);
21
21
  font-size: inherit;
22
22
  margin: 0 8px 0 5px;