chrome-devtools-frontend 1.0.940714 → 1.0.942529

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 (241) hide show
  1. package/config/gni/all_devtools_files.gni +0 -57
  2. package/config/gni/devtools_grd_files.gni +55 -15
  3. package/config/gni/devtools_image_files.gni +2 -3
  4. package/front_end/.eslintrc.js +12 -1
  5. package/front_end/Images/src/feedback_button_icon.svg +3 -0
  6. package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
  7. package/front_end/Tests.js +15 -0
  8. package/front_end/core/common/Color.ts +5 -0
  9. package/front_end/core/i18n/locales/en-US.json +31 -28
  10. package/front_end/core/i18n/locales/en-XL.json +31 -28
  11. package/front_end/core/sdk/DebuggerModel.ts +4 -14
  12. package/front_end/core/sdk/sdk-meta.ts +17 -3
  13. package/front_end/emulated_devices/module.json +1 -3
  14. package/front_end/entrypoints/devtools_app/devtools_app.json +1 -9
  15. package/front_end/entrypoints/main/MainImpl.ts +26 -0
  16. package/front_end/entrypoints/shell/shell.js +0 -11
  17. package/front_end/entrypoints/shell/shell.json +0 -2
  18. package/front_end/entrypoints/worker_app/worker_app.json +0 -4
  19. package/front_end/generated/InspectorBackendCommands.js +1 -0
  20. package/front_end/generated/protocol.d.ts +2 -0
  21. package/front_end/global_typings/global_defs.d.ts +5 -0
  22. package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
  23. package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +14 -2
  24. package/front_end/legacy_test_runner/legacy_test_runner.ts +10 -1
  25. package/front_end/legacy_test_runner/test_runner/TestRunner.js +11 -0
  26. package/front_end/models/formatter/SourceFormatter.ts +0 -10
  27. package/front_end/models/workspace/UISourceCode.ts +9 -42
  28. package/front_end/panels/animation/AnimationTimeline.ts +3 -3
  29. package/front_end/panels/application/ApplicationPanelSidebar.ts +3 -3
  30. package/front_end/panels/application/application-meta.ts +0 -3
  31. package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
  32. package/front_end/panels/application/components/ReportsGrid.ts +1 -1
  33. package/front_end/panels/console/ConsolePinPane.ts +21 -26
  34. package/front_end/panels/coverage/CoverageDecorationManager.ts +4 -5
  35. package/front_end/panels/coverage/CoverageView.ts +2 -105
  36. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +11 -56
  37. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -8
  38. package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
  39. package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
  40. package/front_end/panels/elements/components/adornerSettingsPane.css +0 -4
  41. package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
  42. package/front_end/panels/emulation/DeviceModeView.ts +2 -1
  43. package/front_end/panels/emulation/InspectedPagePlaceholder.ts +3 -1
  44. package/front_end/panels/emulation/MediaQueryInspector.ts +3 -1
  45. package/front_end/panels/emulation/emulation-meta.ts +2 -4
  46. package/front_end/panels/issues/issues-meta.ts +0 -2
  47. package/front_end/panels/layers/module.json +0 -1
  48. package/front_end/panels/lighthouse/LighthousePanel.ts +2 -4
  49. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
  50. package/front_end/panels/lighthouse/lighthouseStartView.css +4 -0
  51. package/front_end/panels/lighthouse/module.json +1 -4
  52. package/front_end/panels/media/media-meta.ts +0 -3
  53. package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -1
  54. package/front_end/panels/network/network-meta.ts +0 -3
  55. package/front_end/panels/profiler/module.json +1 -4
  56. package/front_end/panels/screencast/module.json +1 -4
  57. package/front_end/panels/security/security-meta.ts +0 -3
  58. package/front_end/panels/sources/BreakpointEditDialog.ts +16 -30
  59. package/front_end/panels/sources/CSSPlugin.ts +310 -331
  60. package/front_end/panels/sources/CallStackSidebarPane.ts +28 -34
  61. package/front_end/panels/sources/CoveragePlugin.ts +121 -6
  62. package/front_end/panels/sources/DebuggerPlugin.ts +1166 -1243
  63. package/front_end/panels/sources/EditingLocationHistoryManager.ts +71 -101
  64. package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -3
  65. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
  66. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +26 -23
  67. package/front_end/panels/sources/Plugin.ts +20 -4
  68. package/front_end/panels/sources/ProfilePlugin.ts +185 -0
  69. package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
  70. package/front_end/panels/sources/ScriptOriginPlugin.ts +0 -10
  71. package/front_end/panels/sources/SnippetsPlugin.ts +1 -10
  72. package/front_end/panels/sources/SourcesPanel.ts +15 -10
  73. package/front_end/panels/sources/SourcesView.ts +10 -8
  74. package/front_end/panels/sources/TabbedEditorContainer.ts +31 -27
  75. package/front_end/panels/sources/UISourceCodeFrame.ts +335 -470
  76. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
  77. package/front_end/panels/sources/sources-legacy.ts +0 -6
  78. package/front_end/panels/sources/sources.ts +0 -2
  79. package/front_end/panels/timeline/module.json +0 -3
  80. package/front_end/third_party/codemirror.next/bundle.ts +9 -13
  81. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  82. package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -2
  83. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -6
  84. package/front_end/third_party/codemirror.next/chunk/php.js +2 -6
  85. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  86. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  87. package/front_end/third_party/codemirror.next/chunk/xml.js +2 -2
  88. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +279 -198
  89. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  90. package/front_end/third_party/codemirror.next/package.json +13 -11
  91. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1128 -1158
  92. package/front_end/third_party/lighthouse/locales/ar-XB.json +211 -79
  93. package/front_end/third_party/lighthouse/locales/ar.json +213 -81
  94. package/front_end/third_party/lighthouse/locales/bg.json +211 -79
  95. package/front_end/third_party/lighthouse/locales/ca.json +212 -80
  96. package/front_end/third_party/lighthouse/locales/cs.json +211 -79
  97. package/front_end/third_party/lighthouse/locales/da.json +211 -79
  98. package/front_end/third_party/lighthouse/locales/de.json +211 -79
  99. package/front_end/third_party/lighthouse/locales/el.json +213 -81
  100. package/front_end/third_party/lighthouse/locales/en-GB.json +211 -79
  101. package/front_end/third_party/lighthouse/locales/en-US.json +186 -75
  102. package/front_end/third_party/lighthouse/locales/en-XA.json +211 -79
  103. package/front_end/third_party/lighthouse/locales/en-XL.json +186 -75
  104. package/front_end/third_party/lighthouse/locales/es-419.json +211 -79
  105. package/front_end/third_party/lighthouse/locales/es.json +212 -80
  106. package/front_end/third_party/lighthouse/locales/fi.json +211 -79
  107. package/front_end/third_party/lighthouse/locales/fil.json +211 -79
  108. package/front_end/third_party/lighthouse/locales/fr.json +211 -79
  109. package/front_end/third_party/lighthouse/locales/he.json +212 -80
  110. package/front_end/third_party/lighthouse/locales/hi.json +214 -82
  111. package/front_end/third_party/lighthouse/locales/hr.json +211 -79
  112. package/front_end/third_party/lighthouse/locales/hu.json +211 -79
  113. package/front_end/third_party/lighthouse/locales/id.json +211 -79
  114. package/front_end/third_party/lighthouse/locales/it.json +211 -79
  115. package/front_end/third_party/lighthouse/locales/ja.json +211 -79
  116. package/front_end/third_party/lighthouse/locales/ko.json +211 -79
  117. package/front_end/third_party/lighthouse/locales/lt.json +211 -79
  118. package/front_end/third_party/lighthouse/locales/lv.json +214 -82
  119. package/front_end/third_party/lighthouse/locales/nl.json +211 -79
  120. package/front_end/third_party/lighthouse/locales/no.json +211 -79
  121. package/front_end/third_party/lighthouse/locales/pl.json +211 -79
  122. package/front_end/third_party/lighthouse/locales/pt-PT.json +211 -79
  123. package/front_end/third_party/lighthouse/locales/pt.json +211 -79
  124. package/front_end/third_party/lighthouse/locales/ro.json +212 -80
  125. package/front_end/third_party/lighthouse/locales/ru.json +211 -79
  126. package/front_end/third_party/lighthouse/locales/sk.json +211 -79
  127. package/front_end/third_party/lighthouse/locales/sl.json +211 -79
  128. package/front_end/third_party/lighthouse/locales/sr-Latn.json +211 -79
  129. package/front_end/third_party/lighthouse/locales/sr.json +211 -79
  130. package/front_end/third_party/lighthouse/locales/sv.json +211 -79
  131. package/front_end/third_party/lighthouse/locales/ta.json +218 -86
  132. package/front_end/third_party/lighthouse/locales/te.json +251 -119
  133. package/front_end/third_party/lighthouse/locales/th.json +211 -79
  134. package/front_end/third_party/lighthouse/locales/tr.json +211 -79
  135. package/front_end/third_party/lighthouse/locales/uk.json +212 -80
  136. package/front_end/third_party/lighthouse/locales/vi.json +211 -79
  137. package/front_end/third_party/lighthouse/locales/zh-HK.json +211 -79
  138. package/front_end/third_party/lighthouse/locales/zh-TW.json +211 -79
  139. package/front_end/third_party/lighthouse/locales/zh.json +211 -79
  140. package/front_end/third_party/lighthouse/report/bundle.d.ts +72 -34
  141. package/front_end/third_party/lighthouse/report/bundle.js +698 -492
  142. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -2
  143. package/front_end/third_party/lighthouse/report-assets/report.js +40 -35
  144. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +2 -4
  145. package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +60 -68
  146. package/front_end/ui/components/data_grid/dataGrid.css +12 -10
  147. package/front_end/ui/components/docs/css_overview/start_view.html +25 -0
  148. package/front_end/ui/components/docs/css_overview/start_view.ts +14 -0
  149. package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
  150. package/front_end/ui/components/docs/panel_feedback/basic.html +25 -0
  151. package/front_end/ui/components/docs/panel_feedback/basic.ts +20 -0
  152. package/front_end/ui/components/docs/panel_feedback/button.html +25 -0
  153. package/front_end/ui/components/docs/panel_feedback/button.ts +18 -0
  154. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -13
  155. package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
  156. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +67 -0
  157. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +100 -0
  158. package/front_end/ui/components/panel_feedback/panelFeedback.css +76 -0
  159. package/front_end/ui/components/panel_feedback/panel_feedback.ts +6 -0
  160. package/front_end/ui/components/report_view/reportValue.css +1 -0
  161. package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
  162. package/front_end/ui/components/text_editor/TextEditor.ts +79 -36
  163. package/front_end/ui/components/text_editor/config.ts +42 -26
  164. package/front_end/ui/components/text_editor/javascript.ts +2 -3
  165. package/front_end/ui/components/text_editor/position.ts +17 -0
  166. package/front_end/ui/components/text_editor/text_editor.ts +1 -0
  167. package/front_end/ui/components/text_editor/theme.ts +5 -1
  168. package/front_end/ui/legacy/Dialog.ts +3 -1
  169. package/front_end/ui/legacy/DropTarget.ts +2 -1
  170. package/front_end/ui/legacy/EmptyWidget.ts +2 -1
  171. package/front_end/ui/legacy/FilterBar.ts +2 -1
  172. package/front_end/ui/legacy/GlassPane.ts +4 -2
  173. package/front_end/ui/legacy/Infobar.ts +5 -8
  174. package/front_end/ui/legacy/InspectorView.ts +6 -1
  175. package/front_end/ui/legacy/ListWidget.ts +2 -1
  176. package/front_end/ui/legacy/PopoverHelper.ts +2 -1
  177. package/front_end/ui/legacy/ProgressIndicator.ts +2 -1
  178. package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -1
  179. package/front_end/ui/legacy/ReportView.ts +2 -1
  180. package/front_end/ui/legacy/RootView.ts +2 -1
  181. package/front_end/ui/legacy/SearchableView.ts +2 -1
  182. package/front_end/ui/legacy/ShortcutRegistry.ts +11 -7
  183. package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
  184. package/front_end/ui/legacy/SoftDropDown.ts +4 -2
  185. package/front_end/ui/legacy/SplitWidget.ts +2 -1
  186. package/front_end/ui/legacy/SuggestBox.ts +2 -1
  187. package/front_end/ui/legacy/TabbedPane.ts +2 -1
  188. package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -1
  189. package/front_end/ui/legacy/TextPrompt.ts +2 -1
  190. package/front_end/ui/legacy/Toolbar.ts +3 -2
  191. package/front_end/ui/legacy/Treeoutline.ts +3 -2
  192. package/front_end/ui/legacy/UIUtils.ts +16 -13
  193. package/front_end/ui/legacy/ViewManager.ts +2 -1
  194. package/front_end/ui/legacy/Widget.ts +1 -1
  195. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -1
  196. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +3 -1
  197. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -1
  198. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +35 -131
  199. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
  200. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +3 -1
  201. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -1
  202. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
  203. package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +3 -6
  204. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
  205. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
  206. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
  207. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +19 -14
  208. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +502 -252
  209. package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -0
  210. package/front_end/ui/legacy/components/source_frame/module.json +0 -3
  211. package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -11
  212. package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
  213. package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
  214. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +3 -1
  215. package/front_end/ui/legacy/components/text_editor/module.json +0 -3
  216. package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -15
  217. package/front_end/ui/legacy/radioButton.css +1 -13
  218. package/front_end/ui/legacy/softContextMenu.css +1 -0
  219. package/front_end/ui/legacy/themeColors.css +36 -0
  220. package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
  221. package/front_end/ui/legacy/utils/append-style.ts +9 -4
  222. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +2 -2
  223. package/front_end/ui/legacy/utils/inject-core-styles.ts +7 -4
  224. package/package.json +1 -1
  225. package/scripts/build/generate_css_js_files.js +23 -9
  226. package/scripts/build/ninja/generate_css.gni +10 -1
  227. package/scripts/eslint_rules/lib/check_css_import.js +2 -2
  228. package/scripts/eslint_rules/tests/check_css_import_test.js +12 -0
  229. package/front_end/Images/radioDot-dark-theme.png +0 -0
  230. package/front_end/Images/radioDot.png +0 -0
  231. package/front_end/panels/application/module.json +0 -7
  232. package/front_end/panels/emulation/module.json +0 -11
  233. package/front_end/panels/issues/module.json +0 -6
  234. package/front_end/panels/layer_viewer/module.json +0 -6
  235. package/front_end/panels/media/module.json +0 -6
  236. package/front_end/panels/network/module.json +0 -6
  237. package/front_end/panels/security/module.json +0 -5
  238. package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
  239. package/front_end/ui/legacy/components/perf_ui/module.json +0 -13
  240. package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +0 -1030
  241. package/front_end/ui/legacy/module.json +0 -41
@@ -5,11 +5,11 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import * as SDK from '../../core/sdk/sdk.js';
8
+ import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
9
+ import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
8
10
  import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
9
11
  // eslint-disable-next-line rulesdir/es_modules_import
10
12
  import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
11
- import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
12
- import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
13
13
  import * as UI from '../../ui/legacy/legacy.js';
14
14
 
15
15
  import consolePinPaneStyles from './consolePinPane.css.js';
@@ -171,11 +171,10 @@ export class ConsolePin {
171
171
  private readonly pinPreview: HTMLElement;
172
172
  private lastResult: SDK.RuntimeModel.EvaluationResult|null;
173
173
  private lastExecutionContext: SDK.RuntimeModel.ExecutionContext|null;
174
- private editor: TextEditor.TextEditor.TextEditor|null;
174
+ private editor: TextEditor.TextEditor.TextEditor;
175
175
  private committedExpression: string;
176
176
  private hovered: boolean;
177
177
  private lastNode: SDK.RemoteObject.RemoteObject|null;
178
- private readonly editorPromise: Promise<TextEditor.TextEditor.TextEditor>;
179
178
  private consolePinNumber: number;
180
179
  private deletePinIcon: UI.UIUtils.DevToolsCloseButton;
181
180
 
@@ -209,10 +208,10 @@ export class ConsolePin {
209
208
 
210
209
  this.lastResult = null;
211
210
  this.lastExecutionContext = null;
212
- this.editor = null;
213
211
  this.committedExpression = expression;
214
212
  this.hovered = false;
215
213
  this.lastNode = null;
214
+ this.editor = this.createEditor(expression, nameElement);
216
215
 
217
216
  this.pinPreview.addEventListener('mouseenter', this.setHovered.bind(this, true), false);
218
217
  this.pinPreview.addEventListener('mouseleave', this.setHovered.bind(this, false), false);
@@ -229,22 +228,19 @@ export class ConsolePin {
229
228
  event.consume();
230
229
  }
231
230
  });
232
- this.editorPromise = this.createEditor(expression, nameElement);
233
231
  }
234
232
 
235
- async createEditor(expression: string, parent: HTMLElement): Promise<TextEditor.TextEditor.TextEditor> {
236
- const CM = await import('../../third_party/codemirror.next/codemirror.next.js');
237
- const TE = await import('../../ui/components/text_editor/text_editor.js');
238
- this.editor = new TE.TextEditor.TextEditor(CM.EditorState.create({
233
+ createEditor(expression: string, parent: HTMLElement): TextEditor.TextEditor.TextEditor {
234
+ const editor = new TextEditor.TextEditor.TextEditor(CodeMirror.EditorState.create({
239
235
  doc: expression,
240
236
  extensions: [
241
- CM.EditorView.contentAttributes.of({'aria-label': i18nString(UIStrings.liveExpressionEditor)}),
242
- CM.EditorView.lineWrapping,
243
- (await CM.javascript()).javascriptLanguage,
244
- await TE.JavaScript.completion(),
245
- TE.Config.showCompletionHint,
246
- CM.placeholder(i18nString(UIStrings.expression)),
247
- CM.keymap.of([
237
+ CodeMirror.EditorView.contentAttributes.of({'aria-label': i18nString(UIStrings.liveExpressionEditor)}),
238
+ CodeMirror.EditorView.lineWrapping,
239
+ CodeMirror.javascript.javascriptLanguage,
240
+ TextEditor.JavaScript.completion(),
241
+ TextEditor.Config.showCompletionHint,
242
+ CodeMirror.placeholder(i18nString(UIStrings.expression)),
243
+ CodeMirror.keymap.of([
248
244
  {
249
245
  key: 'Escape',
250
246
  run: (view: CodeMirror.EditorView): boolean => {
@@ -261,13 +257,13 @@ export class ConsolePin {
261
257
  },
262
258
  },
263
259
  ]),
264
- CM.EditorView.domEventHandlers({blur: (_e, view) => this.onBlur(view)}),
265
- TE.Config.baseConfiguration(expression),
266
- TE.Config.autocompletion,
260
+ CodeMirror.EditorView.domEventHandlers({blur: (_e, view) => this.onBlur(view)}),
261
+ TextEditor.Config.baseConfiguration(expression),
262
+ TextEditor.Config.autocompletion,
267
263
  ],
268
264
  }));
269
- parent.appendChild(this.editor);
270
- return this.editor;
265
+ parent.appendChild(editor);
266
+ return editor;
271
267
  }
272
268
 
273
269
  onBlur(editor: CodeMirror.EditorView): void {
@@ -305,9 +301,9 @@ export class ConsolePin {
305
301
  }
306
302
 
307
303
  async focus(): Promise<void> {
308
- const editor = this.editor || await this.editorPromise;
304
+ const editor = this.editor;
309
305
  editor.editor.focus();
310
- editor.editor.dispatch({selection: {anchor: editor.state.doc.length}});
306
+ editor.dispatch({selection: {anchor: editor.state.doc.length}});
311
307
  }
312
308
 
313
309
  appendToContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
@@ -322,8 +318,7 @@ export class ConsolePin {
322
318
  if (!this.editor) {
323
319
  return;
324
320
  }
325
- const TE = await import('../../ui/components/text_editor/text_editor.js');
326
- const text = TE.Config.contentIncludingHint(this.editor.editor);
321
+ const text = TextEditor.Config.contentIncludingHint(this.editor.editor);
327
322
  const isEditing = this.pinElement.hasFocus();
328
323
  const throwOnSideEffect = isEditing && text !== this.committedExpression;
329
324
  const timeout = throwOnSideEffect ? 250 : undefined;
@@ -24,7 +24,7 @@ export class CoverageDecorationManager {
24
24
  this.uiSourceCodeByContentProvider = new Platform.MapUtilities.Multimap();
25
25
 
26
26
  for (const uiSourceCode of Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes()) {
27
- uiSourceCode.addLineDecoration(0, decoratorType, this);
27
+ uiSourceCode.setDecorationData(decoratorType, this);
28
28
  }
29
29
  Workspace.Workspace.WorkspaceImpl.instance().addEventListener(
30
30
  Workspace.Workspace.Events.UISourceCodeAdded, this.onUISourceCodeAdded, this);
@@ -32,7 +32,7 @@ export class CoverageDecorationManager {
32
32
 
33
33
  reset(): void {
34
34
  for (const uiSourceCode of Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes()) {
35
- uiSourceCode.removeDecorationsForType(decoratorType);
35
+ uiSourceCode.setDecorationData(decoratorType, undefined);
36
36
  }
37
37
  }
38
38
 
@@ -45,8 +45,7 @@ export class CoverageDecorationManager {
45
45
  update(updatedEntries: CoverageInfo[]): void {
46
46
  for (const entry of updatedEntries) {
47
47
  for (const uiSourceCode of this.uiSourceCodeByContentProvider.get(entry.getContentProvider())) {
48
- uiSourceCode.removeDecorationsForType(decoratorType);
49
- uiSourceCode.addLineDecoration(0, decoratorType, this);
48
+ uiSourceCode.setDecorationData(decoratorType, this);
50
49
  }
51
50
  }
52
51
  }
@@ -185,7 +184,7 @@ export class CoverageDecorationManager {
185
184
 
186
185
  private onUISourceCodeAdded(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
187
186
  const uiSourceCode = event.data;
188
- uiSourceCode.addLineDecoration(0, decoratorType, this);
187
+ uiSourceCode.setDecorationData(decoratorType, this);
189
188
  }
190
189
  }
191
190
  export interface RawLocation {
@@ -8,15 +8,12 @@ import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as Platform from '../../core/platform/platform.js';
9
9
  import * as SDK from '../../core/sdk/sdk.js';
10
10
  import * as Bindings from '../../models/bindings/bindings.js';
11
- import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
12
11
  import * as UI from '../../ui/legacy/legacy.js';
13
12
 
13
+ import {CoverageDecorationManager} from './CoverageDecorationManager.js';
14
+ import {CoverageListView} from './CoverageListView.js';
14
15
  import coverageViewStyles from './coverageView.css.js';
15
16
 
16
- import type * as Workspace from '../../models/workspace/workspace.js';
17
-
18
- import {CoverageDecorationManager, decoratorType} from './CoverageDecorationManager.js';
19
- import {CoverageListView} from './CoverageListView.js';
20
17
  import type {CoverageInfo, URLCoverageInfo} from './CoverageModel.js';
21
18
  import {CoverageModel, Events, CoverageType} from './CoverageModel.js';
22
19
 
@@ -564,103 +561,3 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
564
561
  }
565
562
  }
566
563
  }
567
- let lineDecoratorInstance: LineDecorator;
568
- export class LineDecorator implements SourceFrame.SourceFrame.LineDecorator {
569
- static instance({forceNew}: {forceNew: boolean} = {forceNew: false}): LineDecorator {
570
- if (!lineDecoratorInstance || forceNew) {
571
- lineDecoratorInstance = new LineDecorator();
572
- }
573
-
574
- return lineDecoratorInstance;
575
- }
576
-
577
- private readonly listeners: WeakMap<
578
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
579
- SourceFrame.SourcesTextEditor.SourcesTextEditor, (arg0: Common.EventTarget.EventTargetEvent<any>) => void>;
580
- constructor() {
581
- this.listeners = new WeakMap();
582
- }
583
-
584
- decorate(
585
- uiSourceCode: Workspace.UISourceCode.UISourceCode,
586
- textEditor: SourceFrame.SourcesTextEditor.SourcesTextEditor): void {
587
- const decorations = uiSourceCode.decorationsForType(decoratorType);
588
- if (!decorations || !decorations.size) {
589
- this.uninstallGutter(textEditor);
590
- return;
591
- }
592
- const decorationManager = decorations.values().next().value.data() as CoverageDecorationManager;
593
- decorationManager.usageByLine(uiSourceCode).then(lineUsage => {
594
- textEditor.operation(() => this.innerDecorate(uiSourceCode, textEditor, lineUsage));
595
- });
596
- }
597
-
598
- private innerDecorate(
599
- uiSourceCode: Workspace.UISourceCode.UISourceCode, textEditor: SourceFrame.SourcesTextEditor.SourcesTextEditor,
600
- lineUsage: (boolean|undefined)[]): void {
601
- const gutterType = LineDecorator.GUTTER_TYPE;
602
- this.uninstallGutter(textEditor);
603
- if (lineUsage.length) {
604
- this.installGutter(textEditor, uiSourceCode.url());
605
- }
606
- for (let line = 0; line < lineUsage.length; ++line) {
607
- // Do not decorate the line if we don't have data.
608
- if (typeof lineUsage[line] !== 'boolean') {
609
- continue;
610
- }
611
- const className = lineUsage[line] ? 'text-editor-coverage-used-marker' : 'text-editor-coverage-unused-marker';
612
- const gutterElement = document.createElement('div');
613
- gutterElement.classList.add(className);
614
- textEditor.setGutterDecoration(line, gutterType, gutterElement);
615
- }
616
- }
617
-
618
- makeGutterClickHandler(url: string):
619
- (arg0: Common.EventTarget.EventTargetEvent<SourceFrame.SourcesTextEditor.GutterClickEventData>) => void {
620
- function handleGutterClick(
621
- event: Common.EventTarget.EventTargetEvent<SourceFrame.SourcesTextEditor.GutterClickEventData>): void {
622
- if (event.data.gutterType !== LineDecorator.GUTTER_TYPE) {
623
- return;
624
- }
625
- const coverageViewId = 'coverage';
626
- UI.ViewManager.ViewManager.instance()
627
- .showView(coverageViewId)
628
- .then(() => {
629
- const view = UI.ViewManager.ViewManager.instance().view(coverageViewId);
630
- return view && view.widget();
631
- })
632
- .then(widget => {
633
- const matchFormattedSuffix = url.match(/(.*):formatted$/);
634
- const urlWithoutFormattedSuffix = (matchFormattedSuffix && matchFormattedSuffix[1]) || url;
635
- (widget as CoverageView).selectCoverageItemByUrl(urlWithoutFormattedSuffix);
636
- });
637
- }
638
- return handleGutterClick;
639
- }
640
-
641
- private installGutter(textEditor: SourceFrame.SourcesTextEditor.SourcesTextEditor, url: string): void {
642
- let listener = this.listeners.get(textEditor);
643
- if (!listener) {
644
- listener = this.makeGutterClickHandler(url);
645
- this.listeners.set(textEditor, listener);
646
- }
647
- textEditor.installGutter(LineDecorator.GUTTER_TYPE, false);
648
- textEditor.addEventListener(SourceFrame.SourcesTextEditor.Events.GutterClick, listener, this);
649
- }
650
-
651
- private uninstallGutter(textEditor: SourceFrame.SourcesTextEditor.SourcesTextEditor): void {
652
- textEditor.uninstallGutter(LineDecorator.GUTTER_TYPE);
653
- const listener = this.listeners.get(textEditor);
654
- if (listener) {
655
- textEditor.removeEventListener(SourceFrame.SourcesTextEditor.Events.GutterClick, listener, this);
656
- this.listeners.delete(textEditor);
657
- }
658
- }
659
-
660
- static readonly GUTTER_TYPE = 'CodeMirror-gutter-coverage';
661
- }
662
-
663
- SourceFrame.SourceFrame.registerLineDecorator({
664
- lineDecorator: LineDecorator.instance,
665
- decoratorType: SourceFrame.SourceFrame.DecoratorType.COVERAGE,
666
- });
@@ -5,8 +5,7 @@
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
7
7
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
8
- import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
9
- import * as Legacy from '../../../ui/legacy/legacy.js';
8
+ import * as PanelFeedback from '../../../ui/components/panel_feedback/panel_feedback.js';
10
9
  import * as LitHtml from '../../../ui/lit-html/lit-html.js';
11
10
 
12
11
  import cssOverviewStartViewStyles from './cssOverviewStartView.css.js';
@@ -34,30 +33,9 @@ const UIStrings = {
34
33
  */
35
34
  locateAffectedElements: 'Locate the affected elements in the Elements panel',
36
35
  /**
37
- *@description Title of the "Preview feature" reminder box
38
- */
39
- previewFeature: 'Preview feature',
40
- /**
41
- *@description Sentence to convey the feature is being actively worked on and we are looking for feedback
42
- *@example {https://goo.gle/css-overview-feedback} PH1
43
- */
44
- activelyWorkingAndLookingForS: 'Our team is actively working on this feature and we are looking for your {PH1}!',
45
- /**
46
- *@description Link text of the inline anchor to navigate to a feedback page
47
- */
48
- feedbackInline: 'feedback',
49
- /**
50
- *@description Title of the section to the quick start video and documentation to CSS Overview panel
51
- */
52
- videoAndDocumentation: 'Video and documentation',
53
- /**
54
36
  *@description Title of the link to the quick start video and documentation to CSS Overview panel
55
37
  */
56
38
  quickStartWithCSSOverview: 'Quick start: get started with the new CSS Overview panel',
57
- /**
58
- *@description Link text of the standalone button to navigate to a feedback page
59
- */
60
- feedbackStandalone: 'Feedback',
61
39
  };
62
40
  const str_ = i18n.i18n.registerUIStrings('panels/css_overview/components/CSSOverviewStartView.ts', UIStrings);
63
41
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -77,13 +55,6 @@ export class OverviewStartRequestedEvent extends Event {
77
55
  export class CSSOverviewStartView extends HTMLElement {
78
56
  static readonly litTagName = LitHtml.literal`devtools-css-overview-start-view`;
79
57
  readonly #shadow = this.attachShadow({mode: 'open'});
80
- #feedbackLink: HTMLElement;
81
-
82
- constructor() {
83
- super();
84
- this.#feedbackLink =
85
- Legacy.XLink.XLink.create(FEEDBACK_LINK, i18nString(UIStrings.feedbackInline), 'devtools-link');
86
- }
87
58
 
88
59
  connectedCallback(): void {
89
60
  this.#shadow.adoptedStyleSheets = [cssOverviewStartViewStyles];
@@ -121,32 +92,16 @@ export class CSSOverviewStartView extends HTMLElement {
121
92
  ${i18nString(UIStrings.captureOverview)}
122
93
  </${Buttons.Button.Button.litTagName}>
123
94
  </div>
124
- <section class="preview-feature">
125
- <h1 class="preview-header">
126
- <${IconButton.Icon.Icon.litTagName} class="preview-icon" .data=${{
127
- iconName: 'ic_preview_feature',
128
- width: '24px',
129
- height: '24px',
130
- color: 'var(--color-primary)',
131
- } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
132
- ${i18nString(UIStrings.previewFeature)}
133
- </h1>
134
- <div class="feedback-prompt">${i18n.i18n.getFormatLocalizedString(str_, UIStrings.activelyWorkingAndLookingForS, {PH1: this.#feedbackLink})}</div>
135
- <div class="resources">
136
- <div class="thumbnail-wrapper">
137
- <${IconButton.Icon.Icon.litTagName} .data=${{
138
- iconName: 'preview_feature_video_thumbnail',
139
- width: '144px',
140
- height: '92px',
141
- } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
142
- </div>
143
- <div>
144
- <h1 class="video-doc-header">${i18nString(UIStrings.videoAndDocumentation)}</h1>
145
- <x-link class="devtools-link" href=${DOC_LINK}>${i18nString(UIStrings.quickStartWithCSSOverview)}</x-link>
146
- </div>
147
- </div>
148
- </section>
149
- <x-link class="feedback-standalone" href=${FEEDBACK_LINK}>${i18nString(UIStrings.feedbackStandalone)}</x-link>
95
+ <${PanelFeedback.PanelFeedback.PanelFeedback.litTagName} .data=${{
96
+ feedbackUrl: FEEDBACK_LINK,
97
+ quickStartUrl: DOC_LINK,
98
+ quickStartLinkText: i18nString(UIStrings.quickStartWithCSSOverview),
99
+ } as PanelFeedback.PanelFeedback.PanelFeedbackData}>
100
+ </${PanelFeedback.PanelFeedback.PanelFeedback.litTagName}>
101
+ <${PanelFeedback.FeedbackButton.FeedbackButton.litTagName} .data=${{
102
+ feedbackUrl: FEEDBACK_LINK,
103
+ } as PanelFeedback.FeedbackButton.FeedbackButtonData}>
104
+ </${PanelFeedback.FeedbackButton.FeedbackButton.litTagName}>
150
105
  </div>
151
106
  `, this.#shadow, {
152
107
  host: this,
@@ -120,15 +120,8 @@ h1 {
120
120
  margin-bottom: 2px;
121
121
  }
122
122
 
123
- .feedback-standalone {
124
- width: fit-content;
125
- padding: 0.5em;
123
+ devtools-feedback-button {
126
124
  align-self: flex-end;
127
- color: var(--color-primary);
128
- border: 1px solid var(--color-details-hairline);
129
- border-radius: 2px;
130
- text-decoration: none;
131
- font-weight: bold;
132
125
  }
133
126
 
134
127
  .resources .devtools-link {
@@ -38,10 +38,10 @@ import * as i18n from '../../core/i18n/i18n.js';
38
38
  import * as Platform from '../../core/platform/platform.js';
39
39
  import * as SDK from '../../core/sdk/sdk.js';
40
40
  import * as TextUtils from '../../models/text_utils/text_utils.js';
41
+ import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
41
42
  import * as Adorners from '../../ui/components/adorners/adorners.js';
42
43
  import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
43
-
44
- import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
44
+ import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
45
45
  import * as Components from '../../ui/legacy/components/utils/utils.js';
46
46
  import * as UI from '../../ui/legacy/legacy.js';
47
47
  import * as Emulation from '../emulation/emulation.js';
@@ -679,8 +679,6 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
679
679
  const isEditable = this.hasEditableNode();
680
680
  // clang-format off
681
681
  if (isEditable && !this.editing) {
682
- // Eagerly load CodeMirror to avoid a delay when opening the "Edit as HTML" editor when the user actually clicks on it
683
- import('../../ui/components/text_editor/text_editor.js');
684
682
  contextMenu.editSection().appendItem(i18nString(UIStrings.editAsHtml), this.editAsHTML.bind(this));
685
683
  }
686
684
  // clang-format on
@@ -1026,9 +1024,6 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1026
1024
  }
1027
1025
  });
1028
1026
 
1029
- const TextEditor = await import('../../ui/components/text_editor/text_editor.js');
1030
- const CodeMirror = await import('../../third_party/codemirror.next/codemirror.next.js');
1031
- const {html} = await CodeMirror.html();
1032
1027
  const editor = new TextEditor.TextEditor.TextEditor(CodeMirror.EditorState.create({
1033
1028
  doc: initialValue,
1034
1029
  extensions: [
@@ -1050,8 +1045,8 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1050
1045
  ]),
1051
1046
  TextEditor.Config.baseConfiguration(initialValue),
1052
1047
  TextEditor.Config.autocompletion,
1053
- html(),
1054
- TextEditor.Config.domWordWrap,
1048
+ CodeMirror.html.html(),
1049
+ TextEditor.Config.domWordWrap.instance(),
1055
1050
  CodeMirror.EditorView.theme({
1056
1051
  '&.cm-editor': {maxHeight: '300px'},
1057
1052
  '.cm-scroller': {overflowY: 'auto'},
@@ -197,6 +197,8 @@ export const FlexboxEditableProperties = [
197
197
  propertyValues: [
198
198
  'row',
199
199
  'column',
200
+ 'row-reverse',
201
+ 'column-reverse',
200
202
  ],
201
203
  },
202
204
  {
@@ -65,7 +65,3 @@
65
65
  .close::after {
66
66
  transform: rotate(-45deg);
67
67
  }
68
-
69
- :host-context(.-theme-with-dark-background) input[type="checkbox"] {
70
- filter: invert(80%);
71
- }
@@ -11,6 +11,8 @@ import * as UI from '../../ui/legacy/legacy.js';
11
11
  import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';
12
12
  import * as EmulationComponents from './components/components.js';
13
13
 
14
+ import deviceModeToolbarStyles from './deviceModeToolbar.css.legacy.js';
15
+
14
16
  const UIStrings = {
15
17
  /**
16
18
  * @description Title of the device dimensions selection iteam in the Device Mode Toolbar.
@@ -518,7 +520,7 @@ export class DeviceModeToolbar {
518
520
  private wrapToolbarItem(element: Element): UI.Toolbar.ToolbarItem {
519
521
  const container = document.createElement('div');
520
522
  const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(
521
- container, {cssFile: 'panels/emulation/deviceModeToolbar.css', delegatesFocus: undefined});
523
+ container, {cssFile: deviceModeToolbarStyles, delegatesFocus: undefined});
522
524
  shadowRoot.appendChild(element);
523
525
  return new UI.Toolbar.ToolbarItem(container);
524
526
  }
@@ -12,6 +12,7 @@ import * as EmulationModel from '../../models/emulation/emulation.js';
12
12
 
13
13
  import {DeviceModeToolbar} from './DeviceModeToolbar.js';
14
14
  import {MediaQueryInspector} from './MediaQueryInspector.js';
15
+ import deviceModeViewStyles from './deviceModeView.css.legacy.js';
15
16
 
16
17
  const UIStrings = {
17
18
  /**
@@ -98,7 +99,7 @@ export class DeviceModeView extends UI.Widget.VBox {
98
99
 
99
100
  this.setMinimumSize(150, 150);
100
101
  this.element.classList.add('device-mode-view');
101
- this.registerRequiredCSS('panels/emulation/deviceModeView.css');
102
+ this.registerRequiredCSS(deviceModeViewStyles);
102
103
 
103
104
  this.model = EmulationModel.DeviceModeModel.DeviceModeModel.instance();
104
105
  this.model.addEventListener(EmulationModel.DeviceModeModel.Events.Updated, this.updateUI, this);
@@ -5,6 +5,8 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
+ import inspectedPagePlaceholderStyles from './inspectedPagePlaceholder.css.legacy.js';
9
+
8
10
  let inspectedPagePlaceholderInstance: InspectedPagePlaceholder;
9
11
 
10
12
  export class InspectedPagePlaceholder extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
@@ -12,7 +14,7 @@ export class InspectedPagePlaceholder extends Common.ObjectWrapper.eventMixin<Ev
12
14
  private updateId?: number;
13
15
  constructor() {
14
16
  super(true);
15
- this.registerRequiredCSS('panels/emulation/inspectedPagePlaceholder.css');
17
+ this.registerRequiredCSS(inspectedPagePlaceholderStyles);
16
18
  UI.ZoomManager.ZoomManager.instance().addEventListener(UI.ZoomManager.Events.ZoomChanged, this.onResize, this);
17
19
  this.restoreMinimumSize();
18
20
  }
@@ -10,6 +10,8 @@ import * as Bindings from '../../models/bindings/bindings.js';
10
10
  import type * as Workspace from '../../models/workspace/workspace.js';
11
11
  import * as UI from '../../ui/legacy/legacy.js';
12
12
 
13
+ import mediaQueryInspectorStyles from './mediaQueryInspector.css.legacy.js';
14
+
13
15
  const UIStrings = {
14
16
  /**
15
17
  * @description A context menu item/command in the Media Query Inspector of the Device Toolbar.
@@ -32,7 +34,7 @@ export class MediaQueryInspector extends UI.Widget.Widget implements
32
34
 
33
35
  constructor(getWidthCallback: () => number, setWidthCallback: (arg0: number) => void) {
34
36
  super(true);
35
- this.registerRequiredCSS('panels/emulation/mediaQueryInspector.css');
37
+ this.registerRequiredCSS(mediaQueryInspectorStyles);
36
38
  this.contentElement.classList.add('media-inspector-view');
37
39
  this.contentElement.addEventListener('click', this.onMediaQueryClicked.bind(this), false);
38
40
  this.contentElement.addEventListener('contextmenu', this.onContextMenu.bind(this), false);
@@ -47,11 +47,11 @@ const UIStrings = {
47
47
  /**
48
48
  *@description Command that shows measuring rulers next to the emulated device.
49
49
  */
50
- showRulers: 'Show rulers',
50
+ showRulers: 'Show rulers in the Device Mode toolbar',
51
51
  /**
52
52
  *@description Command that hides measuring rulers next to the emulated device.
53
53
  */
54
- hideRulers: 'Hide rulers',
54
+ hideRulers: 'Hide rulers in the Device Mode toolbar',
55
55
  /**
56
56
  *@description Command that shows a frame (like a picture frame) around the emulated device.
57
57
  */
@@ -69,8 +69,6 @@ let loadedEmulationModule: (typeof Emulation|undefined);
69
69
 
70
70
  async function loadEmulationModule(): Promise<typeof Emulation> {
71
71
  if (!loadedEmulationModule) {
72
- // Side-effect import resources in module.json
73
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/emulation');
74
72
  loadedEmulationModule = await import('./emulation.js');
75
73
  }
76
74
  return loadedEmulationModule;
@@ -35,8 +35,6 @@ let loadedIssuesModule: (typeof Issues|undefined);
35
35
 
36
36
  async function loadIssuesModule(): Promise<typeof Issues> {
37
37
  if (!loadedIssuesModule) {
38
- // Side-effect import resources in module.json
39
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/issues');
40
38
  loadedIssuesModule = await import('./issues.js');
41
39
  }
42
40
  return loadedIssuesModule;
@@ -1,5 +1,4 @@
1
1
  {
2
2
  "dependencies": [
3
- "panels/layer_viewer"
4
3
  ]
5
4
  }
@@ -7,8 +7,6 @@ import * as Host from '../../core/host/host.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as SDK from '../../core/sdk/sdk.js';
9
9
  import * as EmulationModel from '../../models/emulation/emulation.js';
10
- /* eslint-disable rulesdir/es_modules_import */
11
- import reportStyles from '../../third_party/lighthouse/report-assets/report.css.js';
12
10
  import * as UI from '../../ui/legacy/legacy.js';
13
11
  import * as Emulation from '../emulation/emulation.js';
14
12
 
@@ -263,7 +261,6 @@ export class LighthousePanel extends UI.Panel.Panel {
263
261
 
264
262
  const reportContainer = this.auditResultsElement.createChild('div', 'lh-vars lh-root lh-devtools');
265
263
 
266
- // @ts-ignore: Second argument will soon be required.
267
264
  const dom = new LighthouseReport.DOM(this.auditResultsElement.ownerDocument as Document, reportContainer);
268
265
  const renderer = new LighthouseReportRenderer(dom) as LighthouseReport.ReportRenderer;
269
266
 
@@ -451,8 +448,9 @@ export class LighthousePanel extends UI.Panel.Panel {
451
448
  const inspectedURL = await this.controller.getInspectedURL();
452
449
  await resourceTreeModel.navigate(inspectedURL);
453
450
  }
451
+
454
452
  wasShown(): void {
455
453
  super.wasShown();
456
- this.registerCSSFiles([lighthousePanelStyles, reportStyles]);
454
+ this.registerCSSFiles([lighthousePanelStyles]);
457
455
  }
458
456
  }
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
6
6
  import * as Host from '../../core/host/host.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as Platform from '../../core/platform/platform.js';
9
- import * as Root from '../../core/root/root.js';
10
9
  import * as SDK from '../../core/sdk/sdk.js';
11
10
  import * as Workspace from '../../models/workspace/workspace.js';
12
11
  import * as LighthouseReport from '../../third_party/lighthouse/report/report.js';
@@ -202,9 +201,7 @@ export class LighthouseReportUIFeatures extends LighthouseReport.ReportUIFeature
202
201
  if (!printWindow) {
203
202
  return;
204
203
  }
205
- const style = printWindow.document.createElement('style');
206
- style.textContent = Root.Runtime.cachedResources.get('third_party/lighthouse/report-assets/report.css') || '';
207
- printWindow.document.head.appendChild(style);
204
+
208
205
  printWindow.document.body.replaceWith(clonedReport);
209
206
  // Linkified nodes are shadow elements, which aren't exposed via `cloneNode`.
210
207
  await LighthouseReportRenderer.linkifyNodeDetails(clonedReport as HTMLElement);
@@ -74,6 +74,10 @@ input[type="radio"]:focus {
74
74
  outline-width: 2px;
75
75
  }
76
76
 
77
+ :host-context(.-theme-with-dark-background) input[type="radio"] {
78
+ accent-color: var(--color-checkbox-accent-color);
79
+ }
80
+
77
81
  .lighthouse-radio-text {
78
82
  margin-left: 3px;
79
83
  }
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "dependencies": [
3
- "panels/emulation",
4
- "panels/timeline",
5
- "ui/legacy"
3
+ "panels/timeline"
6
4
  ],
7
5
  "resources": [
8
6
  "../../third_party/lighthouse/report-assets/standalone-template.html",
9
- "../../third_party/lighthouse/report-assets/report.css",
10
7
  "../../third_party/lighthouse/report-assets/report.js"
11
8
  ]
12
9
  }
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -30,8 +29,6 @@ let loadedMediaModule: (typeof Media|undefined);
30
29
 
31
30
  async function loadMediaModule(): Promise<typeof Media> {
32
31
  if (!loadedMediaModule) {
33
- // Side-effect import resources in module.json
34
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/media');
35
32
  loadedMediaModule = await import('./media.js');
36
33
  }
37
34
  return loadedMediaModule;