chrome-devtools-frontend 1.0.941095 → 1.0.943017

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 (254) hide show
  1. package/WATCHLISTS +1 -1
  2. package/config/gni/all_devtools_files.gni +0 -62
  3. package/config/gni/devtools_grd_files.gni +55 -19
  4. package/config/gni/devtools_image_files.gni +2 -3
  5. package/front_end/.eslintrc.js +12 -1
  6. package/front_end/Images/src/feedback_button_icon.svg +3 -0
  7. package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
  8. package/front_end/Tests.js +1 -32
  9. package/front_end/core/common/Color.ts +5 -0
  10. package/front_end/core/i18n/locales/en-US.json +20 -29
  11. package/front_end/core/i18n/locales/en-XL.json +20 -29
  12. package/front_end/core/sdk/CPUProfilerModel.ts +7 -9
  13. package/front_end/core/sdk/ConsoleModel.ts +26 -28
  14. package/front_end/core/sdk/DebuggerModel.ts +4 -14
  15. package/front_end/core/sdk/sdk-meta.ts +17 -3
  16. package/front_end/entrypoints/devtools_app/devtools_app.json +1 -11
  17. package/front_end/entrypoints/inspector/inspector.json +1 -3
  18. package/front_end/entrypoints/js_app/js_app.json +1 -3
  19. package/front_end/entrypoints/main/MainImpl.ts +26 -0
  20. package/front_end/entrypoints/node_app/node_app.json +1 -3
  21. package/front_end/entrypoints/shell/shell.js +0 -11
  22. package/front_end/entrypoints/shell/shell.json +1 -5
  23. package/front_end/entrypoints/worker_app/worker_app.json +1 -7
  24. package/front_end/generated/InspectorBackendCommands.js +19 -0
  25. package/front_end/generated/protocol-mapping.d.ts +31 -1
  26. package/front_end/generated/protocol-proxy-api.d.ts +34 -2
  27. package/front_end/generated/protocol.d.ts +81 -6
  28. package/front_end/global_typings/global_defs.d.ts +5 -0
  29. package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
  30. package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +14 -2
  31. package/front_end/legacy_test_runner/legacy_test_runner.ts +10 -1
  32. package/front_end/legacy_test_runner/test_runner/TestRunner.js +11 -0
  33. package/front_end/models/formatter/SourceFormatter.ts +0 -10
  34. package/front_end/models/workspace/UISourceCode.ts +9 -42
  35. package/front_end/panels/animation/AnimationTimeline.ts +3 -3
  36. package/front_end/panels/application/ApplicationPanelSidebar.ts +3 -3
  37. package/front_end/panels/application/BackForwardCacheStrings.ts +3 -1
  38. package/front_end/panels/application/application-meta.ts +0 -3
  39. package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
  40. package/front_end/panels/application/components/ReportsGrid.ts +1 -1
  41. package/front_end/panels/console/ConsolePinPane.ts +21 -26
  42. package/front_end/panels/coverage/CoverageDecorationManager.ts +4 -5
  43. package/front_end/panels/coverage/CoverageView.ts +2 -105
  44. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +11 -56
  45. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -8
  46. package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
  47. package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
  48. package/front_end/panels/elements/components/adornerSettingsPane.css +0 -4
  49. package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
  50. package/front_end/panels/emulation/DeviceModeView.ts +2 -1
  51. package/front_end/panels/emulation/InspectedPagePlaceholder.ts +3 -1
  52. package/front_end/panels/emulation/MediaQueryInspector.ts +3 -1
  53. package/front_end/panels/emulation/emulation-meta.ts +2 -4
  54. package/front_end/panels/issues/issues-meta.ts +0 -2
  55. package/front_end/panels/js_profiler/js_profiler-meta.ts +0 -3
  56. package/front_end/panels/layers/module.json +0 -1
  57. package/front_end/panels/lighthouse/LighthousePanel.ts +2 -4
  58. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
  59. package/front_end/panels/lighthouse/lighthouseStartView.css +4 -0
  60. package/front_end/panels/lighthouse/module.json +0 -6
  61. package/front_end/panels/media/media-meta.ts +0 -3
  62. package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -1
  63. package/front_end/panels/network/network-meta.ts +0 -3
  64. package/front_end/panels/profiler/CPUProfileView.ts +10 -3
  65. package/front_end/panels/profiler/profiler-meta.ts +0 -2
  66. package/front_end/panels/screencast/screencast-meta.ts +0 -3
  67. package/front_end/panels/security/security-meta.ts +0 -3
  68. package/front_end/panels/sources/BreakpointEditDialog.ts +16 -30
  69. package/front_end/panels/sources/CSSPlugin.ts +310 -331
  70. package/front_end/panels/sources/CallStackSidebarPane.ts +28 -34
  71. package/front_end/panels/sources/CoveragePlugin.ts +121 -6
  72. package/front_end/panels/sources/DebuggerPlugin.ts +1166 -1243
  73. package/front_end/panels/sources/EditingLocationHistoryManager.ts +71 -101
  74. package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -3
  75. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
  76. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +26 -23
  77. package/front_end/panels/sources/Plugin.ts +20 -4
  78. package/front_end/panels/sources/ProfilePlugin.ts +185 -0
  79. package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
  80. package/front_end/panels/sources/ScriptOriginPlugin.ts +0 -10
  81. package/front_end/panels/sources/SnippetsPlugin.ts +1 -10
  82. package/front_end/panels/sources/SourcesPanel.ts +6 -5
  83. package/front_end/panels/sources/SourcesView.ts +10 -8
  84. package/front_end/panels/sources/TabbedEditorContainer.ts +31 -27
  85. package/front_end/panels/sources/UISourceCodeFrame.ts +335 -470
  86. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
  87. package/front_end/panels/sources/sources-legacy.ts +0 -6
  88. package/front_end/panels/sources/sources-meta.ts +1 -4
  89. package/front_end/panels/sources/sources.ts +0 -2
  90. package/front_end/panels/timeline/timeline-meta.ts +0 -5
  91. package/front_end/third_party/codemirror.next/bundle.ts +9 -13
  92. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  93. package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -2
  94. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -6
  95. package/front_end/third_party/codemirror.next/chunk/php.js +2 -6
  96. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  97. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  98. package/front_end/third_party/codemirror.next/chunk/xml.js +2 -2
  99. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +279 -198
  100. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  101. package/front_end/third_party/codemirror.next/package.json +13 -11
  102. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1128 -1158
  103. package/front_end/third_party/lighthouse/locales/ar-XB.json +211 -79
  104. package/front_end/third_party/lighthouse/locales/ar.json +213 -81
  105. package/front_end/third_party/lighthouse/locales/bg.json +211 -79
  106. package/front_end/third_party/lighthouse/locales/ca.json +212 -80
  107. package/front_end/third_party/lighthouse/locales/cs.json +211 -79
  108. package/front_end/third_party/lighthouse/locales/da.json +211 -79
  109. package/front_end/third_party/lighthouse/locales/de.json +211 -79
  110. package/front_end/third_party/lighthouse/locales/el.json +213 -81
  111. package/front_end/third_party/lighthouse/locales/en-GB.json +211 -79
  112. package/front_end/third_party/lighthouse/locales/en-US.json +186 -75
  113. package/front_end/third_party/lighthouse/locales/en-XA.json +211 -79
  114. package/front_end/third_party/lighthouse/locales/en-XL.json +186 -75
  115. package/front_end/third_party/lighthouse/locales/es-419.json +211 -79
  116. package/front_end/third_party/lighthouse/locales/es.json +212 -80
  117. package/front_end/third_party/lighthouse/locales/fi.json +211 -79
  118. package/front_end/third_party/lighthouse/locales/fil.json +211 -79
  119. package/front_end/third_party/lighthouse/locales/fr.json +211 -79
  120. package/front_end/third_party/lighthouse/locales/he.json +212 -80
  121. package/front_end/third_party/lighthouse/locales/hi.json +214 -82
  122. package/front_end/third_party/lighthouse/locales/hr.json +211 -79
  123. package/front_end/third_party/lighthouse/locales/hu.json +211 -79
  124. package/front_end/third_party/lighthouse/locales/id.json +211 -79
  125. package/front_end/third_party/lighthouse/locales/it.json +211 -79
  126. package/front_end/third_party/lighthouse/locales/ja.json +211 -79
  127. package/front_end/third_party/lighthouse/locales/ko.json +211 -79
  128. package/front_end/third_party/lighthouse/locales/lt.json +211 -79
  129. package/front_end/third_party/lighthouse/locales/lv.json +214 -82
  130. package/front_end/third_party/lighthouse/locales/nl.json +211 -79
  131. package/front_end/third_party/lighthouse/locales/no.json +211 -79
  132. package/front_end/third_party/lighthouse/locales/pl.json +211 -79
  133. package/front_end/third_party/lighthouse/locales/pt-PT.json +211 -79
  134. package/front_end/third_party/lighthouse/locales/pt.json +211 -79
  135. package/front_end/third_party/lighthouse/locales/ro.json +212 -80
  136. package/front_end/third_party/lighthouse/locales/ru.json +211 -79
  137. package/front_end/third_party/lighthouse/locales/sk.json +211 -79
  138. package/front_end/third_party/lighthouse/locales/sl.json +211 -79
  139. package/front_end/third_party/lighthouse/locales/sr-Latn.json +211 -79
  140. package/front_end/third_party/lighthouse/locales/sr.json +211 -79
  141. package/front_end/third_party/lighthouse/locales/sv.json +211 -79
  142. package/front_end/third_party/lighthouse/locales/ta.json +218 -86
  143. package/front_end/third_party/lighthouse/locales/te.json +251 -119
  144. package/front_end/third_party/lighthouse/locales/th.json +211 -79
  145. package/front_end/third_party/lighthouse/locales/tr.json +211 -79
  146. package/front_end/third_party/lighthouse/locales/uk.json +212 -80
  147. package/front_end/third_party/lighthouse/locales/vi.json +211 -79
  148. package/front_end/third_party/lighthouse/locales/zh-HK.json +211 -79
  149. package/front_end/third_party/lighthouse/locales/zh-TW.json +211 -79
  150. package/front_end/third_party/lighthouse/locales/zh.json +211 -79
  151. package/front_end/third_party/lighthouse/report/bundle.d.ts +72 -34
  152. package/front_end/third_party/lighthouse/report/bundle.js +698 -492
  153. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -2
  154. package/front_end/third_party/lighthouse/report-assets/report.js +40 -35
  155. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +2 -4
  156. package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +60 -68
  157. package/front_end/ui/components/data_grid/dataGrid.css +12 -10
  158. package/front_end/ui/components/docs/css_overview/start_view.html +25 -0
  159. package/front_end/ui/components/docs/css_overview/start_view.ts +14 -0
  160. package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
  161. package/front_end/ui/components/docs/panel_feedback/button.html +25 -0
  162. package/front_end/ui/components/docs/panel_feedback/button.ts +18 -0
  163. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -14
  164. package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
  165. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +67 -0
  166. package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
  167. package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
  168. package/front_end/ui/components/text_editor/TextEditor.ts +79 -36
  169. package/front_end/ui/components/text_editor/config.ts +42 -26
  170. package/front_end/ui/components/text_editor/javascript.ts +2 -3
  171. package/front_end/ui/components/text_editor/position.ts +17 -0
  172. package/front_end/ui/components/text_editor/text_editor.ts +1 -0
  173. package/front_end/ui/components/text_editor/theme.ts +5 -1
  174. package/front_end/ui/legacy/Dialog.ts +3 -1
  175. package/front_end/ui/legacy/DropTarget.ts +2 -1
  176. package/front_end/ui/legacy/EmptyWidget.ts +2 -1
  177. package/front_end/ui/legacy/FilterBar.ts +2 -1
  178. package/front_end/ui/legacy/GlassPane.ts +4 -2
  179. package/front_end/ui/legacy/Infobar.ts +5 -8
  180. package/front_end/ui/legacy/InspectorView.ts +6 -1
  181. package/front_end/ui/legacy/ListWidget.ts +2 -1
  182. package/front_end/ui/legacy/PopoverHelper.ts +2 -1
  183. package/front_end/ui/legacy/ProgressIndicator.ts +2 -1
  184. package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -1
  185. package/front_end/ui/legacy/ReportView.ts +2 -1
  186. package/front_end/ui/legacy/RootView.ts +2 -1
  187. package/front_end/ui/legacy/SearchableView.ts +2 -1
  188. package/front_end/ui/legacy/ShortcutRegistry.ts +11 -7
  189. package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
  190. package/front_end/ui/legacy/SoftDropDown.ts +4 -2
  191. package/front_end/ui/legacy/SplitWidget.ts +2 -1
  192. package/front_end/ui/legacy/SuggestBox.ts +2 -1
  193. package/front_end/ui/legacy/TabbedPane.ts +2 -1
  194. package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -1
  195. package/front_end/ui/legacy/TextPrompt.ts +2 -1
  196. package/front_end/ui/legacy/Toolbar.ts +3 -2
  197. package/front_end/ui/legacy/Treeoutline.ts +3 -2
  198. package/front_end/ui/legacy/UIUtils.ts +16 -13
  199. package/front_end/ui/legacy/ViewManager.ts +2 -1
  200. package/front_end/ui/legacy/Widget.ts +1 -1
  201. package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -3
  202. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -1
  203. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +3 -1
  204. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -1
  205. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +35 -131
  206. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
  207. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +3 -1
  208. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -1
  209. package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -2
  210. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
  211. package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +3 -6
  212. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
  213. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
  214. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
  215. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +19 -14
  216. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +501 -252
  217. package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -0
  218. package/front_end/ui/legacy/components/source_frame/module.json +0 -3
  219. package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -11
  220. package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
  221. package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
  222. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +3 -1
  223. package/front_end/ui/legacy/components/text_editor/module.json +0 -3
  224. package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -15
  225. package/front_end/ui/legacy/radioButton.css +1 -13
  226. package/front_end/ui/legacy/textButton.css +5 -4
  227. package/front_end/ui/legacy/themeColors.css +36 -0
  228. package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
  229. package/front_end/ui/legacy/utils/append-style.ts +9 -4
  230. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +2 -2
  231. package/front_end/ui/legacy/utils/inject-core-styles.ts +7 -4
  232. package/package.json +1 -1
  233. package/scripts/build/generate_css_js_files.js +23 -9
  234. package/scripts/build/ninja/generate_css.gni +10 -1
  235. package/scripts/eslint_rules/lib/check_css_import.js +2 -2
  236. package/scripts/eslint_rules/tests/check_css_import_test.js +12 -0
  237. package/front_end/Images/radioDot-dark-theme.png +0 -0
  238. package/front_end/Images/radioDot.png +0 -0
  239. package/front_end/emulated_devices/module.json +0 -6
  240. package/front_end/panels/application/module.json +0 -7
  241. package/front_end/panels/emulation/module.json +0 -11
  242. package/front_end/panels/issues/module.json +0 -6
  243. package/front_end/panels/js_profiler/module.json +0 -5
  244. package/front_end/panels/layer_viewer/module.json +0 -6
  245. package/front_end/panels/media/module.json +0 -6
  246. package/front_end/panels/network/module.json +0 -6
  247. package/front_end/panels/profiler/module.json +0 -6
  248. package/front_end/panels/screencast/module.json +0 -6
  249. package/front_end/panels/security/module.json +0 -5
  250. package/front_end/panels/timeline/module.json +0 -8
  251. package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
  252. package/front_end/ui/legacy/components/perf_ui/module.json +0 -13
  253. package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +0 -1030
  254. package/front_end/ui/legacy/module.json +0 -41
@@ -43,6 +43,7 @@ import type {SuggestBoxDelegate, Suggestion} from './SuggestBox.js';
43
43
  import {SuggestBox} from './SuggestBox.js';
44
44
  import {Tooltip} from './Tooltip.js';
45
45
  import {ElementFocusRestorer} from './UIUtils.js';
46
+ import textPromptStyles from './textPrompt.css.legacy.js';
46
47
 
47
48
  export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements SuggestBoxDelegate {
48
49
  private proxyElement!: HTMLElement|undefined;
@@ -135,7 +136,7 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
135
136
  this.boundOnMouseWheel = this.onMouseWheel.bind(this);
136
137
  this.boundClearAutocomplete = this.clearAutocomplete.bind(this);
137
138
  this.proxyElement = element.ownerDocument.createElement('span');
138
- Utils.appendStyle(this.proxyElement, 'ui/legacy/textPrompt.css');
139
+ Utils.appendStyle(this.proxyElement, textPromptStyles);
139
140
  this.contentElement = this.proxyElement.createChild('div', 'text-prompt-root');
140
141
  this.proxyElement.style.display = this.proxyElementDisplay;
141
142
  if (element.parentElement) {
@@ -46,6 +46,7 @@ import type {Suggestion} from './SuggestBox.js';
46
46
  import {Events as TextPromptEvents, TextPrompt} from './TextPrompt.js';
47
47
  import {Tooltip} from './Tooltip.js';
48
48
  import {CheckboxLabel, LongClickController} from './UIUtils.js';
49
+ import toolbarStyles from './toolbar.css.legacy.js';
49
50
 
50
51
  const UIStrings = {
51
52
  /**
@@ -75,8 +76,8 @@ export class Toolbar {
75
76
  this.element.className = className;
76
77
  this.element.classList.add('toolbar');
77
78
  this.enabled = true;
78
- this.shadowRoot = Utils.createShadowRootWithCoreStyles(
79
- this.element, {cssFile: 'ui/legacy/toolbar.css', delegatesFocus: undefined});
79
+ this.shadowRoot =
80
+ Utils.createShadowRootWithCoreStyles(this.element, {cssFile: toolbarStyles, delegatesFocus: undefined});
80
81
  this.contentElement = this.shadowRoot.createChild('div', 'toolbar-shadow');
81
82
  this.insertionPoint = this.contentElement.createChild('slot');
82
83
  }
@@ -45,6 +45,7 @@ import {InplaceEditor} from './InplaceEditor.js';
45
45
  import {Keys} from './KeyboardShortcut.js';
46
46
  import {Tooltip} from './Tooltip.js';
47
47
  import {deepElementFromPoint, enclosingNodeOrSelfWithNodeNameInArray, isEditing} from './UIUtils.js';
48
+ import treeoutlineStyles from './treeoutline.css.legacy.js';
48
49
 
49
50
  const nodeToParentTreeElementMap = new WeakMap<Node, TreeElement>();
50
51
 
@@ -391,8 +392,8 @@ export class TreeOutlineInShadow extends TreeOutline {
391
392
  super();
392
393
  this.contentElement.classList.add('tree-outline');
393
394
  this.element = document.createElement('div');
394
- this.shadowRoot = Utils.createShadowRootWithCoreStyles(
395
- this.element, {cssFile: 'ui/legacy/treeoutline.css', delegatesFocus: undefined});
395
+ this.shadowRoot =
396
+ Utils.createShadowRootWithCoreStyles(this.element, {cssFile: treeoutlineStyles, delegatesFocus: undefined});
396
397
  this.disclosureElement = this.shadowRoot.createChild('div', 'tree-outline-disclosure');
397
398
  this.disclosureElement.appendChild(this.contentElement);
398
399
  this.renderSelection = true;
@@ -53,6 +53,13 @@ import type {ToolbarButton} from './Toolbar.js';
53
53
  import {Toolbar} from './Toolbar.js';
54
54
  import {Tooltip} from './Tooltip.js';
55
55
  import type {TreeOutline} from './Treeoutline.js';
56
+ import checkboxTextLabelStyles from './checkboxTextLabel.css.legacy.js';
57
+ import closeButtonStyles from './closeButton.css.legacy.js';
58
+ import confirmDialogStyles from './confirmDialog.css.legacy.js';
59
+ import inlineButtonStyles from './inlineButton.css.legacy.js';
60
+ import radioButtonStyles from './radioButton.css.legacy.js';
61
+ import sliderStyles from './slider.css.legacy.js';
62
+ import smallBubbleStyles from './smallBubble.css.legacy.js';
56
63
 
57
64
  const UIStrings = {
58
65
  /**
@@ -1186,8 +1193,8 @@ export class CheckboxLabel extends HTMLSpanElement {
1186
1193
  super();
1187
1194
  CheckboxLabel.lastId = CheckboxLabel.lastId + 1;
1188
1195
  const id = 'ui-checkbox-label' + CheckboxLabel.lastId;
1189
- this.shadowRootInternal = Utils.createShadowRootWithCoreStyles(
1190
- this, {cssFile: 'ui/legacy/checkboxTextLabel.css', delegatesFocus: undefined});
1196
+ this.shadowRootInternal =
1197
+ Utils.createShadowRootWithCoreStyles(this, {cssFile: checkboxTextLabelStyles, delegatesFocus: undefined});
1191
1198
  this.checkboxElement = (this.shadowRootInternal.createChild('input') as HTMLInputElement);
1192
1199
  this.checkboxElement.type = 'checkbox';
1193
1200
  this.checkboxElement.setAttribute('id', id);
@@ -1268,8 +1275,7 @@ export class DevToolsRadioButton extends HTMLSpanElement {
1268
1275
  this.radioElement.id = id;
1269
1276
  this.radioElement.type = 'radio';
1270
1277
  this.labelElement.htmlFor = id;
1271
- const root =
1272
- Utils.createShadowRootWithCoreStyles(this, {cssFile: 'ui/legacy/radioButton.css', delegatesFocus: undefined});
1278
+ const root = Utils.createShadowRootWithCoreStyles(this, {cssFile: radioButtonStyles, delegatesFocus: undefined});
1273
1279
  root.createChild('slot');
1274
1280
  this.addEventListener('click', this.radioClickHandler.bind(this), false);
1275
1281
  }
@@ -1291,8 +1297,7 @@ export class DevToolsSlider extends HTMLSpanElement {
1291
1297
 
1292
1298
  constructor() {
1293
1299
  super();
1294
- const root =
1295
- Utils.createShadowRootWithCoreStyles(this, {cssFile: 'ui/legacy/slider.css', delegatesFocus: undefined});
1300
+ const root = Utils.createShadowRootWithCoreStyles(this, {cssFile: sliderStyles, delegatesFocus: undefined});
1296
1301
  this.sliderElement = document.createElement('input');
1297
1302
  this.sliderElement.classList.add('dt-range-input');
1298
1303
  this.sliderElement.type = 'range';
@@ -1315,8 +1320,7 @@ export class DevToolsSmallBubble extends HTMLSpanElement {
1315
1320
 
1316
1321
  constructor() {
1317
1322
  super();
1318
- const root =
1319
- Utils.createShadowRootWithCoreStyles(this, {cssFile: 'ui/legacy/smallBubble.css', delegatesFocus: undefined});
1323
+ const root = Utils.createShadowRootWithCoreStyles(this, {cssFile: smallBubbleStyles, delegatesFocus: undefined});
1320
1324
  this.textElement = root.createChild('div');
1321
1325
  this.textElement.className = 'info';
1322
1326
  this.textElement.createChild('slot');
@@ -1336,8 +1340,7 @@ export class DevToolsCloseButton extends HTMLDivElement {
1336
1340
 
1337
1341
  constructor() {
1338
1342
  super();
1339
- const root =
1340
- Utils.createShadowRootWithCoreStyles(this, {cssFile: 'ui/legacy/closeButton.css', delegatesFocus: undefined});
1343
+ const root = Utils.createShadowRootWithCoreStyles(this, {cssFile: closeButtonStyles, delegatesFocus: undefined});
1341
1344
  this.buttonElement = (root.createChild('div', 'close-button') as HTMLElement);
1342
1345
  Tooltip.install(this.buttonElement, i18nString(UIStrings.close));
1343
1346
  ARIAUtils.setAccessibleName(this.buttonElement, i18nString(UIStrings.close));
@@ -1566,7 +1569,7 @@ export class MessageDialog {
1566
1569
  dialog.setSizeBehavior(SizeBehavior.MeasureContent);
1567
1570
  dialog.setDimmed(true);
1568
1571
  const shadowRoot = Utils.createShadowRootWithCoreStyles(
1569
- dialog.contentElement, {cssFile: 'ui/legacy/confirmDialog.css', delegatesFocus: undefined});
1572
+ dialog.contentElement, {cssFile: confirmDialogStyles, delegatesFocus: undefined});
1570
1573
  const content = shadowRoot.createChild('div', 'widget');
1571
1574
  await new Promise(resolve => {
1572
1575
  const okButton = createTextButton(i18nString(UIStrings.ok), resolve, '', true);
@@ -1590,7 +1593,7 @@ export class ConfirmDialog {
1590
1593
  dialog.setDimmed(true);
1591
1594
  ARIAUtils.setAccessibleName(dialog.contentElement, message);
1592
1595
  const shadowRoot = Utils.createShadowRootWithCoreStyles(
1593
- dialog.contentElement, {cssFile: 'ui/legacy/confirmDialog.css', delegatesFocus: undefined});
1596
+ dialog.contentElement, {cssFile: confirmDialogStyles, delegatesFocus: undefined});
1594
1597
  const content = shadowRoot.createChild('div', 'widget');
1595
1598
  content.createChild('div', 'message').createChild('span').textContent = message;
1596
1599
  const buttonsBar = content.createChild('div', 'button');
@@ -1615,7 +1618,7 @@ export class ConfirmDialog {
1615
1618
  export function createInlineButton(toolbarButton: ToolbarButton): Element {
1616
1619
  const element = document.createElement('span');
1617
1620
  const shadowRoot =
1618
- Utils.createShadowRootWithCoreStyles(element, {cssFile: 'ui/legacy/inlineButton.css', delegatesFocus: undefined});
1621
+ Utils.createShadowRootWithCoreStyles(element, {cssFile: inlineButtonStyles, delegatesFocus: undefined});
1619
1622
  element.classList.add('inline-button');
1620
1623
  const toolbar = new Toolbar('');
1621
1624
  toolbar.appendToolbarItem(toolbarButton);
@@ -18,6 +18,7 @@ import type {TabbedViewLocation, View, ViewLocation, ViewLocationResolver} from
18
18
  import {getRegisteredLocationResolvers, getRegisteredViewExtensions, maybeRemoveViewExtension, registerLocationResolver, registerViewExtension, ViewLocationCategoryValues, ViewLocationValues, ViewPersistence, ViewRegistration} from './ViewRegistration.js';
19
19
  import type {Widget, WidgetElement} from './Widget.js';
20
20
  import {VBox} from './Widget.js';
21
+ import viewContainersStyles from './viewContainers.css.legacy.js';
21
22
 
22
23
  const UIStrings = {
23
24
  /**
@@ -418,7 +419,7 @@ export class _ExpandableContainerWidget extends VBox {
418
419
  constructor(view: View) {
419
420
  super(true);
420
421
  this.element.classList.add('flex-none');
421
- this.registerRequiredCSS('ui/legacy/viewContainers.css');
422
+ this.registerRequiredCSS(viewContainersStyles);
422
423
 
423
424
  this.titleElement = document.createElement('div');
424
425
  this.titleElement.classList.add('expandable-view-title');
@@ -458,7 +458,7 @@ export class Widget {
458
458
  this.doResize();
459
459
  }
460
460
 
461
- registerRequiredCSS(cssFile: string): void {
461
+ registerRequiredCSS(cssFile: string|{cssContent: string}): void {
462
462
  if (this.isWebComponent) {
463
463
  Utils.appendStyle((this.shadowRoot as DocumentFragment), cssFile);
464
464
  } else {
@@ -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 SDK from '../../../../core/sdk/sdk.js';
7
6
  import * as UI from '../../legacy.js';
8
7
 
@@ -13,8 +12,6 @@ let loadedObjectUIModule: (typeof ObjectUI|undefined);
13
12
 
14
13
  async function loadObjectUIModule(): Promise<typeof ObjectUI> {
15
14
  if (!loadedObjectUIModule) {
16
- // Side-effect import resources in module.json
17
- await Root.Runtime.Runtime.instance().loadModulePromise('ui/legacy/components/object_ui');
18
15
  loadedObjectUIModule = await import('./object_ui.js');
19
16
  }
20
17
  return loadedObjectUIModule;
@@ -7,6 +7,7 @@ import * as i18n from '../../../../core/i18n/i18n.js';
7
7
  import * as Platform from '../../../../core/platform/platform.js';
8
8
  import * as UI from '../../legacy.js';
9
9
 
10
+ import chartViewPortStyles from './chartViewport.css.legacy.js';
10
11
  import {MinimalTimeWindowMs} from './FlameChart.js';
11
12
 
12
13
  export interface ChartViewportDelegate {
@@ -51,7 +52,7 @@ export class ChartViewport extends UI.Widget.VBox {
51
52
 
52
53
  constructor(delegate: ChartViewportDelegate) {
53
54
  super();
54
- this.registerRequiredCSS('ui/legacy/components/perf_ui/chartViewport.css');
55
+ this.registerRequiredCSS(chartViewPortStyles);
55
56
 
56
57
  this.delegate = delegate;
57
58
 
@@ -9,6 +9,8 @@ import * as Platform from '../../../../core/platform/platform.js';
9
9
  import type * as SDK from '../../../../core/sdk/sdk.js';
10
10
  import * as UI from '../../legacy.js';
11
11
 
12
+ import filmStripViewStyles from './filmStripView.css.legacy.js';
13
+
12
14
  const UIStrings = {
13
15
  /**
14
16
  *@description Element title in Film Strip View of the Performance panel
@@ -43,7 +45,7 @@ export class FilmStripView extends Common.ObjectWrapper.eventMixin<EventTypes, t
43
45
 
44
46
  constructor() {
45
47
  super(true);
46
- this.registerRequiredCSS('ui/legacy/components/perf_ui/filmStripView.css');
48
+ this.registerRequiredCSS(filmStripViewStyles);
47
49
  this.contentElement.classList.add('film-strip-view');
48
50
  this.statusLabel = this.contentElement.createChild('div', 'label');
49
51
  this.reset();
@@ -42,6 +42,7 @@ import type {ChartViewportDelegate} from './ChartViewport.js';
42
42
  import {ChartViewport} from './ChartViewport.js';
43
43
  import type {Calculator} from './TimelineGrid.js';
44
44
  import {TimelineGrid} from './TimelineGrid.js';
45
+ import flameChartStyles from './flameChart.css.legacy.js';
45
46
 
46
47
  const UIStrings = {
47
48
  /**
@@ -157,7 +158,7 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
157
158
  dataProvider: FlameChartDataProvider, flameChartDelegate: FlameChartDelegate,
158
159
  groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>) {
159
160
  super(true);
160
- this.registerRequiredCSS('ui/legacy/components/perf_ui/flameChart.css');
161
+ this.registerRequiredCSS(flameChartStyles);
161
162
  this.contentElement.classList.add('flame-chart-main-pane');
162
163
  this.groupExpansionSetting = groupExpansionSetting;
163
164
  this.groupExpansionState = groupExpansionSetting && groupExpansionSetting.get() || {};
@@ -2,37 +2,19 @@
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 i18n from '../../../../core/i18n/i18n.js';
6
- import * as Platform from '../../../../core/platform/platform.js';
7
5
  import * as SDK from '../../../../core/sdk/sdk.js';
8
6
  import * as Bindings from '../../../../models/bindings/bindings.js';
9
7
  import * as Workspace from '../../../../models/workspace/workspace.js';
10
8
  import * as SourceFrame from '../source_frame/source_frame.js';
11
9
  import type * as Protocol from '../../../../generated/protocol.js';
12
10
 
13
- const UIStrings = {
14
- /**
15
- *@description The milisecond unit
16
- */
17
- ms: 'ms',
18
- /**
19
- *@description Unit for data size in DevTools
20
- */
21
- mb: 'MB',
22
- /**
23
- *@description A unit
24
- */
25
- kb: 'kB',
26
- };
27
- const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/perf_ui/LineLevelProfile.ts', UIStrings);
28
- const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
29
11
  let performanceInstance: Performance;
30
12
 
31
13
  export class Performance {
32
14
  private readonly helper: Helper;
33
15
 
34
16
  private constructor() {
35
- this.helper = new Helper('performance');
17
+ this.helper = new Helper(SourceFrame.SourceFrame.DecoratorType.PERFORMANCE);
36
18
  }
37
19
 
38
20
  static instance(opts: {
@@ -112,7 +94,7 @@ let memoryInstance: Memory;
112
94
  export class Memory {
113
95
  private readonly helper: Helper;
114
96
  private constructor() {
115
- this.helper = new Helper('memory');
97
+ this.helper = new Helper(SourceFrame.SourceFrame.DecoratorType.MEMORY);
116
98
  }
117
99
 
118
100
  static instance(opts: {
@@ -193,10 +175,12 @@ export class Helper {
193
175
  }, 0);
194
176
  }
195
177
 
196
- private doUpdate(): void {
178
+ private async doUpdate(): Promise<void> {
197
179
  this.locationPool.disposeAll();
198
- Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes().forEach(
199
- uiSourceCode => uiSourceCode.removeDecorationsForType(this.type));
180
+ // Map from sources to line->value profile maps.
181
+ const decorationsBySource = new Map<Workspace.UISourceCode.UISourceCode, Map<number, number>>();
182
+ const pending: Promise<void>[] = [];
183
+
200
184
  for (const targetToScript of this.lineData) {
201
185
  const target = (targetToScript[0] as SDK.Target.Target | null);
202
186
  const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;
@@ -206,124 +190,44 @@ export class Helper {
206
190
  const lineToDataMap = (scriptToLine[1] as Map<number, number>);
207
191
  // debuggerModel is null when the profile is loaded from file.
208
192
  // Try to get UISourceCode by the URL in this case.
209
- const uiSourceCode = !debuggerModel && typeof scriptIdOrUrl === 'string' ?
210
- Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(scriptIdOrUrl) :
211
- null;
212
- if (!debuggerModel && !uiSourceCode) {
213
- continue;
214
- }
215
- for (const lineToData of lineToDataMap) {
216
- const line = (lineToData[0] as number) - 1;
217
- const data = (lineToData[1] as number);
218
- if (uiSourceCode) {
219
- uiSourceCode.addLineDecoration(line, this.type, data);
220
- continue;
221
- }
222
- if (debuggerModel) {
193
+ const workspace = Workspace.Workspace.WorkspaceImpl.instance();
194
+ if (debuggerModel) {
195
+ const workspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
196
+ for (const lineToData of lineToDataMap) {
197
+ const line = lineToData[0] - 1;
198
+ const data = lineToData[1];
223
199
  const rawLocation = typeof scriptIdOrUrl === 'string' ?
224
200
  debuggerModel.createRawLocationByURL(scriptIdOrUrl, line, 0) :
225
201
  debuggerModel.createRawLocationByScriptId(String(scriptIdOrUrl) as Protocol.Runtime.ScriptId, line, 0);
226
202
  if (rawLocation) {
227
- new Presentation(rawLocation, this.type, data, this.locationPool);
203
+ pending.push(workspaceBinding.rawLocationToUILocation(rawLocation).then((uiLocation): void => {
204
+ if (uiLocation) {
205
+ let lineMap = decorationsBySource.get(uiLocation.uiSourceCode);
206
+ if (!lineMap) {
207
+ lineMap = new Map<number, number>();
208
+ decorationsBySource.set(uiLocation.uiSourceCode, lineMap);
209
+ }
210
+ lineMap.set(uiLocation.lineNumber + 1, data);
211
+ }
212
+ }));
228
213
  }
229
214
  }
215
+ } else if (typeof scriptIdOrUrl === 'string') {
216
+ const uiSourceCode = workspace.uiSourceCodeForURL(scriptIdOrUrl);
217
+ if (uiSourceCode) {
218
+ decorationsBySource.set(uiSourceCode, lineToDataMap);
219
+ }
230
220
  }
231
221
  }
222
+ await Promise.all(pending);
223
+ for (const [uiSourceCode, lineMap] of decorationsBySource) {
224
+ uiSourceCode.setDecorationData(this.type, lineMap);
225
+ }
232
226
  }
233
- }
234
- }
235
-
236
- export class Presentation {
237
- private readonly type: string;
238
- private readonly time: number;
239
- private uiLocation: Workspace.UISourceCode.UILocation|null;
240
-
241
- constructor(
242
- rawLocation: SDK.DebuggerModel.Location, type: string, time: number,
243
- locationPool: Bindings.LiveLocation.LiveLocationPool) {
244
- this.type = type;
245
- this.time = time;
246
- this.uiLocation = null;
247
- Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createLiveLocation(
248
- rawLocation, this.updateLocation.bind(this), locationPool);
249
- }
250
-
251
- async updateLocation(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> {
252
- if (this.uiLocation) {
253
- this.uiLocation.uiSourceCode.removeDecorationsForType(this.type);
254
- }
255
- this.uiLocation = await liveLocation.uiLocation();
256
- if (this.uiLocation) {
257
- this.uiLocation.uiSourceCode.addLineDecoration(this.uiLocation.lineNumber, this.type, this.time);
258
- }
259
- }
260
- }
261
-
262
- let lineDecoratorInstance: LineDecorator;
263
-
264
- export class LineDecorator implements SourceFrame.SourceFrame.LineDecorator {
265
- static instance(opts: {
266
- forceNew: boolean|null,
267
- } = {forceNew: null}): LineDecorator {
268
- const {forceNew} = opts;
269
- if (!lineDecoratorInstance || forceNew) {
270
- lineDecoratorInstance = new LineDecorator();
271
- }
272
-
273
- return lineDecoratorInstance;
274
- }
275
- decorate(
276
- uiSourceCode: Workspace.UISourceCode.UISourceCode, textEditor: SourceFrame.SourcesTextEditor.SourcesTextEditor,
277
- type: string): void {
278
- const gutterType = `CodeMirror-gutter-${type}`;
279
- const decorations = uiSourceCode.decorationsForType(type);
280
- textEditor.uninstallGutter(gutterType);
281
- if (!decorations || !decorations.size) {
282
- return;
283
- }
284
- textEditor.installGutter(gutterType, false);
285
- for (const decoration of decorations) {
286
- const value = (decoration.data() as number);
287
- const element = this.createElement(type, value);
288
- textEditor.setGutterDecoration(decoration.range().startLine, gutterType, element);
289
- }
290
- }
291
-
292
- private createElement(type: string, value: number): Element {
293
- const element = document.createElement('div');
294
- element.classList.add('text-editor-line-marker-text');
295
- if (type === 'performance') {
296
- const intensity = Platform.NumberUtilities.clamp(Math.log10(1 + 10 * value) / 5, 0.02, 1);
297
- element.textContent = value.toFixed(1);
298
- element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toFixed(3)})`;
299
- element.createChild('span', 'line-marker-units').textContent = i18nString(UIStrings.ms);
300
- } else {
301
- const intensity = Platform.NumberUtilities.clamp(Math.log10(1 + 2e-3 * value) / 5, 0.02, 1);
302
- element.style.backgroundColor = `hsla(217, 100%, 70%, ${intensity.toFixed(3)})`;
303
- value /= 1e3;
304
- let units;
305
- let fractionDigits;
306
- if (value >= 1e3) {
307
- units = i18nString(UIStrings.mb);
308
- value /= 1e3;
309
- fractionDigits = value >= 20 ? 0 : 1;
310
- } else {
311
- units = i18nString(UIStrings.kb);
312
- fractionDigits = 0;
227
+ for (const uiSourceCode of Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes()) {
228
+ if (!decorationsBySource.has(uiSourceCode)) {
229
+ uiSourceCode.setDecorationData(this.type, undefined);
313
230
  }
314
- element.textContent = value.toFixed(fractionDigits);
315
- element.createChild('span', 'line-marker-units').textContent = units;
316
231
  }
317
- return element;
318
232
  }
319
233
  }
320
-
321
- SourceFrame.SourceFrame.registerLineDecorator({
322
- lineDecorator: LineDecorator.instance,
323
- decoratorType: SourceFrame.SourceFrame.DecoratorType.MEMORY,
324
- });
325
-
326
- SourceFrame.SourceFrame.registerLineDecorator({
327
- lineDecorator: LineDecorator.instance,
328
- decoratorType: SourceFrame.SourceFrame.DecoratorType.PERFORMANCE,
329
- });
@@ -35,6 +35,7 @@ import * as UI from '../../legacy.js';
35
35
 
36
36
  import type {Calculator} from './TimelineGrid.js';
37
37
  import {TimelineGrid} from './TimelineGrid.js';
38
+ import overviewGridStyles from './overviewGrid.css.legacy.js';
38
39
 
39
40
  const UIStrings = {
40
41
  /**
@@ -161,7 +162,7 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
161
162
 
162
163
  this.parentElement.addEventListener('wheel', this.onMouseWheel.bind(this), true);
163
164
  this.parentElement.addEventListener('dblclick', this.resizeWindowMaximum.bind(this), true);
164
- UI.Utils.appendStyle(this.parentElement, 'ui/legacy/components/perf_ui/overviewGrid.css');
165
+ UI.Utils.appendStyle(this.parentElement, overviewGridStyles);
165
166
 
166
167
  this.leftResizeElement = parentElement.createChild('div', 'overview-grid-window-resizer') as HTMLElement;
167
168
  UI.UIUtils.installDragHandle(
@@ -36,6 +36,8 @@ import * as Host from '../../../../core/host/host.js';
36
36
  import * as UI from '../../legacy.js';
37
37
  import * as ThemeSupport from '../../theme_support/theme_support.js';
38
38
 
39
+ import timelineGridStyles from './timelineGrid.css.legacy.js';
40
+
39
41
  const labelMap = new Map<HTMLDivElement|HTMLElement, HTMLDivElement>();
40
42
 
41
43
  export class TimelineGrid {
@@ -47,7 +49,7 @@ export class TimelineGrid {
47
49
 
48
50
  constructor() {
49
51
  this.element = document.createElement('div');
50
- UI.Utils.appendStyle(this.element, 'ui/legacy/components/perf_ui/timelineGrid.css');
52
+ UI.Utils.appendStyle(this.element, timelineGridStyles);
51
53
 
52
54
  this.dividersElementInternal = this.element.createChild('div', 'resources-dividers');
53
55
 
@@ -36,6 +36,7 @@ import * as i18n from '../../../../core/i18n/i18n.js';
36
36
  import type {WindowChangedWithPositionEvent} from './OverviewGrid.js';
37
37
  import {Events as OverviewGridEvents, OverviewGrid} from './OverviewGrid.js';
38
38
  import type {Calculator} from './TimelineGrid.js';
39
+ import timelineOverviewInfoStyles from './timelineOverviewInfo.css.js';
39
40
 
40
41
  export class TimelineOverviewPane extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
41
42
  UI.Widget.VBox) {
@@ -426,7 +427,7 @@ export class OverviewInfo {
426
427
  this.visible = false;
427
428
  this.element = UI.Utils
428
429
  .createShadowRootWithCoreStyles(this.glassPane.contentElement, {
429
- cssFile: 'ui/legacy/components/perf_ui/timelineOverviewInfo.css',
430
+ cssFile: [timelineOverviewInfoStyles],
430
431
  delegatesFocus: undefined,
431
432
  })
432
433
  .createChild('div', 'overview-info');
@@ -51,8 +51,6 @@ let loadedPerfUIModule: (typeof PerfUI|undefined);
51
51
 
52
52
  async function loadPerfUIModule(): Promise<typeof PerfUI> {
53
53
  if (!loadedPerfUIModule) {
54
- // Side-effect import resources in module.json
55
- await Root.Runtime.Runtime.instance().loadModulePromise('perf_ui');
56
54
  loadedPerfUIModule = await import('./perf_ui.js');
57
55
  }
58
56
  return loadedPerfUIModule;
@@ -113,7 +113,7 @@ devtools-text-prompt {
113
113
  }
114
114
 
115
115
  .filtered-list-widget-item .filtered-list-widget-title {
116
- flex: auto;
116
+ flex: initial;
117
117
  overflow: hidden;
118
118
  text-overflow: ellipsis;
119
119
  }
@@ -194,7 +194,7 @@ devtools-text-prompt {
194
194
  }
195
195
 
196
196
  .filtered-list-widget-item.one-row .filtered-list-widget-title {
197
- flex: none;
197
+ padding-right: 8px;
198
198
  }
199
199
 
200
200
  .filtered-list-widget-item.two-rows {
@@ -4,7 +4,6 @@
4
4
 
5
5
  import type * as Common from '../../../../core/common/common.js';
6
6
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
7
- import type * as UI from '../../legacy.js';
8
7
 
9
8
  import {ResourceSourceFrame} from './ResourceSourceFrame.js';
10
9
 
@@ -64,7 +63,7 @@ export class BinaryResourceViewFactory {
64
63
  return new ResourceSourceFrame(
65
64
  TextUtils.StaticContentProvider.StaticContentProvider.fromString(
66
65
  this.contentUrl, this.resourceType, this.base64content),
67
- /* autoPrettyPrint */ false, ({lineNumbers: false, lineWrapping: true} as UI.TextEditor.Options));
66
+ this.resourceType.canonicalMimeType(), {lineNumbers: false, lineWrapping: true});
68
67
  }
69
68
 
70
69
  createHexView(): ResourceSourceFrame {
@@ -75,8 +74,7 @@ export class BinaryResourceViewFactory {
75
74
  return {content, isEncoded: false};
76
75
  });
77
76
  return new ResourceSourceFrame(
78
- hexViewerContentProvider,
79
- /* autoPrettyPrint */ false, ({lineNumbers: false, lineWrapping: false} as UI.TextEditor.Options));
77
+ hexViewerContentProvider, this.resourceType.canonicalMimeType(), {lineNumbers: false, lineWrapping: false});
80
78
  }
81
79
 
82
80
  createUtf8View(): ResourceSourceFrame {
@@ -84,8 +82,7 @@ export class BinaryResourceViewFactory {
84
82
  const utf8ContentProvider =
85
83
  new TextUtils.StaticContentProvider.StaticContentProvider(this.contentUrl, this.resourceType, utf8fn);
86
84
  return new ResourceSourceFrame(
87
- utf8ContentProvider,
88
- /* autoPrettyPrint */ false, ({lineNumbers: true, lineWrapping: true} as UI.TextEditor.Options));
85
+ utf8ContentProvider, this.resourceType.canonicalMimeType(), {lineNumbers: true, lineWrapping: true});
89
86
  }
90
87
 
91
88
  static uint8ArrayToHexString(uint8Array: Uint8Array): string {
@@ -59,6 +59,7 @@ export class FontView extends UI.View.SimpleView {
59
59
  private inResize!: boolean|null;
60
60
  constructor(mimeType: string, contentProvider: TextUtils.ContentProvider.ContentProvider) {
61
61
  super(i18nString(UIStrings.font));
62
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
62
63
  this.registerRequiredCSS('ui/legacy/components/source_frame/fontView.css');
63
64
  this.element.classList.add('font-view');
64
65
  this.url = contentProvider.contentURL();
@@ -96,6 +96,7 @@ export class ImageView extends UI.View.SimpleView {
96
96
  private cachedContent?: string|null;
97
97
  constructor(mimeType: string, contentProvider: TextUtils.ContentProvider.ContentProvider) {
98
98
  super(i18nString(UIStrings.image));
99
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
99
100
  this.registerRequiredCSS('ui/legacy/components/source_frame/imageView.css');
100
101
  this.element.tabIndex = -1;
101
102
  this.element.classList.add('image-view');
@@ -54,6 +54,7 @@ export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Search
54
54
  constructor(parsedJSON: ParsedJSON, startCollapsed?: boolean) {
55
55
  super();
56
56
  this.initialized = false;
57
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
57
58
  this.registerRequiredCSS('ui/legacy/components/source_frame/jsonView.css');
58
59
  this.parsedJSON = parsedJSON;
59
60
  this.startCollapsed = Boolean(startCollapsed);