chrome-devtools-frontend 1.0.938678 → 1.0.939066

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 (108) hide show
  1. package/.stylelintrc.json +15 -11
  2. package/front_end/Tests.js +30 -29
  3. package/front_end/core/host/InspectorFrontendHost.ts +16 -30
  4. package/front_end/core/i18n/locales/en-US.json +4 -1
  5. package/front_end/core/i18n/locales/en-XL.json +4 -1
  6. package/front_end/core/sdk/EmulationModel.ts +11 -0
  7. package/front_end/core/sdk/sdk-meta.ts +30 -1
  8. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +9 -2
  9. package/front_end/entrypoints/inspector_main/renderingOptions.css +2 -2
  10. package/front_end/entrypoints/main/main-meta.ts +0 -2
  11. package/front_end/entrypoints/node_main/nodeConnectionsPanel.css +2 -2
  12. package/front_end/models/persistence/editFileSystemView.css +1 -1
  13. package/front_end/models/persistence/workspaceSettingsTab.css +1 -1
  14. package/front_end/panels/accessibility/accessibilityNode.css +2 -2
  15. package/front_end/panels/accessibility/axBreadcrumbs.css +1 -1
  16. package/front_end/panels/animation/animationTimeline.css +5 -5
  17. package/front_end/panels/application/components/frameDetailsReportView.css +1 -1
  18. package/front_end/panels/application/resourcesPanel.css +1 -1
  19. package/front_end/panels/application/resourcesSidebar.css +1 -1
  20. package/front_end/panels/browser_debugger/xhrBreakpointsSidebarPane.css +2 -5
  21. package/front_end/panels/changes/changesSidebar.css +1 -1
  22. package/front_end/panels/changes/changesView.css +2 -2
  23. package/front_end/panels/console/consolePrompt.css +1 -1
  24. package/front_end/panels/console/consoleSidebar.css +4 -4
  25. package/front_end/panels/console/consoleView.css +2 -2
  26. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -1
  27. package/front_end/panels/css_overview/cssOverviewCompletedView.css +8 -8
  28. package/front_end/panels/elements/classesPaneWidget.css +1 -1
  29. package/front_end/panels/elements/components/adornerSettingsPane.css +1 -1
  30. package/front_end/panels/elements/computedStyleWidgetTree.css +1 -1
  31. package/front_end/panels/elements/elementsPanel.css +1 -1
  32. package/front_end/panels/elements/elementsTreeOutline.css +1 -1
  33. package/front_end/panels/elements/layoutPane.css +1 -1
  34. package/front_end/panels/elements/platformFontsWidget.css +1 -1
  35. package/front_end/panels/elements/stylesSectionTree.css +1 -1
  36. package/front_end/panels/event_listeners/EventListenersView.ts +5 -4
  37. package/front_end/panels/event_listeners/eventListenersView.css +3 -2
  38. package/front_end/panels/issues/IssueKindView.ts +0 -6
  39. package/front_end/panels/issues/IssueView.ts +19 -27
  40. package/front_end/panels/issues/components/HideIssuesMenu.ts +7 -11
  41. package/front_end/panels/issues/components/hideIssuesMenu.css +8 -0
  42. package/front_end/panels/issues/issuesTree.css +17 -5
  43. package/front_end/panels/lighthouse/lighthouseStartView.css +2 -2
  44. package/front_end/panels/media/playerListView.css +1 -1
  45. package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +1 -1
  46. package/front_end/panels/network/NetworkSearchScope.ts +3 -1
  47. package/front_end/panels/network/blockedURLsPane.css +1 -1
  48. package/front_end/panels/network/networkConfigView.css +1 -1
  49. package/front_end/panels/network/networkLogView.css +3 -3
  50. package/front_end/panels/profiler/profileLauncherView.css +3 -3
  51. package/front_end/panels/security/mainView.css +2 -2
  52. package/front_end/panels/security/originView.css +1 -1
  53. package/front_end/panels/sensors/sensors.css +2 -2
  54. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -1
  55. package/front_end/panels/settings/emulation/devicesSettingsTab.css +4 -4
  56. package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +1 -1
  57. package/front_end/panels/settings/settingsScreen.css +2 -2
  58. package/front_end/panels/sources/CoveragePlugin.ts +7 -2
  59. package/front_end/panels/sources/callStackSidebarPane.css +1 -1
  60. package/front_end/panels/sources/dialog.css +1 -1
  61. package/front_end/panels/sources/javaScriptBreakpointsSidebarPane.css +1 -1
  62. package/front_end/panels/sources/navigatorTree.css +4 -4
  63. package/front_end/panels/sources/sourcesPanel.css +2 -2
  64. package/front_end/panels/sources/threadsSidebarPane.css +1 -1
  65. package/front_end/panels/timeline/components/WebVitalsTooltip.css +1 -1
  66. package/front_end/panels/timeline/historyToolbarButton.css +1 -1
  67. package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
  68. package/front_end/panels/webauthn/webauthnPane.css +2 -2
  69. package/front_end/ui/components/adorners/adorner.css +1 -1
  70. package/front_end/ui/components/expandable_list/expandableList.css +1 -1
  71. package/front_end/ui/components/linear_memory_inspector/valueInterpreterDisplay.css +1 -2
  72. package/front_end/ui/components/linear_memory_inspector/valueInterpreterSettings.css +1 -1
  73. package/front_end/ui/components/report_view/reportKey.css +1 -1
  74. package/front_end/ui/components/report_view/reportValue.css +1 -1
  75. package/front_end/ui/legacy/ContextMenu.ts +5 -1
  76. package/front_end/ui/legacy/SoftContextMenu.ts +5 -1
  77. package/front_end/ui/legacy/checkboxTextLabel.css +1 -1
  78. package/front_end/ui/legacy/components/color_picker/spectrum.css +9 -9
  79. package/front_end/ui/legacy/components/data_grid/dataGrid.css +2 -2
  80. package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -3
  81. package/front_end/ui/legacy/components/inline_editor/cssLength.css +1 -1
  82. package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +1 -1
  83. package/front_end/ui/legacy/components/inline_editor/fontEditor.css +1 -1
  84. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -2
  85. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +13 -7
  86. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
  87. package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
  88. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +6 -14
  89. package/front_end/ui/legacy/emptyWidget.css +1 -1
  90. package/front_end/ui/legacy/filter.css +1 -1
  91. package/front_end/ui/legacy/infobar.css +2 -2
  92. package/front_end/ui/legacy/inspectorCommon.css +45 -45
  93. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +3 -3
  94. package/front_end/ui/legacy/inspectorViewTabbedPane.css +1 -1
  95. package/front_end/ui/legacy/searchableView.css +1 -1
  96. package/front_end/ui/legacy/softContextMenu.css +1 -1
  97. package/front_end/ui/legacy/textPrompt.css +1 -1
  98. package/front_end/ui/legacy/toolbar.css +8 -8
  99. package/front_end/ui/legacy/treeoutline.css +4 -4
  100. package/inspector_overlay/common.css +2 -2
  101. package/inspector_overlay/tool_highlight.css +1 -1
  102. package/inspector_overlay/tool_paused.css +2 -2
  103. package/package.json +1 -1
  104. package/scripts/eslint_rules/lib/es_modules_import.js +21 -20
  105. package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -3
  106. package/scripts/eslint_rules/lib/migrate_create_shadow_root_with_styles.js +2 -2
  107. package/scripts/eslint_rules/lib/migrate_register_required_css.js +1 -1
  108. package/scripts/eslint_rules/tests/es_modules_import_test.js +3 -2
@@ -28,7 +28,7 @@
28
28
 
29
29
  .overview-completed-view .colors ul li {
30
30
  display: inline-block;
31
- margin: 0 0 16px 0;
31
+ margin: 0 0 16px;
32
32
  padding: 0 8px 0 0;
33
33
  }
34
34
 
@@ -111,7 +111,7 @@
111
111
  font-size: 15px;
112
112
  font-weight: normal;
113
113
  padding: 0;
114
- margin: 0 0 20px 0;
114
+ margin: 0 0 20px;
115
115
  padding-left: calc(var(--overview-default-padding) + var(--overview-icon-padding));
116
116
  position: relative;
117
117
  height: 26px;
@@ -119,7 +119,7 @@
119
119
  }
120
120
 
121
121
  .results-section h1::before {
122
- content: '';
122
+ content: "";
123
123
  display: block;
124
124
  position: absolute;
125
125
  left: var(--overview-default-padding);
@@ -264,14 +264,14 @@
264
264
  .overview-completed-view .font-info h2 {
265
265
  font-size: 14px;
266
266
  font-weight: bold;
267
- margin: 0 0 1em 0;
267
+ margin: 0 0 1em;
268
268
  }
269
269
 
270
270
  .overview-completed-view .font-info h3 {
271
271
  font-size: 13px;
272
272
  font-weight: normal;
273
273
  font-style: italic;
274
- margin: 0 0 0.5em 0;
274
+ margin: 0 0 0.5em;
275
275
  }
276
276
 
277
277
  .overview-completed-view .font-info {
@@ -300,7 +300,7 @@
300
300
  width: 30px;
301
301
  }
302
302
 
303
- .contrast-warning [is=ui-icon] {
303
+ .contrast-warning [is="ui-icon"] {
304
304
  margin-left: 5px;
305
305
  }
306
306
 
@@ -318,11 +318,11 @@
318
318
  min-width: initial;
319
319
  }
320
320
 
321
- [is=ui-icon].smallicon-checkmark-square {
321
+ [is="ui-icon"].smallicon-checkmark-square {
322
322
  background-color: var(--color-green);
323
323
  }
324
324
 
325
- [is=ui-icon].smallicon-no {
325
+ [is="ui-icon"].smallicon-no {
326
326
  background-color: var(--color-red);
327
327
  }
328
328
 
@@ -16,7 +16,7 @@
16
16
  justify-content: flex-start;
17
17
  }
18
18
 
19
- .styles-element-classes-pane [is=dt-checkbox] {
19
+ .styles-element-classes-pane [is="dt-checkbox"] {
20
20
  margin-right: 15px;
21
21
  }
22
22
 
@@ -44,7 +44,7 @@
44
44
 
45
45
  .close::before,
46
46
  .close::after {
47
- content: '';
47
+ content: "";
48
48
  display: inline-block;
49
49
  position: absolute;
50
50
  left: 0;
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  .group-title > h1 {
35
- margin: 1px 0 0 0;
35
+ margin: 1px 0 0;
36
36
  padding: 1em 0;
37
37
  width: 100%;
38
38
  cursor: pointer;
@@ -30,7 +30,7 @@
30
30
  #elements-content {
31
31
  flex: 1 1;
32
32
  overflow: auto;
33
- padding: 2px 0 0 0;
33
+ padding: 2px 0 0;
34
34
  }
35
35
 
36
36
  .style-panes-wrapper {
@@ -67,7 +67,7 @@
67
67
  user-select: none;
68
68
  -webkit-mask-image: var(--image-file-treeoutlineTriangles);
69
69
  -webkit-mask-size: 32px 24px;
70
- content: '\A0\A0';
70
+ content: "\A0\A0";
71
71
  color: transparent;
72
72
  text-shadow: none;
73
73
  margin-right: -3px;
@@ -160,7 +160,7 @@
160
160
  }
161
161
  /* We set dimensions for the invisible input to support quick highlight a11y feature
162
162
  that uses the dimensions to draw an outline around the element. */
163
- .color-picker-label input[type=color] {
163
+ .color-picker-label input[type="color"] {
164
164
  width: 100%;
165
165
  height: 100%;
166
166
  position: absolute;
@@ -44,5 +44,5 @@
44
44
  }
45
45
 
46
46
  .font-stats-item .font-delimeter {
47
- margin: 0 1ex 0 1ex;
47
+ margin: 0 1ex;
48
48
  }
@@ -137,7 +137,7 @@ ol.expanded {
137
137
 
138
138
  .tree-outline li.editing-sub-part {
139
139
  padding: 3px 6px 8px 18px;
140
- margin: -1px -6px -8px -6px;
140
+ margin: -1px -6px -8px;
141
141
  text-overflow: clip;
142
142
  }
143
143
 
@@ -301,10 +301,6 @@ export class ObjectEventListenerBar extends UI.TreeOutline.TreeElement {
301
301
 
302
302
  private setTitle(object: SDK.RemoteObject.RemoteObject, linkifier: Components.Linkifier.Linkifier): void {
303
303
  const title = this.listItemElement.createChild('span', 'event-listener-details');
304
- const subtitle = this.listItemElement.createChild('span', 'event-listener-tree-subtitle');
305
- const linkElement =
306
- linkifier.linkifyRawLocation(this.eventListenerInternal.location(), this.eventListenerInternal.sourceURL());
307
- subtitle.appendChild(linkElement);
308
304
 
309
305
  const propertyValue = ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createPropertyValue(
310
306
  object, /* wasThrown */ false, /* showPreview */ false);
@@ -333,6 +329,11 @@ export class ObjectEventListenerBar extends UI.TreeOutline.TreeElement {
333
329
  title.appendChild(passiveButton);
334
330
  }
335
331
 
332
+ const subtitle = title.createChild('span', 'event-listener-tree-subtitle');
333
+ const linkElement =
334
+ linkifier.linkifyRawLocation(this.eventListenerInternal.location(), this.eventListenerInternal.sourceURL());
335
+ subtitle.appendChild(linkElement);
336
+
336
337
  this.listItemElement.addEventListener('contextmenu', event => {
337
338
  const menu = new UI.ContextMenu.ContextMenu(event);
338
339
  if (event.target !== linkElement) {
@@ -33,7 +33,8 @@
33
33
  color: var(--color-syntax-2);
34
34
  }
35
35
 
36
- .tree-outline-disclosure .object-value-node {
36
+ .tree-outline-disclosure .object-value-node,
37
+ .tree-outline-disclosure .object-value-object {
37
38
  overflow: hidden;
38
39
  text-overflow: ellipsis;
39
40
  }
@@ -53,7 +54,7 @@
53
54
  background-color: var(--color-background-elevation-1);
54
55
  border-radius: 3px;
55
56
  border: 1px solid var(--color-details-hairline);
56
- margin-left: 10px;
57
+ margin-left: 5px;
57
58
  display: block;
58
59
  cursor: pointer;
59
60
  opacity: 80%;
@@ -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;
@@ -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));