chrome-devtools-frontend 1.0.935332 → 1.0.936736

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 (83) hide show
  1. package/config/gni/all_devtools_files.gni +0 -24
  2. package/config/gni/devtools_grd_files.gni +9 -13
  3. package/front_end/.eslintrc.js +1 -0
  4. package/front_end/Tests.js +13 -0
  5. package/front_end/core/host/UserMetrics.ts +2 -1
  6. package/front_end/core/i18n/locales/en-US.json +6 -6
  7. package/front_end/core/i18n/locales/en-XL.json +6 -6
  8. package/front_end/core/sdk/ConsoleModel.ts +0 -20
  9. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -7
  10. package/front_end/entrypoints/inspector_main/module.json +1 -2
  11. package/front_end/entrypoints/main/MainImpl.ts +10 -3
  12. package/front_end/entrypoints/node_app/node_app.json +0 -1
  13. package/front_end/entrypoints/node_main/node_main-meta.ts +0 -3
  14. package/front_end/entrypoints/shell/shell.json +0 -7
  15. package/front_end/entrypoints/worker_app/worker_app.json +0 -5
  16. package/front_end/models/issues_manager/IssuesManager.ts +2 -2
  17. package/front_end/models/issues_manager/{DeprecationIssue.ts → NavigatorUserAgentIssue.ts} +4 -4
  18. package/front_end/models/issues_manager/issues_manager.ts +2 -2
  19. package/front_end/panels/application/BackForwardCacheView.ts +54 -6
  20. package/front_end/panels/application/module.json +0 -3
  21. package/front_end/panels/console/ConsoleFilter.ts +1 -1
  22. package/front_end/panels/console/ConsolePinPane.ts +1 -0
  23. package/front_end/panels/console/ConsoleViewMessage.ts +2 -19
  24. package/front_end/panels/console_counters/console_counters-meta.ts +0 -3
  25. package/front_end/panels/coverage/CoverageListView.ts +13 -4
  26. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +1 -0
  27. package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -2
  28. package/front_end/panels/elements/ElementsTreeElement.ts +2 -1
  29. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  30. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -0
  31. package/front_end/panels/elements/components/QueryContainer.ts +1 -0
  32. package/front_end/panels/elements/module.json +0 -3
  33. package/front_end/panels/emulation/DeviceModeWrapper.ts +4 -0
  34. package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +18 -2
  35. package/front_end/panels/emulation/module.json +1 -2
  36. package/front_end/panels/help/help-meta.ts +0 -3
  37. package/front_end/panels/input/input-meta.ts +0 -2
  38. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +0 -3
  39. package/front_end/panels/network/module.json +0 -3
  40. package/front_end/panels/performance_monitor/performance_monitor-meta.ts +0 -3
  41. package/front_end/panels/profiler/profilesPanel.css +1 -1
  42. package/front_end/panels/settings/settings-meta.ts +0 -2
  43. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
  44. package/front_end/panels/sources/module.json +0 -4
  45. package/front_end/panels/timeline/module.json +1 -2
  46. package/front_end/panels/web_audio/web_audio-meta.ts +0 -3
  47. package/front_end/panels/webauthn/webauthn-meta.ts +0 -2
  48. package/front_end/ui/components/buttons/button.css +1 -0
  49. package/front_end/ui/components/docs/create_breadcrumbs.ts +1 -0
  50. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -1
  51. package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -0
  52. package/front_end/ui/components/text_editor/config.ts +3 -1
  53. package/front_end/ui/components/text_editor/theme.ts +5 -0
  54. package/front_end/ui/legacy/UIUtils.ts +1 -1
  55. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -1
  56. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +6 -1
  57. package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +2 -1
  58. package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +3 -2
  59. package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +5 -1
  60. package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +2 -1
  61. package/front_end/ui/legacy/components/inline_editor/Swatches.ts +4 -2
  62. package/front_end/ui/legacy/inspectorCommon.css +2 -12
  63. package/front_end/ui/legacy/softDropDownButton.css +0 -11
  64. package/front_end/ui/legacy/themeColors.css +2 -2
  65. package/package.json +1 -1
  66. package/scripts/build/rollup.config.js +3 -0
  67. package/scripts/eslint_rules/lib/ban_a_tags_in_lit_html.js +47 -0
  68. package/scripts/eslint_rules/tests/ban_a_tags_in_lit_html_test.js +60 -0
  69. package/front_end/entrypoints/node_main/module.json +0 -8
  70. package/front_end/panels/console_counters/module.json +0 -5
  71. package/front_end/panels/developer_resources/module.json +0 -5
  72. package/front_end/panels/event_listeners/module.json +0 -5
  73. package/front_end/panels/help/module.json +0 -5
  74. package/front_end/panels/input/module.json +0 -5
  75. package/front_end/panels/mobile_throttling/module.json +0 -5
  76. package/front_end/panels/performance_monitor/module.json +0 -5
  77. package/front_end/panels/search/module.json +0 -5
  78. package/front_end/panels/settings/module.json +0 -5
  79. package/front_end/panels/web_audio/module.json +0 -5
  80. package/front_end/panels/webauthn/module.json +0 -5
  81. package/front_end/ui/legacy/components/color_picker/module.json +0 -8
  82. package/front_end/ui/legacy/components/cookie_table/module.json +0 -8
  83. package/front_end/ui/legacy/components/inline_editor/module.json +0 -14
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type * as Platform from '../../core/platform/platform.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import * as Buttons from '../../ui/components/buttons/buttons.js';
7
8
  import * as SDK from '../../core/sdk/sdk.js';
8
9
  import * as LitHtml from '../../ui/lit-html/lit-html.js';
9
10
  import * as ReportView from '../../ui/components/report_view/report_view.js';
@@ -19,10 +20,6 @@ const UIStrings = {
19
20
  * @description Title text in Back-forward Cache view of the Application panel
20
21
  */
21
22
  mainFrame: 'Main Frame',
22
- /**
23
- * @description Section header text in Back-forward Cache view of the Application panel
24
- */
25
- lastMainFrameNavigation: 'Last Main Frame Navigation',
26
23
  /**
27
24
  * @description Title text in Back-forward Cache view of the Application panel
28
25
  */
@@ -83,6 +80,10 @@ const UIStrings = {
83
80
  * of chrome they will not prevent back-forward cache usage anymore.
84
81
  */
85
82
  supportPending: 'Pending Support',
83
+ /**
84
+ * @description Button name for showing whether BFCache is available in the pages.
85
+ */
86
+ runTest: 'Run Test',
86
87
  /**
87
88
  * @description Explanation for 'pending support' items which prevent the page from being eligible
88
89
  * for back-forward cache.
@@ -131,6 +132,48 @@ export class BackForwardCacheView extends UI.ThrottledWidget.ThrottledWidget {
131
132
  return this.getMainResourceTreeModel()?.mainFrame || null;
132
133
  }
133
134
 
135
+ private async goBackOneHistoryEntry(): Promise<void> {
136
+ SDK.TargetManager.TargetManager.instance().removeModelListener(
137
+ SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.FrameNavigated,
138
+ this.goBackOneHistoryEntry, this);
139
+ const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
140
+ if (!mainTarget) {
141
+ return;
142
+ }
143
+ const resourceTreeModel = mainTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);
144
+ if (!resourceTreeModel) {
145
+ return;
146
+ }
147
+ const historyResults = await resourceTreeModel.navigationHistory();
148
+ if (!historyResults) {
149
+ return;
150
+ }
151
+ resourceTreeModel.navigateToHistoryEntry(historyResults.entries[historyResults.currentIndex - 1]);
152
+ }
153
+
154
+ private async navigateAwayAndBack(): Promise<void> {
155
+ // Checking BFCache Compatibility
156
+
157
+ const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
158
+ if (!mainTarget) {
159
+ return;
160
+ }
161
+ const resourceTreeModel = mainTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);
162
+
163
+ if (resourceTreeModel) {
164
+ // This event is removed by inside of goBackOneHistoryEntry().
165
+ SDK.TargetManager.TargetManager.instance().addModelListener(
166
+ SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.FrameNavigated,
167
+ this.goBackOneHistoryEntry, this);
168
+
169
+ // We can know whether the current page can use BFCache
170
+ // as the browser navigates to another unrelated page and goes back to the current page.
171
+ // We chose "chrome://version" because it must be cross-site.
172
+ // Ideally, We want to have our own testing page like "chrome: //bfcache-test".
173
+ resourceTreeModel.navigate('chrome://version/');
174
+ }
175
+ }
176
+
134
177
  private renderMainFrameInformation(mainFrame: SDK.ResourceTreeModel.ResourceTreeFrame|null): LitHtml.TemplateResult {
135
178
  if (!mainFrame) {
136
179
  return LitHtml.html`<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.mainFrame)}</${
@@ -140,8 +183,13 @@ export class BackForwardCacheView extends UI.ThrottledWidget.ThrottledWidget {
140
183
  </${ReportView.ReportView.ReportValue.litTagName}>`;
141
184
  }
142
185
  return LitHtml.html`
143
- <${ReportView.ReportView.ReportSectionHeader.litTagName}>${i18nString(UIStrings.lastMainFrameNavigation)}</${
144
- ReportView.ReportView.ReportSectionHeader.litTagName}>
186
+ <${ReportView.ReportView.ReportSectionHeader.litTagName}>
187
+ <${Buttons.Button.Button.litTagName}
188
+ .variant=${Buttons.Button.Variant.PRIMARY}
189
+ @click=${this.navigateAwayAndBack}>
190
+ ${i18nString(UIStrings.runTest)}
191
+ </${Buttons.Button.Button.litTagName}>
192
+ </${ReportView.ReportView.ReportSectionHeader.litTagName}>
145
193
  <${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.url)}</${
146
194
  ReportView.ReportView.ReportKey.litTagName}>
147
195
  <${ReportView.ReportView.ReportValue.litTagName}>${mainFrame.url}</${
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy/components/source_frame",
4
- "ui/legacy/components/cookie_table",
5
- "ui/legacy/components/inline_editor",
6
4
  "ui/legacy",
7
5
  "ui/legacy/components/perf_ui",
8
- "panels/mobile_throttling",
9
6
  "panels/network",
10
7
  "panels/sources"
11
8
  ]
@@ -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]) {
@@ -263,6 +263,7 @@ export class ConsolePin {
263
263
  ]),
264
264
  CM.EditorView.domEventHandlers({blur: (_e, view) => this.onBlur(view)}),
265
265
  TE.Config.baseConfiguration(expression),
266
+ TE.Config.autocompletion,
266
267
  ],
267
268
  }));
268
269
  parent.appendChild(this.editor);
@@ -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 {
@@ -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;
@@ -138,8 +138,8 @@ export class CoverageListView extends UI.Widget.VBox {
138
138
  this.highlightRegExp = null;
139
139
 
140
140
  const columns: DataGrid.DataGrid.ColumnDescriptor[] = [
141
- {id: 'url', title: i18nString(UIStrings.url), width: '250px', fixedWidth: false, sortable: true},
142
- {id: 'type', title: i18nString(UIStrings.type), width: '45px', fixedWidth: true, sortable: true},
141
+ {id: 'url', title: i18nString(UIStrings.url), width: '250px', weight: 3, fixedWidth: false, sortable: true},
142
+ {id: 'type', title: i18nString(UIStrings.type), width: '45px', weight: 1, fixedWidth: true, sortable: true},
143
143
  {
144
144
  id: 'size',
145
145
  title: i18nString(UIStrings.totalBytes),
@@ -147,6 +147,7 @@ export class CoverageListView extends UI.Widget.VBox {
147
147
  fixedWidth: true,
148
148
  sortable: true,
149
149
  align: DataGrid.DataGrid.Align.Right,
150
+ weight: 1,
150
151
  },
151
152
  {
152
153
  id: 'unusedSize',
@@ -156,9 +157,17 @@ export class CoverageListView extends UI.Widget.VBox {
156
157
  sortable: true,
157
158
  align: DataGrid.DataGrid.Align.Right,
158
159
  sort: DataGrid.DataGrid.Order.Descending,
160
+ weight: 1,
159
161
  },
160
- {id: 'bars', title: i18nString(UIStrings.usageVisualization), width: '250px', fixedWidth: false, sortable: true},
161
- ] as DataGrid.DataGrid.ColumnDescriptor[];
162
+ {
163
+ id: 'bars',
164
+ title: i18nString(UIStrings.usageVisualization),
165
+ width: '250px',
166
+ fixedWidth: false,
167
+ sortable: true,
168
+ weight: 1,
169
+ },
170
+ ];
162
171
  this.dataGrid = new DataGrid.SortableDataGrid.SortableDataGrid<GridNode>({
163
172
  displayName: i18nString(UIStrings.codeCoverage),
164
173
  columns,
@@ -106,6 +106,7 @@ export class CSSOverviewStartView extends HTMLElement {
106
106
  private render(): void {
107
107
  // Disabled until https://crbug.com/1079231 is fixed.
108
108
  // clang-format off
109
+ // eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
109
110
  render(html`
110
111
  <div class="css-overview-start-view">
111
112
  <h1 class="summary-header">${i18nString(UIStrings.identifyCSSImprovements)}</h1>
@@ -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;
@@ -1049,10 +1049,11 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1049
1049
  },
1050
1050
  ]),
1051
1051
  TextEditor.Config.baseConfiguration(initialValue),
1052
+ TextEditor.Config.autocompletion,
1052
1053
  html(),
1053
1054
  TextEditor.Config.domWordWrap,
1054
1055
  CodeMirror.EditorView.theme({
1055
- '.cm-editor': {maxHeight: '300px'},
1056
+ '&.cm-editor': {maxHeight: '300px'},
1056
1057
  '.cm-scroller': {overflowY: 'auto'},
1057
1058
  }),
1058
1059
  CodeMirror.EditorView.domEventHandlers({
@@ -3055,7 +3055,7 @@ export class StylesSidebarPropertyRenderer {
3055
3055
  }
3056
3056
  processors.push(this.fontHandler);
3057
3057
  }
3058
- if (this.lengthHandler) {
3058
+ if (Root.Runtime.experiments.isEnabled('cssTypeComponentLength') && this.lengthHandler) {
3059
3059
  // TODO(changhaohan): crbug.com/1138628 refactor this to handle unitless 0 cases
3060
3060
  regexes.push(InlineEditor.CSSLengthUtils.CSSLengthRegex);
3061
3061
  processors.push(this.lengthHandler);
@@ -286,6 +286,7 @@ export class ElementsBreadcrumbs extends HTMLElement {
286
286
  crumb: true,
287
287
  selected: crumb.selected,
288
288
  };
289
+ // eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
289
290
  return LitHtml.html`
290
291
  <li class=${LitHtml.Directives.classMap(crumbClasses)}
291
292
  data-node-id=${crumb.node.id}
@@ -81,6 +81,7 @@ export class QueryContainer extends HTMLElement {
81
81
 
82
82
  // Disabled until https://crbug.com/1079231 is fixed.
83
83
  // clang-format off
84
+ // eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
84
85
  render(html`
85
86
 
86
87
  <a href="#"
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "ui/legacy/components/inline_editor",
5
- "ui/legacy/components/color_picker",
6
- "panels/event_listeners",
7
4
  "ui/legacy/components/text_editor"
8
5
  ]
9
6
  }
@@ -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();
@@ -6,6 +6,7 @@ import type * as Platform from '../../../core/platform/platform.js';
6
6
  import * as EmulationModel from '../../../models/emulation/emulation.js';
7
7
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
8
8
  import * as LitHtml from '../../../ui/lit-html/lit-html.js';
9
+ import * as UILegacy from '../../../ui/legacy/legacy.js';
9
10
 
10
11
  class SizeChangedEvent extends Event {
11
12
  static readonly eventName = 'sizechanged';
@@ -14,6 +15,10 @@ class SizeChangedEvent extends Event {
14
15
  }
15
16
  }
16
17
 
18
+ function getInputValue(event: Event): number {
19
+ return Number((event.target as HTMLInputElement).value);
20
+ }
21
+
17
22
  export class SizeInputElement extends HTMLElement {
18
23
  #root = this.attachShadow({mode: 'open'});
19
24
  #disabled = false;
@@ -86,13 +91,24 @@ export class SizeInputElement extends HTMLElement {
86
91
  placeholder=${this.#placeholder}
87
92
  ?disabled=${this.#disabled}
88
93
  .value=${this.#size}
89
- @change=${this.fireSizeChange} />
94
+ @change=${this.fireSizeChange}
95
+ @keydown=${this.handleModifierKeys} />
90
96
  `,
91
97
  this.#root, {host: this});
92
98
  }
93
99
 
94
100
  private fireSizeChange(event: Event): void {
95
- this.dispatchEvent(new SizeChangedEvent(Number((event.target as HTMLInputElement).value)));
101
+ this.dispatchEvent(new SizeChangedEvent(getInputValue(event)));
102
+ }
103
+
104
+ private handleModifierKeys(event: Event): void {
105
+ const modifiedValue = UILegacy.UIUtils.modifiedFloatNumber(getInputValue(event), event);
106
+ if (modifiedValue === null) {
107
+ return;
108
+ }
109
+
110
+ event.preventDefault();
111
+ (event.target as HTMLInputElement).value = String(modifiedValue);
96
112
  }
97
113
  }
98
114
 
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "panels/mobile_throttling"
3
+ "ui/legacy"
5
4
  ],
6
5
  "resources": [
7
6
  "deviceModeToolbar.css",
@@ -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;
@@ -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
@@ -53,8 +52,6 @@ let loadedMobileThrottlingModule: (typeof MobileThrottling|undefined);
53
52
 
54
53
  async function loadMobileThrottlingModule(): Promise<typeof MobileThrottling> {
55
54
  if (!loadedMobileThrottlingModule) {
56
- // Side-effect import resources in module.json
57
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/mobile_throttling');
58
55
  loadedMobileThrottlingModule = await import('./mobile_throttling.js');
59
56
  }
60
57
  return loadedMobileThrottlingModule;
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy/components/cookie_table",
4
- "panels/mobile_throttling",
5
3
  "ui/legacy/components/perf_ui",
6
- "panels/search",
7
4
  "ui/legacy/components/source_frame",
8
5
  "ui/legacy"
9
6
  ]
@@ -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 '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -47,8 +46,6 @@ let loadedPerformanceMonitorModule: (typeof PerformanceMonitor|undefined);
47
46
 
48
47
  async function loadPerformanceMonitorModule(): Promise<typeof PerformanceMonitor> {
49
48
  if (!loadedPerformanceMonitorModule) {
50
- // Side-effect import resources in module.json
51
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/performance_monitor');
52
49
  loadedPerformanceMonitorModule = await import('./performance_monitor.js');
53
50
  }
54
51
  return loadedPerformanceMonitorModule;
@@ -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
 
@@ -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;
@@ -71,6 +71,7 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
71
71
  const editorConfig = [
72
72
  (await CodeMirror.javascript()).javascriptLanguage,
73
73
  TextEditor.Config.baseConfiguration(oldCondition || ''),
74
+ TextEditor.Config.autocompletion,
74
75
  CodeMirror.EditorView.lineWrapping,
75
76
  TextEditor.Config.showCompletionHint,
76
77
  await TextEditor.JavaScript.completion(),
@@ -1,11 +1,7 @@
1
1
  {
2
2
  "dependencies": [
3
3
  "ui/legacy",
4
- "panels/search",
5
4
  "ui/legacy/components/source_frame",
6
- "ui/legacy/components/inline_editor",
7
- "ui/legacy/components/color_picker",
8
- "panels/event_listeners",
9
5
  "panels/coverage"
10
6
  ]
11
7
  }
@@ -4,7 +4,6 @@
4
4
  "panels/coverage",
5
5
  "panels/layer_viewer",
6
6
  "ui/legacy/components/perf_ui",
7
- "panels/profiler",
8
- "panels/mobile_throttling"
7
+ "panels/profiler"
9
8
  ]
10
9
  }
@@ -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 '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -30,8 +29,6 @@ let loadedWebAudioModule: (typeof WebAudio|undefined);
30
29
 
31
30
  async function loadWebAudioModule(): Promise<typeof WebAudio> {
32
31
  if (!loadedWebAudioModule) {
33
- // Side-effect import resources in module.json
34
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/web_audio');
35
32
  loadedWebAudioModule = await import('./web_audio.js');
36
33
  }
37
34
  return loadedWebAudioModule;
@@ -26,8 +26,6 @@ let loadedWebauthnModule: (typeof Webauthn|undefined);
26
26
 
27
27
  async function loadWebauthnModule(): Promise<typeof Webauthn> {
28
28
  if (!loadedWebauthnModule) {
29
- // Side-effect import resources in module.json
30
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/webauthn');
31
29
  loadedWebauthnModule = await import('./webauthn.js');
32
30
  }
33
31
  return loadedWebauthnModule;
@@ -32,6 +32,7 @@ button {
32
32
  display: inline-flex;
33
33
  font-family: inherit;
34
34
  font-size: 12px;
35
+ font-weight: 500;
35
36
  height: 24px;
36
37
  line-height: 14px;
37
38
  padding: 5px 12px;
@@ -6,6 +6,7 @@ import * as LitHtml from '../../lit-html/lit-html.js';
6
6
  export function init(): void {
7
7
  const container = document.createElement('ul');
8
8
  // clang-format off
9
+ // eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
9
10
  LitHtml.render(LitHtml.html`
10
11
 
11
12
  <style>
@@ -48,7 +48,6 @@ export const CSS_RESOURCES_TO_LOAD_INTO_RUNTIME = [
48
48
  'ui/legacy/progressIndicator.css',
49
49
  'panels/application/serviceWorkerUpdateCycleView.css',
50
50
  'ui/legacy/tabbedPane.css',
51
- 'ui/legacy/components/inline_editor/colorSwatch.css',
52
51
  'ui/legacy/glassPane.css',
53
52
  'ui/legacy/suggestBox.css',
54
53
  'ui/legacy/treeoutline.css',
@@ -66,6 +66,7 @@ export class Linkifier extends HTMLElement {
66
66
  // Disabled until https://crbug.com/1079231 is fixed.
67
67
  await coordinator.write(() => {
68
68
  // clang-format off
69
+ // eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
69
70
  LitHtml.render(LitHtml.html`<a class="link" href=${this.#url} @click=${this.onLinkActivation}><slot>${LinkifierUtils.linkText(this.#url, this.#lineNumber)}</slot></a>`, this.#shadow, { host: this});
70
71
  // clang-format on
71
72
  });
@@ -57,7 +57,9 @@ export const tabMovesFocus = DynamicSetting.bool('textEditorTabMovesFocus', CM.k
57
57
  shift: (view: CM.EditorView): boolean => view.state.doc.length ? CM.indentLess(view) : false,
58
58
  }]));
59
59
 
60
- export const autocompletion = DynamicSetting.bool('textEditorAutocompletion', CM.autocompletion({icons: false}));
60
+ export const autocompletion = CM.autocompletion({icons: false});
61
+
62
+ export const sourcesAutocompletion = DynamicSetting.bool('textEditorAutocompletion', autocompletion);
61
63
 
62
64
  export const bracketMatching = DynamicSetting.bool('textEditorBracketMatching', CM.bracketMatching());
63
65
 
@@ -57,6 +57,11 @@ export const editorTheme = CM.EditorView.theme({
57
57
  padding: '0 3px 0 9px',
58
58
  },
59
59
 
60
+ '.cm-matchingBracket, .cm-nonmatchingBracket': {
61
+ background: 'transparent',
62
+ borderBottom: 'none',
63
+ },
64
+
60
65
  '&:focus-within .cm-matchingBracket': {
61
66
  color: 'inherit',
62
67
  backgroundColor: 'var(--color-matching-bracket-background)',
@@ -450,7 +450,7 @@ function modifiedHexValue(hexString: string, event: Event): string|null {
450
450
  return resultString;
451
451
  }
452
452
 
453
- function modifiedFloatNumber(number: number, event: Event, modifierMultiplier?: number): number|null {
453
+ export function modifiedFloatNumber(number: number, event: Event, modifierMultiplier?: number): number|null {
454
454
  const direction = getValueModificationDirection(event);
455
455
  if (!direction) {
456
456
  return null;
@@ -42,6 +42,7 @@ import {ContrastDetails, Events as ContrastDetailsEvents} from './ContrastDetail
42
42
 
43
43
  import type {ContrastInfo} from './ContrastInfo.js';
44
44
  import {ContrastOverlay} from './ContrastOverlay.js';
45
+ import spectrumStyles from './spectrum.css.js';
45
46
 
46
47
  const UIStrings = {
47
48
  /**
@@ -183,7 +184,6 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
183
184
  private colorFormat?: string;
184
185
  constructor(contrastInfo?: ContrastInfo|null) {
185
186
  super(true);
186
- this.registerRequiredCSS('ui/legacy/components/color_picker/spectrum.css');
187
187
 
188
188
  this.contentElement.tabIndex = 0;
189
189
  this.colorElement = this.contentElement.createChild('div', 'spectrum-color');
@@ -1140,6 +1140,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
1140
1140
  }
1141
1141
 
1142
1142
  wasShown(): void {
1143
+ this.registerCSSFiles([spectrumStyles]);
1143
1144
  this.hueAlphaWidth = this.hueElement.offsetWidth;
1144
1145
  this.slideHelperWidth = this.hueSlider.offsetWidth / 2;
1145
1146
  this.dragWidth = this.colorElement.offsetWidth;
@@ -43,6 +43,8 @@ import * as NetworkForward from '../../../../panels/network/forward/forward.js';
43
43
  import * as UI from '../../legacy.js';
44
44
  import * as DataGrid from '../data_grid/data_grid.js';
45
45
 
46
+ import cookiesTableStyles from './cookiesTable.css.js';
47
+
46
48
  const UIStrings = {
47
49
  /**
48
50
  *@description Cookie table cookies table expires session value in Cookies Table of the Cookies table in the Application panel
@@ -124,7 +126,6 @@ export class CookiesTable extends UI.Widget.VBox {
124
126
  deleteCallback?: ((arg0: SDK.Cookie.Cookie, arg1: () => void) => void)) {
125
127
  super();
126
128
 
127
- this.registerRequiredCSS('ui/legacy/components/cookie_table/cookiesTable.css');
128
129
  this.element.classList.add('cookies-table');
129
130
 
130
131
  this.saveCallback = saveCallback;
@@ -286,6 +287,10 @@ export class CookiesTable extends UI.Widget.VBox {
286
287
  this.cookieToBlockedReasons = null;
287
288
  }
288
289
 
290
+ wasShown(): void {
291
+ this.registerCSSFiles([cookiesTableStyles]);
292
+ }
293
+
289
294
  setCookies(
290
295
  cookies: SDK.Cookie.Cookie[],
291
296
  cookieToBlockedReasons?: ReadonlyMap<SDK.Cookie.Cookie, SDK.CookieModel.BlockedReason[]>): void {