chrome-devtools-frontend 1.0.945884 → 1.0.948295

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 (259) hide show
  1. package/.eslintrc.js +1 -0
  2. package/config/gni/all_devtools_files.gni +1 -20
  3. package/config/gni/devtools_grd_files.gni +9 -48
  4. package/config/gni/devtools_image_files.gni +1 -0
  5. package/front_end/.eslintrc.js +6 -1
  6. package/front_end/Images/src/circled_backslash_icon.svg +3 -0
  7. package/front_end/core/host/InspectorFrontendHost.ts +0 -3
  8. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  9. package/front_end/core/host/UserMetrics.ts +1 -23
  10. package/front_end/core/i18n/locales/en-US.json +41 -41
  11. package/front_end/core/i18n/locales/en-XL.json +41 -41
  12. package/front_end/core/platform/platform.ts +0 -2
  13. package/front_end/core/platform/string-utilities.ts +14 -1
  14. package/front_end/core/platform/utilities.ts +0 -29
  15. package/front_end/core/root/Runtime.ts +4 -212
  16. package/front_end/core/sdk/AccessibilityModel.ts +0 -2
  17. package/front_end/core/sdk/CSSProperty.ts +16 -11
  18. package/front_end/core/sdk/CSSRule.ts +0 -2
  19. package/front_end/core/sdk/Cookie.ts +0 -25
  20. package/front_end/core/sdk/EmulationModel.ts +0 -2
  21. package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
  22. package/front_end/core/sdk/NetworkManager.ts +0 -3
  23. package/front_end/core/sdk/Resource.ts +0 -3
  24. package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
  25. package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
  26. package/front_end/core/sdk/sdk-legacy.ts +0 -3
  27. package/front_end/devtools_compatibility.js +1 -8
  28. package/front_end/entrypoints/devtools_app/{devtools_app-meta-files.ts → devtools_app.ts} +9 -2
  29. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -3
  30. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -2
  31. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +0 -120
  32. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -11
  33. package/front_end/entrypoints/formatter_worker/formatter_worker.ts +5 -0
  34. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +2 -1
  35. package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
  36. package/front_end/entrypoints/js_app/{JsMain.ts → js_app.ts} +5 -1
  37. package/front_end/entrypoints/main/MainImpl.ts +0 -7
  38. package/front_end/entrypoints/ndb_app/{ndb_app.js → ndb_app.ts} +3 -2
  39. package/front_end/entrypoints/{node_main → node_app}/NodeConnectionsPanel.ts +1 -1
  40. package/front_end/entrypoints/{node_main → node_app}/NodeMain.ts +2 -4
  41. package/front_end/entrypoints/{node_main → node_app}/nodeConnectionsPanel.css +0 -0
  42. package/front_end/entrypoints/node_app/node_app.ts +79 -0
  43. package/front_end/entrypoints/shell/{shell-meta-files.ts → shell.ts} +7 -1
  44. package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +6 -2
  45. package/front_end/generated/InspectorBackendCommands.js +5 -1
  46. package/front_end/generated/protocol.d.ts +12 -0
  47. package/front_end/legacy/legacy-defs.d.ts +0 -4
  48. package/front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js +0 -1
  49. package/front_end/legacy_test_runner/test_runner/TestRunner.js +35 -59
  50. package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
  51. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
  52. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
  53. package/front_end/models/bindings/ResourceMapping.ts +1 -1
  54. package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
  55. package/front_end/models/emulation/DeviceModeModel.ts +0 -2
  56. package/front_end/models/formatter/FormatterWorkerPool.ts +0 -18
  57. package/front_end/models/issues_manager/CorsIssue.ts +17 -9
  58. package/front_end/models/issues_manager/descriptions/{corsInsecurePrivateNetworkPreflight.md → corsPreflightAllowPrivateNetworkError.md} +1 -1
  59. package/front_end/models/text_utils/CodeMirrorUtils.ts +6 -51
  60. package/front_end/models/text_utils/TextUtils.ts +1 -2
  61. package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
  62. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +3 -1
  63. package/front_end/panels/animation/AnimationTimeline.ts +0 -2
  64. package/front_end/panels/animation/AnimationUI.ts +0 -2
  65. package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
  66. package/front_end/panels/application/BackForwardCacheStrings.ts +2 -5
  67. package/front_end/panels/application/BackForwardCacheView.ts +150 -58
  68. package/front_end/panels/application/ResourcesPanel.ts +0 -42
  69. package/front_end/panels/application/application-legacy.ts +0 -3
  70. package/front_end/panels/application/application-meta.ts +0 -13
  71. package/front_end/panels/application/backForwardCacheView.css +44 -6
  72. package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
  73. package/front_end/panels/application/components/OriginTrialTreeView.ts +3 -3
  74. package/front_end/panels/application/components/StackTrace.ts +1 -1
  75. package/front_end/panels/coverage/CoverageView.ts +1 -1
  76. package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
  77. package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
  78. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
  79. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -0
  80. package/front_end/panels/css_overview/cssOverviewCompletedView.css +1 -1
  81. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -1
  82. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -11
  83. package/front_end/panels/elements/ElementsPanel.ts +9 -1
  84. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  85. package/front_end/panels/elements/StylesSidebarPane.ts +0 -1
  86. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  87. package/front_end/panels/elements/elementsTreeOutline.css +0 -13
  88. package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -16
  89. package/front_end/panels/issues/CorsIssueDetailsView.ts +18 -2
  90. package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
  91. package/front_end/panels/network/NetworkConfigView.ts +10 -0
  92. package/front_end/panels/network/NetworkItemView.ts +3 -0
  93. package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -0
  94. package/front_end/panels/network/networkConfigView.css +5 -0
  95. package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -1
  96. package/front_end/panels/profiler/ProfileDataGrid.ts +2 -1
  97. package/front_end/panels/profiler/profilesPanel.css +1 -1
  98. package/front_end/panels/search/SearchView.ts +24 -4
  99. package/front_end/panels/settings/components/SyncSection.ts +2 -2
  100. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +52 -50
  101. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -12
  102. package/front_end/panels/sources/CSSPlugin.ts +3 -0
  103. package/front_end/panels/sources/CoveragePlugin.ts +2 -0
  104. package/front_end/panels/sources/DebuggerPlugin.ts +35 -7
  105. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
  106. package/front_end/panels/sources/ProfilePlugin.ts +3 -0
  107. package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
  108. package/front_end/panels/sources/sourcesView.css +0 -130
  109. package/front_end/panels/timeline/TimelineTreeView.ts +3 -1
  110. package/front_end/third_party/codemirror/codemirror-tsconfig.json +1 -25
  111. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  112. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  113. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  114. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  115. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  116. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  117. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  118. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  119. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  120. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1486 -1423
  121. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  122. package/front_end/third_party/codemirror.next/package.json +10 -9
  123. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
  124. package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
  125. package/front_end/third_party/lighthouse/locales/ar.json +0 -3
  126. package/front_end/third_party/lighthouse/locales/bg.json +17 -20
  127. package/front_end/third_party/lighthouse/locales/ca.json +0 -3
  128. package/front_end/third_party/lighthouse/locales/cs.json +0 -3
  129. package/front_end/third_party/lighthouse/locales/da.json +16 -19
  130. package/front_end/third_party/lighthouse/locales/de.json +0 -3
  131. package/front_end/third_party/lighthouse/locales/el.json +0 -3
  132. package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
  133. package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
  134. package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
  135. package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
  136. package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
  137. package/front_end/third_party/lighthouse/locales/es.json +0 -3
  138. package/front_end/third_party/lighthouse/locales/fi.json +16 -19
  139. package/front_end/third_party/lighthouse/locales/fil.json +33 -36
  140. package/front_end/third_party/lighthouse/locales/fr.json +16 -19
  141. package/front_end/third_party/lighthouse/locales/he.json +16 -19
  142. package/front_end/third_party/lighthouse/locales/hi.json +0 -3
  143. package/front_end/third_party/lighthouse/locales/hr.json +16 -19
  144. package/front_end/third_party/lighthouse/locales/hu.json +16 -19
  145. package/front_end/third_party/lighthouse/locales/id.json +16 -19
  146. package/front_end/third_party/lighthouse/locales/it.json +37 -40
  147. package/front_end/third_party/lighthouse/locales/ja.json +16 -19
  148. package/front_end/third_party/lighthouse/locales/ko.json +16 -19
  149. package/front_end/third_party/lighthouse/locales/lt.json +17 -20
  150. package/front_end/third_party/lighthouse/locales/lv.json +0 -3
  151. package/front_end/third_party/lighthouse/locales/nl.json +16 -19
  152. package/front_end/third_party/lighthouse/locales/no.json +17 -20
  153. package/front_end/third_party/lighthouse/locales/pl.json +16 -19
  154. package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
  155. package/front_end/third_party/lighthouse/locales/pt.json +16 -19
  156. package/front_end/third_party/lighthouse/locales/ro.json +0 -3
  157. package/front_end/third_party/lighthouse/locales/ru.json +16 -19
  158. package/front_end/third_party/lighthouse/locales/sk.json +0 -3
  159. package/front_end/third_party/lighthouse/locales/sl.json +0 -3
  160. package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
  161. package/front_end/third_party/lighthouse/locales/sr.json +16 -19
  162. package/front_end/third_party/lighthouse/locales/sv.json +17 -20
  163. package/front_end/third_party/lighthouse/locales/ta.json +0 -3
  164. package/front_end/third_party/lighthouse/locales/te.json +0 -3
  165. package/front_end/third_party/lighthouse/locales/th.json +0 -3
  166. package/front_end/third_party/lighthouse/locales/tr.json +0 -3
  167. package/front_end/third_party/lighthouse/locales/uk.json +17 -20
  168. package/front_end/third_party/lighthouse/locales/vi.json +0 -3
  169. package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
  170. package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
  171. package/front_end/third_party/lighthouse/locales/zh.json +0 -3
  172. package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
  173. package/front_end/third_party/lighthouse/report/bundle.js +36 -7
  174. package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
  175. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  176. package/front_end/ui/components/helpers/component-server-setup.ts +1 -12
  177. package/front_end/ui/components/helpers/helpers.ts +0 -2
  178. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  179. package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
  180. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +3 -3
  181. package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
  182. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +98 -0
  183. package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
  184. package/front_end/ui/components/panel_feedback/previewToggle.css +24 -0
  185. package/front_end/ui/components/report_view/ReportView.ts +22 -0
  186. package/front_end/ui/components/report_view/reportSection.css +20 -0
  187. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  188. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -2
  189. package/front_end/ui/components/text_editor/config.ts +11 -9
  190. package/front_end/ui/components/text_editor/javascript.ts +34 -12
  191. package/front_end/ui/components/text_editor/theme.ts +1 -0
  192. package/front_end/ui/components/text_prompt/TextPrompt.ts +2 -2
  193. package/front_end/ui/legacy/GlassPane.ts +1 -1
  194. package/front_end/ui/legacy/InspectorView.ts +10 -0
  195. package/front_end/ui/legacy/SearchableView.ts +2 -1
  196. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  197. package/front_end/ui/legacy/Widget.ts +1 -1
  198. package/front_end/ui/legacy/XWidget.ts +0 -5
  199. package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +2 -2
  200. package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
  201. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -3
  202. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +0 -1
  203. package/front_end/ui/legacy/components/object_ui/object_ui-legacy.ts +0 -8
  204. package/front_end/ui/legacy/components/object_ui/object_ui.ts +0 -4
  205. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -29
  206. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +0 -211
  207. package/front_end/ui/legacy/legacy-legacy.ts +0 -6
  208. package/front_end/ui/legacy/legacy.ts +0 -2
  209. package/front_end/ui/legacy/tabbedPane.css +1 -1
  210. package/front_end/ui/legacy/themeColors.css +1 -1
  211. package/front_end/ui/legacy/utils/append-style.ts +2 -13
  212. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +7 -5
  213. package/package.json +2 -4
  214. package/scripts/build/build_inspector_overlay.py +15 -1
  215. package/scripts/build/rjsmin.py +84 -115
  216. package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
  217. package/scripts/eslint_rules/lib/lit_html_no_attribute_quotes.js +101 -0
  218. package/scripts/eslint_rules/lib/no_only_eslint_tests.js +53 -0
  219. package/scripts/eslint_rules/tests/.eslintrc.js +14 -0
  220. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
  221. package/scripts/eslint_rules/tests/lit_html_no_attribute_quotes_test.js +45 -0
  222. package/scripts/eslint_rules/tests/no_only_eslint_tests_test.js +94 -0
  223. package/scripts/hosted_mode/server.js +17 -2
  224. package/front_end/entrypoints/devtools_app/devtools_app.js +0 -8
  225. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -6
  226. package/front_end/entrypoints/inspector/inspector.json +0 -4
  227. package/front_end/entrypoints/js_app/js_app.js +0 -9
  228. package/front_end/entrypoints/js_app/js_app.json +0 -4
  229. package/front_end/entrypoints/ndb_app/ndb_app.json +0 -5
  230. package/front_end/entrypoints/node_app/node_app-meta.ts +0 -43
  231. package/front_end/entrypoints/node_app/node_app.js +0 -13
  232. package/front_end/entrypoints/node_app/node_app.json +0 -4
  233. package/front_end/entrypoints/node_main/node_main-meta.ts +0 -48
  234. package/front_end/entrypoints/node_main/node_main.ts +0 -11
  235. package/front_end/entrypoints/shell/shell.js +0 -13
  236. package/front_end/entrypoints/shell/shell.json +0 -5
  237. package/front_end/entrypoints/startup/RuntimeInstantiator.ts +0 -95
  238. package/front_end/entrypoints/startup/startup.ts +0 -9
  239. package/front_end/entrypoints/worker_app/worker_app.json +0 -4
  240. package/front_end/panels/lighthouse/module.json +0 -6
  241. package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
  242. package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
  243. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
  244. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -45
  245. package/front_end/ui/legacy/TextEditor.ts +0 -82
  246. package/front_end/ui/legacy/components/object_ui/JavaScriptAutocomplete.ts +0 -836
  247. package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +0 -1676
  248. package/front_end/ui/legacy/components/text_editor/TextEditorAutocompleteController.ts +0 -586
  249. package/front_end/ui/legacy/components/text_editor/autocompleteTooltip.css +0 -20
  250. package/front_end/ui/legacy/components/text_editor/cm_modes.ts +0 -23
  251. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +0 -995
  252. package/front_end/ui/legacy/components/text_editor/module.json +0 -7
  253. package/front_end/ui/legacy/components/text_editor/text_editor-legacy.ts +0 -33
  254. package/front_end/ui/legacy/components/text_editor/text_editor.ts +0 -13
  255. package/scripts/build/build_release_applications.py +0 -216
  256. package/scripts/build/modular_build.py +0 -184
  257. package/scripts/check_gn.js +0 -119
  258. package/scripts/json_validator/module.schema.json +0 -19
  259. package/scripts/json_validator/validate_module_json.js +0 -44
@@ -3,9 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
- import * as Host from '../../core/host/host.js';
7
6
  import * as i18n from '../../core/i18n/i18n.js';
8
- import * as Root from '../../core/root/root.js';
9
7
  import * as Bindings from '../../models/bindings/bindings.js';
10
8
  import * as ColorPicker from '../../ui/legacy/components/color_picker/color_picker.js';
11
9
  import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
@@ -55,9 +53,6 @@ export class BezierPopoverIcon {
55
53
  }
56
54
 
57
55
  private iconClick(event: Event): void {
58
- if (Root.Runtime.experiments.isEnabled('fontEditor')) {
59
- Host.userMetrics.cssEditorOpened('bezierEditor');
60
- }
61
56
  event.consume(true);
62
57
  if (this.swatchPopoverHelper.isShowing()) {
63
58
  this.swatchPopoverHelper.hide(true);
@@ -163,9 +158,6 @@ export class ColorSwatchPopoverIcon {
163
158
  }
164
159
 
165
160
  private iconClick(event: Event): void {
166
- if (Root.Runtime.experiments.isEnabled('fontEditor')) {
167
- Host.userMetrics.cssEditorOpened('colorPicker');
168
- }
169
161
  event.consume(true);
170
162
  this.showPopover();
171
163
  }
@@ -278,9 +270,6 @@ export class ShadowSwatchPopoverHelper {
278
270
  }
279
271
 
280
272
  private iconClick(event: Event): void {
281
- if (Root.Runtime.experiments.isEnabled('fontEditor')) {
282
- Host.userMetrics.cssEditorOpened('shadowEditor');
283
- }
284
273
  event.consume(true);
285
274
  this.showPopover();
286
275
  }
@@ -291,8 +291,16 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
291
291
  }
292
292
 
293
293
  private showDOMTree(): void {
294
- // TODO(meredithl): Scroll to inspected DOM node.
295
294
  this.splitWidget.setMainWidget(this.searchableViewInternal);
295
+ const selectedNode = this.selectedDOMNode();
296
+ if (!selectedNode) {
297
+ return;
298
+ }
299
+ const treeElement = this.treeElementForNode(selectedNode);
300
+ if (!treeElement) {
301
+ return;
302
+ }
303
+ treeElement.select();
296
304
  }
297
305
 
298
306
  static instance(opts: {
@@ -1899,7 +1899,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1899
1899
  this.hideSearchHighlight();
1900
1900
 
1901
1901
  const text = this.listItemElement.textContent || '';
1902
- const regexObject = createPlainTextSearchRegex(this.searchQuery, 'gi');
1902
+ const regexObject = Platform.StringUtilities.createPlainTextSearchRegex(this.searchQuery, 'gi');
1903
1903
 
1904
1904
  let match = regexObject.exec(text);
1905
1905
  const matchRanges = [];
@@ -1616,7 +1616,6 @@ export class StylePropertiesSection {
1616
1616
 
1617
1617
  private onFontEditorButtonClicked(): void {
1618
1618
  if (this.fontEditorSectionManager && this.fontEditorButton) {
1619
- Host.userMetrics.cssEditorOpened('fontEditor');
1620
1619
  this.fontEditorSectionManager.showPopover(this.fontEditorButton.element, this.parentPane);
1621
1620
  }
1622
1621
  }
@@ -276,7 +276,7 @@ export class ElementsBreadcrumbs extends HTMLElement {
276
276
  // Disabled until https://crbug.com/1079231 is fixed.
277
277
  // clang-format off
278
278
  LitHtml.render(LitHtml.html`
279
- <nav class="crumbs" aria-label="${i18nString(UIStrings.breadcrumbs)}">
279
+ <nav class="crumbs" aria-label=${i18nString(UIStrings.breadcrumbs)}>
280
280
  ${this.renderOverflowButton('left', this.userScrollPosition === 'start')}
281
281
 
282
282
  <div class="crumbs-window" @scroll=${this.onCrumbsWindowScroll}>
@@ -186,19 +186,6 @@
186
186
  margin-right: 4px;
187
187
  }
188
188
 
189
- .CodeMirror {
190
- background-color: var(--color-background);
191
- height: 300px !important; /* stylelint-disable-line declaration-no-important */
192
- }
193
-
194
- .CodeMirror-lines {
195
- padding: 0;
196
- }
197
-
198
- .CodeMirror pre {
199
- padding: 0;
200
- }
201
-
202
189
  button,
203
190
  input,
204
191
  select {
@@ -225,10 +225,6 @@ export class DeviceModeToolbar {
225
225
  showMediaInspectorSetting: Common.Settings.Setting<boolean>,
226
226
  showRulersSetting: Common.Settings.Setting<boolean>) {
227
227
  this.model = model;
228
- const device = model.device();
229
- if (device) {
230
- this.recordDeviceChange(device, null);
231
- }
232
228
  this.showMediaInspectorSetting = showMediaInspectorSetting;
233
229
  this.showRulersSetting = showRulersSetting;
234
230
 
@@ -302,16 +298,6 @@ export class DeviceModeToolbar {
302
298
  }
303
299
  }
304
300
 
305
- private recordDeviceChange(
306
- device: EmulationModel.EmulatedDevices.EmulatedDevice,
307
- oldDevice: EmulationModel.EmulatedDevices.EmulatedDevice|null): void {
308
- if (device !== oldDevice && device && device.isDualScreen) {
309
- // When we start emulating a device, whether we start a new emulation session, or switch to
310
- // a new device, if the device is dual screen, we count this once.
311
- Host.userMetrics.dualScreenDeviceEmulated(Host.UserMetrics.DualScreenDeviceEmulated.DualScreenDeviceSelected);
312
- }
313
- }
314
-
315
301
  private createEmptyToolbarElement(): Element {
316
302
  const element = document.createElement('div');
317
303
  element.classList.add('device-mode-empty-toolbar-element');
@@ -527,7 +513,6 @@ export class DeviceModeToolbar {
527
513
 
528
514
  private emulateDevice(device: EmulationModel.EmulatedDevices.EmulatedDevice): void {
529
515
  const scale = this.autoAdjustScaleSetting.get() ? undefined : this.model.scaleSetting().get();
530
- this.recordDeviceChange(device, this.model.device());
531
516
  this.model.emulate(
532
517
  EmulationModel.DeviceModeModel.Type.Device, device, this.lastMode.get(device) || device.modes[0], scale);
533
518
  }
@@ -615,7 +600,6 @@ export class DeviceModeToolbar {
615
600
  return;
616
601
  }
617
602
 
618
- Host.userMetrics.dualScreenDeviceEmulated(Host.UserMetrics.DualScreenDeviceEmulated.SpanButtonClicked);
619
603
  const scale = this.autoAdjustScaleSetting.get() ? undefined : this.model.scaleSetting().get();
620
604
  const mode = this.model.mode();
621
605
  if (!mode) {
@@ -174,11 +174,16 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
174
174
  this.appendColumnTitle(header, i18nString(UIStrings.allowCredentialsValueFromHeader));
175
175
  break;
176
176
  case IssuesManager.CorsIssue.IssueCode.InsecurePrivateNetwork:
177
- case IssuesManager.CorsIssue.IssueCode.InsecurePrivateNetworkPreflight:
178
177
  this.appendColumnTitle(header, i18nString(UIStrings.resourceAddressSpace));
179
178
  this.appendColumnTitle(header, i18nString(UIStrings.initiatorAddressSpace));
180
179
  this.appendColumnTitle(header, i18nString(UIStrings.initiatorContext));
181
180
  break;
181
+ case IssuesManager.CorsIssue.IssueCode.PreflightAllowPrivateNetworkError:
182
+ this.appendColumnTitle(header, i18nString(UIStrings.preflightRequest));
183
+ this.appendColumnTitle(header, i18nString(UIStrings.invalidValue));
184
+ this.appendColumnTitle(header, i18nString(UIStrings.initiatorAddressSpace));
185
+ this.appendColumnTitle(header, i18nString(UIStrings.initiatorContext));
186
+ break;
182
187
  case IssuesManager.CorsIssue.IssueCode.MethodDisallowedByPreflightResponse:
183
188
  this.appendColumnTitle(header, i18nString(UIStrings.preflightRequest));
184
189
  this.appendColumnTitle(header, i18nString(UIStrings.disallowedRequestMethod));
@@ -249,6 +254,9 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
249
254
  case Protocol.Network.CorsError.InvalidAllowCredentials:
250
255
  case Protocol.Network.CorsError.PreflightInvalidAllowCredentials:
251
256
  return 'Access-Control-Allow-Credentials';
257
+ case Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork:
258
+ case Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork:
259
+ return 'Access-Control-Allow-Private-Network';
252
260
  case Protocol.Network.CorsError.RedirectContainsCredentials:
253
261
  case Protocol.Network.CorsError.PreflightDisallowedRedirect:
254
262
  return 'Location';
@@ -360,13 +368,21 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
360
368
  this.appendIssueDetailCell(element, details.corsErrorStatus.failedParameter, 'code-example');
361
369
  break;
362
370
  case IssuesManager.CorsIssue.IssueCode.InsecurePrivateNetwork:
363
- case IssuesManager.CorsIssue.IssueCode.InsecurePrivateNetworkPreflight:
364
371
  element.appendChild(this.createRequestCell(details.request, opts));
365
372
  this.appendStatus(element, details.isWarning);
366
373
  this.appendIssueDetailCell(element, details.resourceIPAddressSpace ?? '');
367
374
  this.appendIssueDetailCell(element, details.clientSecurityState?.initiatorIPAddressSpace ?? '');
368
375
  this.appendSecureContextCell(element, details.clientSecurityState?.initiatorIsSecureContext);
369
376
  break;
377
+ case IssuesManager.CorsIssue.IssueCode.PreflightAllowPrivateNetworkError: {
378
+ element.appendChild(this.createRequestCell(details.request, opts));
379
+ this.appendStatus(element, details.isWarning);
380
+ element.appendChild(this.createRequestCell(details.request, {...opts, linkToPreflight: true, highlightHeader}));
381
+ this.appendIssueDetailCell(element, details.corsErrorStatus.failedParameter, 'code-example');
382
+ this.appendIssueDetailCell(element, details.clientSecurityState?.initiatorIPAddressSpace ?? '');
383
+ this.appendSecureContextCell(element, details.clientSecurityState?.initiatorIsSecureContext);
384
+ break;
385
+ }
370
386
  case IssuesManager.CorsIssue.IssueCode.MethodDisallowedByPreflightResponse:
371
387
  element.appendChild(this.createRequestCell(details.request, opts));
372
388
  this.appendStatus(element, details.isWarning);
@@ -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
  import type * as Lighthouse from './lighthouse.js';
@@ -22,8 +21,6 @@ let loadedLighthouseModule: (typeof Lighthouse|undefined);
22
21
 
23
22
  async function loadLighthouseModule(): Promise<typeof Lighthouse> {
24
23
  if (!loadedLighthouseModule) {
25
- // Side-effect import resources in module.json
26
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/lighthouse');
27
24
  loadedLighthouseModule = await import('./lighthouse.js');
28
25
  }
29
26
  return loadedLighthouseModule;
@@ -50,6 +50,10 @@ const UIStrings = {
50
50
  * a set of checkboxes to override the content encodings supported by the browser.
51
51
  */
52
52
  acceptedEncoding: 'Accepted `Content-Encoding`s',
53
+ /**
54
+ * @description Status text for successful update of client hints.
55
+ */
56
+ clientHintsStatusText: 'User agent updated.',
53
57
  };
54
58
  const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkConfigView.ts', UIStrings);
55
59
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -246,10 +250,12 @@ export class NetworkConfigView extends UI.Widget.VBox {
246
250
  showMobileCheckbox: true,
247
251
  showSubmitButton: true,
248
252
  };
253
+ userAgentUpdateButtonStatusText.textContent = '';
249
254
  });
250
255
 
251
256
  clientHints.addEventListener('clienthintschange', () => {
252
257
  customSelectAndInput.select.value = 'custom';
258
+ userAgentUpdateButtonStatusText.textContent = '';
253
259
  });
254
260
 
255
261
  clientHints.addEventListener('clienthintssubmit', (event: Event) => {
@@ -257,8 +263,12 @@ export class NetworkConfigView extends UI.Widget.VBox {
257
263
  const customUA = customUserAgentSetting.get();
258
264
  userAgentMetadataSetting.set(metaData);
259
265
  SDK.NetworkManager.MultitargetNetworkManager.instance().setCustomUserAgentOverride(customUA, metaData);
266
+ userAgentUpdateButtonStatusText.textContent = i18nString(UIStrings.clientHintsStatusText);
260
267
  });
261
268
 
269
+ const userAgentUpdateButtonStatusText = section.createChild('span', 'status-text');
270
+ userAgentUpdateButtonStatusText.textContent = '';
271
+
262
272
  userAgentSelectBoxChanged();
263
273
 
264
274
  function userAgentSelectBoxChanged(): void {
@@ -250,6 +250,9 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
250
250
  }
251
251
 
252
252
  private async maybeAppendPayloadPanel(): Promise<void> {
253
+ if (this.hasTab('payload')) {
254
+ return;
255
+ }
253
256
  if (this.requestInternal.queryParameters || await this.requestInternal.requestFormData()) {
254
257
  this.payloadView = new RequestPayloadView(this.requestInternal);
255
258
  this.appendTab(
@@ -16,6 +16,7 @@ import {RequestTimeRangeNameToColor} from './NetworkOverview.js';
16
16
  import type {Label, NetworkTimeCalculator} from './NetworkTimeCalculator.js';
17
17
  import type {RequestTimeRange} from './RequestTimingView.js';
18
18
  import {RequestTimeRangeNames, RequestTimingView} from './RequestTimingView.js';
19
+ import networkingTimingTableStyles from './networkTimingTable.css.js';
19
20
 
20
21
  const BAR_SPACING = 1;
21
22
 
@@ -271,6 +272,7 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
271
272
  show: (popover: UI.GlassPane.GlassPane): Promise<true> => {
272
273
  const content =
273
274
  RequestTimingView.createTimingTable((request as SDK.NetworkRequest.NetworkRequest), this.calculator);
275
+ popover.registerCSSFiles([networkingTimingTableStyles]);
274
276
  popover.contentElement.appendChild(content);
275
277
  return Promise.resolve(true);
276
278
  },
@@ -99,3 +99,8 @@
99
99
  margin-top: 14px;
100
100
  width: min(100%, 400px);
101
101
  }
102
+
103
+ .status-text {
104
+ padding: 10px;
105
+ color: var(--color-accent-green);
106
+ }
@@ -30,6 +30,7 @@
30
30
 
31
31
  import * as Common from '../../core/common/common.js';
32
32
  import * as Host from '../../core/host/host.js';
33
+ import * as Platform from '../../core/platform/platform.js';
33
34
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
34
35
  import type * as SDK from '../../core/sdk/sdk.js';
35
36
  import * as UI from '../../ui/legacy/legacy.js';
@@ -217,7 +218,8 @@ export class CPUProfileFlameChart extends
217
218
  }
218
219
 
219
220
  performSearch(searchConfig: UI.SearchableView.SearchConfig, _shouldJump: boolean, jumpBackwards?: boolean): void {
220
- const matcher = createPlainTextSearchRegex(searchConfig.query, searchConfig.caseSensitive ? '' : 'i');
221
+ const matcher =
222
+ Platform.StringUtilities.createPlainTextSearchRegex(searchConfig.query, searchConfig.caseSensitive ? '' : 'i');
221
223
 
222
224
  const selectedEntryIndex: number = this.searchResultIndex !== -1 ? this.searchResults[this.searchResultIndex] : -1;
223
225
  this.searchResults = [];
@@ -28,6 +28,7 @@
28
28
  */
29
29
 
30
30
  import * as i18n from '../../core/i18n/i18n.js';
31
+ import * as Platform from '../../core/platform/platform.js';
31
32
  import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
32
33
 
33
34
  import type * as SDK from '../../core/sdk/sdk.js';
@@ -528,7 +529,7 @@ export class ProfileDataGridTree implements UI.SearchableView.Searchable {
528
529
  equalTo = true;
529
530
  }
530
531
 
531
- const matcher = createPlainTextSearchRegex(query, 'i');
532
+ const matcher = Platform.StringUtilities.createPlainTextSearchRegex(query, 'i');
532
533
 
533
534
  function matchesQuery(profileDataGridNode: ProfileDataGridNode): boolean {
534
535
  profileDataGridNode.searchMatchedSelfColumn = false;
@@ -55,7 +55,7 @@
55
55
 
56
56
  .profile-view .data-grid span.percent-column {
57
57
  color: var(--color-text-secondary);
58
- width: 55px;
58
+ width: 9ex;
59
59
  display: inline-block;
60
60
  }
61
61
 
@@ -432,18 +432,38 @@ export class SearchView extends UI.Widget.VBox {
432
432
  }
433
433
  }
434
434
 
435
+ /**
436
+ * Handles keydown event on panel itself for handling expand/collapse all shortcut
437
+ *
438
+ * We use `event.code` instead of `event.key` here to check whether the shortcut is triggered.
439
+ * The reason is, `event.key` is dependent on the modification keys, locale and keyboard layout.
440
+ * Usually it is useful when we care about the character that needs to be printed.
441
+ *
442
+ * However, our aim in here is to assign a shortcut to the physical key combination on the keyboard
443
+ * not on the character that the key combination prints.
444
+ *
445
+ * For example, `Cmd + [` shortcut in global shortcuts map to focusing on previous panel.
446
+ * In Turkish - Q keyboard layout, the key combination that triggers the shortcut prints `ğ`
447
+ * character. Whereas in Turkish - Q Legacy keyboard layout, the shortcut that triggers focusing
448
+ * on previous panel prints `[` character. So, if we use `event.key` and check
449
+ * whether it is `[`, we break the shortcut in Turkish - Q keyboard layout.
450
+ *
451
+ * @param event KeyboardEvent
452
+ */
435
453
  private onKeyDownOnPanel(event: KeyboardEvent): void {
436
454
  const isMac = Host.Platform.isMac();
437
455
  // "Command + Alt + ]" for Mac
438
- const shouldShowAllForMac = isMac && event.metaKey && !event.ctrlKey && event.altKey && event.key === ']';
456
+ const shouldShowAllForMac =
457
+ isMac && event.metaKey && !event.ctrlKey && event.altKey && event.code === 'BracketRight';
439
458
  // "Ctrl + Shift + }" for other platforms
440
459
  const shouldShowAllForOtherPlatforms =
441
- !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.key === '}';
460
+ !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketRight';
442
461
  // "Command + Alt + [" for Mac
443
- const shouldCollapseAllForMac = isMac && event.metaKey && !event.ctrlKey && event.altKey && event.key === '[';
462
+ const shouldCollapseAllForMac =
463
+ isMac && event.metaKey && !event.ctrlKey && event.altKey && event.code === 'BracketLeft';
444
464
  // "Command + Alt + {" for other platforms
445
465
  const shouldCollapseAllForOtherPlatforms =
446
- !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.key === '{';
466
+ !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketLeft';
447
467
 
448
468
  if (shouldShowAllForMac || shouldShowAllForOtherPlatforms) {
449
469
  this.searchResultsPane?.showAllMatches();
@@ -92,7 +92,7 @@ function renderAccountInfoOrWarning(syncInfo: Host.InspectorFrontendHostAPI.Sync
92
92
  // clang-format off
93
93
  return LitHtml.html`
94
94
  <span class="warning">
95
- ${i18nString(UIStrings.syncDisabled)} <a href="${link}" class="link" target="_blank"
95
+ ${i18nString(UIStrings.syncDisabled)} <a href=${link} class="link" target="_blank"
96
96
  @click=${(e: Event): void => openSettingsTab(link, e)}
97
97
  @keydown=${(e: Event): void => openSettingsTab(link, e)}>${i18nString(UIStrings.settings)}</x-link>
98
98
  </span>`;
@@ -104,7 +104,7 @@ function renderAccountInfoOrWarning(syncInfo: Host.InspectorFrontendHostAPI.Sync
104
104
  // clang-format off
105
105
  return LitHtml.html`
106
106
  <span class="warning">
107
- ${i18nString(UIStrings.preferencesSyncDisabled)} <a href="${link}" class="link" target="_blank"
107
+ ${i18nString(UIStrings.preferencesSyncDisabled)} <a href=${link} class="link" target="_blank"
108
108
  @click=${(e: Event): void => openSettingsTab(link, e)}
109
109
  @keydown=${(e: Event): void => openSettingsTab(link, e)}>${i18nString(UIStrings.settings)}</x-link>
110
110
  </span>`;
@@ -3,8 +3,10 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../../../core/i18n/i18n.js';
6
+ import * as Buttons from '../../../../ui/components/buttons/buttons.js';
6
7
  import * as ComponentHelpers from '../../../../ui/components/helpers/helpers.js';
7
8
  import * as LitHtml from '../../../../ui/lit-html/lit-html.js';
9
+
8
10
  import userAgentClientHintsFormStyles from './userAgentClientHintsForm.css.js';
9
11
 
10
12
  import type * as Protocol from '../../../../generated/protocol.js';
@@ -354,9 +356,9 @@ export class UserAgentClientHintsForm extends HTMLElement {
354
356
  <input
355
357
  class="input-field"
356
358
  type="text"
357
- @input="${handleInputChange}"
358
- .value="${value}"
359
- placeholder="${placeholder}"
359
+ @input=${handleInputChange}
360
+ .value=${value}
361
+ placeholder=${placeholder}
360
362
  />
361
363
  </label>
362
364
  `;
@@ -374,22 +376,22 @@ export class UserAgentClientHintsForm extends HTMLElement {
374
376
  };
375
377
  return LitHtml.html`
376
378
  <span class="full-row label">${i18nString(UIStrings.platformLabel)}</span>
377
- <div class="full-row brand-row" aria-label="${i18nString(UIStrings.platformProperties)}" role="group">
379
+ <div class="full-row brand-row" aria-label=${i18nString(UIStrings.platformProperties)} role="group">
378
380
  <input
379
381
  class="input-field half-row"
380
382
  type="text"
381
- @input="${handlePlatformNameChange}"
382
- .value="${platform}"
383
- placeholder="${i18nString(UIStrings.platformPlaceholder)}"
384
- aria-label="${i18nString(UIStrings.platformLabel)}"
383
+ @input=${handlePlatformNameChange}
384
+ .value=${platform}
385
+ placeholder=${i18nString(UIStrings.platformPlaceholder)}
386
+ aria-label=${i18nString(UIStrings.platformLabel)}
385
387
  />
386
388
  <input
387
389
  class="input-field half-row"
388
390
  type="text"
389
- @input="${handlePlatformVersionChange}"
390
- .value="${platformVersion}"
391
- placeholder="${i18nString(UIStrings.platformVersion)}"
392
- aria-label="${i18nString(UIStrings.platformVersion)}"
391
+ @input=${handlePlatformVersionChange}
392
+ .value=${platformVersion}
393
+ placeholder=${i18nString(UIStrings.platformVersion)}
394
+ aria-label=${i18nString(UIStrings.platformVersion)}
393
395
  />
394
396
  </div>
395
397
  `;
@@ -407,20 +409,20 @@ export class UserAgentClientHintsForm extends HTMLElement {
407
409
  };
408
410
  const mobileCheckboxInput = this.showMobileCheckbox ? LitHtml.html`
409
411
  <label class="mobile-checkbox-container">
410
- <input type="checkbox" @input="${handleMobileChange}" .checked="${mobile}" />
412
+ <input type="checkbox" @input=${handleMobileChange} .checked=${mobile} />
411
413
  ${i18nString(UIStrings.mobileCheckboxLabel)}
412
414
  </label>
413
415
  ` :
414
416
  LitHtml.html``;
415
417
  return LitHtml.html`
416
418
  <span class="full-row label">${i18nString(UIStrings.deviceModel)}</span>
417
- <div class="full-row brand-row" aria-label="${i18nString(UIStrings.deviceProperties)}" role="group">
419
+ <div class="full-row brand-row" aria-label=${i18nString(UIStrings.deviceProperties)} role="group">
418
420
  <input
419
421
  class="input-field ${this.showMobileCheckbox ? 'device-model-input' : 'full-row'}"
420
422
  type="text"
421
- @input="${handleDeviceModelChange}"
422
- .value="${model}"
423
- placeholder="${i18nString(UIStrings.deviceModel)}"
423
+ @input=${handleDeviceModelChange}
424
+ .value=${model}
425
+ placeholder=${i18nString(UIStrings.deviceModel)}
424
426
  />
425
427
  ${mobileCheckboxInput}
426
428
  </div>
@@ -457,41 +459,41 @@ export class UserAgentClientHintsForm extends HTMLElement {
457
459
  this.handleBrandInputChange(value, index, 'brandVersion');
458
460
  };
459
461
  return LitHtml.html`
460
- <div class="full-row brand-row" aria-label="${i18nString(UIStrings.brandProperties)}" role="group">
462
+ <div class="full-row brand-row" aria-label=${i18nString(UIStrings.brandProperties)} role="group">
461
463
  <input
462
464
  class="input-field brand-name-input"
463
465
  type="text"
464
- @input="${handleBrandBrowserChange}"
465
- .value="${brand}"
466
+ @input=${handleBrandBrowserChange}
467
+ .value=${brand}
466
468
  id="brand-${index + 1}-input"
467
- placeholder="${i18nString(UIStrings.brandName)}"
468
- aria-label="${i18nString(UIStrings.brandNameAriaLabel, {
469
+ placeholder=${i18nString(UIStrings.brandName)}
470
+ aria-label=${i18nString(UIStrings.brandNameAriaLabel, {
469
471
  PH1: index + 1,
470
- })}"
472
+ })}
471
473
  />
472
474
  <input
473
475
  class="input-field"
474
476
  type="text"
475
- @input="${handleBrandVersionChange}"
476
- .value="${version}"
477
- placeholder="${i18nString(UIStrings.version)}"
478
- aria-label="${i18nString(UIStrings.brandVersionAriaLabel, {
477
+ @input=${handleBrandVersionChange}
478
+ .value=${version}
479
+ placeholder=${i18nString(UIStrings.version)}
480
+ aria-label=${i18nString(UIStrings.brandVersionAriaLabel, {
479
481
  PH1: index + 1,
480
- })}"
482
+ })}
481
483
  />
482
484
  <${IconButton.Icon.Icon.litTagName}
483
485
  .data=${
484
486
  {color: 'var(--client-hints-form-icon-color)', iconName: 'trash_bin_icon', width: '10px', height: '14px'} as
485
487
  IconButton.Icon.IconData}
486
- title="${i18nString(UIStrings.deleteTooltip)}"
488
+ title=${i18nString(UIStrings.deleteTooltip)}
487
489
  class="delete-icon"
488
490
  tabindex="0"
489
491
  role="button"
490
- @click="${handleDeleteClick}"
491
- @keypress="${handleKeyPress}"
492
- aria-label="${i18nString(UIStrings.brandDeleteAriaLabel, {
492
+ @click=${handleDeleteClick}
493
+ @keypress=${handleKeyPress}
494
+ aria-label=${i18nString(UIStrings.brandDeleteAriaLabel, {
493
495
  PH1: index + 1,
494
- })}"
496
+ })}
495
497
  >
496
498
  </${IconButton.Icon.Icon.litTagName}>
497
499
  </div>
@@ -505,9 +507,9 @@ export class UserAgentClientHintsForm extends HTMLElement {
505
507
  role="button"
506
508
  tabindex="0"
507
509
  id="add-brand-button"
508
- aria-label="${i18nString(UIStrings.addBrand)}"
509
- @click="${this.handleAddBrandClick}"
510
- @keypress="${this.handleAddBrandKeyPress}"
510
+ aria-label=${i18nString(UIStrings.addBrand)}
511
+ @click=${this.handleAddBrandClick}
512
+ @keypress=${this.handleAddBrandKeyPress}
511
513
  >
512
514
  <${IconButton.Icon.Icon.litTagName}
513
515
  aria-hidden="true"
@@ -532,12 +534,12 @@ export class UserAgentClientHintsForm extends HTMLElement {
532
534
  'architecture');
533
535
  const deviceModelSection = this.renderDeviceModelSection();
534
536
  const submitButton = this.showSubmitButton ? LitHtml.html`
535
- <button
536
- type="submit"
537
- class="submit-button full-row"
537
+ <${Buttons.Button.Button.litTagName}
538
+ .variant=${Buttons.Button.Variant.SECONDARY}
539
+ .type=${'submit'}
538
540
  >
539
541
  ${i18nString(UIStrings.update)}
540
- </button>
542
+ </${Buttons.Button.Button.litTagName}>
541
543
  ` :
542
544
  LitHtml.html``;
543
545
  const output = LitHtml.html`
@@ -545,16 +547,16 @@ export class UserAgentClientHintsForm extends HTMLElement {
545
547
  <div
546
548
  class="tree-title"
547
549
  role="button"
548
- @click="${this.handleTreeClick}"
550
+ @click=${this.handleTreeClick}
549
551
  tabindex="0"
550
- @keydown="${this.handleTreeExpand}"
551
- aria-expanded="${this.isFormOpened}"
552
+ @keydown=${this.handleTreeExpand}
553
+ aria-expanded=${this.isFormOpened}
552
554
  aria-controls="form-container"
553
- @disabled="${this.isFormDisabled}"
554
- aria-disabled="${this.isFormDisabled}"
555
+ @disabled=${this.isFormDisabled}
556
+ aria-disabled=${this.isFormDisabled}
555
557
  >
556
558
  <${IconButton.Icon.Icon.litTagName}
557
- class="${this.isFormOpened ? '' : 'rotate-icon'}"
559
+ class=${this.isFormOpened ? '' : 'rotate-icon'}
558
560
  .data=${
559
561
  {color: 'var(--client-hints-form-icon-color)', iconName: 'chromeSelect', width: '20px'} as
560
562
  IconButton.Icon.IconData}
@@ -566,8 +568,8 @@ export class UserAgentClientHintsForm extends HTMLElement {
566
568
  href="https://web.dev/user-agent-client-hints/"
567
569
  target="_blank"
568
570
  class="info-link"
569
- @keypress="${this.handleLinkPress}"
570
- aria-label="${i18nString(UIStrings.userAgentClientHintsInfo)}"
571
+ @keypress=${this.handleLinkPress}
572
+ aria-label=${i18nString(UIStrings.userAgentClientHintsInfo)}
571
573
  >
572
574
  <${IconButton.Icon.Icon.litTagName}
573
575
  .data=${
@@ -580,7 +582,7 @@ export class UserAgentClientHintsForm extends HTMLElement {
580
582
  <form
581
583
  id="form-container"
582
584
  class="form-container ${this.isFormOpened ? '' : 'hide-container'}"
583
- @submit="${this.handleSubmit}"
585
+ @submit=${this.handleSubmit}
584
586
  >
585
587
  ${brandSection}
586
588
  ${fullBrowserInput}
@@ -589,7 +591,7 @@ export class UserAgentClientHintsForm extends HTMLElement {
589
591
  ${deviceModelSection}
590
592
  ${submitButton}
591
593
  </form>
592
- <div aria-live="polite" aria-label="${this.brandsModifiedAriaMessage}"></div>
594
+ <div aria-live="polite" aria-label=${this.brandsModifiedAriaMessage}></div>
593
595
  </section>
594
596
  `;
595
597
  // clang-format off
@@ -96,18 +96,6 @@
96
96
  margin-left: 5px;
97
97
  }
98
98
 
99
- .submit-button {
100
- border: none;
101
- border-radius: 2px;
102
- font-weight: normal;
103
- height: 24px;
104
- font-size: 12px;
105
- padding: 0 12px;
106
- cursor: pointer;
107
- background-color: var(--color-primary-variant);
108
- color: var(--color-text-primary);
109
- }
110
-
111
99
  .hide-container {
112
100
  display: none;
113
101
  }