chrome-devtools-frontend 1.0.1700561 → 1.0.1701636

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 (53) hide show
  1. package/front_end/core/root/Runtime.ts +5 -0
  2. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -11
  3. package/front_end/core/sdk/NetworkManager.ts +7 -0
  4. package/front_end/core/sdk/SecurityOrigin.ts +1 -0
  5. package/front_end/core/sdk/SourceMap.ts +12 -1
  6. package/front_end/core/sdk/SourceMapCache.ts +12 -0
  7. package/front_end/core/sdk/SourceMapManager.ts +17 -8
  8. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -19
  9. package/front_end/core/sdk/SourceMapScopesInfo.ts +21 -0
  10. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +7 -3
  11. package/front_end/entrypoints/formatter_worker/Substitute.ts +90 -26
  12. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
  13. package/front_end/entrypoints/main/ExecutionContextSelector.ts +17 -4
  14. package/front_end/generated/InspectorBackendCommands.ts +1 -3
  15. package/front_end/generated/protocol-mapping.d.ts +0 -8
  16. package/front_end/generated/protocol-proxy-api.d.ts +0 -6
  17. package/front_end/generated/protocol.ts +4 -22
  18. package/front_end/models/ai_assistance/debug.ts +10 -2
  19. package/front_end/models/comment_manager/CD4ABridge.ts +2 -2
  20. package/front_end/models/comment_manager/CommentManager.ts +3 -0
  21. package/front_end/models/formatter/FormatterWorkerPool.ts +2 -2
  22. package/front_end/models/javascript_metadata/NativeFunctions.ts +7 -2
  23. package/front_end/models/source_map_scopes/NamesResolver.ts +42 -39
  24. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +70 -1
  25. package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
  26. package/front_end/panels/common/CommentsOverlayWidget.ts +29 -2
  27. package/front_end/panels/common/ExtensionServer.ts +18 -8
  28. package/front_end/panels/console/ConsolePrompt.ts +1 -1
  29. package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
  30. package/front_end/panels/elements/ClassesPaneWidget.ts +2 -1
  31. package/front_end/panels/elements/DOMTreeContextMenu.ts +1 -1
  32. package/front_end/panels/elements/{ElementsTreeOutline.ts → DOMTreeWidget.ts} +34 -24
  33. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  34. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  35. package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
  36. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
  37. package/front_end/panels/elements/StylesSidebarPane.ts +4 -6
  38. package/front_end/panels/elements/TopLayerContainer.ts +1 -1
  39. package/front_end/panels/elements/elements.ts +4 -3
  40. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +1 -1
  41. package/front_end/panels/profiler/HeapProfileView.ts +8 -6
  42. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -1
  43. package/front_end/panels/profiler/HeapSnapshotView.ts +6 -4
  44. package/front_end/panels/security/SecurityPanel.ts +87 -99
  45. package/front_end/panels/sensors/SensorsView.ts +87 -0
  46. package/front_end/panels/sensors/sensors-meta.ts +69 -1
  47. package/front_end/panels/settings/keybindsSettingsTab.css +1 -1
  48. package/front_end/third_party/chromium/README.chromium +1 -1
  49. package/front_end/ui/legacy/Treeoutline.ts +2 -1
  50. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
  51. package/front_end/ui/legacy/treeoutline.css +2 -2
  52. package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
  53. package/package.json +1 -1
@@ -12,6 +12,7 @@ import * as Geometry from '../../ui/geometry/geometry.js';
12
12
  import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
13
13
  import * as UI from '../../ui/legacy/legacy.js';
14
14
  import {Directives, html, render} from '../../ui/lit/lit.js';
15
+ import * as SettingUIRegistration from '../../ui/settings/settings.js';
15
16
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
16
17
  import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';
17
18
 
@@ -128,6 +129,15 @@ const UIStrings = {
128
129
  * @description Description of the Emulate Idle State select in the Sensors view.
129
130
  */
130
131
  forcesSelectedIdleStateEmulation: 'Forces selected idle state emulation',
132
+ /**
133
+ * @description Description of the Emulate CPU Performance Tier select in the Sensors view.
134
+ */
135
+ forcesSelectedCpuPerformanceTierEmulation: 'Forces CPU performance tier emulation',
136
+ /**
137
+ * @description Option value for no CPU Performance override with default value
138
+ * @example {Tier 3: HIGH} PH1
139
+ */
140
+ cpuPerformanceNoOverrideWithDefault: 'No override ({PH1})',
131
141
  /**
132
142
  * @description Description of the Emulate CPU Pressure State select in the Sensors view.
133
143
  */
@@ -206,6 +216,8 @@ export class SensorsView extends UI.Widget.VBox {
206
216
  private boxMatrix?: DOMMatrix;
207
217
  private mouseDownVector?: Geometry.Vector|null;
208
218
  private originalBoxMatrix?: DOMMatrix;
219
+ readonly #cpuThrottlingManager: SDK.CPUThrottlingManager.CPUThrottlingManager;
220
+ #cpuPerformanceNoOverrideOptionElement?: HTMLOptionElement;
209
221
 
210
222
  constructor() {
211
223
  super({
@@ -215,6 +227,8 @@ export class SensorsView extends UI.Widget.VBox {
215
227
  this.registerRequiredCSS(sensorsStyles);
216
228
  this.contentElement.classList.add('sensors-view');
217
229
 
230
+ this.#cpuThrottlingManager = SDK.CPUThrottlingManager.CPUThrottlingManager.instance();
231
+
218
232
  this.#locationSetting = Common.Settings.Settings.instance().createSetting('emulation.location-override', '');
219
233
  this.#location = SDK.EmulationModel.Location.parseSetting(this.#locationSetting.get());
220
234
  this.#locationOverrideEnabled = false;
@@ -251,6 +265,10 @@ export class SensorsView extends UI.Widget.VBox {
251
265
  this.createPressureSection();
252
266
 
253
267
  this.createPanelSeparator();
268
+
269
+ this.createCPUPerformanceSection();
270
+
271
+ this.createPanelSeparator();
254
272
  }
255
273
 
256
274
  private createPanelSeparator(): void {
@@ -734,6 +752,75 @@ export class SensorsView extends UI.Widget.VBox {
734
752
  }
735
753
  }
736
754
 
755
+ private createCPUPerformanceSection(): void {
756
+ const container = this.contentElement.createChild('div', 'cpu-performance-section');
757
+ const control = SettingsUI.SettingsUI.createControlForSetting(
758
+ Common.Settings.Settings.instance().resolve(SDK.SDKSettings.cpuPerformanceSettingDescriptor),
759
+ i18nString(UIStrings.forcesSelectedCpuPerformanceTierEmulation));
760
+
761
+ if (control) {
762
+ container.appendChild(control);
763
+ // The text of the "no override" option element needs to be updated dynamically.
764
+ const noOverrideOption = control.querySelector<HTMLOptionElement>('select option[value="no-override"]');
765
+ if (noOverrideOption) {
766
+ this.#cpuPerformanceNoOverrideOptionElement = noOverrideOption;
767
+ this.#updateCPUPerformanceNoOverrideLabel();
768
+ } else {
769
+ this.#cpuPerformanceNoOverrideOptionElement = undefined;
770
+ }
771
+ }
772
+ }
773
+
774
+ override wasShown(): void {
775
+ super.wasShown();
776
+ if (this.#cpuPerformanceNoOverrideOptionElement) {
777
+ this.#cpuThrottlingManager.addEventListener(SDK.CPUThrottlingManager.Events.CPU_PERFORMANCE_TIER_CHANGED,
778
+ this.#updateCPUPerformanceNoOverrideLabel, this);
779
+ this.#cpuThrottlingManager.addEventListener(SDK.CPUThrottlingManager.Events.RATE_CHANGED,
780
+ this.#updateCPUPerformanceNoOverrideLabel, this);
781
+ this.#updateCPUPerformanceNoOverrideLabel();
782
+ }
783
+ }
784
+
785
+ override willHide(): void {
786
+ super.willHide();
787
+ if (this.#cpuPerformanceNoOverrideOptionElement) {
788
+ this.#cpuThrottlingManager.removeEventListener(SDK.CPUThrottlingManager.Events.CPU_PERFORMANCE_TIER_CHANGED,
789
+ this.#updateCPUPerformanceNoOverrideLabel, this);
790
+ this.#cpuThrottlingManager.removeEventListener(SDK.CPUThrottlingManager.Events.RATE_CHANGED,
791
+ this.#updateCPUPerformanceNoOverrideLabel, this);
792
+ }
793
+ }
794
+
795
+ #updateCPUPerformanceNoOverrideLabel(): void {
796
+ if (!this.#cpuPerformanceNoOverrideOptionElement) {
797
+ return;
798
+ }
799
+ // Helper function to retrieve the tier labels (i18n) from the settings.
800
+ const options =
801
+ SettingUIRegistration.SettingUIRegistration.resolve(SDK.SDKSettings.cpuPerformanceSettingDescriptor).options;
802
+ const getOptionTitle = (value: string): string => {
803
+ const opt = options.find(o => o.value === value);
804
+ if (!opt) {
805
+ return '';
806
+ }
807
+ return opt.title;
808
+ };
809
+ // Helper function to return a fallback title, to be used if the above fails.
810
+ const getFallbackTitle = (tier: SDK.CPUThrottlingManager.CPUPerformanceTier): string => {
811
+ return `Tier ${SDK.CPUThrottlingManager.tierToNumber(tier)}: ${tier.toUpperCase()}`;
812
+ };
813
+ // Update the text of the "no-override" element using the calculated tier.
814
+ const calculatedTier = this.#cpuThrottlingManager.calculatedCPUPerformanceTier();
815
+ if (calculatedTier !== undefined) {
816
+ const tierTitle = getOptionTitle(calculatedTier) || getFallbackTitle(calculatedTier);
817
+ this.#cpuPerformanceNoOverrideOptionElement.text =
818
+ i18nString(UIStrings.cpuPerformanceNoOverrideWithDefault, {PH1: tierTitle});
819
+ } else {
820
+ this.#cpuPerformanceNoOverrideOptionElement.text = getOptionTitle('no-override') || 'No override';
821
+ }
822
+ }
823
+
737
824
  private enableOrientationFields(disable: boolean|null): void {
738
825
  if (disable) {
739
826
  this.deviceOrientationFieldset.disabled = true;
@@ -119,6 +119,34 @@ const UIStrings = {
119
119
  * @description Command that shows the Locations settings tab.
120
120
  */
121
121
  showLocations: 'Show Locations',
122
+ /**
123
+ * @description Text for the CPU Performance Tier type to simulate on a device.
124
+ */
125
+ cpuPerformance: 'CPU Performance Tier',
126
+ /**
127
+ * @description Option value for no CPU Performance override
128
+ */
129
+ cpuPerformanceNoOverride: 'No override',
130
+ /**
131
+ * @description Label for Unknown CPU Performance tier
132
+ */
133
+ cpuPerformanceTierUnknown: 'Tier 0: UNKNOWN',
134
+ /**
135
+ * @description Label for Low CPU Performance tier
136
+ */
137
+ cpuPerformanceTierLow: 'Tier 1: LOW',
138
+ /**
139
+ * @description Label for Mid CPU Performance tier
140
+ */
141
+ cpuPerformanceTierMid: 'Tier 2: MID',
142
+ /**
143
+ * @description Label for High CPU Performance tier
144
+ */
145
+ cpuPerformanceTierHigh: 'Tier 3: HIGH',
146
+ /**
147
+ * @description Label for Ultra CPU Performance tier
148
+ */
149
+ cpuPerformanceTierUltra: 'Tier 4: ULTRA',
122
150
  } as const;
123
151
  const str_ = i18n.i18n.registerUIStrings('panels/sensors/sensors-meta.ts', UIStrings);
124
152
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
@@ -140,7 +168,11 @@ UI.ViewManager.registerViewExtension({
140
168
  persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,
141
169
  order: 100,
142
170
  async loadView() {
143
- const Sensors = await loadEmulationModule();
171
+ const [Sensors] = await Promise.all([
172
+ loadEmulationModule(),
173
+ // Ensure that this is available when the sensors panel is constructed.
174
+ SDK.CPUThrottlingManager.CPUThrottlingManager.instance().updateHostDefaultCPUPerformanceTier(),
175
+ ]);
144
176
  return new Sensors.SensorsView.SensorsView();
145
177
  },
146
178
  tags: [
@@ -330,3 +362,39 @@ SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.idleDetectionSettingDe
330
362
  },
331
363
  ],
332
364
  });
365
+
366
+ SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.cpuPerformanceSettingDescriptor, {
367
+ title: i18nLazyString(UIStrings.cpuPerformance),
368
+ options: [
369
+ {
370
+ value: 'no-override',
371
+ title: i18nLazyString(UIStrings.cpuPerformanceNoOverride),
372
+ text: i18nLazyString(UIStrings.cpuPerformanceNoOverride),
373
+ },
374
+ {
375
+ value: 'unknown',
376
+ title: i18nLazyString(UIStrings.cpuPerformanceTierUnknown),
377
+ text: i18nLazyString(UIStrings.cpuPerformanceTierUnknown),
378
+ },
379
+ {
380
+ value: 'low',
381
+ title: i18nLazyString(UIStrings.cpuPerformanceTierLow),
382
+ text: i18nLazyString(UIStrings.cpuPerformanceTierLow),
383
+ },
384
+ {
385
+ value: 'mid',
386
+ title: i18nLazyString(UIStrings.cpuPerformanceTierMid),
387
+ text: i18nLazyString(UIStrings.cpuPerformanceTierMid),
388
+ },
389
+ {
390
+ value: 'high',
391
+ title: i18nLazyString(UIStrings.cpuPerformanceTierHigh),
392
+ text: i18nLazyString(UIStrings.cpuPerformanceTierHigh),
393
+ },
394
+ {
395
+ value: 'ultra',
396
+ title: i18nLazyString(UIStrings.cpuPerformanceTierUltra),
397
+ text: i18nLazyString(UIStrings.cpuPerformanceTierUltra),
398
+ },
399
+ ],
400
+ });
@@ -81,7 +81,7 @@
81
81
  }
82
82
 
83
83
  .keybinds-list-item:not(.keybinds-editing):hover .keybinds-edit-button,
84
- .keybinds-list-item:not(.keybinds-editing):focus-within .keybinds-edit-button {
84
+ .keybinds-list-item-wrapper:focus-within > .keybinds-list-item:not(.keybinds-editing) .keybinds-edit-button {
85
85
  display: inline-block;
86
86
  }
87
87
 
@@ -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: 9d63ca908583451379cc48bc4e3cc2e5c7041395
4
+ Revision: 06b292ff2ec4351e7347ab81ef96701be766e37b
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -1676,7 +1676,8 @@ class TreeViewTreeElement extends TreeElement {
1676
1676
  this.#clonedClasses.clear();
1677
1677
  for (let i = 0; i < this.configElement.attributes.length; ++i) {
1678
1678
  const attribute = this.configElement.attributes.item(i);
1679
- if (attribute && attribute.name !== 'role' && TreeViewTreeElement.CLONED_ATTRIBUTES.has(attribute.name)) {
1679
+ if (attribute && attribute.name !== 'role' &&
1680
+ (TreeViewTreeElement.CLONED_ATTRIBUTES.has(attribute.name) || attribute.name.startsWith('data-'))) {
1680
1681
  this.listItemElement.setAttribute(attribute.name, attribute.value);
1681
1682
  this.#clonedAttributes.add(attribute.name);
1682
1683
  }
@@ -646,7 +646,7 @@ function nodeMixin<TBase extends Constructor<DataGridNode<any>>>(base: TBase) {
646
646
 
647
647
  override createElement(): HTMLElement {
648
648
  const element = super.createElement();
649
- element.addEventListener('click', this.#onRowMouseEvent.bind(this));
649
+ element.addEventListener('click', this.#onRowMouseEvent.bind(this), {capture: true});
650
650
  element.addEventListener('mouseenter', this.#onRowMouseEvent.bind(this));
651
651
  element.addEventListener('mouseleave', this.#onRowMouseEvent.bind(this));
652
652
  if (this.#configElement.hasAttribute('style')) {
@@ -35,7 +35,7 @@
35
35
  margin-left: -10000px;
36
36
  }
37
37
 
38
- .tree-outline:not(.hide-selection-when-blurred) li.selected {
38
+ .tree-outline:not(.hide-selection-when-blurred, .elements-tree-outline) li.selected {
39
39
  color: var(--sys-color-on-surface-subtle);
40
40
  }
41
41
 
@@ -90,7 +90,7 @@ ol.tree-outline,
90
90
  min-height: var(--sys-size-8);
91
91
  }
92
92
 
93
- ol.tree-outline:not(.hide-selection-when-blurred) li.selected:focus {
93
+ ol.tree-outline:not(.hide-selection-when-blurred, .elements-tree-outline) li.selected:focus {
94
94
  color: var(--sys-color-on-tonal-container);
95
95
 
96
96
  & ::selection {
@@ -287,6 +287,7 @@ export const knownContextValues: Set<string> = new Set([
287
287
  'accessibility-default',
288
288
  'accessibility-tree',
289
289
  'accessibility.clear-announcements',
290
+ 'accessibility.export-csv',
290
291
  'accessibility.toggle-recording',
291
292
  'accessibility.view',
292
293
  'accuracy',
@@ -1632,6 +1633,7 @@ export const knownContextValues: Set<string> = new Set([
1632
1633
  'emulation.capture-full-height-screenshot',
1633
1634
  'emulation.capture-node-screenshot',
1634
1635
  'emulation.capture-screenshot',
1636
+ 'emulation.cpu-performance',
1635
1637
  'emulation.cpu-pressure',
1636
1638
  'emulation.device-height',
1637
1639
  'emulation.device-mode-value',
@@ -2060,6 +2062,7 @@ export const knownContextValues: Set<string> = new Set([
2060
2062
  'hide-network-messages',
2061
2063
  'hide-player',
2062
2064
  'hide-repeating-children',
2065
+ 'high',
2063
2066
  'highlight-node-on-hover-in-overlay',
2064
2067
  'history',
2065
2068
  'historyRedo',
@@ -2718,6 +2721,7 @@ export const knownContextValues: Set<string> = new Set([
2718
2721
  'long-tasks',
2719
2722
  'longitude',
2720
2723
  'lostpointercapture',
2724
+ 'low',
2721
2725
  'low-contrast-details',
2722
2726
  'low-end-mobile',
2723
2727
  'low-text-contrast',
@@ -2846,6 +2850,7 @@ export const knownContextValues: Set<string> = new Set([
2846
2850
  'microsoft-edge-edge-html-x-box',
2847
2851
  'microsoft-edge-i-pad',
2848
2852
  'microsoft-edge-i-phone',
2853
+ 'mid',
2849
2854
  'mid-tier-mobile',
2850
2855
  'min-block-size',
2851
2856
  'min-height',
@@ -4530,6 +4535,7 @@ export const knownContextValues: Set<string> = new Set([
4530
4535
  'ui-theme-system-preferred',
4531
4536
  'uiTheme',
4532
4537
  'uk',
4538
+ 'ultra',
4533
4539
  'unavailable',
4534
4540
  'unblock',
4535
4541
  'undefined',
@@ -4537,6 +4543,7 @@ export const knownContextValues: Set<string> = new Set([
4537
4543
  'unicode-bidi',
4538
4544
  'unicode-range',
4539
4545
  'unit',
4546
+ 'unknown',
4540
4547
  'unload',
4541
4548
  'unregister',
4542
4549
  'unset',
package/package.json CHANGED
@@ -90,5 +90,5 @@
90
90
  "yargs": "18.1.0",
91
91
  "yargs-unparser": "2.0.0"
92
92
  },
93
- "version": "1.0.1700561"
93
+ "version": "1.0.1701636"
94
94
  }