chrome-devtools-frontend 1.0.1664496 → 1.0.1665921

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 (407) hide show
  1. package/.agents/skills/devtools-testing-guidance/SKILL.md +48 -0
  2. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +3 -3
  3. package/.agents/skills/repro-flaky-tests/SKILL.md +2 -2
  4. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
  5. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +2 -0
  6. package/.agents/skills/version-control/SKILL.md +4 -3
  7. package/docs/ui_engineering.md +89 -0
  8. package/eslint.config.mjs +9 -2
  9. package/front_end/Images/rollup.config.mjs +1 -1
  10. package/front_end/Tests.js +15 -16
  11. package/front_end/core/common/Gzip.ts +2 -2
  12. package/front_end/core/common/Settings.ts +4 -20
  13. package/front_end/core/common/Srcset.ts +1 -1
  14. package/front_end/core/common/VersionController.ts +1 -1
  15. package/front_end/core/host/AidaClient.ts +19 -4
  16. package/front_end/core/host/AidaGcaTranslation.ts +2 -2
  17. package/front_end/core/host/GcaClient.ts +2 -2
  18. package/front_end/core/host/GdpClient.ts +3 -3
  19. package/front_end/core/host/InspectorFrontendHostStub.ts +1 -1
  20. package/front_end/core/host/ResourceLoader.ts +15 -15
  21. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
  22. package/front_end/core/protocol_client/InspectorBackend.ts +1 -1
  23. package/front_end/core/root/Runtime.ts +0 -1
  24. package/front_end/core/sdk/CSSMatchedStyles.ts +78 -3
  25. package/front_end/core/sdk/CSSMetadata.ts +17 -12
  26. package/front_end/core/sdk/CSSProperty.ts +1 -1
  27. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +2 -2
  28. package/front_end/core/sdk/CSSRule.ts +3 -3
  29. package/front_end/core/sdk/CSSStyleSheetHeader.ts +3 -3
  30. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +1 -1
  31. package/front_end/core/sdk/Connections.ts +1 -1
  32. package/front_end/core/sdk/DebuggerModel.ts +13 -13
  33. package/front_end/core/sdk/NetworkManager.ts +19 -19
  34. package/front_end/core/sdk/NetworkRequest.ts +57 -57
  35. package/front_end/core/sdk/OverlayModel.ts +1 -1
  36. package/front_end/core/sdk/PageResourceLoader.ts +2 -2
  37. package/front_end/core/sdk/RehydratingConnection.ts +5 -5
  38. package/front_end/core/sdk/ScreenCaptureModel.ts +1 -1
  39. package/front_end/core/sdk/Script.ts +2 -2
  40. package/front_end/core/sdk/ServerTiming.ts +7 -7
  41. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +1 -1
  42. package/front_end/core/sdk/ServiceWorkerManager.ts +11 -11
  43. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -2
  44. package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
  45. package/front_end/core/sdk/StorageKeyManager.ts +1 -1
  46. package/front_end/core/sdk/sdk-meta.ts +98 -98
  47. package/front_end/devtools_compatibility.js +15 -13
  48. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +4 -8
  49. package/front_end/entrypoints/main/MainImpl.ts +2 -3
  50. package/front_end/entrypoints/main/main-meta.ts +1 -16
  51. package/front_end/entrypoints/shell/shell.ts +1 -0
  52. package/front_end/entrypoints/trace_app/trace_app.ts +1 -0
  53. package/front_end/foundation/README.md +1 -1
  54. package/front_end/foundation/Universe.test.api.ts +73 -0
  55. package/front_end/foundation/Universe.ts +22 -0
  56. package/front_end/generated/InspectorBackendCommands.ts +2 -2
  57. package/front_end/generated/SupportedCSSProperties.js +1 -1
  58. package/front_end/generated/protocol.ts +19 -0
  59. package/front_end/models/ai_assistance/AiAgent2.ts +1 -1
  60. package/front_end/models/ai_assistance/AiConversation.ts +1 -1
  61. package/front_end/models/ai_assistance/BuiltInAi.ts +1 -1
  62. package/front_end/models/ai_assistance/ChangeManager.ts +0 -70
  63. package/front_end/models/ai_assistance/ExtensionScope.ts +2 -36
  64. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +9 -9
  65. package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -2
  66. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +4 -4
  67. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +1 -1
  68. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +21 -21
  69. package/front_end/models/ai_assistance/agents/StorageAgent.ts +4 -4
  70. package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
  71. package/front_end/models/ai_assistance/ai_assistance.ts +0 -5
  72. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +11 -4
  73. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +8 -2
  74. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +14 -11
  75. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +2 -2
  76. package/front_end/models/ai_assistance/performance/AICallTree.ts +2 -2
  77. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +1 -1
  78. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +9 -2
  79. package/front_end/models/ai_assistance/tools/GetStyles.ts +4 -4
  80. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -5
  81. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -2
  82. package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -2
  83. package/front_end/models/badges/badges-meta.ts +27 -0
  84. package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -3
  85. package/front_end/models/bindings/ContentProviderBasedProject.ts +1 -1
  86. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +6 -7
  87. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +5 -4
  88. package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +72 -29
  89. package/front_end/models/bindings/ResourceMapping.ts +38 -32
  90. package/front_end/models/bindings/ResourceScriptMapping.ts +5 -7
  91. package/front_end/models/breakpoints/BreakpointManager.ts +2 -1
  92. package/front_end/models/har/Writer.ts +2 -2
  93. package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +1 -1
  94. package/front_end/models/issues_manager/GenericIssue.ts +1 -1
  95. package/front_end/models/issues_manager/IssuesManager.ts +14 -5
  96. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +1 -1
  97. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
  98. package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +13 -2
  99. package/front_end/models/issues_manager/issues_manager.ts +0 -2
  100. package/front_end/models/live-metrics/LiveMetrics.ts +22 -5
  101. package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +1 -1
  102. package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +10 -4
  103. package/front_end/models/logs/logs-meta.ts +23 -16
  104. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +2 -2
  105. package/front_end/models/persistence/IsolatedFileSystem.ts +1 -1
  106. package/front_end/models/persistence/IsolatedFileSystemManager.ts +1 -1
  107. package/front_end/models/source_map_scopes/NamesResolver.ts +104 -86
  108. package/front_end/models/source_map_scopes/ScopeChainModel.ts +6 -2
  109. package/front_end/models/stack_trace/StackTraceModel.ts +1 -1
  110. package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +1 -1
  111. package/front_end/models/trace/handlers/UserTimingsHandler.ts +17 -6
  112. package/front_end/models/trace/helpers/SamplesIntegrator.ts +1 -1
  113. package/front_end/models/trace/helpers/Timing.ts +1 -1
  114. package/front_end/models/trace/insights/Common.ts +1 -1
  115. package/front_end/models/trace/insights/DocumentLatency.ts +3 -3
  116. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  117. package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
  118. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +2 -2
  119. package/front_end/models/workspace_diff/WorkspaceDiff.ts +14 -9
  120. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +2 -15
  121. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -2
  122. package/front_end/panels/ai_assistance/components/ChatInput.ts +23 -19
  123. package/front_end/panels/ai_assistance/components/ChatMessage.ts +9 -18
  124. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -35
  125. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +1 -1
  126. package/front_end/panels/ai_assistance/components/ExploreWidget.ts +4 -4
  127. package/front_end/panels/ai_assistance/components/ImageResize.ts +74 -0
  128. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +2 -2
  129. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +28 -29
  130. package/front_end/panels/animation/AnimationTimeline.ts +3 -3
  131. package/front_end/panels/animation/animationTimeline.css +0 -2
  132. package/front_end/panels/application/AppManifestView.ts +1 -1
  133. package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -1
  134. package/front_end/panels/application/CookieItemsView.ts +1 -1
  135. package/front_end/panels/application/CrashReportContextView.ts +3 -3
  136. package/front_end/panels/application/DeviceBoundSessionsModel.ts +1 -1
  137. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +1 -1
  138. package/front_end/panels/application/DeviceBoundSessionsView.ts +1 -1
  139. package/front_end/panels/application/IndexedDBViews.ts +1 -1
  140. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -1
  141. package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
  142. package/front_end/panels/application/ServiceWorkersView.ts +6 -6
  143. package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
  144. package/front_end/panels/application/StorageItemsToolbar.ts +3 -3
  145. package/front_end/panels/application/WebMCPView.ts +7 -5
  146. package/front_end/panels/application/components/AdsView.ts +21 -6
  147. package/front_end/panels/application/components/BackForwardCacheView.ts +2 -2
  148. package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
  149. package/front_end/panels/application/components/StorageMetadataView.ts +1 -1
  150. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +2 -2
  151. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
  152. package/front_end/panels/application/preloading/components/PreloadingString.ts +3 -3
  153. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -1
  154. package/front_end/panels/autofill/AutofillView.ts +1 -1
  155. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
  156. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +2 -2
  157. package/front_end/panels/changes/ChangesSidebar.ts +2 -2
  158. package/front_end/panels/changes/ChangesView.ts +4 -5
  159. package/front_end/panels/changes/CombinedDiffView.ts +3 -3
  160. package/front_end/panels/changes/changes-meta.ts +2 -2
  161. package/front_end/panels/common/AiCodeCompletionTeaser.ts +1 -1
  162. package/front_end/panels/common/AiCodeGenerationTeaser.ts +3 -3
  163. package/front_end/panels/common/BadgeNotification.ts +8 -8
  164. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  165. package/front_end/panels/common/GdpSignUpDialog.ts +2 -2
  166. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
  167. package/front_end/panels/common/aiCodeCompletionDisclaimer.css +0 -1
  168. package/front_end/panels/console/ConsoleInsightTeaser.ts +1 -1
  169. package/front_end/panels/console/ConsolePinPane.ts +3 -3
  170. package/front_end/panels/console/ConsolePrompt.ts +6 -4
  171. package/front_end/panels/console/ConsoleSidebar.ts +8 -10
  172. package/front_end/panels/console_counters/WarningErrorCounter.ts +10 -11
  173. package/front_end/panels/coverage/CoverageView.ts +2 -2
  174. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
  175. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +1 -1
  176. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
  177. package/front_end/panels/elements/CSSRuleValidator.ts +1 -1
  178. package/front_end/panels/elements/ComputedStyleWidget.ts +3 -2
  179. package/front_end/panels/elements/ElementsTreeElement.ts +3 -3
  180. package/front_end/panels/elements/EventListenersWidget.ts +1 -3
  181. package/front_end/panels/elements/LayoutPane.ts +23 -13
  182. package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -7
  183. package/front_end/panels/elements/StylePropertiesSection.ts +33 -5
  184. package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -5
  185. package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -6
  186. package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
  187. package/front_end/panels/elements/elements-meta.ts +18 -2
  188. package/front_end/panels/emulation/DeviceModeToolbar.ts +100 -40
  189. package/front_end/panels/emulation/DeviceModeView.ts +5 -4
  190. package/front_end/panels/emulation/MediaQueryInspector.ts +35 -19
  191. package/front_end/panels/event_listeners/EventListenersView.ts +4 -4
  192. package/front_end/panels/explain/components/ConsoleInsight.ts +8 -9
  193. package/front_end/panels/explain/explain-meta.ts +3 -3
  194. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +135 -167
  195. package/front_end/panels/layer_viewer/Layers3DView.ts +10 -23
  196. package/front_end/panels/layer_viewer/layer_viewer-meta.ts +27 -0
  197. package/front_end/panels/lighthouse/LighthouseController.ts +44 -55
  198. package/front_end/panels/lighthouse/LighthousePanel.ts +9 -9
  199. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +2 -2
  200. package/front_end/panels/lighthouse/LighthouseStartView.ts +9 -12
  201. package/front_end/panels/lighthouse/LighthouseStatusView.ts +33 -33
  202. package/front_end/panels/lighthouse/RadioSetting.ts +1 -1
  203. package/front_end/panels/lighthouse/lighthouse-meta.ts +131 -1
  204. package/front_end/panels/media/EventDisplayTable.ts +67 -94
  205. package/front_end/panels/media/PlayerListView.ts +1 -1
  206. package/front_end/panels/media/eventDisplayTable.css +9 -4
  207. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +5 -5
  208. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
  209. package/front_end/panels/network/EventSourceMessagesView.ts +98 -107
  210. package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
  211. package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -1
  212. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  213. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  214. package/front_end/panels/network/RequestHeadersView.ts +5 -5
  215. package/front_end/panels/network/RequestPayloadView.ts +4 -4
  216. package/front_end/panels/network/RequestTimingView.ts +2 -2
  217. package/front_end/panels/network/components/DirectSocketConnectionView.ts +1 -1
  218. package/front_end/panels/network/eventSourceMessagesView.css +12 -3
  219. package/front_end/panels/network/networkTimingTable.css +2 -2
  220. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
  221. package/front_end/panels/profiler/BottomUpProfileDataGrid.ts +25 -29
  222. package/front_end/panels/profiler/HeapProfileView.ts +308 -247
  223. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +13 -3
  224. package/front_end/panels/profiler/HeapSnapshotView.ts +30 -10
  225. package/front_end/panels/profiler/HeapTimelineOverview.ts +5 -2
  226. package/front_end/panels/profiler/ProfileDataGrid.ts +128 -157
  227. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +17 -5
  228. package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
  229. package/front_end/panels/profiler/TopDownProfileDataGrid.ts +17 -21
  230. package/front_end/panels/profiler/profilesPanel.css +9 -13
  231. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
  232. package/front_end/panels/recorder/CreateRecordingView.ts +4 -4
  233. package/front_end/panels/recorder/RecorderPanel.ts +6 -6
  234. package/front_end/panels/recorder/RecordingView.ts +1 -1
  235. package/front_end/panels/recorder/ReplaySection.ts +1 -1
  236. package/front_end/panels/recorder/StepView.ts +1 -1
  237. package/front_end/panels/recorder/injected/rollup.config.mjs +1 -1
  238. package/front_end/panels/search/SearchView.ts +1 -1
  239. package/front_end/panels/security/SecurityPanel.ts +54 -41
  240. package/front_end/panels/sensors/LocationsSettingsTab.ts +246 -233
  241. package/front_end/panels/sensors/SensorsView.ts +1 -1
  242. package/front_end/panels/settings/AISettingsTab.ts +11 -10
  243. package/front_end/panels/settings/SettingsScreen.ts +29 -24
  244. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
  245. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +5 -5
  246. package/front_end/panels/sources/BreakpointEditDialog.ts +2 -2
  247. package/front_end/panels/sources/BreakpointsView.ts +1 -1
  248. package/front_end/panels/sources/CallStackSidebarPane.ts +2 -2
  249. package/front_end/panels/sources/DebuggerPausedMessage.ts +2 -2
  250. package/front_end/panels/sources/DebuggerPlugin.ts +25 -22
  251. package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -1
  252. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +7 -5
  253. package/front_end/panels/sources/sources-meta.ts +1 -1
  254. package/front_end/panels/timeline/CountersGraph.ts +1 -2
  255. package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
  256. package/front_end/panels/timeline/TimelineDetailsView.ts +2 -2
  257. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -2
  258. package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
  259. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
  260. package/front_end/panels/timeline/TimelinePanel.ts +53 -81
  261. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +10 -3
  262. package/front_end/panels/timeline/TimelineUIUtils.ts +18 -4
  263. package/front_end/panels/timeline/TrackConfigBanner.ts +1 -1
  264. package/front_end/panels/timeline/components/ExportTraceOptions.ts +1 -1
  265. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +8 -9
  266. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
  267. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +1 -1
  268. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
  269. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +1 -1
  270. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +1 -1
  271. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
  272. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -0
  273. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +13 -8
  274. package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +1 -0
  275. package/front_end/panels/timeline/timeline-meta.ts +169 -0
  276. package/front_end/panels/timeline/timelineFlameChartView.css +5 -0
  277. package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
  278. package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
  279. package/front_end/panels/whats_new/resources/WNDT.md +7 -8
  280. package/front_end/third_party/chromium/README.chromium +1 -1
  281. package/front_end/third_party/web-vitals/README.chromium +2 -2
  282. package/front_end/third_party/web-vitals/package/README.md +120 -19
  283. package/front_end/third_party/web-vitals/package/attribution.d.ts +16 -0
  284. package/front_end/third_party/web-vitals/package/attribution.js +18 -0
  285. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +1 -1
  286. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +1 -7
  287. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +53 -32
  288. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +2 -2
  289. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +43 -12
  290. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +1 -1
  291. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +21 -3
  292. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +1 -1
  293. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +30 -24
  294. package/front_end/third_party/web-vitals/package/dist/modules/lib/FCPEntryManager.d.ts +3 -0
  295. package/front_end/third_party/web-vitals/package/dist/modules/lib/FCPEntryManager.js +18 -0
  296. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +2 -1
  297. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +18 -2
  298. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +1 -0
  299. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.js +1 -0
  300. package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.d.ts +1 -1
  301. package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
  302. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.d.ts +1 -1
  303. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +7 -7
  304. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +1 -1
  305. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -1
  306. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +4 -1
  307. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +7 -3
  308. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +20 -11
  309. package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.js +8 -3
  310. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.d.ts +3 -1
  311. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +19 -4
  312. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -1
  313. package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.d.ts +3 -0
  314. package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.js +38 -0
  315. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +5 -1
  316. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.d.ts +1 -1
  317. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +30 -11
  318. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.d.ts +1 -1
  319. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +36 -4
  320. package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +1 -1
  321. package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +42 -22
  322. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.d.ts +1 -1
  323. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +109 -30
  324. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.d.ts +1 -1
  325. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +25 -7
  326. package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +24 -1
  327. package/front_end/third_party/web-vitals/package/dist/modules/types/fcp.d.ts +1 -1
  328. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +14 -6
  329. package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +1 -1
  330. package/front_end/third_party/web-vitals/package/dist/modules/types/ttfb.d.ts +2 -2
  331. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +26 -4
  332. package/front_end/third_party/web-vitals/package/package.json +21 -22
  333. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +1 -1
  334. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +62 -39
  335. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +52 -15
  336. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +25 -7
  337. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +43 -37
  338. package/front_end/third_party/web-vitals/package/src/lib/{polyfills/getFirstHiddenTimePolyfill.ts → FCPEntryManager.ts} +4 -14
  339. package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +22 -2
  340. package/front_end/third_party/web-vitals/package/src/lib/LCPEntryManager.ts +1 -0
  341. package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
  342. package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
  343. package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +11 -12
  344. package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +1 -1
  345. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +4 -1
  346. package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +24 -11
  347. package/front_end/third_party/web-vitals/package/src/lib/initUnique.ts +12 -4
  348. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +26 -5
  349. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +1 -1
  350. package/front_end/third_party/web-vitals/package/src/lib/softNavs.ts +48 -0
  351. package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +12 -4
  352. package/front_end/third_party/web-vitals/package/src/onCLS.ts +75 -18
  353. package/front_end/third_party/web-vitals/package/src/onFCP.ts +66 -7
  354. package/front_end/third_party/web-vitals/package/src/onINP.ts +100 -39
  355. package/front_end/third_party/web-vitals/package/src/onLCP.ts +169 -34
  356. package/front_end/third_party/web-vitals/package/src/onTTFB.ts +50 -13
  357. package/front_end/third_party/web-vitals/package/src/types/base.ts +31 -10
  358. package/front_end/third_party/web-vitals/package/src/types/fcp.ts +1 -1
  359. package/front_end/third_party/web-vitals/package/src/types/inp.ts +14 -6
  360. package/front_end/third_party/web-vitals/package/src/types/lcp.ts +1 -1
  361. package/front_end/third_party/web-vitals/package/src/types/ttfb.ts +2 -2
  362. package/front_end/third_party/web-vitals/package/src/types.ts +32 -9
  363. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +11 -11
  364. package/front_end/third_party/web-vitals/rebuild.sh +2 -2
  365. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +2 -0
  366. package/front_end/ui/components/buttons/Button.ts +16 -0
  367. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  368. package/front_end/ui/components/highlighting/HighlightManager.ts +6 -1
  369. package/front_end/ui/components/highlighting/highlighting.ts +1 -1
  370. package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
  371. package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
  372. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +2 -2
  373. package/front_end/ui/components/settings/SettingCheckbox.ts +12 -7
  374. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +2 -2
  375. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +6 -6
  376. package/front_end/ui/components/text_editor/javascript.ts +3 -1
  377. package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
  378. package/front_end/ui/legacy/ContextMenu.ts +12 -2
  379. package/front_end/ui/legacy/ListControl.ts +1 -1
  380. package/front_end/ui/legacy/SelectMenu.docs.ts +17 -19
  381. package/front_end/ui/legacy/Toolbar.ts +4 -1
  382. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  383. package/front_end/ui/legacy/components/color_picker/spectrum.css +1 -2
  384. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  385. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -4
  386. package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +3 -1
  387. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +4 -4
  388. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -7
  389. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +14 -11
  390. package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -1
  391. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +15 -5
  392. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -4
  393. package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -1
  394. package/front_end/ui/lit/render.ts +1 -1
  395. package/front_end/ui/settings/SettingUIRegistration.ts +8 -3
  396. package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
  397. package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
  398. package/inspector_overlay/main.ts +1 -1
  399. package/mcp/mcp.ts +5 -4
  400. package/package.json +13 -13
  401. package/front_end/models/ai_assistance/AgentProject.ts +0 -261
  402. package/front_end/models/ai_assistance/agents/PatchAgent.ts +0 -306
  403. package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +0 -45
  404. package/front_end/models/text_utils/text_utils.ts +0 -5
  405. package/front_end/panels/ai_assistance/PatchWidget.ts +0 -867
  406. package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +0 -368
  407. package/front_end/panels/ai_assistance/selectWorkspaceDialog.css +0 -92
@@ -1,9 +1,9 @@
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 @devtools/no-imperative-dom-api */
5
4
 
6
5
  import '../../ui/components/icon_button/icon_button.js';
6
+ import '../../ui/legacy/components/data_grid/data_grid.js';
7
7
 
8
8
  import * as Common from '../../core/common/common.js';
9
9
  import * as Host from '../../core/host/host.js';
@@ -14,23 +14,24 @@ import type * as Protocol from '../../generated/protocol.js';
14
14
  import * as Bindings from '../../models/bindings/bindings.js';
15
15
  import * as CPUProfile from '../../models/cpu_profile/cpu_profile.js';
16
16
  import * as Buttons from '../../ui/components/buttons/buttons.js';
17
- import type * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
18
17
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
19
18
  import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
20
19
  import * as Components from '../../ui/legacy/components/utils/utils.js';
21
20
  import * as UI from '../../ui/legacy/legacy.js';
22
- import {Directives, html, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
21
+ import {Directives, html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
23
22
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
24
23
 
25
24
  import {BottomUpProfileDataGridTree} from './BottomUpProfileDataGrid.js';
26
25
  import {Events, HeapTimelineOverview, type IdsRangeChangedEvent, type Samples} from './HeapTimelineOverview.js';
27
- import {type Formatter, type ProfileDataGridNode, ProfileDataGridTree} from './ProfileDataGrid.js';
26
+ import {type Formatter, ProfileDataGridTree, type ProfileEntry} from './ProfileDataGrid.js';
28
27
  import {ProfileFlameChart, ProfileFlameChartDataProvider} from './ProfileFlameChartDataProvider.js';
29
28
  import {ProfileEvents, type ProfileHeader, ProfileType} from './ProfileHeader.js';
29
+ import profilesPanelStyles from './profilesPanel.css.js';
30
30
  import {TopDownProfileDataGridTree} from './TopDownProfileDataGrid.js';
31
31
  import {WritableProfileHeader} from './WritableProfileHeader.js';
32
32
 
33
33
  const {repeat, ref} = Directives;
34
+ const {widget, widgetRef} = UI.Widget;
34
35
 
35
36
  const UIStrings = {
36
37
  /**
@@ -186,6 +187,168 @@ export const enum ViewTypes {
186
187
  HEAVY = 'Heavy',
187
188
  }
188
189
 
190
+ export interface ViewInput {
191
+ timelineOverview: HeapTimelineOverview;
192
+ searchable: UI.SearchableView.Searchable;
193
+ hasTemporaryView: boolean;
194
+ viewType: ViewTypes|null;
195
+ profileDataGridTree: ProfileDataGridTree|undefined;
196
+ selectedNode: ProfileEntry|null;
197
+ nodeFormatter: Formatter;
198
+ columnHeader: (columnId: string) => Common.UIString.LocalizedString;
199
+ searchableView: UI.SearchableView.SearchableView|undefined;
200
+ dataProvider: ProfileFlameChartDataProvider|undefined;
201
+ target: SDK.Target.Target|null;
202
+ onExpand: (node: ProfileEntry) => void;
203
+ onCollapse: (node: ProfileEntry) => void;
204
+ onSelect: (node: ProfileEntry) => void;
205
+ onDeselect: () => void;
206
+ onContextMenu: (event: CustomEvent<UI.ContextMenu.ContextMenu>, node: ProfileEntry) => void;
207
+ onSearchableViewMount: (widget: UI.SearchableView.SearchableView) => void;
208
+ onFlameChartEntryInvoked: (entryIndex: number) => void;
209
+ range?: {left: number, right: number};
210
+ }
211
+
212
+ export interface ViewOutput {
213
+ performSearch?: (searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean) => void;
214
+ jumpToNextSearchResult?: () => void;
215
+ jumpToPreviousSearchResult?: () => void;
216
+ onSearchCanceled?: () => void;
217
+ }
218
+
219
+ export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement|DocumentFragment) => void;
220
+
221
+ export const DEFAULT_VIEW: View = (input, output, target) => {
222
+ const {searchableView, dataProvider} = input;
223
+ // clang-format off
224
+ render(html`
225
+ ${input.hasTemporaryView ? html`
226
+ <devtools-widget ${widget(() => input.timelineOverview)}></devtools-widget>` : nothing}
227
+ <devtools-widget ${widget(element => {
228
+ const searchableViewWidget = new UI.SearchableView.SearchableView(input.searchable, null, undefined, element);
229
+ searchableViewWidget.setPlaceholder(i18nString(UIStrings.findByCostMsNameOrFile));
230
+ return searchableViewWidget;
231
+ })}
232
+ ${widgetRef(UI.SearchableView.SearchableView, input.onSearchableViewMount)}>
233
+ ${input.viewType === ViewTypes.FLAME && searchableView && dataProvider ? html`
234
+ <devtools-widget
235
+ autofocus
236
+ ${widget((e: HTMLElement) => new ProfileFlameChart(searchableView, dataProvider, e), {range: input.range})}
237
+ @EntryInvoked=${(e: CustomEvent<number>) => input.onFlameChartEntryInvoked(e.detail)}
238
+ ${widgetRef(ProfileFlameChart, widget => {
239
+ output.performSearch = widget.performSearch.bind(widget);
240
+ output.jumpToNextSearchResult = widget.jumpToNextSearchResult.bind(widget);
241
+ output.jumpToPreviousSearchResult = widget.jumpToPreviousSearchResult.bind(widget);
242
+ output.onSearchCanceled = widget.onSearchCanceled.bind(widget);
243
+ })}>
244
+ </devtools-widget>`
245
+ : input.profileDataGridTree ? html`
246
+ <div class="data-grid-target vbox flex-auto">${renderDataGrid(input)}</div>`
247
+ : nothing}
248
+ </devtools-widget>`, target);
249
+ // clang-format on
250
+ };
251
+
252
+ function renderDataGrid(input: ViewInput): LitTemplate {
253
+ if (!input.profileDataGridTree) {
254
+ return nothing;
255
+ }
256
+
257
+ let highlightIndex = -1;
258
+ if (input.profileDataGridTree && input.profileDataGridTree.searchResults) {
259
+ highlightIndex = input.profileDataGridTree.searchResultIndex + 1;
260
+ }
261
+ // clang-format off
262
+ return html`
263
+ <style>${profilesPanelStyles}</style>
264
+ <devtools-data-grid class="flex-auto" name=${i18nString(UIStrings.profiler)} striped autofocus resize="last"
265
+ highlight=${highlightIndex >= 1 ? highlightIndex : nothing}
266
+ @deselect=${input.onDeselect} .template=${html`
267
+ <style>${profilesPanelStyles}</style>
268
+ <table>
269
+ <tr>
270
+ <th id="self" width="120px" fixed weight="1" sortable sort="descending">
271
+ ${input.columnHeader('self')}
272
+ </th>
273
+ <th id="total" width="120px" fixed weight="1" sortable>
274
+ ${input.columnHeader('total')}
275
+ </th>
276
+ <th id="function" weight="3" sortable disclosure>
277
+ ${i18nString(UIStrings.function)}
278
+ </th>
279
+ </tr>
280
+ ${repeat(input.profileDataGridTree.children,
281
+ (node: ProfileEntry) => node.callUID,
282
+ (node: ProfileEntry) => renderNode(node, input))}
283
+ </table>`}>
284
+ </devtools-data-grid>`;
285
+ // clang-format on
286
+ }
287
+
288
+ function renderNode(node: ProfileEntry, input: ViewInput): LitTemplate {
289
+ const onSelect = (): void => {
290
+ input.onSelect(node);
291
+ };
292
+ const onContextMenu = (event: CustomEvent<UI.ContextMenu.ContextMenu>): void => {
293
+ input.onContextMenu(event, node);
294
+ };
295
+ const onExpand = (): void => {
296
+ input.onExpand(node);
297
+ };
298
+ const onCollapse = (): void => {
299
+ input.onCollapse(node);
300
+ };
301
+
302
+ // clang-format off
303
+ return html`
304
+ <tr data-uid=${node.callUID} ?selected=${input.selectedNode === node} ?expanded=${node.expanded}
305
+ ?highlighted=${node.searchMatchedSelfColumn || node.searchMatchedTotalColumn || node.searchMatchedFunctionColumn}
306
+ @select=${onSelect}
307
+ @contextmenu=${onContextMenu}
308
+ @expand=${onExpand} @collapse=${onCollapse}>
309
+ <td data-value=${node.self} class="numeric-column ${node.searchMatchedSelfColumn ? 'highlight' : ''}"
310
+ aria-label=${`${input.nodeFormatter.formatValueAccessibleText(node.self, node)}, ${input.nodeFormatter.formatPercent(node.selfPercent, node)}`}>
311
+ <div class="profile-multiple-values">
312
+ <span>${input.nodeFormatter.formatValue(node.self, node)}</span>
313
+ <span class="percent-column">${input.nodeFormatter.formatPercent(node.selfPercent, node)}</span>
314
+ </div>
315
+ </td>
316
+ <td data-value=${node.total} class="numeric-column ${node.searchMatchedTotalColumn ? 'highlight' : ''}"
317
+ aria-label=${`${input.nodeFormatter.formatValueAccessibleText(node.total, node)}, ${input.nodeFormatter.formatPercent(node.totalPercent, node)}`}>
318
+ <div class="profile-multiple-values">
319
+ <span>${input.nodeFormatter.formatValue(node.total, node)}</span>
320
+ <span class="percent-column">${input.nodeFormatter.formatPercent(node.totalPercent, node)}</span>
321
+ </div>
322
+ </td>
323
+ <td data-value=${node.functionName} class="${node.searchMatchedFunctionColumn ? 'highlight' : ''} ${node.deoptReason ? 'not-optimized' : ''}">
324
+ ${node.deoptReason ? html`
325
+ <devtools-icon name="warning-filled" class="profile-warn-marker small"
326
+ title=${i18nString(UIStrings.notOptimizedS, {PH1: node.deoptReason})}>
327
+ </devtools-icon>` : nothing}
328
+ ${node.functionName}
329
+ ${node.profileNode.scriptId !== '0' && node.profileNode.callFrame ? widget(Components.Linkifier.ScriptLocationLink, {
330
+ target: input.target ?? undefined,
331
+ scriptId: node.profileNode.callFrame.scriptId,
332
+ sourceURL: node.profileNode.callFrame.url as Platform.DevToolsPath.UrlString,
333
+ lineNumber: node.profileNode.callFrame.lineNumber,
334
+ options: {
335
+ columnNumber: node.profileNode.callFrame.columnNumber,
336
+ maxLength: maxLinkLength,
337
+ className: 'profile-node-file',
338
+ },
339
+ }) : nothing}
340
+ </td>
341
+ ${node.hasChildren() ? html`
342
+ <td><table>
343
+ ${node.expanded ? html`${repeat(
344
+ node.children,
345
+ child => child.callUID,
346
+ child => renderNode(child, input))}` : nothing}
347
+ </table></td>` : nothing}
348
+ </tr>`;
349
+ // clang-format on
350
+ }
351
+
189
352
  export class HeapProfileView extends UI.View.SimpleView implements UI.SearchableView.Searchable {
190
353
  profileHeader: SamplingHeapProfileHeader;
191
354
  readonly profileType: SamplingHeapProfileTypeBase;
@@ -200,48 +363,44 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
200
363
  readonly timelineOverview: HeapTimelineOverview = new HeapTimelineOverview();
201
364
  profileInternal: CPUProfile.ProfileTreeModel.ProfileTreeModel|null = null;
202
365
  searchableViewInternal!: UI.SearchableView.SearchableView;
203
- dataGrid: UI.Widget.Widget;
204
366
  viewSelectComboBox: HTMLSelectElement|undefined;
205
367
  focusButton: Buttons.Button.Button|undefined;
206
368
  excludeButton: Buttons.Button.Button|undefined;
207
369
  resetButton: Buttons.Button.Button|undefined;
208
- #sortColumnId = 'self';
209
- #sortAscending = false;
210
- #selectedNode: ProfileDataGridNode|null = null;
370
+
371
+ #selectedNode: ProfileEntry|null = null;
211
372
 
212
373
  readonly linkifierInternal: Components.Linkifier.Linkifier = new Components.Linkifier.Linkifier(maxLinkLength);
213
- nodeFormatter!: NodeFormatter;
374
+
214
375
  viewType!: Common.Settings.Setting<ViewTypes>;
215
376
  bottomUpProfileDataGridTree?: BottomUpProfileDataGridTree|null;
216
377
  topDownProfileDataGridTree?: TopDownProfileDataGridTree|null;
217
378
  currentSearchResultIndex?: number;
218
379
  dataProvider?: ProfileFlameChartDataProvider;
219
- flameChart?: ProfileFlameChart;
220
- visibleView?: UI.Widget.Widget;
221
- searchableElement?: ProfileDataGridTree|ProfileFlameChart;
222
380
  profileDataGridTree?: ProfileDataGridTree;
223
381
 
224
382
  #isNodeSelected = false;
383
+ #view: View;
384
+ #viewOutput: ViewOutput = {};
385
+
225
386
  #isResetEnabled = false;
226
387
  #selectedSize: number|null = null;
227
388
  #minId: number|null = null;
228
389
  #maxId: number|null = null;
390
+ #range?: {left: number, right: number};
229
391
  #lastAppliedRange: {minId: number, maxId: number}|null = null;
230
392
  #lastAppliedViewType: ViewTypes|null = null;
231
393
 
232
- constructor(profileHeader: SamplingHeapProfileHeader) {
394
+ constructor(profileHeader: SamplingHeapProfileHeader, view: View = DEFAULT_VIEW) {
233
395
  super({
234
396
  title: i18nString(UIStrings.profile),
235
397
  viewId: 'profile',
236
398
  });
237
-
238
- this.#setupSearchableView();
239
-
240
- this.dataGrid = new UI.Widget.VBox();
399
+ this.#view = view;
241
400
 
242
401
  this.profileHeader = profileHeader;
243
402
  this.profileType = profileHeader.profileType();
244
- this.initialize(new NodeFormatter(this));
403
+ this.initialize();
245
404
  const profile = new SamplingHeapProfileModel(convertToSamplingHeapProfile(profileHeader));
246
405
  this.adjustedTotal = profile.total;
247
406
  this.setProfile(profile);
@@ -252,7 +411,6 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
252
411
  #setupTimelineOverview(): void {
253
412
  if (this.profileType.hasTemporaryView()) {
254
413
  this.timelineOverview.addEventListener(Events.IDS_RANGE_CHANGED, this.onIdsRangeChanged.bind(this));
255
- this.timelineOverview.show(this.element, this.element.firstChild);
256
414
  this.timelineOverview.start();
257
415
 
258
416
  this.profileType.addEventListener(SamplingHeapProfileType.Events.STATS_UPDATE, this.onStatsUpdate, this);
@@ -264,118 +422,6 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
264
422
  }
265
423
  }
266
424
 
267
- #setupSearchableView(): void {
268
- this.searchableViewInternal = new UI.SearchableView.SearchableView(this, null);
269
- this.searchableViewInternal.setPlaceholder(i18nString(UIStrings.findByCostMsNameOrFile));
270
- this.searchableViewInternal.show(this.element);
271
- }
272
-
273
- #renderDataGrid(): void {
274
- if (!this.profileDataGridTree) {
275
- return;
276
- }
277
- const onSort = (e: CustomEvent<{columnId: string, ascending: boolean}>): void => {
278
- this.#sortColumnId = e.detail.columnId;
279
- this.#sortAscending = e.detail.ascending;
280
- this.sortProfile();
281
- };
282
-
283
- const onDeselect = (): void => {
284
- this.#selectedNode = null;
285
- this.nodeSelected(false);
286
- };
287
-
288
- // clang-format off
289
- // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
290
- render(html`
291
- <devtools-data-grid class="flex-auto" name=${i18nString(UIStrings.profiler)} striped autofocus resize="last"
292
- @sort=${onSort} @deselect=${onDeselect} .template=${html`
293
- <table>
294
- <tr>
295
- <th id="self" width="120px" fixed weight="1" sortable
296
- sort=${this.#sortColumnId === 'self' ? (this.#sortAscending ? 'ascending' : 'descending') : 'none'}>
297
- ${this.columnHeader('self')}
298
- </th>
299
- <th id="total" width="120px" fixed weight="1" sortable
300
- sort=${this.#sortColumnId === 'total' ? (this.#sortAscending ? 'ascending' : 'descending') : 'none'}>
301
- ${this.columnHeader('total')}
302
- </th>
303
- <th id="function" weight="3" sortable disclosure
304
- sort=${this.#sortColumnId === 'function' ? (this.#sortAscending ? 'ascending' : 'descending') : 'none'}>
305
- ${i18nString(UIStrings.function)}
306
- </th>
307
- </tr>
308
- ${repeat(this.profileDataGridTree.children,
309
- (node: ProfileDataGridNode) => node.callUID,
310
- (node: ProfileDataGridNode) => this.#renderNode(node))}
311
- </table>`}>
312
- </devtools-data-grid>
313
- `, this.dataGrid.element);
314
- // clang-format on
315
- }
316
-
317
- #renderNode(node: ProfileDataGridNode): TemplateResult {
318
- const onSelect = (): void => {
319
- this.#selectedNode = node;
320
- this.nodeSelected(true);
321
- };
322
- const onContextMenu = (event: CustomEvent<UI.ContextMenu.ContextMenu>): void => {
323
- this.populateContextMenu(event.detail, node);
324
- };
325
- const onExpand = (): void => {
326
- node.expanded = true;
327
- node.populate();
328
- this.refresh();
329
- };
330
- const onCollapse = (): void => {
331
- node.expanded = false;
332
- this.refresh();
333
- };
334
-
335
- if (node.profileNode.scriptId !== '0' && !node.linkElement) {
336
- node.linkElement = this.nodeFormatter.linkifyNode(node);
337
- if (node.linkElement) {
338
- (node.linkElement as HTMLElement).style.maxWidth = '75%';
339
- }
340
- }
341
-
342
- // clang-format off
343
- return html`
344
- <tr data-uid=${node.callUID} ?selected=${this.#selectedNode === node} ?expanded=${node.expanded} @select=${onSelect}
345
- @contextmenu=${onContextMenu} @expand=${onExpand} @collapse=${onCollapse}>
346
- <td data-value=${node.self} class="numeric-column ${node.searchMatchedSelfColumn ? 'highlight' : ''}"
347
- aria-label=${`${this.nodeFormatter.formatValueAccessibleText(node.self)}, ${this.nodeFormatter.formatPercent(node.selfPercent, node)}`}>
348
- <div class="profile-multiple-values">
349
- <span>${this.nodeFormatter.formatValue(node.self)}</span>
350
- <span class="percent-column">${this.nodeFormatter.formatPercent(node.selfPercent, node)}</span>
351
- </div>
352
- </td>
353
- <td data-value=${node.total} class="numeric-column ${node.searchMatchedTotalColumn ? 'highlight' : ''}"
354
- aria-label=${`${this.nodeFormatter.formatValueAccessibleText(node.total)}, ${this.nodeFormatter.formatPercent(node.totalPercent, node)}`}>
355
- <div class="profile-multiple-values">
356
- <span>${this.nodeFormatter.formatValue(node.total)}</span>
357
- <span class="percent-column">${this.nodeFormatter.formatPercent(node.totalPercent, node)}</span>
358
- </div>
359
- </td>
360
- <td data-value=${node.functionName} class="${node.searchMatchedFunctionColumn ? 'highlight' : ''} ${node.deoptReason ? 'not-optimized' : ''}">
361
- ${node.deoptReason ? html`
362
- <devtools-icon name="warning-filled" class="profile-warn-marker small"
363
- title=${i18nString(UIStrings.notOptimizedS, {PH1: node.deoptReason})}>
364
- </devtools-icon>` : nothing}
365
- ${node.functionName}
366
- ${node.linkElement ? node.linkElement : nothing}
367
- </td>
368
- ${node.hasChildren() ? html`
369
- <td><table>
370
- ${node.expanded ? html`${repeat(
371
- node.children as ProfileDataGridNode[],
372
- child => child.callUID,
373
- child => this.#renderNode(child))}` : nothing}
374
- </table></td>` : nothing}
375
- </tr>`;
376
- // clang-format on
377
- }
378
-
379
425
  override async toolbarItems(): Promise<TemplateResult> {
380
426
  const currentViewType = this.viewType.get();
381
427
  const isFlame = currentViewType === ViewTypes.FLAME;
@@ -503,14 +549,15 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
503
549
  static buildPopoverTable(popoverInfo: Array<{
504
550
  title: string,
505
551
  value: string,
506
- }>): Element {
507
- const table = document.createElement('table');
508
- for (const entry of popoverInfo) {
509
- const row = table.createChild('tr');
510
- row.createChild('td').textContent = entry.title;
511
- row.createChild('td').textContent = entry.value;
512
- }
513
- return table;
552
+ }>): TemplateResult {
553
+ return html`<table>
554
+ ${popoverInfo.map(entry => html`
555
+ <tr>
556
+ <td>${entry.title}</td>
557
+ <td>${entry.value}</td>
558
+ </tr>
559
+ `)}
560
+ </table>`;
514
561
  }
515
562
 
516
563
  setProfile(profile: CPUProfile.ProfileTreeModel.ProfileTreeModel): void {
@@ -525,56 +572,50 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
525
572
  return this.profileInternal;
526
573
  }
527
574
 
528
- initialize(nodeFormatter: NodeFormatter): void {
529
- this.nodeFormatter = nodeFormatter;
530
-
575
+ initialize(): void {
531
576
  this.viewType = Common.Settings.Settings.instance().createSetting('profile-view', ViewTypes.HEAVY);
532
577
 
533
578
  this.changeView();
534
- if (this.flameChart) {
535
- this.flameChart.update();
536
- }
537
- }
538
-
539
- override focus(): void {
540
- if (this.flameChart) {
541
- this.flameChart.focus();
542
- } else {
543
- super.focus();
544
- }
545
579
  }
546
580
 
547
581
  selectRange(timeLeft: number, timeRight: number): void {
548
- if (!this.flameChart) {
549
- return;
550
- }
551
- this.flameChart.selectRange(timeLeft, timeRight);
582
+ this.#range = {left: timeLeft, right: timeRight};
583
+ this.performUpdate();
552
584
  }
553
585
 
554
- getBottomUpProfileDataGridTree(): ProfileDataGridTree {
586
+ getBottomUpProfileDataGridTree(): ProfileDataGridTree|undefined {
587
+ if (!this.searchableViewInternal) {
588
+ return undefined;
589
+ }
555
590
  if (!this.bottomUpProfileDataGridTree) {
556
591
  this.bottomUpProfileDataGridTree = new BottomUpProfileDataGridTree(
557
- this.nodeFormatter, this.searchableViewInternal,
592
+ nodeFormatter, this.searchableViewInternal,
558
593
  (this.profileInternal as CPUProfile.ProfileTreeModel.ProfileTreeModel).root, this.adjustedTotal);
559
594
  }
560
595
  return this.bottomUpProfileDataGridTree;
561
596
  }
562
597
 
563
- getTopDownProfileDataGridTree(): ProfileDataGridTree {
598
+ getTopDownProfileDataGridTree(): ProfileDataGridTree|undefined {
599
+ if (!this.searchableViewInternal) {
600
+ return undefined;
601
+ }
564
602
  if (!this.topDownProfileDataGridTree) {
565
603
  this.topDownProfileDataGridTree = new TopDownProfileDataGridTree(
566
- this.nodeFormatter, this.searchableViewInternal,
604
+ nodeFormatter, this.searchableViewInternal,
567
605
  (this.profileInternal as CPUProfile.ProfileTreeModel.ProfileTreeModel).root, this.adjustedTotal);
568
606
  }
569
607
  return this.topDownProfileDataGridTree;
570
608
  }
571
609
 
572
- populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu,
573
- gridNode: DataGrid.DataGrid.DataGridNode<unknown>): void {
574
- const node = (gridNode as ProfileDataGridNode);
575
- if (node.linkElement) {
576
- contextMenu.appendApplicableItems(node.linkElement);
610
+ populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu, node: ProfileEntry): void {
611
+ const heapProfilerModel = this.profileHeader.heapProfilerModel();
612
+ const target = heapProfilerModel ? heapProfilerModel.target() : null;
613
+ const tempLinkifier = new Components.Linkifier.Linkifier();
614
+ const linkElement = tempLinkifier.maybeLinkifyConsoleCallFrame(target, node.profileNode.callFrame);
615
+ if (linkElement) {
616
+ contextMenu.appendApplicableItems(linkElement);
577
617
  }
618
+ tempLinkifier.dispose();
578
619
  }
579
620
 
580
621
  override willHide(): void {
@@ -586,15 +627,15 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
586
627
  if (!this.profileDataGridTree) {
587
628
  return;
588
629
  }
589
- this.#renderDataGrid();
630
+ this.performUpdate();
590
631
  }
591
632
 
592
633
  refreshVisibleData(): void {
593
- this.#renderDataGrid();
634
+ this.performUpdate();
594
635
  }
595
636
 
596
- searchableView(): UI.SearchableView.SearchableView {
597
- return this.searchableViewInternal;
637
+ searchableView(): UI.SearchableView.SearchableView|null {
638
+ return this.searchableViewInternal || null;
598
639
  }
599
640
 
600
641
  supportsCaseSensitiveSearch(): boolean {
@@ -610,46 +651,62 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
610
651
  }
611
652
 
612
653
  onSearchCanceled(): void {
613
- if (this.searchableElement) {
614
- this.searchableElement.onSearchCanceled();
615
- this.refresh();
654
+ if (this.viewType.get() === ViewTypes.FLAME) {
655
+ this.#viewOutput.onSearchCanceled?.();
656
+ } else if (this.profileDataGridTree) {
657
+ this.profileDataGridTree.onSearchCanceled();
616
658
  }
659
+ this.refresh();
617
660
  }
618
661
 
619
662
  performSearch(searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean): void {
620
- if (this.searchableElement) {
621
- this.searchableElement.performSearch(searchConfig, shouldJump, jumpBackwards);
663
+ if (this.viewType.get() !== ViewTypes.FLAME && this.profileDataGridTree) {
664
+ // 1. Delegate to model to find ALL matches (including virtualized ones) using complex query logic
665
+ this.profileDataGridTree.performSearch(searchConfig, shouldJump, jumpBackwards);
666
+
667
+ // 2. Guarantee Deep Matches: Expand ancestors of matching nodes if deep search is on
668
+ if (this.profileDataGridTree.deepSearch) {
669
+ for (const match of this.profileDataGridTree.searchResults) {
670
+ let parent = match.profileNode.parent;
671
+ while (parent && !(parent instanceof ProfileDataGridTree)) {
672
+ parent.expanded = true;
673
+ parent = parent.parent;
674
+ }
675
+ }
676
+ }
677
+ this.refresh();
678
+ } else if (this.viewType.get() === ViewTypes.FLAME) {
679
+ this.#viewOutput.performSearch?.(searchConfig, shouldJump, jumpBackwards);
622
680
  this.refresh();
623
681
  }
624
682
  }
625
683
 
626
684
  jumpToNextSearchResult(): void {
627
- if (this.searchableElement) {
628
- this.searchableElement.jumpToNextSearchResult();
629
- this.#syncSearchSelection();
685
+ if (this.viewType.get() !== ViewTypes.FLAME && this.profileDataGridTree) {
686
+ if (!this.profileDataGridTree.searchResults?.length) {
687
+ return;
688
+ }
689
+ this.profileDataGridTree.searchResultIndex =
690
+ (this.profileDataGridTree.searchResultIndex + 1) % this.profileDataGridTree.searchResults.length;
691
+ this.searchableViewInternal.updateCurrentMatchIndex(this.profileDataGridTree.searchResultIndex);
692
+ this.refresh();
693
+ } else if (this.viewType.get() === ViewTypes.FLAME) {
694
+ this.#viewOutput.jumpToNextSearchResult?.();
630
695
  }
631
696
  }
632
697
 
633
698
  jumpToPreviousSearchResult(): void {
634
- if (this.searchableElement) {
635
- this.searchableElement.jumpToPreviousSearchResult();
636
- this.#syncSearchSelection();
637
- }
638
- }
639
-
640
- #syncSearchSelection(): void {
641
- if (this.searchableElement === this.profileDataGridTree && this.profileDataGridTree) {
642
- const searchResult = this.profileDataGridTree.searchResults[this.profileDataGridTree.searchResultIndex];
643
- this.#selectedNode = searchResult?.profileNode || null;
644
-
645
- let node = this.#selectedNode;
646
- while (node?.parent) {
647
- node.parent.expanded = true;
648
- node = node.parent as ProfileDataGridNode;
699
+ if (this.viewType.get() !== ViewTypes.FLAME && this.profileDataGridTree) {
700
+ if (!this.profileDataGridTree.searchResults?.length) {
701
+ return;
649
702
  }
650
-
651
- this.nodeSelected(!!this.#selectedNode);
703
+ this.profileDataGridTree.searchResultIndex =
704
+ (this.profileDataGridTree.searchResultIndex - 1 + this.profileDataGridTree.searchResults.length) %
705
+ this.profileDataGridTree.searchResults.length;
706
+ this.searchableViewInternal.updateCurrentMatchIndex(this.profileDataGridTree.searchResultIndex);
652
707
  this.refresh();
708
+ } else if (this.viewType.get() === ViewTypes.FLAME) {
709
+ this.#viewOutput.jumpToPreviousSearchResult?.();
653
710
  }
654
711
  }
655
712
 
@@ -658,21 +715,16 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
658
715
  }
659
716
 
660
717
  ensureFlameChartCreated(): void {
661
- if (this.flameChart) {
718
+ if (this.dataProvider || !this.searchableViewInternal) {
662
719
  return;
663
720
  }
664
721
  this.dataProvider = this.createFlameChartDataProvider();
665
- this.flameChart = new ProfileFlameChart(this.searchableViewInternal, this.dataProvider);
666
- this.flameChart.addEventListener(PerfUI.FlameChart.Events.ENTRY_INVOKED, event => {
667
- void this.onEntryInvoked(event);
668
- });
669
722
  }
670
723
 
671
- async onEntryInvoked(event: Common.EventTarget.EventTargetEvent<number>): Promise<void> {
724
+ async onEntryInvoked(entryIndex: number): Promise<void> {
672
725
  if (!this.dataProvider) {
673
726
  return;
674
727
  }
675
- const entryIndex = event.data;
676
728
  const node = this.dataProvider.entryNodes[entryIndex];
677
729
  const debuggerModel = this.profileHeader.debuggerModel;
678
730
  if (!node || !node.scriptId || !debuggerModel) {
@@ -759,52 +811,27 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
759
811
  this.refreshVisibleData();
760
812
  }
761
813
 
762
- sortProfile(): void {
763
- if (!this.profileDataGridTree) {
764
- return;
765
- }
766
- const sortAscending = this.#sortAscending;
767
- const sortColumnId = this.#sortColumnId;
768
- const sortProperty = sortColumnId === 'function' ? 'functionName' : sortColumnId || '';
769
- this.profileDataGridTree.sort(ProfileDataGridTree.propertyComparator(sortProperty, sortAscending), false);
770
-
771
- this.refresh();
772
- }
773
-
774
814
  override performUpdate(): void {
775
815
  const currentViewType = this.viewType ? this.viewType.get() : null;
776
816
  if (currentViewType && currentViewType !== this.#lastAppliedViewType) {
777
- this.searchableViewInternal.closeSearch();
778
-
779
- if (this.visibleView) {
780
- this.visibleView.detach();
781
- }
817
+ this.searchableViewInternal?.closeSearch();
782
818
 
783
819
  switch (currentViewType) {
784
820
  case ViewTypes.FLAME:
785
821
  this.ensureFlameChartCreated();
786
- this.visibleView = this.flameChart;
787
- this.searchableElement = this.flameChart;
788
822
  break;
789
823
  case ViewTypes.TREE:
790
824
  this.profileDataGridTree = this.getTopDownProfileDataGridTree();
791
- this.sortProfile();
792
- this.visibleView = this.dataGrid;
793
- this.searchableElement = this.profileDataGridTree;
794
825
  break;
795
826
  case ViewTypes.HEAVY:
796
827
  this.profileDataGridTree = this.getBottomUpProfileDataGridTree();
797
- this.sortProfile();
798
- this.visibleView = this.dataGrid;
799
- this.searchableElement = this.profileDataGridTree;
800
828
  break;
801
829
  }
802
830
 
803
- if (this.visibleView) {
804
- this.visibleView.show(this.searchableViewInternal.element);
831
+ const initialized = currentViewType === ViewTypes.FLAME ? !!this.dataProvider : !!this.profileDataGridTree;
832
+ if (initialized) {
833
+ this.#lastAppliedViewType = currentViewType;
805
834
  }
806
-
807
- this.#lastAppliedViewType = currentViewType;
808
835
  }
809
836
 
810
837
  const isFlame = currentViewType === ViewTypes.FLAME;
@@ -848,6 +875,52 @@ export class HeapProfileView extends UI.View.SimpleView implements UI.Searchable
848
875
 
849
876
  this.timelineOverview.setSamples(samples);
850
877
  }
878
+
879
+ const input: ViewInput = {
880
+ timelineOverview: this.timelineOverview,
881
+ searchable: this,
882
+ hasTemporaryView: this.profileType.hasTemporaryView(),
883
+ viewType: currentViewType,
884
+ range: this.#range,
885
+ profileDataGridTree: this.profileDataGridTree,
886
+ selectedNode: this.#selectedNode,
887
+ nodeFormatter,
888
+ columnHeader: this.columnHeader.bind(this),
889
+ searchableView: this.searchableViewInternal,
890
+ dataProvider: this.dataProvider,
891
+ target: this.profileHeader.heapProfilerModel()?.target() ?? null,
892
+ onExpand: (node: ProfileEntry) => {
893
+ node.expanded = true;
894
+ node.populate();
895
+ this.refresh();
896
+ },
897
+ onCollapse: (node: ProfileEntry) => {
898
+ node.expanded = false;
899
+ this.refresh();
900
+ },
901
+ onSelect: (node: ProfileEntry) => {
902
+ this.#selectedNode = node;
903
+ this.nodeSelected(true);
904
+ },
905
+ onDeselect: () => {
906
+ this.#selectedNode = null;
907
+ this.nodeSelected(false);
908
+ },
909
+ onContextMenu: (event: CustomEvent<UI.ContextMenu.ContextMenu>, node: ProfileEntry) => {
910
+ this.populateContextMenu(event.detail, node);
911
+ },
912
+ onSearchableViewMount: (widget: UI.SearchableView.SearchableView) => {
913
+ if (this.searchableViewInternal !== widget) {
914
+ this.searchableViewInternal = widget;
915
+ this.requestUpdate();
916
+ }
917
+ },
918
+ onFlameChartEntryInvoked: (entryIndex: number) => {
919
+ void this.onEntryInvoked(entryIndex);
920
+ },
921
+ };
922
+
923
+ this.#view(input, this.#viewOutput, this.contentElement);
851
924
  }
852
925
  }
853
926
 
@@ -1219,15 +1292,10 @@ export class SamplingHeapProfileModel extends CPUProfile.ProfileTreeModel.Profil
1219
1292
  }
1220
1293
 
1221
1294
  export class NodeFormatter implements Formatter {
1222
- readonly profileView: HeapProfileView;
1223
1295
  readonly #formattedValueCache = new Map<number, string>();
1224
1296
  readonly #formattedValueAccessibleTextCache = new Map<number, string>();
1225
1297
  readonly #formattedPercentCache = new Map<number, string>();
1226
1298
 
1227
- constructor(profileView: HeapProfileView) {
1228
- this.profileView = profileView;
1229
- }
1230
-
1231
1299
  formatValue(value: number): string {
1232
1300
  let result = this.#formattedValueCache.get(value);
1233
1301
  if (!result) {
@@ -1246,7 +1314,7 @@ export class NodeFormatter implements Formatter {
1246
1314
  return result;
1247
1315
  }
1248
1316
 
1249
- formatPercent(value: number, _node: ProfileDataGridNode): string {
1317
+ formatPercent(value: number, _node: ProfileEntry): string {
1250
1318
  let result = this.#formattedPercentCache.get(value);
1251
1319
  if (!result) {
1252
1320
  result = i18nString(UIStrings.formatPercent, {PH1: value.toFixed(2)});
@@ -1254,17 +1322,10 @@ export class NodeFormatter implements Formatter {
1254
1322
  }
1255
1323
  return result;
1256
1324
  }
1257
-
1258
- linkifyNode(node: ProfileDataGridNode): Element|null {
1259
- const heapProfilerModel = this.profileView.profileHeader.heapProfilerModel();
1260
- const target = heapProfilerModel ? heapProfilerModel.target() : null;
1261
- const options = {
1262
- className: 'profile-node-file',
1263
- };
1264
- return this.profileView.linkifier().maybeLinkifyConsoleCallFrame(target, node.profileNode.callFrame, options);
1265
- }
1266
1325
  }
1267
1326
 
1327
+ export const nodeFormatter = new NodeFormatter();
1328
+
1268
1329
  export class HeapFlameChartDataProvider extends ProfileFlameChartDataProvider {
1269
1330
  readonly profile: CPUProfile.ProfileTreeModel.ProfileTreeModel;
1270
1331
  readonly heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null;
@@ -1329,7 +1390,7 @@ export class HeapFlameChartDataProvider extends ProfileFlameChartDataProvider {
1329
1390
  return this.timelineDataInternal;
1330
1391
  }
1331
1392
 
1332
- override preparePopoverElement(entryIndex: number): Element|null {
1393
+ override preparePopoverElement(entryIndex: number): TemplateResult|null {
1333
1394
  const node = this.entryNodes[entryIndex];
1334
1395
  if (!node) {
1335
1396
  return null;