chrome-devtools-frontend 1.0.934269 → 1.0.935784

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 (79) hide show
  1. package/config/gni/all_devtools_files.gni +0 -13
  2. package/config/gni/devtools_grd_files.gni +5 -8
  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 +15 -3
  6. package/front_end/core/i18n/locales/en-XL.json +15 -3
  7. package/front_end/core/root/Runtime.ts +0 -1
  8. package/front_end/core/sdk/DOMModel.ts +3 -3
  9. package/front_end/core/sdk/sdk-meta.ts +3 -0
  10. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -1
  11. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +1 -1
  12. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -0
  13. package/front_end/entrypoints/main/MainImpl.ts +1 -11
  14. package/front_end/entrypoints/main/main-meta.ts +2 -1
  15. package/front_end/entrypoints/shell/shell.json +0 -6
  16. package/front_end/entrypoints/worker_app/worker_app.json +0 -1
  17. package/front_end/models/emulation/EmulatedDevices.ts +306 -84
  18. package/front_end/models/issues_manager/IssuesManager.ts +2 -2
  19. package/front_end/models/issues_manager/{DeprecationIssue.ts → NavigatorUserAgentIssue.ts} +4 -4
  20. package/front_end/models/issues_manager/issues_manager.ts +2 -2
  21. package/front_end/panels/application/module.json +0 -2
  22. package/front_end/panels/changes/changes-meta.ts +0 -3
  23. package/front_end/panels/console/module.json +0 -2
  24. package/front_end/panels/coverage/module.json +0 -1
  25. package/front_end/panels/css_overview/module.json +1 -2
  26. package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -2
  27. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  28. package/front_end/panels/elements/StylesSidebarPane.ts +15 -0
  29. package/front_end/panels/elements/elements-meta.ts +5 -0
  30. package/front_end/panels/emulation/DeviceModeWrapper.ts +4 -0
  31. package/front_end/panels/event_listeners/module.json +1 -2
  32. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -5
  33. package/front_end/panels/media/module.json +0 -1
  34. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +1 -0
  35. package/front_end/panels/network/module.json +0 -3
  36. package/front_end/panels/network/network-meta.ts +2 -0
  37. package/front_end/panels/profiler/module.json +1 -3
  38. package/front_end/panels/profiler/profiler-meta.ts +1 -0
  39. package/front_end/panels/profiler/profilesPanel.css +1 -1
  40. package/front_end/panels/sensors/sensors-meta.ts +1 -0
  41. package/front_end/panels/settings/emulation/devicesSettingsTab.css +1 -1
  42. package/front_end/panels/sources/CallStackSidebarPane.ts +21 -0
  43. package/front_end/panels/sources/NavigatorView.ts +8 -8
  44. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +15 -0
  45. package/front_end/panels/sources/module.json +0 -4
  46. package/front_end/panels/sources/sources-meta.ts +12 -0
  47. package/front_end/panels/sources/watchExpressionsSidebarPane.css +10 -3
  48. package/front_end/panels/timeline/module.json +0 -1
  49. package/front_end/panels/timeline/timeline-meta.ts +1 -0
  50. package/front_end/panels/webauthn/module.json +0 -1
  51. package/front_end/ui/components/text_editor/config.ts +1 -1
  52. package/front_end/ui/components/text_editor/theme.ts +13 -0
  53. package/front_end/ui/legacy/GlassPane.ts +4 -0
  54. package/front_end/ui/legacy/InspectorView.ts +0 -4
  55. package/front_end/ui/legacy/TabbedPane.ts +4 -0
  56. package/front_end/ui/legacy/ViewManager.ts +10 -2
  57. package/front_end/ui/legacy/components/cookie_table/module.json +1 -2
  58. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -1
  59. package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
  60. package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +10 -3
  61. package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
  62. package/front_end/ui/legacy/components/inline_editor/cssLength.css +30 -9
  63. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +2 -1
  64. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +4 -3
  65. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -5
  66. package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +1 -0
  67. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +3 -1
  68. package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -3
  69. package/front_end/ui/legacy/components/source_frame/module.json +1 -2
  70. package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +1 -0
  71. package/front_end/ui/legacy/themeColors.css +4 -0
  72. package/package.json +1 -1
  73. package/front_end/panels/changes/module.json +0 -7
  74. package/front_end/panels/developer_resources/module.json +0 -6
  75. package/front_end/panels/search/module.json +0 -5
  76. package/front_end/panels/snippets/module.json +0 -6
  77. package/front_end/ui/legacy/components/data_grid/module.json +0 -8
  78. package/front_end/ui/legacy/components/object_ui/module.json +0 -11
  79. package/front_end/ui/legacy/components/quick_open/module.json +0 -8
@@ -31,6 +31,8 @@ import * as i18n from '../../../../core/i18n/i18n.js';
31
31
  import * as Platform from '../../../../core/platform/platform.js';
32
32
  import * as UI from '../../legacy.js';
33
33
 
34
+ import dataGridStyles from './dataGrid.css.js';
35
+
34
36
  const UIStrings = {
35
37
  /**
36
38
  *@description Accessible text label for expandible nodes in datagrids
@@ -169,7 +171,6 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
169
171
  const {displayName, columns: columnsArray, editCallback, deleteCallback, refreshCallback} = dataGridParameters;
170
172
  this.element = document.createElement('div');
171
173
  this.element.classList.add('data-grid');
172
- UI.Utils.appendStyle(this.element, 'ui/legacy/components/data_grid/dataGrid.css');
173
174
  this.element.tabIndex = 0;
174
175
  this.element.addEventListener('keydown', this.keyDown.bind(this), false);
175
176
  this.element.addEventListener('contextmenu', this.contextMenu.bind(this), true);
@@ -2351,6 +2352,7 @@ export class DataGridWidget<T> extends UI.Widget.VBox {
2351
2352
  }
2352
2353
 
2353
2354
  wasShown(): void {
2355
+ this.registerCSSFiles([dataGridStyles]);
2354
2356
  this.dataGrid.wasShown();
2355
2357
  }
2356
2358
 
@@ -154,6 +154,7 @@
154
154
  }
155
155
 
156
156
  .data-grid th .sort-order-icon-container {
157
+ background-color: var(--color-background-elevation-1);
157
158
  position: absolute;
158
159
  top: 1px;
159
160
  right: 0;
@@ -162,6 +163,10 @@
162
163
  align-items: center;
163
164
  }
164
165
 
166
+ .data-grid th:hover .sort-order-icon-container {
167
+ background-color: var(--color-background-highlight);
168
+ }
169
+
165
170
  .data-grid th .sort-order-icon {
166
171
  margin-right: 4px;
167
172
  margin-bottom: -2px;
@@ -77,6 +77,10 @@ export class CSSLength extends HTMLElement {
77
77
  }
78
78
 
79
79
  private onValueMousedown(event: MouseEvent): void {
80
+ if (event.button !== 0) {
81
+ return;
82
+ }
83
+
80
84
  this.currentMouseClientX = event.clientX;
81
85
  const targetDocument = event.target instanceof Node && event.target.ownerDocument;
82
86
  if (targetDocument) {
@@ -136,9 +140,12 @@ export class CSSLength extends HTMLElement {
136
140
  <span class="value"
137
141
  @mousedown=${this.onValueMousedown}
138
142
  @mouseup=${this.onValueMouseup}
139
- >${this.length.value}</span><select class="unit ${this.length.unit}" @mouseup=${this.onUnitMouseup} @change=${this.onUnitChange}>
140
- ${options}
141
- </select>
143
+ >${this.length.value}</span><span class="unit">${this.length.unit}</span><div class="unit-dropdown">
144
+ <span class="icon"></span>
145
+ <select @mouseup=${this.onUnitMouseup} @change=${this.onUnitChange}>
146
+ ${options}
147
+ </select>
148
+ </div>
142
149
  `;
143
150
  // clang-format on
144
151
  }
@@ -106,7 +106,7 @@ export class CSSShadowEditor extends Common.ObjectWrapper.eventMixin<EventTypes,
106
106
  field.appendChild(textInput);
107
107
  textInput.id = propertyName;
108
108
  textInput.addEventListener('keydown', this.handleValueModification.bind(this), false);
109
- textInput.addEventListener('mousewheel', this.handleValueModification.bind(this), false);
109
+ textInput.addEventListener('wheel', this.handleValueModification.bind(this), false);
110
110
  textInput.addEventListener('input', this.onTextInput.bind(this), false);
111
111
  textInput.addEventListener('blur', this.onTextBlur.bind(this), false);
112
112
  return textInput;
@@ -14,21 +14,42 @@
14
14
  cursor: ew-resize;
15
15
  }
16
16
 
17
- select.unit {
17
+ .unit-dropdown {
18
+ display: none;
19
+ }
20
+
21
+ .unit-dropdown select {
18
22
  all: unset;
19
23
  cursor: pointer;
20
- width: 2ch;
24
+ opacity: 0%;
25
+ width: 0.8em;
26
+ }
27
+
28
+ .icon {
29
+ position: absolute;
30
+ display: inline-block;
31
+ -webkit-mask-image: var(--image-file-chevrons);
32
+ -webkit-mask-position: -12px 4px;
33
+ -webkit-mask-size: 19px 6px;
34
+ -webkit-mask-repeat: no-repeat;
35
+ background-color: var(--color-text-primary);
36
+ content: '';
37
+ height: 1em;
38
+ width: 1em;
39
+ }
40
+
41
+ :host(:not(:last-child)) {
42
+ margin-right: 0.1em;
21
43
  }
22
44
 
23
- select.unit:hover {
24
- text-decoration: underline;
45
+ :host(:not(:last-child)) .unit-dropdown {
46
+ position: absolute;
25
47
  }
26
48
 
27
- select.unit.rem {
28
- width: 3ch;
49
+ .css-length:hover .unit-dropdown {
50
+ display: inline-block;
29
51
  }
30
52
 
31
- select.unit.vmin,
32
- select.unit.vmax {
33
- width: 4ch;
53
+ :host(:last-child) .unit-dropdown select {
54
+ width: 0.6em;
34
55
  }
@@ -9,6 +9,7 @@ import * as UI from '../../legacy.js';
9
9
  import type * as Protocol from '../../../../generated/protocol.js';
10
10
 
11
11
  import {ObjectPropertiesSection} from './ObjectPropertiesSection.js';
12
+ import customPreviewComponentStyles from './customPreviewComponent.css.js';
12
13
 
13
14
  const UIStrings = {
14
15
  /**
@@ -188,7 +189,7 @@ export class CustomPreviewComponent {
188
189
  this.element = document.createElement('span');
189
190
  this.element.classList.add('source-code');
190
191
  const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(this.element, {
191
- cssFile: 'ui/legacy/components/object_ui/customPreviewComponent.css',
192
+ cssFile: [customPreviewComponentStyles],
192
193
  delegatesFocus: undefined,
193
194
  });
194
195
  this.element.addEventListener('contextmenu', this.contextMenuEventFired.bind(this), false);
@@ -34,7 +34,9 @@ import * as UI from '../../legacy.js';
34
34
  import * as Components from '../utils/utils.js';
35
35
 
36
36
  import {CustomPreviewComponent} from './CustomPreviewComponent.js';
37
+ import objectPopoverStyles from './objectPopover.css.js';
37
38
  import {ObjectPropertiesSection} from './ObjectPropertiesSection.js';
39
+ import objectValueStyles from './objectValue.css.js';
38
40
 
39
41
  export class ObjectPopoverHelper {
40
42
  private readonly linkifier: Components.Linkifier.Linkifier|null;
@@ -72,7 +74,7 @@ export class ObjectPopoverHelper {
72
74
  } else {
73
75
  popoverContentElement = document.createElement('div');
74
76
  popoverContentElement.classList.add('object-popover-content');
75
- UI.Utils.appendStyle(popoverContentElement, 'ui/legacy/components/object_ui/objectPopover.css');
77
+ popover.registerCSSFiles([objectPopoverStyles]);
76
78
  const titleElement = popoverContentElement.createChild('div', 'monospace object-popover-title');
77
79
  titleElement.createChild('span').textContent = description;
78
80
  linkifier = new Components.Linkifier.Linkifier();
@@ -90,8 +92,7 @@ export class ObjectPopoverHelper {
90
92
 
91
93
  popoverContentElement = document.createElement('span');
92
94
  popoverContentElement.dataset.stableNameForTest = 'object-popover-content';
93
- UI.Utils.appendStyle(popoverContentElement, 'ui/legacy/components/object_ui/objectValue.css');
94
- UI.Utils.appendStyle(popoverContentElement, 'ui/legacy/components/object_ui/objectPopover.css');
95
+ popover.registerCSSFiles([objectValueStyles, objectPopoverStyles]);
95
96
  const valueElement = popoverContentElement.createChild('span', 'monospace object-value-' + result.type);
96
97
  valueElement.style.whiteSpace = 'pre';
97
98
 
@@ -43,6 +43,8 @@ import {CustomPreviewComponent} from './CustomPreviewComponent.js';
43
43
  import {JavaScriptAutocomplete} from './JavaScriptAutocomplete.js';
44
44
  import {JavaScriptREPL} from './JavaScriptREPL.js';
45
45
  import {createSpansForNodeTitle, RemoteObjectPreviewFormatter} from './RemoteObjectPreviewFormatter.js';
46
+ import objectValueStyles from './objectValue.css.js';
47
+ import objectPropertiesSectionStyles from './objectPropertiesSection.css.js';
46
48
 
47
49
  const UIStrings = {
48
50
  /**
@@ -161,8 +163,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
161
163
  }
162
164
 
163
165
  objectPropertiesSectionMap.set(this.element, this);
164
- this.registerRequiredCSS('ui/legacy/components/object_ui/objectValue.css');
165
- this.registerRequiredCSS('ui/legacy/components/object_ui/objectPropertiesSection.css');
166
+ this.registerCSSFiles([objectValueStyles, objectPropertiesSectionStyles]);
166
167
  this.rootElement().childrenListElement.classList.add('source-code', 'object-properties-section');
167
168
  }
168
169
 
@@ -183,7 +184,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
183
184
  const titleElement = document.createElement('span');
184
185
  titleElement.classList.add('source-code');
185
186
  const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(titleElement, {
186
- cssFile: 'ui/legacy/components/object_ui/objectValue.css',
187
+ cssFile: [objectValueStyles],
187
188
  delegatesFocus: undefined,
188
189
  });
189
190
  const propertyValue =
@@ -578,8 +579,7 @@ export class ObjectPropertiesSectionsTreeOutline extends UI.TreeOutline.TreeOutl
578
579
  private readonly editable: boolean;
579
580
  constructor(options?: TreeOutlineOptions|null) {
580
581
  super();
581
- this.registerRequiredCSS('ui/legacy/components/object_ui/objectValue.css');
582
- this.registerRequiredCSS('ui/legacy/components/object_ui/objectPropertiesSection.css');
582
+ this.registerCSSFiles([objectValueStyles, objectPropertiesSectionStyles]);
583
583
  this.editable = !(options && options.readOnly);
584
584
  this.contentElement.classList.add('source-code');
585
585
  this.contentElement.classList.add('object-properties-section');
@@ -71,6 +71,7 @@ UI.ActionRegistration.registerActionExtension({
71
71
 
72
72
  Common.Settings.registerSettingExtension({
73
73
  category: Common.Settings.SettingCategory.PERFORMANCE,
74
+ storageType: Common.Settings.SettingStorageType.Synced,
74
75
  title: i18nLazyString(UIStrings.flamechartMouseWheelAction),
75
76
  settingName: 'flamechartMouseWheelAction',
76
77
  settingType: Common.Settings.SettingType.ENUM,
@@ -13,6 +13,8 @@ import * as Diff from '../../../../third_party/diff/diff.js';
13
13
  import * as TextPrompt from '../../../../ui/components/text_prompt/text_prompt.js';
14
14
  import * as UI from '../../legacy.js';
15
15
 
16
+ import filteredListWidgetStyles from './filteredListWidget.css.js';
17
+
16
18
  const UIStrings = {
17
19
  /**
18
20
  * @description Aria label for quick open dialog prompt
@@ -64,7 +66,6 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
64
66
  const listener = (this.onKeyDown.bind(this) as (arg0: Event) => void);
65
67
  this.contentElement.addEventListener('keydown', listener, true);
66
68
  UI.ARIAUtils.markAsCombobox(this.contentElement);
67
- this.registerRequiredCSS('ui/legacy/components/quick_open/filteredListWidget.css');
68
69
 
69
70
  this.inputBoxElement = new TextPrompt.TextPrompt.TextPrompt();
70
71
  this.inputBoxElement.data = {ariaLabel: i18nString(UIStrings.quickOpenPrompt), prefix: '', suggestion: ''};
@@ -212,6 +213,7 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
212
213
  }
213
214
 
214
215
  wasShown(): void {
216
+ this.registerCSSFiles([filteredListWidgetStyles]);
215
217
  this.attachProvider();
216
218
  }
217
219
 
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../../../core/i18n/i18n.js';
6
- import * as Root from '../../../../core/root/root.js';
7
6
  import * as UI from '../../legacy.js';
8
7
 
9
8
  const UIStrings = {
@@ -26,8 +25,6 @@ let loadedQuickOpenModule: (typeof QuickOpen|undefined);
26
25
 
27
26
  async function loadQuickOpenModule(): Promise<typeof QuickOpen> {
28
27
  if (!loadedQuickOpenModule) {
29
- // Side-effect import resources in module.json
30
- await Root.Runtime.Runtime.instance().loadModulePromise('ui/legacy/components/quick_open');
31
28
  loadedQuickOpenModule = await import('./quick_open.js');
32
29
  }
33
30
  return loadedQuickOpenModule;
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy/components/text_editor",
4
- "ui/legacy",
5
- "ui/legacy/components/object_ui"
4
+ "ui/legacy"
6
5
  ],
7
6
  "resources": [
8
7
  "fontView.css",
@@ -48,6 +48,7 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
48
48
 
49
49
  Common.Settings.registerSettingExtension({
50
50
  category: Common.Settings.SettingCategory.SOURCES,
51
+ storageType: Common.Settings.SettingStorageType.Synced,
51
52
  title: i18nLazyString(UIStrings.defaultIndentation),
52
53
  settingName: 'textEditorIndent',
53
54
  settingType: Common.Settings.SettingType.ENUM,
@@ -163,6 +163,8 @@
163
163
  --color-nonmatching-bracket-background: rgb(255 0 0 / 7%);
164
164
  --color-editor-selection: #cfe8fc;
165
165
  --color-editor-selection-blurred: #e0e0e0;
166
+ --color-selected-option: #fff;
167
+ --color-selected-option-background: #1a73e8;
166
168
  --color-highlighted-line: rgb(255 255 0 / 50%);
167
169
  }
168
170
 
@@ -282,5 +284,7 @@
282
284
  --color-nonmatching-bracket-background: initial;
283
285
  --color-editor-selection: hsl(207deg 88% 22%);
284
286
  --color-editor-selection-blurred: #454545;
287
+ --color-selected-option: #fff;
288
+ --color-selected-option-background: #0e639c;
285
289
  --color-highlighted-line: hsl(133deg 100% 30% / 50%);
286
290
  }
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.934269"
58
+ "version": "1.0.935784"
59
59
  }
@@ -1,7 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy/components/text_editor",
4
- "panels/snippets",
5
- "ui/legacy"
6
- ]
7
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/data_grid"
5
- ]
6
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ]
5
- }
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy/components/quick_open",
4
- "ui/legacy"
5
- ]
6
- }
@@ -1,8 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
- "resources": [
6
- "dataGrid.css"
7
- ]
8
- }
@@ -1,11 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
- "resources": [
6
- "customPreviewComponent.css",
7
- "objectPopover.css",
8
- "objectPropertiesSection.css",
9
- "objectValue.css"
10
- ]
11
- }
@@ -1,8 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
- "resources": [
6
- "filteredListWidget.css"
7
- ]
8
- }