chrome-devtools-frontend 1.0.1526203 → 1.0.1528866

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 (328) hide show
  1. package/docs/ui_engineering.md +159 -0
  2. package/eslint.config.mjs +6 -1
  3. package/front_end/core/i18n/i18nImpl.ts +5 -0
  4. package/front_end/core/protocol_client/protocol_client.ts +1 -1
  5. package/front_end/core/root/Runtime.ts +28 -4
  6. package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
  7. package/front_end/core/sdk/CSSRule.ts +35 -6
  8. package/front_end/core/sdk/ChildTargetManager.ts +2 -0
  9. package/front_end/core/sdk/Connections.ts +2 -1
  10. package/front_end/core/sdk/DOMModel.ts +4 -0
  11. package/front_end/core/sdk/DebuggerModel.ts +5 -1
  12. package/front_end/core/sdk/NetworkManager.ts +214 -31
  13. package/front_end/core/sdk/PreloadingModel.ts +82 -17
  14. package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1 -1
  15. package/front_end/core/sdk/RehydratingConnection.ts +29 -4
  16. package/front_end/core/sdk/ScopeTreeCache.ts +8 -3
  17. package/front_end/core/sdk/SourceMap.ts +37 -11
  18. package/front_end/core/sdk/SourceMapManager.ts +13 -2
  19. package/front_end/core/sdk/SourceMapScopesInfo.ts +17 -0
  20. package/front_end/core/sdk/TargetManager.ts +0 -22
  21. package/front_end/core/sdk/TraceObject.ts +8 -7
  22. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +81 -0
  23. package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
  24. package/front_end/entrypoints/main/GlobalAiButton.ts +1 -0
  25. package/front_end/entrypoints/main/MainImpl.ts +20 -25
  26. package/front_end/generated/InspectorBackendCommands.js +4 -3
  27. package/front_end/generated/protocol-mapping.d.ts +3 -1
  28. package/front_end/generated/protocol-proxy-api.d.ts +3 -1
  29. package/front_end/generated/protocol.ts +17 -3
  30. package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
  31. package/front_end/models/ai_assistance/ai_assistance.ts +53 -24
  32. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +105 -0
  33. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +6 -1
  34. package/front_end/models/extensions/ExtensionView.ts +3 -0
  35. package/front_end/models/javascript_metadata/NativeFunctions.js +23 -27
  36. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
  37. package/front_end/models/persistence/EditFileSystemView.ts +1 -0
  38. package/front_end/models/source_map_scopes/NamesResolver.ts +5 -11
  39. package/front_end/models/stack_trace/Trie.ts +9 -0
  40. package/front_end/models/trace/lantern/types/Lantern.ts +1 -1
  41. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -0
  42. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -0
  43. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +120 -113
  44. package/front_end/panels/ai_assistance/PatchWidget.ts +9 -8
  45. package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +2 -0
  46. package/front_end/panels/ai_assistance/components/ChatView.ts +29 -29
  47. package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -0
  48. package/front_end/panels/animation/AnimationTimeline.ts +1 -0
  49. package/front_end/panels/application/CookieItemsView.ts +1 -0
  50. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
  51. package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -0
  52. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +11 -5
  53. package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +2 -2
  54. package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -5
  55. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -10
  56. package/front_end/panels/changes/CombinedDiffView.ts +1 -0
  57. package/front_end/panels/console/ConsoleInsightTeaser.ts +106 -0
  58. package/front_end/panels/console/ConsolePanel.ts +2 -0
  59. package/front_end/panels/console/ConsolePrompt.ts +12 -2
  60. package/front_end/panels/console/ConsoleSidebar.ts +1 -1
  61. package/front_end/panels/console/ConsoleView.ts +12 -0
  62. package/front_end/panels/console/ConsoleViewMessage.ts +27 -0
  63. package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
  64. package/front_end/panels/console/console.ts +6 -0
  65. package/front_end/panels/console/consoleInsightTeaser.css +55 -0
  66. package/front_end/panels/coverage/CoverageListView.ts +141 -277
  67. package/front_end/panels/coverage/CoverageView.ts +330 -324
  68. package/front_end/panels/coverage/coverageView.css +17 -0
  69. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -0
  70. package/front_end/panels/elements/LayoutPane.ts +1 -0
  71. package/front_end/panels/elements/NodeStackTraceWidget.ts +1 -0
  72. package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -1
  73. package/front_end/panels/elements/stylePropertiesTreeOutline.css +17 -0
  74. package/front_end/panels/emulation/DeviceModeView.ts +2 -0
  75. package/front_end/panels/explain/ActionDelegate.ts +1 -2
  76. package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
  77. package/front_end/panels/explain/explain.ts +0 -1
  78. package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -1
  79. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -0
  80. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -0
  81. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +12 -19
  82. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +27 -43
  83. package/front_end/panels/media/MainView.ts +1 -0
  84. package/front_end/panels/media/TickingFlameChart.ts +2 -0
  85. package/front_end/panels/network/BlockedURLsPane.ts +111 -85
  86. package/front_end/panels/network/EventSourceMessagesView.ts +1 -0
  87. package/front_end/panels/network/NetworkItemView.ts +1 -0
  88. package/front_end/panels/network/NetworkLogView.ts +9 -7
  89. package/front_end/panels/network/NetworkOverview.ts +1 -0
  90. package/front_end/panels/network/RequestCookiesView.ts +1 -0
  91. package/front_end/panels/network/RequestHTMLView.ts +1 -0
  92. package/front_end/panels/network/RequestInitiatorView.ts +1 -0
  93. package/front_end/panels/network/RequestPayloadView.ts +1 -0
  94. package/front_end/panels/network/RequestPreviewView.ts +1 -0
  95. package/front_end/panels/network/RequestResponseView.ts +2 -1
  96. package/front_end/panels/network/RequestTimingView.ts +2 -0
  97. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -0
  98. package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -0
  99. package/front_end/panels/network/components/RequestHeadersView.ts +2 -0
  100. package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -0
  101. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -0
  102. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +2 -0
  103. package/front_end/panels/profiler/HeapSnapshotView.ts +7 -0
  104. package/front_end/panels/profiler/IsolateSelector.ts +1 -0
  105. package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -0
  106. package/front_end/panels/profiler/ProfileView.ts +1 -0
  107. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
  108. package/front_end/panels/recorder/RecorderPanel.ts +2 -0
  109. package/front_end/panels/screencast/ScreencastView.ts +1 -0
  110. package/front_end/panels/search/SearchView.ts +1 -0
  111. package/front_end/panels/settings/AISettingsTab.ts +3 -3
  112. package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -0
  113. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
  114. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +12 -0
  115. package/front_end/panels/sources/BreakpointsView.ts +1 -0
  116. package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
  117. package/front_end/panels/sources/UISourceCodeFrame.ts +17 -2
  118. package/front_end/panels/timeline/README.md +2 -2
  119. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
  120. package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -3
  121. package/front_end/panels/timeline/TimelineLayersView.ts +1 -0
  122. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +114 -37
  123. package/front_end/panels/timeline/TimelinePanel.ts +43 -62
  124. package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
  125. package/front_end/panels/timeline/components/LiveMetricsView.ts +4 -8
  126. package/front_end/panels/timeline/components/Sidebar.ts +2 -0
  127. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
  128. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +7 -7
  129. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
  130. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
  131. package/front_end/panels/web_audio/WebAudioView.ts +1 -0
  132. package/front_end/third_party/chromium/README.chromium +1 -1
  133. package/front_end/third_party/lighthouse/README.chromium +2 -2
  134. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1530 -2426
  135. package/front_end/third_party/lighthouse/locales/ar-XB.json +107 -455
  136. package/front_end/third_party/lighthouse/locales/ar.json +107 -455
  137. package/front_end/third_party/lighthouse/locales/bg.json +96 -444
  138. package/front_end/third_party/lighthouse/locales/ca.json +96 -444
  139. package/front_end/third_party/lighthouse/locales/cs.json +96 -444
  140. package/front_end/third_party/lighthouse/locales/da.json +96 -444
  141. package/front_end/third_party/lighthouse/locales/de.json +96 -444
  142. package/front_end/third_party/lighthouse/locales/el.json +96 -444
  143. package/front_end/third_party/lighthouse/locales/en-GB.json +96 -444
  144. package/front_end/third_party/lighthouse/locales/en-US.json +116 -467
  145. package/front_end/third_party/lighthouse/locales/en-XA.json +93 -441
  146. package/front_end/third_party/lighthouse/locales/en-XL.json +116 -467
  147. package/front_end/third_party/lighthouse/locales/es-419.json +96 -444
  148. package/front_end/third_party/lighthouse/locales/es.json +96 -444
  149. package/front_end/third_party/lighthouse/locales/fi.json +96 -444
  150. package/front_end/third_party/lighthouse/locales/fil.json +96 -444
  151. package/front_end/third_party/lighthouse/locales/fr.json +96 -444
  152. package/front_end/third_party/lighthouse/locales/he.json +118 -466
  153. package/front_end/third_party/lighthouse/locales/hi.json +96 -444
  154. package/front_end/third_party/lighthouse/locales/hr.json +100 -448
  155. package/front_end/third_party/lighthouse/locales/hu.json +96 -444
  156. package/front_end/third_party/lighthouse/locales/id.json +96 -444
  157. package/front_end/third_party/lighthouse/locales/it.json +96 -444
  158. package/front_end/third_party/lighthouse/locales/ja.json +96 -444
  159. package/front_end/third_party/lighthouse/locales/ko.json +97 -445
  160. package/front_end/third_party/lighthouse/locales/lt.json +96 -444
  161. package/front_end/third_party/lighthouse/locales/lv.json +97 -445
  162. package/front_end/third_party/lighthouse/locales/nl.json +96 -444
  163. package/front_end/third_party/lighthouse/locales/no.json +96 -444
  164. package/front_end/third_party/lighthouse/locales/pl.json +96 -444
  165. package/front_end/third_party/lighthouse/locales/pt-PT.json +96 -444
  166. package/front_end/third_party/lighthouse/locales/pt.json +97 -445
  167. package/front_end/third_party/lighthouse/locales/ro.json +97 -445
  168. package/front_end/third_party/lighthouse/locales/ru.json +96 -444
  169. package/front_end/third_party/lighthouse/locales/sk.json +96 -444
  170. package/front_end/third_party/lighthouse/locales/sl.json +96 -444
  171. package/front_end/third_party/lighthouse/locales/sr-Latn.json +96 -444
  172. package/front_end/third_party/lighthouse/locales/sr.json +96 -444
  173. package/front_end/third_party/lighthouse/locales/sv.json +96 -444
  174. package/front_end/third_party/lighthouse/locales/ta.json +96 -444
  175. package/front_end/third_party/lighthouse/locales/te.json +97 -445
  176. package/front_end/third_party/lighthouse/locales/th.json +96 -444
  177. package/front_end/third_party/lighthouse/locales/tr.json +96 -444
  178. package/front_end/third_party/lighthouse/locales/uk.json +96 -444
  179. package/front_end/third_party/lighthouse/locales/vi.json +96 -444
  180. package/front_end/third_party/lighthouse/locales/zh-HK.json +96 -444
  181. package/front_end/third_party/lighthouse/locales/zh-TW.json +97 -445
  182. package/front_end/third_party/lighthouse/locales/zh.json +96 -444
  183. package/front_end/third_party/lighthouse/report/bundle.d.ts +8 -14
  184. package/front_end/third_party/lighthouse/report/bundle.js +10 -49
  185. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  186. package/front_end/third_party/web-vitals/README.chromium +5 -8
  187. package/front_end/third_party/web-vitals/package/README.md +191 -152
  188. package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.d.ts +0 -1
  189. package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.js +0 -1
  190. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +2 -2
  191. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +45 -26
  192. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +2 -2
  193. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +3 -3
  194. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +10 -10
  195. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +307 -206
  196. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
  197. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +69 -49
  198. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +2 -2
  199. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +2 -2
  200. package/front_end/third_party/web-vitals/package/dist/modules/index.d.ts +0 -1
  201. package/front_end/third_party/web-vitals/package/dist/modules/index.js +0 -1
  202. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +33 -0
  203. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +111 -0
  204. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +4 -0
  205. package/front_end/third_party/web-vitals/package/dist/modules/{attribution/deprecated.js → lib/LCPEntryManager.js} +6 -7
  206. package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.d.ts +6 -0
  207. package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.js +44 -0
  208. package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.js +1 -1
  209. package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
  210. package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -1
  211. package/front_end/third_party/web-vitals/package/dist/modules/lib/getNavigationEntry.js +5 -7
  212. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.d.ts +1 -1
  213. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +9 -12
  214. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -0
  215. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +52 -33
  216. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +0 -2
  217. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +2 -2
  218. package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.d.ts +6 -0
  219. package/front_end/third_party/web-vitals/package/dist/modules/{deprecated.js → lib/initUnique.js} +11 -4
  220. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +3 -6
  221. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +6 -6
  222. package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.d.ts → whenIdleOrHidden.d.ts} +1 -1
  223. package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.js → whenIdleOrHidden.js} +10 -8
  224. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +17 -35
  225. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +3 -5
  226. package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +9 -7
  227. package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +27 -19
  228. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +33 -26
  229. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +2 -4
  230. package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +6 -5
  231. package/front_end/third_party/web-vitals/package/dist/modules/types/cls.d.ts +5 -3
  232. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +80 -33
  233. package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +6 -2
  234. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +28 -4
  235. package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
  236. package/front_end/third_party/web-vitals/package/package.json +4 -10
  237. package/front_end/third_party/web-vitals/package/src/attribution/index.ts +0 -1
  238. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +58 -33
  239. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +4 -4
  240. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +382 -258
  241. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +96 -69
  242. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +3 -3
  243. package/front_end/third_party/web-vitals/package/src/index.ts +0 -1
  244. package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +146 -0
  245. package/front_end/third_party/web-vitals/package/src/{attribution/deprecated.ts → lib/LCPEntryManager.ts} +6 -9
  246. package/front_end/third_party/web-vitals/package/src/lib/LayoutShiftManager.ts +50 -0
  247. package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
  248. package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
  249. package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -1
  250. package/front_end/third_party/web-vitals/package/src/lib/getNavigationEntry.ts +5 -8
  251. package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +12 -12
  252. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +57 -35
  253. package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +2 -2
  254. package/front_end/third_party/web-vitals/package/src/{deprecated.ts → lib/initUnique.ts} +14 -8
  255. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +3 -11
  256. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +12 -6
  257. package/front_end/third_party/web-vitals/package/src/lib/{whenIdle.ts → whenIdleOrHidden.ts} +10 -8
  258. package/front_end/third_party/web-vitals/package/src/onCLS.ts +17 -38
  259. package/front_end/third_party/web-vitals/package/src/onFCP.ts +3 -6
  260. package/front_end/third_party/web-vitals/package/src/onINP.ts +33 -28
  261. package/front_end/third_party/web-vitals/package/src/onLCP.ts +36 -29
  262. package/front_end/third_party/web-vitals/package/src/onTTFB.ts +2 -5
  263. package/front_end/third_party/web-vitals/package/src/types/base.ts +5 -5
  264. package/front_end/third_party/web-vitals/package/src/types/cls.ts +5 -3
  265. package/front_end/third_party/web-vitals/package/src/types/inp.ts +88 -33
  266. package/front_end/third_party/web-vitals/package/src/types/lcp.ts +6 -2
  267. package/front_end/third_party/web-vitals/package/src/types.ts +47 -4
  268. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +75 -0
  269. package/front_end/third_party/web-vitals/rebuild.sh +32 -18
  270. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +5 -10
  271. package/front_end/third_party/web-vitals/web-vitals.ts +0 -2
  272. package/front_end/ui/components/buttons/Button.ts +1 -1
  273. package/front_end/ui/components/docs/console_insight/basic.ts +3 -2
  274. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +2 -0
  275. package/front_end/ui/components/text_editor/TextEditor.ts +0 -2
  276. package/front_end/ui/legacy/EmptyWidget.ts +11 -1
  277. package/front_end/ui/legacy/InspectorView.ts +2 -0
  278. package/front_end/ui/legacy/SplitWidget.ts +2 -0
  279. package/front_end/ui/legacy/TabbedPane.ts +1 -0
  280. package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -0
  281. package/front_end/ui/legacy/Toolbar.ts +25 -4
  282. package/front_end/ui/legacy/UIUtils.ts +28 -13
  283. package/front_end/ui/legacy/ViewManager.ts +1 -0
  284. package/front_end/ui/legacy/Widget.ts +5 -0
  285. package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +7 -20
  286. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -0
  287. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -0
  288. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
  289. package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -0
  290. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +1 -0
  291. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -0
  292. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
  293. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
  294. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
  295. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
  296. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +9 -8
  297. package/front_end/ui/visual_logging/KnownContextValues.ts +17 -0
  298. package/mcp/README.md +7 -0
  299. package/mcp/mcp.ts +8 -0
  300. package/package.json +1 -1
  301. package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +0 -34
  302. package/front_end/third_party/web-vitals/package/attribution.d.ts +0 -16
  303. package/front_end/third_party/web-vitals/package/attribution.js +0 -18
  304. package/front_end/third_party/web-vitals/package/dist/modules/attribution/deprecated.d.ts +0 -7
  305. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.d.ts +0 -11
  306. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.js +0 -46
  307. package/front_end/third_party/web-vitals/package/dist/modules/deprecated.d.ts +0 -5
  308. package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.d.ts +0 -31
  309. package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.js +0 -107
  310. package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.d.ts +0 -1
  311. package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.js +0 -22
  312. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.d.ts +0 -7
  313. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.js +0 -147
  314. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.d.ts +0 -1
  315. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js +0 -25
  316. package/front_end/third_party/web-vitals/package/dist/modules/onFID.d.ts +0 -13
  317. package/front_end/third_party/web-vitals/package/dist/modules/onFID.js +0 -70
  318. package/front_end/third_party/web-vitals/package/dist/modules/types/fid.d.ts +0 -46
  319. package/front_end/third_party/web-vitals/package/dist/modules/types/fid.js +0 -16
  320. package/front_end/third_party/web-vitals/package/src/attribution/onFID.ts +0 -62
  321. package/front_end/third_party/web-vitals/package/src/lib/interactions.ts +0 -139
  322. package/front_end/third_party/web-vitals/package/src/lib/onHidden.ts +0 -23
  323. package/front_end/third_party/web-vitals/package/src/lib/polyfills/firstInputPolyfill.ts +0 -174
  324. package/front_end/third_party/web-vitals/package/src/onFID.ts +0 -105
  325. package/front_end/third_party/web-vitals/package/src/types/fid.ts +0 -65
  326. package/front_end/ui/components/text_editor/textEditor.css +0 -18
  327. package/front_end/ui/legacy/inlineButton.css +0 -22
  328. /package/front_end/entrypoints/{rehydrated_devtools_app/rehydrated_devtools_app.ts → trace_app/trace_app.ts} +0 -0
@@ -1,7 +1,6 @@
1
1
  // Copyright 2016 The Chromium Authors
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
- /* eslint-disable rulesdir/no-imperative-dom-api */
5
4
 
6
5
  import '../../ui/legacy/legacy.js';
7
6
 
@@ -14,6 +13,7 @@ import * as Bindings from '../../models/bindings/bindings.js';
14
13
  import * as Workspace from '../../models/workspace/workspace.js';
15
14
  import * as Buttons from '../../ui/components/buttons/buttons.js';
16
15
  import * as UI from '../../ui/legacy/legacy.js';
16
+ import {Directives, html, i18nTemplate as unboundI18nTemplate, render, type TemplateResult} from '../../ui/lit/lit.js';
17
17
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
18
18
 
19
19
  import {CoverageDecorationManager} from './CoverageDecorationManager.js';
@@ -124,148 +124,238 @@ const UIStrings = {
124
124
  } as const;
125
125
  const str_ = i18n.i18n.registerUIStrings('panels/coverage/CoverageView.ts', UIStrings);
126
126
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
127
+ const i18nTemplate = unboundI18nTemplate.bind(undefined, str_);
128
+ const {ref} = Directives;
129
+ const {bindToAction} = UI.UIUtils;
130
+ const {bindToSetting} = UI.SettingsUI;
131
+ const {widgetConfig} = UI.Widget;
127
132
 
128
133
  let coverageViewInstance: CoverageView|undefined;
129
134
 
135
+ export interface CoverageViewInput {
136
+ coverageType: number;
137
+ recording: boolean;
138
+ supportsRecordOnReload: boolean;
139
+ textFilter: RegExp|null;
140
+ typeFilter: number|null;
141
+ showContentScriptsSetting: Common.Settings.Setting<boolean>;
142
+
143
+ needsReload: 'bfcache-page'|'prerender-page'|null;
144
+ coverageInfo: CoverageListItem[]|null;
145
+ selectedUrl: Platform.DevToolsPath.UrlString|null;
146
+ statusMessage: string;
147
+
148
+ onCoverageTypeChanged: (newValue: number) => void;
149
+ onFilterChanged: (e: string) => void;
150
+ onTypeFilterChanged: (newValue: number) => void;
151
+ }
152
+
153
+ export interface CoverageViewOutput {
154
+ focusResults: () => void;
155
+ }
156
+
157
+ export type View = (input: CoverageViewInput, output: CoverageViewOutput, target: HTMLElement) => void;
158
+
159
+ export const DEFAULT_VIEW: View = (input, output, target) => {
160
+ // clang-format off
161
+ render(html`
162
+ <style>${coverageViewStyles}</style>
163
+ <div class="coverage-toolbar-container" jslog=${VisualLogging.toolbar()} role="toolbar">
164
+ <devtools-toolbar class="coverage-toolbar" role="presentation" wrappable>
165
+ <select title=${i18nString(UIStrings.chooseCoverageGranularityPer)}
166
+ aria-label=${i18nString(UIStrings.chooseCoverageGranularityPer)}
167
+ jslog=${VisualLogging.dropDown('coverage-type').track({change: true})}
168
+ @change=${(event: Event) => input.onCoverageTypeChanged((event.target as HTMLSelectElement).selectedIndex)}
169
+ .selectedIndex=${input.coverageType}
170
+ ?disabled=${input.recording}>
171
+ <option value=${CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION}
172
+ jslog=${VisualLogging.item(`${CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION}`).track({click: true})}>
173
+ ${i18nString(UIStrings.perFunction)}
174
+ </option>
175
+ <option value=${CoverageType.JAVA_SCRIPT}
176
+ jslog=${VisualLogging.item(`${CoverageType.JAVA_SCRIPT}`).track({click: true})}>
177
+ ${i18nString(UIStrings.perBlock)}
178
+ </option>
179
+ </select>
180
+ <devtools-button ${bindToAction(input.supportsRecordOnReload && !input.recording ?
181
+ 'coverage.start-with-reload' : 'coverage.toggle-recording')}>
182
+ </devtools-button>
183
+ <devtools-button ${bindToAction('coverage.clear')}></devtools-button>
184
+ <div class="toolbar-divider"></div>
185
+ <devtools-button ${bindToAction('coverage.export')}></devtools-button>
186
+ <div class="toolbar-divider"></div>
187
+ <devtools-toolbar-input type="filter" placeholder=${i18nString(UIStrings.filterByUrl)}
188
+ ?disabled=${!Boolean(input.coverageInfo)}
189
+ @change=${(e: CustomEvent<string>) => input.onFilterChanged(e.detail)}
190
+ style="flex-grow:1; flex-shrink:1">
191
+ </devtools-toolbar-input>
192
+ <div class="toolbar-divider"></div>
193
+ <select title=${i18nString(UIStrings.filterCoverageByType)}
194
+ aria-label=${i18nString(UIStrings.filterCoverageByType)}
195
+ jslog=${VisualLogging.dropDown('coverage-by-type').track({change: true})}
196
+ ?disabled=${!Boolean(input.coverageInfo)}
197
+ @change=${(event: Event) => input.onTypeFilterChanged(
198
+ Number((event.target as HTMLSelectElement).selectedOptions[0]?.value))}>
199
+ <option value="" jslog=${VisualLogging.item('').track({click: true})}
200
+ .selected=${input.typeFilter === null}>${i18nString(UIStrings.all)}</option>
201
+ <option value=${CoverageType.CSS}
202
+ jslog=${VisualLogging.item(`${CoverageType.CSS}`).track({click: true})}
203
+ .selected=${input.typeFilter === CoverageType.CSS}>
204
+ ${i18nString(UIStrings.css)}
205
+ </option>
206
+ <option value=${CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION}
207
+ jslog=${VisualLogging.item(`${CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION}`).track({click: true})}
208
+ .selected=${(input.typeFilter !== null && Boolean(input.typeFilter & (CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION)))}>
209
+ ${i18nString(UIStrings.javascript)}
210
+ </option>
211
+ </select>
212
+ <div class="toolbar-divider"></div>
213
+ <devtools-checkbox title=${i18nString(UIStrings.includeExtensionContentScripts)}
214
+ ${bindToSetting(input.showContentScriptsSetting)}
215
+ ?disabled=${!Boolean(input.coverageInfo)}>
216
+ ${i18nString(UIStrings.contentScripts)}
217
+ </devtools-checkbox>
218
+ </devtools-toolbar>
219
+ </div>
220
+ <div class="coverage-results">
221
+ ${input.needsReload ?
222
+ renderReloadPromptPage(input.needsReload === 'bfcache-page' ?
223
+ i18nString(UIStrings.bfcacheNoCapture) : i18nString(UIStrings.activationNoCapture),
224
+ input.needsReload)
225
+ : input.coverageInfo ? html`
226
+ <devtools-widget autofocus class="results" .widgetConfig=${widgetConfig(CoverageListView, {
227
+ coverageInfo: input.coverageInfo,
228
+ highlightRegExp: input.textFilter,
229
+ selectedUrl: input.selectedUrl,
230
+ })}
231
+ ${ref(e => { if (e instanceof HTMLElement) { output.focusResults = () => { e.focus(); };}})}>`
232
+ : renderLandingPage(input.supportsRecordOnReload)}
233
+ </div>
234
+ <div class="coverage-toolbar-summary">
235
+ <div class="coverage-message">
236
+ ${input.statusMessage}
237
+ </div>
238
+ </div>`, target);
239
+ // clang-format on
240
+ };
241
+
242
+ function renderLandingPage(supportsRecordOnReload: boolean): TemplateResult {
243
+ if (supportsRecordOnReload) {
244
+ // clang-format off
245
+ return html`
246
+ <devtools-widget .widgetConfig=${widgetConfig(UI.EmptyWidget.EmptyWidget,{
247
+ header: i18nString(UIStrings.noCoverageData),
248
+ link: 'https://developer.chrome.com/docs/devtools/coverage' as Platform.DevToolsPath.UrlString,
249
+ text: i18nString(UIStrings.clickTheReloadButtonSToReloadAnd, {PH1: i18nString(UIStrings.reloadPage)}),
250
+ })}>
251
+ <devtools-button ${bindToAction('coverage.start-with-reload')}
252
+ .variant=${Buttons.Button.Variant.TONAL} .iconName=${undefined}>
253
+ ${i18nString(UIStrings.reloadPage)}
254
+ </devtools-button>
255
+ </devtools-widget>`;
256
+ // clang-format on
257
+ }
258
+ // clang-format off
259
+ return html`
260
+ <devtools-widget .widgetConfig=${widgetConfig(UI.EmptyWidget.EmptyWidget,{
261
+ header: i18nString(UIStrings.noCoverageData),
262
+ link: 'https://developer.chrome.com/docs/devtools/coverage' as Platform.DevToolsPath.UrlString,
263
+ text: i18nString(UIStrings.clickTheRecordButtonSToStart, {PH1: i18nString(UIStrings.startRecording)}),
264
+ })}>
265
+ <devtools-button ${bindToAction('coverage.toggle-recording')}
266
+ .variant=${Buttons.Button.Variant.TONAL} .iconName=${undefined}>
267
+ ${i18nString(UIStrings.startRecording)}
268
+ </devtools-button>
269
+ </devtools-widget>`;
270
+ // clang-format on
271
+ }
272
+
273
+ function renderReloadPromptPage(message: Common.UIString.LocalizedString, className: string): TemplateResult {
274
+ // clang-format off
275
+ return html`
276
+ <div class="widget vbox ${className}">
277
+ <div class="message">${message}</div>
278
+ <span class="message">
279
+ ${i18nTemplate(UIStrings.reloadPrompt, {PH1: html`
280
+ <devtools-button class="inline-button" ${bindToAction('inspector-main.reload')}></devtools-button>`})}
281
+ </span>
282
+ </div>`;
283
+ // clang-format on
284
+ }
285
+
130
286
  export class CoverageView extends UI.Widget.VBox {
131
- private model: CoverageModel|null;
132
- private decorationManager: CoverageDecorationManager|null;
133
- private readonly coverageTypeComboBox: UI.Toolbar.ToolbarComboBox;
134
- private readonly coverageTypeComboBoxSetting: Common.Settings.Setting<number>;
135
- private toggleRecordAction: UI.ActionRegistration.Action;
136
- private readonly toggleRecordButton: UI.Toolbar.ToolbarButton;
137
- private inlineReloadButton: Element|null;
138
- private readonly startWithReloadButton: UI.Toolbar.ToolbarButton|undefined;
139
- private readonly clearAction: UI.ActionRegistration.Action;
140
- private readonly exportAction: UI.ActionRegistration.Action;
141
- private textFilterRegExp: RegExp|null;
142
- private readonly filterInput: UI.Toolbar.ToolbarInput;
143
- private typeFilterValue: number|null;
144
- private readonly filterByTypeComboBox: UI.Toolbar.ToolbarComboBox;
145
- private showContentScriptsSetting: Common.Settings.Setting<boolean>;
146
- private readonly contentScriptsCheckbox: UI.Toolbar.ToolbarSettingCheckbox;
147
- private readonly coverageResultsElement: HTMLElement;
148
- private readonly landingPage: UI.Widget.VBox;
149
- private readonly bfcacheReloadPromptPage: UI.Widget.VBox;
150
- private readonly activationReloadPromptPage: UI.Widget.VBox;
151
- private listView: CoverageListView;
152
- private readonly statusToolbarElement: HTMLElement;
153
- private statusMessageElement: HTMLElement;
154
-
155
- constructor() {
287
+ #model: CoverageModel|null;
288
+ #decorationManager: CoverageDecorationManager|null;
289
+ readonly #coverageTypeComboBoxSetting: Common.Settings.Setting<number>;
290
+ readonly #toggleRecordAction: UI.ActionRegistration.Action;
291
+ readonly #clearAction: UI.ActionRegistration.Action;
292
+ readonly #exportAction: UI.ActionRegistration.Action;
293
+ #textFilter: RegExp|null;
294
+ #typeFilter: number|null;
295
+ readonly #showContentScriptsSetting: Common.Settings.Setting<boolean>;
296
+
297
+ readonly #view: View;
298
+ #supportsRecordOnReload: boolean;
299
+ #needsReload: 'bfcache-page'|'prerender-page'|null = null;
300
+ #statusMessage = '';
301
+ #output: CoverageViewOutput = {focusResults: () => {}};
302
+ #coverageInfo: CoverageListItem[]|null = null;
303
+ #selectedUrl: Platform.DevToolsPath.UrlString|null = null;
304
+
305
+ constructor(view: View = DEFAULT_VIEW) {
156
306
  super({
157
307
  jslog: `${VisualLogging.panel('coverage').track({resize: true})}`,
158
308
  useShadowDom: true,
309
+ delegatesFocus: true,
159
310
  });
160
311
  this.registerRequiredCSS(coverageViewStyles);
312
+ this.#view = view;
161
313
 
162
- this.model = null;
163
- this.decorationManager = null;
164
-
165
- const toolbarContainer = this.contentElement.createChild('div', 'coverage-toolbar-container');
166
- toolbarContainer.setAttribute('jslog', `${VisualLogging.toolbar()}`);
167
- toolbarContainer.role = 'toolbar';
168
- const toolbar = toolbarContainer.createChild('devtools-toolbar', 'coverage-toolbar');
169
- toolbar.role = 'presentation';
170
- toolbar.wrappable = true;
171
-
172
- this.coverageTypeComboBox = new UI.Toolbar.ToolbarComboBox(
173
- this.onCoverageTypeComboBoxSelectionChanged.bind(this), i18nString(UIStrings.chooseCoverageGranularityPer),
174
- undefined, 'coverage-type');
175
- const coverageTypes = [
176
- {
177
- label: i18nString(UIStrings.perFunction),
178
- value: CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION,
179
- },
180
- {
181
- label: i18nString(UIStrings.perBlock),
182
- value: CoverageType.JAVA_SCRIPT,
183
- },
184
- ];
185
- for (const type of coverageTypes) {
186
- this.coverageTypeComboBox.addOption(this.coverageTypeComboBox.createOption(type.label, `${type.value}`));
187
- }
188
- this.coverageTypeComboBoxSetting =
314
+ this.#model = null;
315
+ this.#decorationManager = null;
316
+
317
+ this.#coverageTypeComboBoxSetting =
189
318
  Common.Settings.Settings.instance().createSetting('coverage-view-coverage-type', 0);
190
- this.coverageTypeComboBox.setSelectedIndex(this.coverageTypeComboBoxSetting.get());
191
- this.coverageTypeComboBox.setEnabled(true);
192
- toolbar.appendToolbarItem(this.coverageTypeComboBox);
193
- this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.toggle-recording');
194
- this.toggleRecordButton = UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction);
195
- toolbar.appendToolbarItem(this.toggleRecordButton);
319
+
320
+ this.#toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.toggle-recording');
196
321
 
197
322
  const mainTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
198
- const mainTargetSupportsRecordOnReload = mainTarget?.model(SDK.ResourceTreeModel.ResourceTreeModel);
199
- this.inlineReloadButton = null;
200
- if (mainTargetSupportsRecordOnReload) {
201
- this.startWithReloadButton = UI.Toolbar.Toolbar.createActionButton('coverage.start-with-reload');
202
- toolbar.appendToolbarItem(this.startWithReloadButton);
203
- this.toggleRecordButton.setEnabled(false);
204
- this.toggleRecordButton.setVisible(false);
205
- }
206
- this.clearAction = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.clear');
207
- this.clearAction.setEnabled(false);
208
- toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.clearAction));
209
-
210
- toolbar.appendSeparator();
211
- this.exportAction = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.export');
212
- this.exportAction.setEnabled(false);
213
- toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.exportAction));
214
-
215
- this.textFilterRegExp = null;
216
- toolbar.appendSeparator();
217
- this.filterInput = new UI.Toolbar.ToolbarFilter(i18nString(UIStrings.filterByUrl), 1, 1);
218
- this.filterInput.setEnabled(false);
219
- this.filterInput.addEventListener(UI.Toolbar.ToolbarInput.Event.TEXT_CHANGED, this.onFilterChanged, this);
220
- toolbar.appendToolbarItem(this.filterInput);
221
-
222
- toolbar.appendSeparator();
223
-
224
- this.typeFilterValue = null;
225
- this.filterByTypeComboBox = new UI.Toolbar.ToolbarComboBox(
226
- this.onFilterByTypeChanged.bind(this), i18nString(UIStrings.filterCoverageByType), undefined,
227
- 'coverage-by-type');
228
- const options = [
229
- {
230
- label: i18nString(UIStrings.all),
231
- value: '',
232
- },
233
- {
234
- label: i18nString(UIStrings.css),
235
- value: CoverageType.CSS,
236
- },
237
- {
238
- label: i18nString(UIStrings.javascript),
239
- value: CoverageType.JAVA_SCRIPT | CoverageType.JAVA_SCRIPT_PER_FUNCTION,
240
- },
241
- ];
242
- for (const option of options) {
243
- this.filterByTypeComboBox.addOption(this.filterByTypeComboBox.createOption(option.label, `${option.value}`));
244
- }
323
+ this.#supportsRecordOnReload = Boolean(mainTarget?.model(SDK.ResourceTreeModel.ResourceTreeModel));
324
+ this.#clearAction = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.clear');
325
+ this.#clearAction.setEnabled(false);
326
+ this.#exportAction = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.export');
327
+ this.#exportAction.setEnabled(false);
328
+
329
+ this.#textFilter = null;
245
330
 
246
- this.filterByTypeComboBox.setSelectedIndex(0);
247
- this.filterByTypeComboBox.setEnabled(false);
248
- toolbar.appendToolbarItem(this.filterByTypeComboBox);
249
-
250
- toolbar.appendSeparator();
251
- this.showContentScriptsSetting = Common.Settings.Settings.instance().createSetting('show-content-scripts', false);
252
- this.showContentScriptsSetting.addChangeListener(this.onFilterChanged, this);
253
- this.contentScriptsCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(
254
- this.showContentScriptsSetting, i18nString(UIStrings.includeExtensionContentScripts),
255
- i18nString(UIStrings.contentScripts));
256
- this.contentScriptsCheckbox.setEnabled(false);
257
- toolbar.appendToolbarItem(this.contentScriptsCheckbox);
258
-
259
- this.coverageResultsElement = this.contentElement.createChild('div', 'coverage-results');
260
- this.landingPage = this.buildLandingPage();
261
- this.bfcacheReloadPromptPage = this.buildReloadPromptPage(i18nString(UIStrings.bfcacheNoCapture), 'bfcache-page');
262
- this.activationReloadPromptPage =
263
- this.buildReloadPromptPage(i18nString(UIStrings.activationNoCapture), 'prerender-page');
264
- this.listView = new CoverageListView();
265
-
266
- this.statusToolbarElement = this.contentElement.createChild('div', 'coverage-toolbar-summary');
267
- this.statusMessageElement = this.statusToolbarElement.createChild('div', 'coverage-message');
268
- this.landingPage.show(this.coverageResultsElement);
331
+ this.#typeFilter = null;
332
+
333
+ this.#showContentScriptsSetting = Common.Settings.Settings.instance().createSetting('show-content-scripts', false);
334
+ this.#showContentScriptsSetting.addChangeListener(this.#onFilterChanged, this);
335
+
336
+ this.requestUpdate();
337
+ }
338
+
339
+ override performUpdate(): void {
340
+ const input: CoverageViewInput = {
341
+ coverageType: this.#coverageTypeComboBoxSetting.get(),
342
+ recording: this.#toggleRecordAction.toggled(),
343
+ supportsRecordOnReload: this.#supportsRecordOnReload,
344
+ typeFilter: this.#typeFilter,
345
+ showContentScriptsSetting: this.#showContentScriptsSetting,
346
+ needsReload: this.#needsReload,
347
+ coverageInfo: this.#coverageInfo,
348
+ textFilter: this.#textFilter,
349
+ selectedUrl: this.#selectedUrl,
350
+ statusMessage: this.#statusMessage,
351
+ onCoverageTypeChanged: this.#onCoverageTypeChanged.bind(this),
352
+ onFilterChanged: (value: string) => {
353
+ this.#textFilter = value ? Platform.StringUtilities.createPlainTextSearchRegex(value, 'i') : null;
354
+ this.#onFilterChanged();
355
+ },
356
+ onTypeFilterChanged: this.#onTypeFilterChanged.bind(this),
357
+ };
358
+ this.#view(input, this.#output, this.contentElement);
269
359
  }
270
360
 
271
361
  static instance(): CoverageView {
@@ -279,68 +369,27 @@ export class CoverageView extends UI.Widget.VBox {
279
369
  coverageViewInstance = undefined;
280
370
  }
281
371
 
282
- private buildLandingPage(): UI.Widget.VBox {
283
- const widget = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noCoverageData), '');
284
- widget.link = 'https://developer.chrome.com/docs/devtools/coverage' as Platform.DevToolsPath.UrlString;
285
- if (this.startWithReloadButton) {
286
- const action = UI.ActionRegistry.ActionRegistry.instance().getAction('coverage.start-with-reload');
287
- if (action) {
288
- widget.text = i18nString(UIStrings.clickTheReloadButtonSToReloadAnd, {PH1: i18nString(UIStrings.reloadPage)});
289
- const button = UI.UIUtils.createTextButton(
290
- i18nString(UIStrings.reloadPage), () => action.execute(),
291
- {jslogContext: action.id(), variant: Buttons.Button.Variant.TONAL});
292
- widget.contentElement.append(button);
293
- }
294
- } else {
295
- widget.text = i18nString(UIStrings.clickTheRecordButtonSToStart, {PH1: i18nString(UIStrings.startRecording)});
296
- const button = UI.UIUtils.createTextButton(
297
- i18nString(UIStrings.startRecording), () => this.toggleRecordAction.execute(),
298
- {jslogContext: this.toggleRecordAction.id(), variant: Buttons.Button.Variant.TONAL});
299
- widget.contentElement.append(button);
300
- }
301
- return widget;
302
- }
303
-
304
- private buildReloadPromptPage(message: Common.UIString.LocalizedString, className: string): UI.Widget.VBox {
305
- const widget = new UI.Widget.VBox();
306
- const reasonDiv = document.createElement('div');
307
- reasonDiv.classList.add('message');
308
- reasonDiv.textContent = message;
309
- widget.contentElement.appendChild(reasonDiv);
310
- this.inlineReloadButton =
311
- UI.UIUtils.createInlineButton(UI.Toolbar.Toolbar.createActionButton('inspector-main.reload'));
312
- const messageElement =
313
- i18n.i18n.getFormatLocalizedString(str_, UIStrings.reloadPrompt, {PH1: this.inlineReloadButton});
314
- messageElement.classList.add('message');
315
- widget.contentElement.appendChild(messageElement);
316
- widget.element.classList.add(className);
317
- return widget;
318
- }
319
-
320
372
  clear(): void {
321
- if (this.model) {
322
- this.model.reset();
373
+ if (this.#model) {
374
+ this.#model.reset();
323
375
  }
324
- this.reset();
376
+ this.#reset();
325
377
  }
326
378
 
327
- private reset(): void {
328
- if (this.decorationManager) {
329
- this.decorationManager.dispose();
330
- this.decorationManager = null;
379
+ #reset(): void {
380
+ if (this.#decorationManager) {
381
+ this.#decorationManager.dispose();
382
+ this.#decorationManager = null;
331
383
  }
332
- this.listView.reset();
333
- this.listView.detach();
334
- this.landingPage.show(this.coverageResultsElement);
335
- this.statusMessageElement.textContent = '';
336
- this.filterInput.setEnabled(false);
337
- this.filterByTypeComboBox.setEnabled(false);
338
- this.contentScriptsCheckbox.setEnabled(false);
339
- this.exportAction.setEnabled(false);
384
+ this.#needsReload = null;
385
+ this.#coverageInfo = null;
386
+ this.#statusMessage = '';
387
+ this.#exportAction.setEnabled(false);
388
+ this.requestUpdate();
340
389
  }
341
390
 
342
391
  toggleRecording(): void {
343
- const enable = !this.toggleRecordAction.toggled();
392
+ const enable = !this.#toggleRecordAction.toggled();
344
393
 
345
394
  if (enable) {
346
395
  void this.startRecording({reload: false, jsCoveragePerBlock: this.isBlockCoverageSelected()});
@@ -350,31 +399,22 @@ export class CoverageView extends UI.Widget.VBox {
350
399
  }
351
400
 
352
401
  isBlockCoverageSelected(): boolean {
353
- const option = this.coverageTypeComboBox.selectedOption();
354
- const coverageType = Number(option ? option.value : Number.NaN);
355
402
  // Check that Coverage.CoverageType.JavaScriptPerFunction is not present.
356
- return coverageType === CoverageType.JAVA_SCRIPT;
403
+ return this.#coverageTypeComboBoxSetting.get() === CoverageType.JAVA_SCRIPT;
357
404
  }
358
405
 
359
- private selectCoverageType(jsCoveragePerBlock: boolean): void {
406
+ #selectCoverageType(jsCoveragePerBlock: boolean): void {
360
407
  const selectedIndex = jsCoveragePerBlock ? 1 : 0;
361
- this.coverageTypeComboBox.setSelectedIndex(selectedIndex);
408
+ this.#coverageTypeComboBoxSetting.set(selectedIndex);
362
409
  }
363
410
 
364
- private onCoverageTypeComboBoxSelectionChanged(): void {
365
- this.coverageTypeComboBoxSetting.set(this.coverageTypeComboBox.selectedIndex());
411
+ #onCoverageTypeChanged(newValue: number): void {
412
+ this.#coverageTypeComboBoxSetting.set(newValue);
366
413
  }
367
414
 
368
415
  async startRecording(options: {reload: (boolean|undefined), jsCoveragePerBlock: (boolean|undefined)}|null):
369
416
  Promise<void> {
370
- let hadFocus, reloadButtonFocused;
371
- if ((this.startWithReloadButton?.element.hasFocus()) || (this.inlineReloadButton?.hasFocus())) {
372
- reloadButtonFocused = true;
373
- } else if (this.hasFocus()) {
374
- hadFocus = true;
375
- }
376
-
377
- this.reset();
417
+ this.#reset();
378
418
  const mainTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
379
419
  if (!mainTarget) {
380
420
  return;
@@ -382,77 +422,63 @@ export class CoverageView extends UI.Widget.VBox {
382
422
 
383
423
  const {reload, jsCoveragePerBlock} = {reload: false, jsCoveragePerBlock: false, ...options};
384
424
 
385
- if (!this.model || reload) {
386
- this.model = mainTarget.model(CoverageModel);
425
+ if (!this.#model || reload) {
426
+ this.#model = mainTarget.model(CoverageModel);
387
427
  }
388
- if (!this.model) {
428
+ if (!this.#model) {
389
429
  return;
390
430
  }
391
431
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.CoverageStarted);
392
432
  if (jsCoveragePerBlock) {
393
433
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.CoverageStartedPerBlock);
394
434
  }
395
- const success = await this.model.start(Boolean(jsCoveragePerBlock));
435
+ const success = await this.#model.start(Boolean(jsCoveragePerBlock));
396
436
  if (!success) {
397
437
  return;
398
438
  }
399
- this.selectCoverageType(Boolean(jsCoveragePerBlock));
400
- this.model.addEventListener(Events.CoverageUpdated, this.onCoverageDataReceived, this);
401
- this.model.addEventListener(Events.SourceMapResolved, this.updateListView, this);
439
+ this.#selectCoverageType(Boolean(jsCoveragePerBlock));
440
+ this.#model.addEventListener(Events.CoverageUpdated, this.#onCoverageDataReceived, this);
441
+ this.#model.addEventListener(Events.SourceMapResolved, this.#updateListView, this);
402
442
  const resourceTreeModel = mainTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);
403
443
  SDK.TargetManager.TargetManager.instance().addModelListener(
404
444
  SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
405
- this.onPrimaryPageChanged, this);
406
- this.decorationManager = new CoverageDecorationManager(
407
- this.model, Workspace.Workspace.WorkspaceImpl.instance(),
445
+ this.#onPrimaryPageChanged, this);
446
+ this.#decorationManager = new CoverageDecorationManager(
447
+ this.#model, Workspace.Workspace.WorkspaceImpl.instance(),
408
448
  Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),
409
449
  Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance());
410
- this.toggleRecordAction.setToggled(true);
411
- this.clearAction.setEnabled(false);
412
- if (this.startWithReloadButton) {
413
- this.startWithReloadButton.setEnabled(false);
414
- this.startWithReloadButton.setVisible(false);
415
- this.toggleRecordButton.setEnabled(true);
416
- this.toggleRecordButton.setVisible(true);
417
- if (reloadButtonFocused) {
418
- this.toggleRecordButton.focus();
419
- }
420
- }
421
- this.coverageTypeComboBox.setEnabled(false);
422
- this.filterInput.setEnabled(true);
423
- this.filterByTypeComboBox.setEnabled(true);
424
- this.contentScriptsCheckbox.setEnabled(true);
425
- if (this.landingPage.isShowing()) {
426
- this.landingPage.detach();
427
- }
428
- this.listView.show(this.coverageResultsElement);
429
- if (hadFocus && !reloadButtonFocused) {
430
- this.listView.focus();
431
- }
450
+ this.#toggleRecordAction.setToggled(true);
451
+ this.#clearAction.setEnabled(false);
452
+ this.#coverageInfo = [];
453
+ this.#needsReload = null;
454
+ this.requestUpdate();
455
+ await this.updateComplete;
456
+
457
+ this.#output.focusResults();
432
458
  if (reload && resourceTreeModel) {
433
459
  resourceTreeModel.reloadPage();
434
460
  } else {
435
- void this.model.startPolling();
461
+ void this.#model.startPolling();
436
462
  }
437
463
  }
438
464
 
439
- private onCoverageDataReceived(event: Common.EventTarget.EventTargetEvent<CoverageInfo[]>): void {
465
+ #onCoverageDataReceived(event: Common.EventTarget.EventTargetEvent<CoverageInfo[]>): void {
440
466
  const data = event.data;
441
- this.updateViews(data);
467
+ this.#updateViews(data);
442
468
  }
443
469
 
444
- private updateListView(): void {
470
+ #updateListView(): void {
445
471
  const entries =
446
- (this.model?.entries() || [])
447
- .map(entry => this.toCoverageListItem(entry))
448
- .filter(info => this.isVisible(info))
472
+ (this.#model?.entries() || [])
473
+ .map(entry => this.#toCoverageListItem(entry))
474
+ .filter(info => this.#isVisible(info))
449
475
  .map(
450
476
  (entry: CoverageListItem) =>
451
- ({...entry, sources: entry.sources.filter((entry: CoverageListItem) => this.isVisible(entry))}));
452
- this.listView.update(entries, this.textFilterRegExp);
477
+ ({...entry, sources: entry.sources.filter((entry: CoverageListItem) => this.#isVisible(entry))}));
478
+ this.#coverageInfo = entries;
453
479
  }
454
480
 
455
- private toCoverageListItem(info: URLCoverageInfo): CoverageListItem {
481
+ #toCoverageListItem(info: URLCoverageInfo): CoverageListItem {
456
482
  return {
457
483
  url: info.url(),
458
484
  type: info.type(),
@@ -461,7 +487,7 @@ export class CoverageView extends UI.Widget.VBox {
461
487
  unusedSize: info.unusedSize(),
462
488
  usedPercentage: info.usedPercentage(),
463
489
  unusedPercentage: info.unusedPercentage(),
464
- sources: [...info.sourcesURLCoverageInfo.values()].map(this.toCoverageListItem, this),
490
+ sources: [...info.sourcesURLCoverageInfo.values()].map(this.#toCoverageListItem, this),
465
491
  isContentScript: info.isContentScript(),
466
492
  generatedUrl: info instanceof SourceURLCoverageInfo ? info.generatedURLCoverageInfo.url() : undefined,
467
493
  };
@@ -470,27 +496,18 @@ export class CoverageView extends UI.Widget.VBox {
470
496
  async stopRecording(): Promise<void> {
471
497
  SDK.TargetManager.TargetManager.instance().removeModelListener(
472
498
  SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
473
- this.onPrimaryPageChanged, this);
474
- if (this.hasFocus()) {
475
- this.listView.focus();
476
- }
499
+ this.#onPrimaryPageChanged, this);
477
500
  // Stopping the model triggers one last poll to get the final data.
478
- if (this.model) {
479
- await this.model.stop();
480
- this.model.removeEventListener(Events.CoverageUpdated, this.onCoverageDataReceived, this);
481
- }
482
- this.toggleRecordAction.setToggled(false);
483
- this.coverageTypeComboBox.setEnabled(true);
484
- if (this.startWithReloadButton) {
485
- this.startWithReloadButton.setEnabled(true);
486
- this.startWithReloadButton.setVisible(true);
487
- this.toggleRecordButton.setEnabled(false);
488
- this.toggleRecordButton.setVisible(false);
501
+ if (this.#model) {
502
+ await this.#model.stop();
503
+ this.#model.removeEventListener(Events.CoverageUpdated, this.#onCoverageDataReceived, this);
489
504
  }
490
- this.clearAction.setEnabled(true);
505
+ this.#toggleRecordAction.setToggled(false);
506
+ this.#clearAction.setEnabled(true);
507
+ this.requestUpdate();
491
508
  }
492
509
 
493
- private async onPrimaryPageChanged(
510
+ async #onPrimaryPageChanged(
494
511
  event: Common.EventTarget.EventTargetEvent<
495
512
  {frame: SDK.ResourceTreeModel.ResourceTreeFrame, type: SDK.ResourceTreeModel.PrimaryPageChangeType}>):
496
513
  Promise<void> {
@@ -500,71 +517,64 @@ export class CoverageView extends UI.Widget.VBox {
500
517
  return;
501
518
  }
502
519
  // If the primary page target has changed (due to MPArch activation), switch to new CoverageModel.
503
- if (this.model !== coverageModel) {
504
- if (this.model) {
505
- await this.model.stop();
506
- this.model.removeEventListener(Events.CoverageUpdated, this.onCoverageDataReceived, this);
520
+ if (this.#model !== coverageModel) {
521
+ if (this.#model) {
522
+ await this.#model.stop();
523
+ this.#model.removeEventListener(Events.CoverageUpdated, this.#onCoverageDataReceived, this);
507
524
  }
508
- this.model = coverageModel;
509
- const success = await this.model.start(this.isBlockCoverageSelected());
525
+ this.#model = coverageModel;
526
+ const success = await this.#model.start(this.isBlockCoverageSelected());
510
527
  if (!success) {
511
528
  return;
512
529
  }
513
530
 
514
- this.model.addEventListener(Events.CoverageUpdated, this.onCoverageDataReceived, this);
515
- this.decorationManager = new CoverageDecorationManager(
516
- this.model, Workspace.Workspace.WorkspaceImpl.instance(),
531
+ this.#model.addEventListener(Events.CoverageUpdated, this.#onCoverageDataReceived, this);
532
+ this.#decorationManager = new CoverageDecorationManager(
533
+ this.#model, Workspace.Workspace.WorkspaceImpl.instance(),
517
534
  Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),
518
535
  Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance());
519
536
  }
520
537
 
521
- if (this.bfcacheReloadPromptPage.isShowing()) {
522
- this.bfcacheReloadPromptPage.detach();
523
- this.listView.show(this.coverageResultsElement);
524
- }
525
- if (this.activationReloadPromptPage.isShowing()) {
526
- this.activationReloadPromptPage.detach();
527
- this.listView.show(this.coverageResultsElement);
528
- }
529
- if (frame.backForwardCacheDetails.restoredFromCache) {
530
- this.listView.detach();
531
- this.bfcacheReloadPromptPage.show(this.coverageResultsElement);
532
- }
533
538
  if (event.data.type === SDK.ResourceTreeModel.PrimaryPageChangeType.ACTIVATION) {
534
- this.listView.detach();
535
- this.activationReloadPromptPage.show(this.coverageResultsElement);
539
+ this.#needsReload = 'prerender-page';
540
+ } else if (frame.backForwardCacheDetails.restoredFromCache) {
541
+ this.#needsReload = 'bfcache-page';
542
+ } else {
543
+ this.#needsReload = null;
544
+ this.#coverageInfo = [];
536
545
  }
546
+ this.requestUpdate();
537
547
 
538
- this.model.reset();
539
- this.decorationManager?.reset();
540
- this.listView.reset();
541
- void this.model.startPolling();
548
+ this.#model.reset();
549
+ this.#decorationManager?.reset();
550
+ void this.#model.startPolling();
542
551
  }
543
552
 
544
- private updateViews(updatedEntries: CoverageInfo[]): void {
545
- this.updateStats();
546
- this.updateListView();
547
- this.exportAction.setEnabled(this.model !== null && this.model.entries().length > 0);
548
- this.decorationManager?.update(updatedEntries);
553
+ #updateViews(updatedEntries: CoverageInfo[]): void {
554
+ this.#updateStats();
555
+ this.#updateListView();
556
+ this.#exportAction.setEnabled(this.#model !== null && this.#model.entries().length > 0);
557
+ this.#decorationManager?.update(updatedEntries);
558
+ this.requestUpdate();
549
559
  }
550
560
 
551
- private updateStats(): void {
561
+ #updateStats(): void {
552
562
  const all = {total: 0, unused: 0};
553
563
  const filtered = {total: 0, unused: 0};
554
- const filterApplied = this.textFilterRegExp !== null;
555
- if (this.model) {
556
- for (const info of this.model.entries()) {
564
+ const filterApplied = this.#textFilter !== null;
565
+ if (this.#model) {
566
+ for (const info of this.#model.entries()) {
557
567
  all.total += info.size();
558
568
  all.unused += info.unusedSize();
559
- const listItem = this.toCoverageListItem(info);
560
- if (this.isVisible(listItem)) {
561
- if (this.textFilterRegExp?.test(info.url())) {
569
+ const listItem = this.#toCoverageListItem(info);
570
+ if (this.#isVisible(listItem)) {
571
+ if (this.#textFilter?.test(info.url())) {
562
572
  filtered.total += info.size();
563
573
  filtered.unused += info.unusedSize();
564
574
  } else {
565
575
  // If it doesn't match the filter, calculate the stats from visible children if there are any
566
576
  for (const childInfo of info.sourcesURLCoverageInfo.values()) {
567
- if (this.isVisible(this.toCoverageListItem(childInfo))) {
577
+ if (this.#isVisible(this.#toCoverageListItem(childInfo))) {
568
578
  filtered.total += childInfo.size();
569
579
  filtered.unused += childInfo.unusedSize();
570
580
  }
@@ -573,7 +583,7 @@ export class CoverageView extends UI.Widget.VBox {
573
583
  }
574
584
  }
575
585
  }
576
- this.statusMessageElement.textContent = filterApplied ?
586
+ this.#statusMessage = filterApplied ?
577
587
  i18nString(UIStrings.filteredSTotalS, {PH1: formatStat(filtered), PH2: formatStat(all)}) :
578
588
  formatStat(all);
579
589
 
@@ -589,51 +599,42 @@ export class CoverageView extends UI.Widget.VBox {
589
599
  }
590
600
  }
591
601
 
592
- private onFilterChanged(): void {
593
- if (!this.listView) {
594
- return;
595
- }
596
- const text = this.filterInput.value();
597
- this.textFilterRegExp = text ? Platform.StringUtilities.createPlainTextSearchRegex(text, 'i') : null;
598
- this.updateListView();
599
- this.updateStats();
602
+ #onFilterChanged(): void {
603
+ this.#updateListView();
604
+ this.#updateStats();
605
+ this.requestUpdate();
600
606
  }
601
607
 
602
- private onFilterByTypeChanged(): void {
603
- if (!this.listView) {
604
- return;
605
- }
606
-
608
+ #onTypeFilterChanged(typeFilter: number): void {
607
609
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.CoverageReportFiltered);
608
610
 
609
- const option = this.filterByTypeComboBox.selectedOption();
610
- const type = option?.value;
611
- this.typeFilterValue = parseInt(type || '', 10) || null;
612
- this.updateListView();
613
- this.updateStats();
611
+ this.#typeFilter = typeFilter;
612
+ this.#updateListView();
613
+ this.#updateStats();
614
+ this.requestUpdate();
614
615
  }
615
616
 
616
- private isVisible(coverageInfo: CoverageListItem): boolean {
617
+ #isVisible(coverageInfo: CoverageListItem): boolean {
617
618
  const url = coverageInfo.url;
618
619
  if (url.startsWith(CoverageView.EXTENSION_BINDINGS_URL_PREFIX)) {
619
620
  return false;
620
621
  }
621
- if (coverageInfo.isContentScript && !this.showContentScriptsSetting.get()) {
622
+ if (coverageInfo.isContentScript && !this.#showContentScriptsSetting.get()) {
622
623
  return false;
623
624
  }
624
- if (this.typeFilterValue && !(coverageInfo.type & this.typeFilterValue)) {
625
+ if (this.#typeFilter && !(coverageInfo.type & this.#typeFilter)) {
625
626
  return false;
626
627
  }
627
628
  // If it's a parent, check if any children are visible
628
629
  if (coverageInfo.sources.length > 0) {
629
630
  for (const sourceURLCoverageInfo of coverageInfo.sources) {
630
- if (this.isVisible(sourceURLCoverageInfo)) {
631
+ if (this.#isVisible(sourceURLCoverageInfo)) {
631
632
  return true;
632
633
  }
633
634
  }
634
635
  }
635
636
 
636
- return !this.textFilterRegExp || this.textFilterRegExp.test(url);
637
+ return !this.#textFilter || this.#textFilter.test(url);
637
638
  }
638
639
 
639
640
  async exportReport(): Promise<void> {
@@ -644,11 +645,12 @@ export class CoverageView extends UI.Widget.VBox {
644
645
  if (!accepted) {
645
646
  return;
646
647
  }
647
- this.model && await this.model.exportReport(fos);
648
+ this.#model && await this.#model.exportReport(fos);
648
649
  }
649
650
 
650
651
  selectCoverageItemByUrl(url: string): void {
651
- this.listView.selectByUrl(url as Platform.DevToolsPath.UrlString);
652
+ this.#selectedUrl = url as Platform.DevToolsPath.UrlString;
653
+ this.requestUpdate();
652
654
  }
653
655
 
654
656
  static readonly EXTENSION_BINDINGS_URL_PREFIX = 'extensions::';
@@ -662,6 +664,10 @@ export class CoverageView extends UI.Widget.VBox {
662
664
  super.willHide();
663
665
  UI.Context.Context.instance().setFlavor(CoverageView, null);
664
666
  }
667
+
668
+ get model(): CoverageModel|null {
669
+ return this.#model;
670
+ }
665
671
  }
666
672
 
667
673
  export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {