chrome-devtools-frontend 1.0.1656897 → 1.0.1657110

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 (54) hide show
  1. package/AUTHORS +2 -0
  2. package/docs/get_the_code.md +6 -6
  3. package/front_end/Tests.js +1 -1
  4. package/front_end/core/common/Settings.ts +0 -8
  5. package/front_end/core/host/Platform.ts +4 -0
  6. package/front_end/core/sdk/CSSMetadata.ts +11 -0
  7. package/front_end/core/sdk/CSSModel.ts +3 -0
  8. package/front_end/core/sdk/DOMModel.ts +37 -8
  9. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  10. package/front_end/core/sdk/EmulationModel.ts +6 -4
  11. package/front_end/core/sdk/NetworkManager.ts +21 -14
  12. package/front_end/core/sdk/RuntimeModel.ts +1 -1
  13. package/front_end/core/sdk/TargetManager.ts +10 -0
  14. package/front_end/design_system_tokens.css +6 -0
  15. package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -11
  16. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -1
  17. package/front_end/entrypoints/main/GlobalAiButton.ts +29 -35
  18. package/front_end/entrypoints/main/MainImpl.ts +1 -1
  19. package/front_end/entrypoints/main/main-meta.ts +1 -1
  20. package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +2 -3
  21. package/front_end/foundation/Universe.ts +33 -1
  22. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +2 -1
  23. package/front_end/models/emulation/DeviceModeModel.ts +43 -24
  24. package/front_end/models/live-metrics/LiveMetrics.ts +47 -23
  25. package/front_end/models/project_settings/ProjectSettingsModel.ts +2 -37
  26. package/front_end/models/workspace/FileManager.ts +9 -6
  27. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +2 -1
  28. package/front_end/panels/application/ServiceWorkersView.ts +9 -20
  29. package/front_end/panels/application/components/StorageMetadataView.ts +7 -2
  30. package/front_end/panels/common/BadgeNotification.ts +1 -1
  31. package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -1
  32. package/front_end/panels/elements/ElementsTreeElement.ts +208 -143
  33. package/front_end/panels/elements/ElementsTreeOutline.ts +3 -2
  34. package/front_end/panels/elements/components/AdornerManager.ts +1 -0
  35. package/front_end/panels/emulation/DeviceModeToolbar.ts +19 -19
  36. package/front_end/panels/explain/components/ConsoleInsight.ts +2 -1
  37. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +13 -12
  38. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +8 -7
  39. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +6 -7
  40. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +3 -2
  41. package/front_end/panels/settings/components/SyncSection.ts +2 -1
  42. package/front_end/panels/timeline/AppenderUtils.ts +12 -4
  43. package/front_end/panels/timeline/ThreadAppender.ts +3 -3
  44. package/front_end/panels/timeline/TimelinePanel.ts +5 -5
  45. package/front_end/panels/timeline/timelineFlameChartView.css +2 -1
  46. package/front_end/third_party/chromium/README.chromium +1 -1
  47. package/front_end/third_party/chromium/ahem/ahem.js +792 -0
  48. package/front_end/tsconfig.json +7 -1
  49. package/front_end/ui/legacy/ActionRegistration.ts +1 -1
  50. package/front_end/ui/legacy/InspectorView.ts +1 -1
  51. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +109 -23
  52. package/front_end/ui/legacy/theme_support/ThemeSupport.ts +2 -2
  53. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  54. package/package.json +1 -1
@@ -230,10 +230,9 @@ export class CPUThrottlingCard {
230
230
  private state: 'cta'|'prompting'|'calibrating' = 'cta';
231
231
  private warnings: string[] = [];
232
232
 
233
- constructor() {
234
- this.setting =
235
- Common.Settings.Settings.instance().createSetting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>(
236
- 'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
233
+ constructor(settings: Common.Settings.Settings) {
234
+ this.setting = settings.createSetting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>(
235
+ 'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
237
236
 
238
237
  this.element = document.createElement('devtools-card');
239
238
  this.element.heading = i18nString(UIStrings.cpuThrottlingPresets);
@@ -475,7 +474,7 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox implements
475
474
  */
476
475
  #customUserConditionsCount: number;
477
476
 
478
- constructor() {
477
+ constructor(settings: Common.Settings.Settings) {
479
478
  super({
480
479
  jslog: `${VisualLogging.pane('throttling-conditions')}`,
481
480
  useShadowDom: true,
@@ -486,7 +485,7 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox implements
486
485
  this.contentElement.createChild('div', 'settings-card-container-wrapper').createChild('div');
487
486
  settingsContent.classList.add('settings-card-container', 'throttling-conditions-settings');
488
487
 
489
- this.cpuThrottlingCard = new CPUThrottlingCard();
488
+ this.cpuThrottlingCard = new CPUThrottlingCard(settings);
490
489
  settingsContent.append(this.cpuThrottlingCard.element);
491
490
 
492
491
  const addButton = new Buttons.Button.Button();
@@ -512,7 +511,7 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox implements
512
511
  const customContainer = createProfilesCard(i18nString(UIStrings.customProfiles), this.customList, settingsContent);
513
512
  customContainer.appendChild(addButton);
514
513
 
515
- this.customUserConditions = SDK.NetworkManager.customUserNetworkConditionsSetting();
514
+ this.customUserConditions = SDK.NetworkManager.customUserNetworkConditionsSetting(settings);
516
515
  this.customUserConditions.addChangeListener(this.conditionsUpdated, this);
517
516
 
518
517
  const customConditions = this.customUserConditions.get();
@@ -62,9 +62,10 @@ UI.ViewManager.registerViewExtension({
62
62
  title: i18nLazyString(UIStrings.throttling),
63
63
  commandPrompt: i18nLazyString(UIStrings.showThrottling),
64
64
  order: 35,
65
- async loadView() {
65
+ async loadView(universe) {
66
66
  const MobileThrottling = await loadMobileThrottlingModule();
67
- return new MobileThrottling.ThrottlingSettingsTab.ThrottlingSettingsTab();
67
+ const {settings} = universe;
68
+ return new MobileThrottling.ThrottlingSettingsTab.ThrottlingSettingsTab(settings);
68
69
  },
69
70
  settings: [
70
71
  'custom-network-conditions',
@@ -276,7 +276,8 @@ export class SyncSection extends UI.Widget.Widget {
276
276
  super(element);
277
277
  this.#view = view;
278
278
  this.#receiveBadgesSetting = Common.Settings.Settings.instance().moduleSetting('receive-gdp-badges');
279
- this.#syncSetting = Common.Settings.moduleSetting('sync-preferences') as Common.Settings.Setting<boolean>;
279
+ this.#syncSetting =
280
+ Common.Settings.Settings.instance().moduleSetting('sync-preferences') as Common.Settings.Setting<boolean>;
280
281
  }
281
282
 
282
283
  override wasShown(): void {
@@ -56,13 +56,15 @@ export function buildGroupStyle(extra?: Partial<PerfUI.FlameChart.GroupStyle>):
56
56
  * @param style the GroupStyle for the track header.
57
57
  * @param selectable if the track is selectable.
58
58
  * @param expanded if the track is expanded.
59
- * @param track this is set only when `selectable` is true, and it is used for selecting a track in the details panel.
60
59
  * @param showStackContextMenu whether menu with options to merge/collapse entries in track is shown.
60
+ * @param fullTrackName a full, non-truncated description of the track to be shown in the tooltip on hover.
61
+ * @param url the raw URL of the track, if applicable, used for right-click copy actions.
61
62
  * @returns the group that built from the give data
62
63
  */
63
- export function buildTrackHeader(
64
- jslogContext: VisualLoggingTrackName|null, startLevel: number, name: string, style: PerfUI.FlameChart.GroupStyle,
65
- selectable: boolean, expanded?: boolean, showStackContextMenu?: boolean): PerfUI.FlameChart.Group {
64
+ export function buildTrackHeader(jslogContext: VisualLoggingTrackName|null, startLevel: number, name: string,
65
+ style: PerfUI.FlameChart.GroupStyle, selectable: boolean, expanded?: boolean,
66
+ showStackContextMenu?: boolean, fullTrackName?: string,
67
+ url?: string): PerfUI.FlameChart.Group {
66
68
  const group: PerfUI.FlameChart.Group = {
67
69
  startLevel,
68
70
  name: name as Common.UIString.LocalizedString,
@@ -74,6 +76,12 @@ export function buildTrackHeader(
74
76
  if (jslogContext !== null) {
75
77
  group.jslogContext = jslogContext;
76
78
  }
79
+ if (fullTrackName !== undefined) {
80
+ group.fullTrackName = fullTrackName;
81
+ }
82
+ if (url !== undefined) {
83
+ group.url = url;
84
+ }
77
85
  return group;
78
86
  }
79
87
 
@@ -265,9 +265,9 @@ export class ThreadAppender implements TrackAppender {
265
265
  style.nestingLevel = this.#headerNestingLevel;
266
266
  }
267
267
  const visualLoggingName = this.#visualLoggingNameForThread();
268
- const group = buildTrackHeader(
269
- visualLoggingName, currentLevel, this.trackName(), style, /* selectable= */ true, this.#expanded,
270
- /* showStackContextMenu= */ true);
268
+ const group = buildTrackHeader(visualLoggingName, currentLevel, this.trackName(), style, /* selectable= */ true,
269
+ this.#expanded,
270
+ /* showStackContextMenu= */ true, this.trackName(), this.#url || undefined);
271
271
  this.#compatibilityBuilder.registerTrackForGroup(group, this);
272
272
  }
273
273
 
@@ -1162,7 +1162,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1162
1162
  }
1163
1163
 
1164
1164
  #setupNavigationSetting(): HTMLElement {
1165
- const currentNavSetting = Common.Settings.moduleSetting('flamechart-selected-navigation').get();
1165
+ const currentNavSetting = Common.Settings.Settings.instance().moduleSetting('flamechart-selected-navigation').get();
1166
1166
  const hideTheDialogForTests: string|null = localStorage.getItem('hide-shortcuts-dialog-for-test');
1167
1167
  const userHadShortcutsDialogOpenedOnce = this.#userHadShortcutsDialogOpenedOnce.get();
1168
1168
 
@@ -1189,11 +1189,11 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1189
1189
  // Change EventListener is only triggered when the radio button is selected
1190
1190
  this.#modernNavRadioButton.radio.addEventListener('change', () => {
1191
1191
  this.#shortcutsDialog.data = {shortcuts: this.#getShortcutsInfo(/* isNavClassic */ false)};
1192
- Common.Settings.moduleSetting('flamechart-selected-navigation').set('modern');
1192
+ Common.Settings.Settings.instance().moduleSetting('flamechart-selected-navigation').set('modern');
1193
1193
  });
1194
1194
  this.#classicNavRadioButton.radio.addEventListener('change', () => {
1195
1195
  this.#shortcutsDialog.data = {shortcuts: this.#getShortcutsInfo(/* isNavClassic */ true)};
1196
- Common.Settings.moduleSetting('flamechart-selected-navigation').set('classic');
1196
+ Common.Settings.Settings.instance().moduleSetting('flamechart-selected-navigation').set('classic');
1197
1197
  });
1198
1198
 
1199
1199
  this.#navigationRadioButtons.appendChild(this.#modernNavRadioButton.label);
@@ -1204,7 +1204,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1204
1204
  }
1205
1205
 
1206
1206
  #updateNavigationSettingSelection(): void {
1207
- const currentNavSetting = Common.Settings.moduleSetting('flamechart-selected-navigation').get();
1207
+ const currentNavSetting = Common.Settings.Settings.instance().moduleSetting('flamechart-selected-navigation').get();
1208
1208
  if (currentNavSetting === 'classic') {
1209
1209
  this.#classicNavRadioButton.radio.checked = true;
1210
1210
  Host.userMetrics.navigationSettingAtFirstTimelineLoad(
@@ -2237,7 +2237,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2237
2237
  // Logging the setting on the first timeline load will allow us to get an estimate number of people using each option.
2238
2238
  if (this.#traceEngineModel.size() === 1) {
2239
2239
  this.#setupNavigationSetting();
2240
- if (Common.Settings.moduleSetting('flamechart-selected-navigation').get() === 'classic') {
2240
+ if (Common.Settings.Settings.instance().moduleSetting('flamechart-selected-navigation').get() === 'classic') {
2241
2241
  Host.userMetrics.navigationSettingAtFirstTimelineLoad(
2242
2242
  Host.UserMetrics.TimelineNavigationSetting.CLASSIC_AT_SESSION_FIRST_TRACE);
2243
2243
  } else {
@@ -146,7 +146,8 @@
146
146
  pointer-events: none;
147
147
  padding: var(--sys-size-3) var(--sys-size-4);
148
148
  border-radius: var(--sys-shape-corner-extra-small);
149
- white-space: nowrap;
149
+ white-space: pre-wrap;
150
+ word-break: break-all;
150
151
  max-width: 80%;
151
152
  box-shadow: var(--sys-elevation-level2);
152
153
  }
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: Internal
3
3
  Version: N/A
4
- Revision: 53dca21fdb660ead59f15a05a34d6fe08bd1dd35
4
+ Revision: 5b4c0fb18c574481d5449ad96d165caf343e8be8
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE