chrome-devtools-frontend 1.0.934332 → 1.0.935974

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 (99) hide show
  1. package/config/gni/all_devtools_files.gni +0 -23
  2. package/config/gni/devtools_grd_files.gni +7 -15
  3. package/front_end/Tests.js +15 -2
  4. package/front_end/core/host/UserMetrics.ts +0 -1
  5. package/front_end/core/i18n/locales/en-US.json +18 -6
  6. package/front_end/core/i18n/locales/en-XL.json +18 -6
  7. package/front_end/core/root/Runtime.ts +0 -1
  8. package/front_end/core/sdk/ConsoleModel.ts +0 -20
  9. package/front_end/core/sdk/DOMModel.ts +3 -3
  10. package/front_end/core/sdk/sdk-meta.ts +3 -0
  11. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -5
  12. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +1 -1
  13. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -0
  14. package/front_end/entrypoints/main/MainImpl.ts +1 -11
  15. package/front_end/entrypoints/main/main-meta.ts +2 -1
  16. package/front_end/entrypoints/shell/shell.json +0 -10
  17. package/front_end/entrypoints/worker_app/worker_app.json +0 -3
  18. package/front_end/models/emulation/EmulatedDevices.ts +306 -84
  19. package/front_end/models/issues_manager/IssuesManager.ts +2 -2
  20. package/front_end/models/issues_manager/{DeprecationIssue.ts → NavigatorUserAgentIssue.ts} +4 -4
  21. package/front_end/models/issues_manager/issues_manager.ts +2 -2
  22. package/front_end/panels/application/BackForwardCacheView.ts +54 -6
  23. package/front_end/panels/application/module.json +0 -3
  24. package/front_end/panels/changes/changes-meta.ts +0 -3
  25. package/front_end/panels/console/ConsoleFilter.ts +1 -1
  26. package/front_end/panels/console/ConsoleViewMessage.ts +2 -19
  27. package/front_end/panels/console/module.json +0 -2
  28. package/front_end/panels/console_counters/console_counters-meta.ts +0 -3
  29. package/front_end/panels/coverage/module.json +0 -1
  30. package/front_end/panels/css_overview/module.json +1 -2
  31. package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -2
  32. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  33. package/front_end/panels/elements/StylesSidebarPane.ts +15 -0
  34. package/front_end/panels/elements/elements-meta.ts +5 -0
  35. package/front_end/panels/elements/module.json +0 -1
  36. package/front_end/panels/emulation/DeviceModeWrapper.ts +4 -0
  37. package/front_end/panels/event_listeners/module.json +1 -2
  38. package/front_end/panels/help/help-meta.ts +0 -3
  39. package/front_end/panels/input/input-meta.ts +0 -2
  40. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -5
  41. package/front_end/panels/media/module.json +0 -1
  42. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +1 -0
  43. package/front_end/panels/network/module.json +0 -4
  44. package/front_end/panels/network/network-meta.ts +2 -0
  45. package/front_end/panels/profiler/module.json +1 -3
  46. package/front_end/panels/profiler/profiler-meta.ts +1 -0
  47. package/front_end/panels/profiler/profilesPanel.css +1 -1
  48. package/front_end/panels/sensors/sensors-meta.ts +1 -0
  49. package/front_end/panels/settings/emulation/devicesSettingsTab.css +1 -1
  50. package/front_end/panels/settings/settings-meta.ts +0 -2
  51. package/front_end/panels/sources/CallStackSidebarPane.ts +21 -0
  52. package/front_end/panels/sources/NavigatorView.ts +8 -8
  53. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +15 -0
  54. package/front_end/panels/sources/module.json +0 -5
  55. package/front_end/panels/sources/sources-meta.ts +12 -0
  56. package/front_end/panels/sources/watchExpressionsSidebarPane.css +10 -3
  57. package/front_end/panels/timeline/module.json +0 -1
  58. package/front_end/panels/timeline/timeline-meta.ts +1 -0
  59. package/front_end/panels/web_audio/web_audio-meta.ts +0 -3
  60. package/front_end/panels/webauthn/webauthn-meta.ts +0 -2
  61. package/front_end/ui/components/buttons/button.css +1 -0
  62. package/front_end/ui/components/text_editor/config.ts +1 -1
  63. package/front_end/ui/components/text_editor/theme.ts +13 -0
  64. package/front_end/ui/legacy/GlassPane.ts +4 -0
  65. package/front_end/ui/legacy/InspectorView.ts +0 -4
  66. package/front_end/ui/legacy/TabbedPane.ts +4 -0
  67. package/front_end/ui/legacy/ViewManager.ts +10 -2
  68. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -1
  69. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +6 -1
  70. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -1
  71. package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
  72. package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +10 -3
  73. package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
  74. package/front_end/ui/legacy/components/inline_editor/cssLength.css +30 -9
  75. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +2 -1
  76. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +4 -3
  77. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -5
  78. package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +1 -0
  79. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +3 -1
  80. package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -3
  81. package/front_end/ui/legacy/components/source_frame/module.json +1 -2
  82. package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +1 -0
  83. package/front_end/ui/legacy/themeColors.css +4 -0
  84. package/package.json +1 -1
  85. package/front_end/panels/changes/module.json +0 -7
  86. package/front_end/panels/console_counters/module.json +0 -5
  87. package/front_end/panels/developer_resources/module.json +0 -6
  88. package/front_end/panels/help/module.json +0 -5
  89. package/front_end/panels/input/module.json +0 -5
  90. package/front_end/panels/search/module.json +0 -5
  91. package/front_end/panels/settings/module.json +0 -5
  92. package/front_end/panels/snippets/module.json +0 -6
  93. package/front_end/panels/web_audio/module.json +0 -5
  94. package/front_end/panels/webauthn/module.json +0 -6
  95. package/front_end/ui/legacy/components/color_picker/module.json +0 -8
  96. package/front_end/ui/legacy/components/cookie_table/module.json +0 -9
  97. package/front_end/ui/legacy/components/data_grid/module.json +0 -8
  98. package/front_end/ui/legacy/components/object_ui/module.json +0 -11
  99. package/front_end/ui/legacy/components/quick_open/module.json +0 -8
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy/components/source_frame",
4
- "ui/legacy/components/cookie_table",
5
4
  "ui/legacy/components/inline_editor",
6
- "ui/legacy/components/data_grid",
7
5
  "ui/legacy",
8
- "ui/legacy/components/object_ui",
9
6
  "ui/legacy/components/perf_ui",
10
7
  "panels/mobile_throttling",
11
8
  "panels/network",
@@ -4,7 +4,6 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
- import * as Root from '../../core/root/root.js';
8
7
  import * as WorkspaceDiff from '../../models/workspace_diff/workspace_diff.js';
9
8
  import * as UI from '../../ui/legacy/legacy.js';
10
9
 
@@ -28,8 +27,6 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
28
27
 
29
28
  async function loadChangesModule(): Promise<typeof Changes> {
30
29
  if (!loadedChangesModule) {
31
- // Side-effect import resources in module.json
32
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/changes');
33
30
  loadedChangesModule = await import('./changes.js');
34
31
  }
35
32
  return loadedChangesModule;
@@ -68,7 +68,7 @@ export class ConsoleFilter {
68
68
  }
69
69
 
70
70
  if (message.type === SDK.ConsoleModel.FrontendMessageType.Command ||
71
- message.type === SDK.ConsoleModel.FrontendMessageType.Result) {
71
+ message.type === SDK.ConsoleModel.FrontendMessageType.Result || message.isGroupMessage()) {
72
72
  return true;
73
73
  }
74
74
  if (message.level && !this.levelsMask[message.level as string]) {
@@ -1057,25 +1057,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
1057
1057
  }
1058
1058
 
1059
1059
  matchesFilterText(filter: string): boolean {
1060
- return ConsoleViewMessage.recursivelyTestParentConsoleMessage(this.message, filter) ||
1061
- ConsoleViewMessage.recursivelyTestChildrenConsoleMessage(this.message, filter);
1062
- }
1063
-
1064
- static recursivelyTestParentConsoleMessage(consoleMessage: SDK.ConsoleModel.ConsoleMessage, filterString: string):
1065
- boolean {
1066
- const doesFilterMatchText = consoleMessage.messageText.toLowerCase().includes(filterString.toLowerCase());
1067
- const doesParentMatchText = consoleMessage.groupParent &&
1068
- ConsoleViewMessage.recursivelyTestParentConsoleMessage(consoleMessage.groupParent, filterString);
1069
- return Boolean(doesFilterMatchText || doesParentMatchText);
1070
- }
1071
-
1072
- static recursivelyTestChildrenConsoleMessage(consoleMessage: SDK.ConsoleModel.ConsoleMessage, filterString: string):
1073
- boolean {
1074
- const doesFilterMatchChildren = consoleMessage.groupChildren?.some(childMessage => {
1075
- const filterMatch = childMessage.messageText.toLowerCase().includes(filterString.toLowerCase());
1076
- return filterMatch || ConsoleViewMessage.recursivelyTestChildrenConsoleMessage(childMessage, filterString);
1077
- });
1078
- return Boolean(doesFilterMatchChildren);
1060
+ const text = this.contentElement().deepTextContent();
1061
+ return text.toLowerCase().includes(filter.toLowerCase());
1079
1062
  }
1080
1063
 
1081
1064
  updateTimestamp(): void {
@@ -1,8 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "ui/legacy/components/data_grid",
5
- "ui/legacy/components/object_ui",
6
4
  "ui/legacy/components/text_editor"
7
5
  ]
8
6
  }
@@ -2,7 +2,6 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import * as Root from '../../core/root/root.js';
6
5
  import * as UI from '../../ui/legacy/legacy.js';
7
6
 
8
7
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -12,8 +11,6 @@ let loadedConsoleCountersModule: (typeof ConsoleCounters|undefined);
12
11
 
13
12
  async function loadConsoleCountersModule(): Promise<typeof ConsoleCounters> {
14
13
  if (!loadedConsoleCountersModule) {
15
- // Side-effect import reconsole_counters in module.json
16
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/console_counters');
17
14
  loadedConsoleCountersModule = await import('./console_counters.js');
18
15
  }
19
16
  return loadedConsoleCountersModule;
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy/components/data_grid",
4
3
  "ui/legacy/components/source_frame",
5
4
  "ui/legacy"
6
5
  ]
@@ -1,5 +1,4 @@
1
1
  {
2
- "dependencies": [
3
- "ui/legacy/components/data_grid"
2
+ "dependencies": [
4
3
  ]
5
4
  }
@@ -26,8 +26,6 @@ let loadedDeveloperResourcesModule: (typeof DeveloperResources|undefined);
26
26
 
27
27
  async function loadDeveloperResourcesModule(): Promise<typeof DeveloperResources> {
28
28
  if (!loadedDeveloperResourcesModule) {
29
- // Side-effect import resources in module.json
30
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/developer_resources');
31
29
  loadedDeveloperResourcesModule = await import('./developer_resources.js');
32
30
  }
33
31
  return loadedDeveloperResourcesModule;
@@ -1052,7 +1052,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1052
1052
  html(),
1053
1053
  TextEditor.Config.domWordWrap,
1054
1054
  CodeMirror.EditorView.theme({
1055
- '.cm-editor': {maxHeight: '300px'},
1055
+ '&.cm-editor': {maxHeight: '300px'},
1056
1056
  '.cm-scroller': {overflowY: 'auto'},
1057
1057
  }),
1058
1058
  CodeMirror.EditorView.domEventHandlers({
@@ -160,6 +160,18 @@ const UIStrings = {
160
160
  *@description Tooltip text that appears when hovering over the largeicon add button in the Styles Sidebar Pane of the Elements panel
161
161
  */
162
162
  newStyleRule: 'New Style Rule',
163
+ /**
164
+ *@description Text that is announced by the screen reader when the user focuses on an input field for entering the name of a CSS property in the Styles panel
165
+ */
166
+ cssPropertyName: '`CSS` property name',
167
+ /**
168
+ *@description Text that is announced by the screen reader when the user focuses on an input field for entering the value of a CSS property in the Styles panel
169
+ */
170
+ cssPropertyValue: '`CSS` property value',
171
+ /**
172
+ *@description Text that is announced by the screen reader when the user focuses on an input field for editing the name of a CSS selector in the Styles panel
173
+ */
174
+ cssSelector: '`CSS` selector',
163
175
  };
164
176
 
165
177
  const str_ = i18n.i18n.registerUIStrings('panels/elements/StylesSidebarPane.ts', UIStrings);
@@ -1235,6 +1247,7 @@ export class StylePropertiesSection {
1235
1247
 
1236
1248
  const selectorContainer = document.createElement('div');
1237
1249
  this.selectorElement = document.createElement('span');
1250
+ UI.ARIAUtils.setAccessibleName(this.selectorElement, i18nString(UIStrings.cssSelector));
1238
1251
  this.selectorElement.classList.add('selector');
1239
1252
  this.selectorElement.textContent = this.headerText();
1240
1253
  selectorContainer.appendChild(this.selectorElement);
@@ -2985,6 +2998,7 @@ export class StylesSidebarPropertyRenderer {
2985
2998
 
2986
2999
  renderName(): Element {
2987
3000
  const nameElement = document.createElement('span');
3001
+ UI.ARIAUtils.setAccessibleName(nameElement, i18nString(UIStrings.cssPropertyName));
2988
3002
  nameElement.className = 'webkit-css-property';
2989
3003
  nameElement.textContent = this.propertyName;
2990
3004
  nameElement.normalize();
@@ -2993,6 +3007,7 @@ export class StylesSidebarPropertyRenderer {
2993
3007
 
2994
3008
  renderValue(): Element {
2995
3009
  const valueElement = document.createElement('span');
3010
+ UI.ARIAUtils.setAccessibleName(valueElement, i18nString(UIStrings.cssPropertyValue));
2996
3011
  valueElement.className = 'value';
2997
3012
  if (!this.propertyValue) {
2998
3013
  return valueElement;
@@ -379,6 +379,7 @@ UI.ActionRegistration.registerActionExtension({
379
379
 
380
380
  Common.Settings.registerSettingExtension({
381
381
  category: Common.Settings.SettingCategory.ELEMENTS,
382
+ storageType: Common.Settings.SettingStorageType.Synced,
382
383
  order: 1,
383
384
  title: i18nLazyString(UIStrings.showUserAgentShadowDOM),
384
385
  settingName: 'showUAShadowDOM',
@@ -388,6 +389,7 @@ Common.Settings.registerSettingExtension({
388
389
 
389
390
  Common.Settings.registerSettingExtension({
390
391
  category: Common.Settings.SettingCategory.ELEMENTS,
392
+ storageType: Common.Settings.SettingStorageType.Synced,
391
393
  order: 2,
392
394
  title: i18nLazyString(UIStrings.wordWrap),
393
395
  settingName: 'domWordWrap',
@@ -407,6 +409,7 @@ Common.Settings.registerSettingExtension({
407
409
 
408
410
  Common.Settings.registerSettingExtension({
409
411
  category: Common.Settings.SettingCategory.ELEMENTS,
412
+ storageType: Common.Settings.SettingStorageType.Synced,
410
413
  order: 3,
411
414
  title: i18nLazyString(UIStrings.showHtmlComments),
412
415
  settingName: 'showHTMLComments',
@@ -426,6 +429,7 @@ Common.Settings.registerSettingExtension({
426
429
 
427
430
  Common.Settings.registerSettingExtension({
428
431
  category: Common.Settings.SettingCategory.ELEMENTS,
432
+ storageType: Common.Settings.SettingStorageType.Synced,
429
433
  order: 4,
430
434
  title: i18nLazyString(UIStrings.revealDomNodeOnHover),
431
435
  settingName: 'highlightNodeOnHoverInOverlay',
@@ -435,6 +439,7 @@ Common.Settings.registerSettingExtension({
435
439
 
436
440
  Common.Settings.registerSettingExtension({
437
441
  category: Common.Settings.SettingCategory.ELEMENTS,
442
+ storageType: Common.Settings.SettingStorageType.Synced,
438
443
  order: 5,
439
444
  title: i18nLazyString(UIStrings.showDetailedInspectTooltip),
440
445
  settingName: 'showDetailedInspectTooltip',
@@ -2,7 +2,6 @@
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
4
  "ui/legacy/components/inline_editor",
5
- "ui/legacy/components/color_picker",
6
5
  "panels/event_listeners",
7
6
  "ui/legacy/components/text_editor"
8
7
  ]
@@ -56,6 +56,10 @@ export class DeviceModeWrapper extends UI.Widget.VBox {
56
56
  this.showDeviceModeSetting.set(!this.showDeviceModeSetting.get());
57
57
  }
58
58
 
59
+ isDeviceModeOn(): boolean {
60
+ return this.showDeviceModeSetting.get();
61
+ }
62
+
59
63
  captureScreenshot(fullSize?: boolean, clip?: Protocol.Page.Viewport): boolean {
60
64
  if (!this.deviceModeView) {
61
65
  this.deviceModeView = new DeviceModeView();
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/object_ui"
3
+ "ui/legacy"
5
4
  ]
6
5
  }
@@ -4,7 +4,6 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
- import * as Root from '../../core/root/root.js';
8
7
  import * as UI from '../../ui/legacy/legacy.js';
9
8
 
10
9
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -51,8 +50,6 @@ let loadedHelpModule: (typeof Help|undefined);
51
50
 
52
51
  async function loadHelpModule(): Promise<typeof Help> {
53
52
  if (!loadedHelpModule) {
54
- // Side-effect import resources in module.json
55
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/help');
56
53
  loadedHelpModule = await import('./help.js');
57
54
  }
58
55
  return loadedHelpModule;
@@ -46,8 +46,6 @@ let loadedInputModule: (typeof Input|undefined);
46
46
 
47
47
  async function loadInputModule(): Promise<typeof Input> {
48
48
  if (!loadedInputModule) {
49
- // Side-effect import resources in module.json
50
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/input');
51
49
  loadedInputModule = await import('./input.js');
52
50
  }
53
51
  return loadedInputModule;
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import type * as ProtocolClient from '../../core/protocol_client/protocol_client.js';
7
7
  import * as SDK from '../../core/sdk/sdk.js';
8
- import * as Root from '../../core/root/root.js';
9
8
 
10
9
  import type * as ReportRenderer from './LighthouseReporterTypes.js';
11
10
 
@@ -35,10 +34,7 @@ export class ProtocolService {
35
34
  }
36
35
 
37
36
  getLocales(): readonly string[] {
38
- if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS)) {
39
- return [i18n.DevToolsLocale.DevToolsLocale.instance().locale];
40
- }
41
- return navigator.languages;
37
+ return [i18n.DevToolsLocale.DevToolsLocale.instance().locale];
42
38
  }
43
39
 
44
40
  startLighthouse(auditURL: string, categoryIDs: string[], flags: Object): Promise<ReportRenderer.RunnerResult> {
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "ui/legacy/components/data_grid",
5
4
  "ui/legacy/components/source_frame",
6
5
  "ui/legacy/components/perf_ui"
7
6
  ]
@@ -132,6 +132,7 @@ UI.ActionRegistration.registerActionExtension({
132
132
  });
133
133
 
134
134
  Common.Settings.registerSettingExtension({
135
+ storageType: Common.Settings.SettingStorageType.Synced,
135
136
  settingName: 'customNetworkConditions',
136
137
  settingType: Common.Settings.SettingType.ARRAY,
137
138
  defaultValue: [],
@@ -1,11 +1,7 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy/components/cookie_table",
4
- "ui/legacy/components/data_grid",
5
3
  "panels/mobile_throttling",
6
- "ui/legacy/components/object_ui",
7
4
  "ui/legacy/components/perf_ui",
8
- "panels/search",
9
5
  "ui/legacy/components/source_frame",
10
6
  "ui/legacy"
11
7
  ]
@@ -275,6 +275,7 @@ UI.ActionRegistration.registerActionExtension({
275
275
 
276
276
  Common.Settings.registerSettingExtension({
277
277
  category: Common.Settings.SettingCategory.NETWORK,
278
+ storageType: Common.Settings.SettingStorageType.Synced,
278
279
  title: i18nLazyString(UIStrings.colorcodeResourceTypes),
279
280
  settingName: 'networkColorCodeResourceTypes',
280
281
  settingType: Common.Settings.SettingType.BOOLEAN,
@@ -297,6 +298,7 @@ Common.Settings.registerSettingExtension({
297
298
 
298
299
  Common.Settings.registerSettingExtension({
299
300
  category: Common.Settings.SettingCategory.NETWORK,
301
+ storageType: Common.Settings.SettingStorageType.Synced,
300
302
  title: i18nLazyString(UIStrings.groupNetworkLogByFrame),
301
303
  settingName: 'network.group-by-frame',
302
304
  settingType: Common.Settings.SettingType.BOOLEAN,
@@ -1,8 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "ui/legacy/components/perf_ui",
5
- "ui/legacy/components/data_grid",
6
- "ui/legacy/components/object_ui"
4
+ "ui/legacy/components/perf_ui"
7
5
  ]
8
6
  }
@@ -162,6 +162,7 @@ UI.ActionRegistration.registerActionExtension({
162
162
 
163
163
  Common.Settings.registerSettingExtension({
164
164
  category: Common.Settings.SettingCategory.PERFORMANCE,
165
+ storageType: Common.Settings.SettingStorageType.Synced,
165
166
  title: i18nLazyString(UIStrings.showNativeFunctions),
166
167
  settingName: 'showNativeFunctionsInJSProfile',
167
168
  settingType: Common.Settings.SettingType.BOOLEAN,
@@ -55,7 +55,7 @@
55
55
 
56
56
  .profile-view .data-grid span.percent-column {
57
57
  color: var(--color-text-secondary);
58
- width: 50px;
58
+ width: 55px;
59
59
  display: inline-block;
60
60
  }
61
61
 
@@ -154,6 +154,7 @@ UI.ActionRegistration.registerActionExtension({
154
154
  });
155
155
 
156
156
  Common.Settings.registerSettingExtension({
157
+ storageType: Common.Settings.SettingStorageType.Synced,
157
158
  settingName: 'emulation.locations',
158
159
  settingType: Common.Settings.SettingType.ARRAY,
159
160
  // TODO(crbug.com/1136655): http://crrev.com/c/2666426 regressed localization of city titles.
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  .devices-settings-tab .devices-list {
27
- width: 350px;
27
+ width: min(350px, 100%);
28
28
  margin-top: 10px;
29
29
  }
30
30
 
@@ -61,8 +61,6 @@ let loadedSettingsModule: (typeof Settings|undefined);
61
61
 
62
62
  async function loadSettingsModule(): Promise<typeof Settings> {
63
63
  if (!loadedSettingsModule) {
64
- // Side-effect import resources in module.json
65
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/settings');
66
64
  loadedSettingsModule = await import('./settings.js');
67
65
  }
68
66
  return loadedSettingsModule;
@@ -82,6 +82,10 @@ const UIStrings = {
82
82
  *@description A context menu item in the Call Stack Sidebar Pane of the Sources panel
83
83
  */
84
84
  addAllContentScriptsToIgnoreList: 'Add all content scripts to ignore list',
85
+ /**
86
+ *@description Text in Call Stack Sidebar Pane of the Sources panel when some call frames have warnings
87
+ */
88
+ callFrameWarnings: 'Some call frames have warnings',
85
89
  };
86
90
  const str_ = i18n.i18n.registerUIStrings('panels/sources/CallStackSidebarPane.ts', UIStrings);
87
91
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -92,6 +96,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
92
96
  UI.ListControl.ListDelegate<Item> {
93
97
  private readonly ignoreListMessageElement: Element;
94
98
  private readonly notPausedMessageElement: HTMLElement;
99
+ private readonly callFrameWarningsElement: HTMLElement;
95
100
  private readonly items: UI.ListModel.ListModel<Item>;
96
101
  private list: UI.ListControl.ListControl<Item>;
97
102
  private readonly showMoreMessageElement: Element;
@@ -113,6 +118,12 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
113
118
  this.notPausedMessageElement.textContent = i18nString(UIStrings.notPaused);
114
119
  this.notPausedMessageElement.tabIndex = -1;
115
120
 
121
+ this.callFrameWarningsElement = this.contentElement.createChild('div', 'ignore-listed-message');
122
+ const icon = UI.Icon.Icon.create('smallicon-warning', 'call-frame-warning-icon');
123
+ this.callFrameWarningsElement.appendChild(icon);
124
+ this.callFrameWarningsElement.appendChild(document.createTextNode(i18nString(UIStrings.callFrameWarnings)));
125
+ this.callFrameWarningsElement.tabIndex = -1;
126
+
116
127
  this.items = new UI.ListModel.ListModel();
117
128
  this.list = new UI.ListControl.ListControl(this.items, this, UI.ListControl.ListMode.NonViewport);
118
129
  this.contentElement.appendChild(this.list.element);
@@ -164,6 +175,8 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
164
175
  private async doUpdate(): Promise<void> {
165
176
  this.locationPool.disposeAll();
166
177
 
178
+ this.callFrameWarningsElement.classList.add('hidden');
179
+
167
180
  const details = UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails);
168
181
  if (!details) {
169
182
  this.notPausedMessageElement.classList.remove('hidden');
@@ -178,6 +191,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
178
191
  this.notPausedMessageElement.classList.add('hidden');
179
192
 
180
193
  const itemPromises = [];
194
+ const uniqueWarnings: Set<string> = new Set();
181
195
  for (const frame of details.callFrames) {
182
196
  const itemPromise =
183
197
  Item.createForDebuggerCallFrame(frame, this.locationPool, this.refreshItem.bind(this)).then(item => {
@@ -185,8 +199,15 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
185
199
  return item;
186
200
  });
187
201
  itemPromises.push(itemPromise);
202
+ for (const warning of frame.warnings) {
203
+ uniqueWarnings.add(warning);
204
+ }
188
205
  }
189
206
  const items = await Promise.all(itemPromises);
207
+ if (uniqueWarnings.size) {
208
+ this.callFrameWarningsElement.classList.remove('hidden');
209
+ UI.Tooltip.Tooltip.install(this.callFrameWarningsElement, Array.from(uniqueWarnings).join('\n'));
210
+ }
190
211
 
191
212
  let asyncStackTrace: Protocol.Runtime.StackTrace|null|undefined = details.asyncStackTrace;
192
213
  if (!asyncStackTrace && details.asyncStackTraceId) {
@@ -782,8 +782,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
782
782
  this.rename(node, false);
783
783
  }
784
784
 
785
- private handleContextMenuExclude(project: Workspace.Workspace.Project, path: string): void {
786
- const shouldExclude = window.confirm(i18nString(UIStrings.areYouSureYouWantToExcludeThis));
785
+ private async handleContextMenuExclude(project: Workspace.Workspace.Project, path: string): Promise<void> {
786
+ const shouldExclude = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToExcludeThis));
787
787
  if (shouldExclude) {
788
788
  UI.UIUtils.startBatchUpdate();
789
789
  project.excludeFolder(
@@ -792,8 +792,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
792
792
  }
793
793
  }
794
794
 
795
- private handleContextMenuDelete(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
796
- const shouldDelete = window.confirm(i18nString(UIStrings.areYouSureYouWantToDeleteThis));
795
+ private async handleContextMenuDelete(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<void> {
796
+ const shouldDelete = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToDeleteThis));
797
797
  if (shouldDelete) {
798
798
  uiSourceCode.project().deleteFile(uiSourceCode);
799
799
  }
@@ -816,8 +816,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
816
816
  contextMenu.show();
817
817
  }
818
818
 
819
- private handleDeleteOverrides(node: NavigatorTreeNode): void {
820
- const shouldRemove = window.confirm(i18nString(UIStrings.areYouSureYouWantToDeleteAll));
819
+ private async handleDeleteOverrides(node: NavigatorTreeNode): Promise<void> {
820
+ const shouldRemove = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToDeleteAll));
821
821
  if (shouldRemove) {
822
822
  this.handleDeleteOverridesHelper(node);
823
823
  }
@@ -871,8 +871,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
871
871
  if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {
872
872
  contextMenu.defaultSection().appendAction('sources.add-folder-to-workspace', undefined, true);
873
873
  if (node instanceof NavigatorGroupTreeNode) {
874
- contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeFolderFromWorkspace), () => {
875
- const shouldRemove = window.confirm(i18nString(UIStrings.areYouSureYouWantToRemoveThis));
874
+ contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeFolderFromWorkspace), async () => {
875
+ const shouldRemove = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToRemoveThis));
876
876
  if (shouldRemove) {
877
877
  project.remove();
878
878
  }
@@ -303,6 +303,7 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
303
303
  private textPrompt?: ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt;
304
304
  private result?: SDK.RemoteObject.RemoteObject|null;
305
305
  private preventClickTimeout?: number;
306
+ private resizeObserver?: ResizeObserver;
306
307
  constructor(
307
308
  expression: string|null,
308
309
  expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController,
@@ -412,6 +413,7 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
412
413
  if (this.expressionInternal) {
413
414
  this.expandController.stopWatchSectionsWithId(this.expressionInternal);
414
415
  }
416
+ this.resizeObserver?.disconnect();
415
417
  this.expressionInternal = newExpression;
416
418
  this.update();
417
419
  this.dispatchEventToListeners(Events.ExpressionUpdated, this);
@@ -442,6 +444,19 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
442
444
  expressionValue?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): Element {
443
445
  const headerElement = this.element.createChild('div', 'watch-expression-header');
444
446
  const deleteButton = UI.Icon.Icon.create('smallicon-cross', 'watch-expression-delete-button');
447
+ this.resizeObserver = new ResizeObserver(entries => {
448
+ entries.forEach(entry => {
449
+ // 55 serves as a width threshold here (in px)
450
+ if (entry.contentRect.width < 55) {
451
+ deleteButton.classList.remove('right-aligned');
452
+ deleteButton.classList.add('left-aligned');
453
+ } else {
454
+ deleteButton.classList.remove('left-aligned');
455
+ deleteButton.classList.add('right-aligned');
456
+ }
457
+ });
458
+ });
459
+ this.resizeObserver.observe(headerElement);
445
460
  UI.Tooltip.Tooltip.install(deleteButton, i18nString(UIStrings.deleteWatchExpression));
446
461
  deleteButton.addEventListener('click', this.deleteWatchExpression.bind(this), false);
447
462
 
@@ -1,14 +1,9 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "panels/search",
5
4
  "ui/legacy/components/source_frame",
6
- "panels/snippets",
7
- "ui/legacy/components/quick_open",
8
5
  "ui/legacy/components/inline_editor",
9
- "ui/legacy/components/color_picker",
10
6
  "panels/event_listeners",
11
- "ui/legacy/components/object_ui",
12
7
  "panels/coverage"
13
8
  ]
14
9
  }