chrome-devtools-frontend 1.0.1545096 → 1.0.1547571

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 (301) hide show
  1. package/.stylelintrc.json +5 -1
  2. package/docs/contributing/infrastructure.md +2 -2
  3. package/docs/styleguide/ux/styles.md +1 -1
  4. package/eslint.config.mjs +2 -1
  5. package/front_end/Images/generate-css-vars.js +1 -1
  6. package/front_end/Images/src/arrow-down.svg +8 -1
  7. package/front_end/Images/src/arrow-up.svg +8 -1
  8. package/front_end/core/common/common.ts +0 -2
  9. package/front_end/core/host/AidaClient.ts +1 -1
  10. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  11. package/front_end/core/host/UserMetrics.ts +0 -5
  12. package/front_end/core/i18n/collect-ui-strings.js +1 -1
  13. package/front_end/core/i18n/generate-locales-js.js +1 -1
  14. package/front_end/core/platform/HostRuntime.ts +25 -0
  15. package/front_end/core/platform/KeyboardUtilities.ts +2 -2
  16. package/front_end/core/platform/StringUtilities.ts +1 -1
  17. package/front_end/core/platform/api/HostRuntime.ts +45 -0
  18. package/front_end/core/platform/api/api.ts +7 -0
  19. package/front_end/core/{common/Worker.ts → platform/browser/HostRuntime.ts} +27 -12
  20. package/front_end/core/platform/browser/browser.ts +7 -0
  21. package/front_end/core/platform/node/HostRuntime.ts +85 -0
  22. package/front_end/core/platform/node/node.ts +7 -0
  23. package/front_end/core/platform/platform.ts +2 -2
  24. package/front_end/core/sdk/AnimationModel.ts +1 -1
  25. package/front_end/core/sdk/CSSModel.ts +1 -1
  26. package/front_end/core/sdk/CSSProperty.ts +1 -1
  27. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
  28. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  29. package/front_end/core/sdk/Cookie.ts +1 -1
  30. package/front_end/core/sdk/DOMModel.ts +2 -2
  31. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  32. package/front_end/core/sdk/NetworkManager.ts +6 -0
  33. package/front_end/core/sdk/PreloadingModel.ts +1 -1
  34. package/front_end/core/sdk/RemoteObject.ts +1 -1
  35. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  36. package/front_end/core/sdk/Script.ts +4 -4
  37. package/front_end/core/sdk/SourceMapScopesInfo.ts +141 -23
  38. package/front_end/core/sdk/Target.ts +5 -14
  39. package/front_end/core/sdk/TargetManager.ts +26 -4
  40. package/front_end/core/sdk/sdk-meta.ts +62 -0
  41. package/front_end/devtools_compatibility.js +0 -1
  42. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
  43. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
  44. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
  45. package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
  46. package/front_end/entrypoints/main/MainImpl.ts +4 -4
  47. package/front_end/foundation/Universe.ts +2 -2
  48. package/front_end/generated/Deprecation.ts +26 -0
  49. package/front_end/generated/InspectorBackendCommands.ts +5 -4
  50. package/front_end/generated/SupportedCSSProperties.js +17 -15
  51. package/front_end/generated/protocol-mapping.d.ts +2 -0
  52. package/front_end/generated/protocol-proxy-api.d.ts +4 -0
  53. package/front_end/generated/protocol.ts +19 -29
  54. package/front_end/models/ai_assistance/AiConversation.ts +268 -0
  55. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -172
  56. package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
  57. package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
  58. package/front_end/models/ai_assistance/ConversationHandler.ts +27 -52
  59. package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -8
  60. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +6 -2
  61. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
  62. package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -19
  63. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  64. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +313 -313
  65. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +8 -6
  66. package/front_end/models/ai_assistance/performance/AICallTree.snapshot.txt +33 -33
  67. package/front_end/models/ai_assistance/performance/AICallTree.ts +9 -3
  68. package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -3
  69. package/front_end/models/bindings/SASSSourceMapping.ts +6 -4
  70. package/front_end/models/cpu_profile/CPUProfileDataModel.ts +10 -7
  71. package/front_end/models/crux-manager/CrUXManager.ts +7 -4
  72. package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
  73. package/front_end/models/har/Importer.ts +1 -1
  74. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
  75. package/front_end/models/issues_manager/GenericIssue.ts +12 -9
  76. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  77. package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
  78. package/front_end/models/trace/handlers/SamplesHandler.ts +3 -0
  79. package/front_end/models/trace/helpers/Trace.ts +13 -0
  80. package/front_end/models/trace/types/TraceEvents.ts +2 -1
  81. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -0
  82. package/front_end/models/workspace/IgnoreListManager.ts +1 -2
  83. package/front_end/models/workspace/UISourceCode.ts +50 -0
  84. package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
  85. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +86 -159
  86. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +8 -0
  87. package/front_end/panels/ai_assistance/components/ChatView.ts +56 -33
  88. package/front_end/panels/animation/AnimationTimeline.ts +0 -8
  89. package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
  90. package/front_end/panels/application/FrameDetailsView.ts +64 -36
  91. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  92. package/front_end/panels/application/components/components.ts +0 -2
  93. package/front_end/panels/common/AiCodeGenerationTeaser.ts +80 -0
  94. package/front_end/panels/common/common.ts +2 -1
  95. package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
  96. package/front_end/panels/console/ConsolePrompt.ts +4 -2
  97. package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
  98. package/front_end/panels/console/ConsoleViewport.ts +2 -3
  99. package/front_end/panels/console/consoleInsightTeaser.css +1 -0
  100. package/front_end/panels/coverage/CoverageModel.ts +2 -2
  101. package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
  102. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  103. package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
  104. package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
  105. package/front_end/panels/elements/StylePropertyTreeElement.ts +24 -21
  106. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  107. package/front_end/panels/elements/cssValueTraceView.css +1 -1
  108. package/front_end/panels/elements/elements-meta.ts +1 -0
  109. package/front_end/panels/explain/components/ConsoleInsight.ts +44 -57
  110. package/front_end/panels/explain/components/consoleInsight.css +46 -1
  111. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -2
  112. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +19 -0
  113. package/front_end/panels/network/RequestConditionsDrawer.ts +116 -42
  114. package/front_end/panels/network/networkLogView.css +11 -0
  115. package/front_end/panels/network/networkTimingTable.css +8 -6
  116. package/front_end/panels/network/requestConditionsDrawer.css +10 -1
  117. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  118. package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
  119. package/front_end/panels/profiler/ProfilesPanel.ts +1 -2
  120. package/front_end/panels/recorder/components/StepEditor.ts +1 -1
  121. package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
  122. package/front_end/panels/settings/KeybindsSettingsTab.ts +21 -22
  123. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  124. package/front_end/panels/sources/CoveragePlugin.ts +5 -5
  125. package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
  126. package/front_end/panels/sources/NavigatorView.ts +1 -1
  127. package/front_end/panels/sources/Plugin.ts +1 -1
  128. package/front_end/panels/sources/ProfilePlugin.ts +22 -14
  129. package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
  130. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
  131. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
  132. package/front_end/panels/sources/sources-meta.ts +0 -62
  133. package/front_end/panels/timeline/README.md +1 -9
  134. package/front_end/panels/timeline/ThreadAppender.ts +0 -7
  135. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  136. package/front_end/panels/timeline/TimelinePanel.ts +8 -8
  137. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -1
  138. package/front_end/panels/timeline/components/ExportTraceOptions.ts +15 -1
  139. package/front_end/panels/timeline/components/LiveMetricsView.ts +37 -1
  140. package/front_end/panels/timeline/components/exportTraceOptions.css +11 -2
  141. package/front_end/panels/timeline/enable-easter-egg.js +1 -1
  142. package/front_end/panels/timeline/utils/Treemap.ts +1 -1
  143. package/front_end/third_party/chromium/README.chromium +1 -1
  144. package/front_end/third_party/puppeteer/README.chromium +2 -2
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
  193. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
  240. package/front_end/third_party/puppeteer/package/package.json +3 -3
  241. package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
  242. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
  243. package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
  244. package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
  245. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
  246. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
  247. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
  248. package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
  249. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
  250. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
  251. package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
  252. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  253. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  254. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  255. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
  256. package/front_end/ui/components/text_editor/javascript.ts +1 -1
  257. package/front_end/ui/legacy/ARIAUtils.ts +2 -2
  258. package/front_end/ui/legacy/ActionRegistration.ts +11 -0
  259. package/front_end/ui/legacy/ListWidget.ts +51 -18
  260. package/front_end/ui/legacy/ReportView.ts +1 -1
  261. package/front_end/ui/legacy/SoftDropDown.ts +2 -2
  262. package/front_end/ui/legacy/TabbedPane.ts +3 -3
  263. package/front_end/ui/legacy/TextPrompt.ts +3 -2
  264. package/front_end/ui/legacy/Treeoutline.ts +3 -2
  265. package/front_end/ui/legacy/UIUtils.ts +11 -10
  266. package/front_end/ui/legacy/Widget.ts +3 -2
  267. package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
  268. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -4
  269. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
  270. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +62 -39
  271. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -1
  272. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +2 -2
  273. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -9
  274. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +41 -13
  275. package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
  276. package/front_end/ui/legacy/inspectorCommon.css +2 -2
  277. package/front_end/ui/legacy/legacy.ts +2 -0
  278. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  279. package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
  280. package/inspector_overlay/tool_window_controls.ts +4 -1
  281. package/mcp/mcp.ts +1 -1
  282. package/package.json +2 -3
  283. package/front_end/panels/application/components/StackTrace.ts +0 -239
  284. package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
  285. package/front_end/panels/application/components/stackTraceRow.css +0 -50
  286. package/front_end/panels/explain/components/consoleInsightSourcesList.css +0 -51
  287. package/front_end/ui/components/docs/README.md +0 -6
  288. package/front_end/ui/components/docs/building-ui-documentation/ComponentEvents.md +0 -54
  289. package/front_end/ui/components/docs/building-ui-documentation/ComponentPerformance.md +0 -136
  290. package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +0 -242
  291. package/front_end/ui/components/docs/building-ui-documentation/README.md +0 -23
  292. package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +0 -66
  293. package/front_end/ui/components/docs/building-ui-documentation/TestingComponents.md +0 -111
  294. package/front_end/ui/components/docs/component_docs.ts +0 -24
  295. package/front_end/ui/components/docs/component_docs_styles.css +0 -53
  296. package/front_end/ui/components/docs/create_breadcrumbs.ts +0 -44
  297. package/front_end/ui/components/docs/slider/basic.html +0 -20
  298. package/front_end/ui/components/docs/switch/basic.html +0 -20
  299. /package/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
  300. /package/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
  301. /package/front_end/{core/platform → ui/legacy}/DOMUtilities.ts +0 -0
@@ -49,6 +49,7 @@ import objectPropertiesSectionStyles from './objectPropertiesSection.css.js';
49
49
  import objectValueStyles from './objectValue.css.js';
50
50
  import {RemoteObjectPreviewFormatter, renderNodeTitle} from './RemoteObjectPreviewFormatter.js';
51
51
 
52
+ const {widgetConfig} = UI.Widget;
52
53
  const {ref, repeat, ifDefined, classMap} = Directives;
53
54
  const UIStrings = {
54
55
  /**
@@ -135,7 +136,6 @@ const UIStrings = {
135
136
  } as const;
136
137
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/object_ui/ObjectPropertiesSection.ts', UIStrings);
137
138
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
138
- const EXPANDABLE_MAX_LENGTH = 50;
139
139
  const EXPANDABLE_MAX_DEPTH = 100;
140
140
 
141
141
  const objectPropertiesSectionMap = new WeakMap<Element, ObjectPropertiesSection>();
@@ -639,13 +639,16 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
639
639
  const text = JSON.stringify(description);
640
640
  const tooLong = description.length > maxRenderableStringLength;
641
641
  return html`<span class="value object-value-string" title=${ifDefined(tooLong ? undefined : description)}>${
642
- tooLong ? new ExpandableTextPropertyValue(text, EXPANDABLE_MAX_LENGTH).element : text}</span>`;
642
+ tooLong ? html`<devtools-widget .widgetConfig=${
643
+ widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
644
+ text}</span>`;
643
645
  }
644
646
  if (type === 'object' && subtype === 'trustedtype') {
645
647
  const text = `${className} '${description}'`;
646
648
  const tooLong = text.length > maxRenderableStringLength;
647
649
  return html`<span class="value object-value-trustedtype" title=${ifDefined(tooLong ? undefined : text)}>${
648
- tooLong ? new ExpandableTextPropertyValue(text, EXPANDABLE_MAX_LENGTH).element :
650
+ tooLong ? html`<devtools-widget .widgetConfig=${
651
+ widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
649
652
  html`${className} <span class=object-value-string title=${description}>${
650
653
  JSON.stringify(description)}</span>`}</span>`;
651
654
  }
@@ -663,8 +666,9 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
663
666
  >${renderNodeTitle(description)}</span>`;
664
667
  }
665
668
  if (description.length > maxRenderableStringLength) {
666
- return html`<span class="value object-value-${subtype || type}" title=${description}>${
667
- new ExpandableTextPropertyValue(description, EXPANDABLE_MAX_LENGTH).element}</span>`;
669
+ return html`<span class="value object-value-${subtype || type}" title=${description}><devtools-widget
670
+ .widgetConfig=${
671
+ widgetConfig(ExpandableTextPropertyValue, {text: description})}></devtools-widget></span>`;
668
672
  }
669
673
  const hasPreview = value.preview && showPreview;
670
674
  return html`<span class="value object-value-${subtype || type}" title=${description}>${
@@ -992,7 +996,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
992
996
  private linkifier: Components.Linkifier.Linkifier|undefined;
993
997
  private readonly maxNumPropertiesToShow: number;
994
998
  readOnly!: boolean;
995
- private prompt!: ObjectPropertyPrompt|undefined;
996
999
  #editing = false;
997
1000
  readonly #view: TreeElementView;
998
1001
  #completions: string[] = [];
@@ -1107,39 +1110,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1107
1110
  treeNode.appendChild(infoElement);
1108
1111
  }
1109
1112
 
1110
- static createRemoteObjectAccessorPropertySpan(
1111
- object: SDK.RemoteObject.RemoteObject|null, propertyPath: string[],
1112
- callback: (arg0: SDK.RemoteObject.CallFunctionResult) => void): HTMLElement {
1113
- const rootElement = document.createElement('span');
1114
- const element = rootElement.createChild('span');
1115
- element.textContent = i18nString(UIStrings.dots);
1116
- if (!object) {
1117
- return rootElement;
1118
- }
1119
- element.classList.add('object-value-calculate-value-button');
1120
- UI.Tooltip.Tooltip.install(element, i18nString(UIStrings.invokePropertyGetter));
1121
- element.addEventListener('click', onInvokeGetterClick, false);
1122
-
1123
- function onInvokeGetterClick(event: Event): void {
1124
- event.consume();
1125
- if (object) {
1126
- void object.callFunction(invokeGetter, [{value: JSON.stringify(propertyPath)}]).then(callback);
1127
- }
1128
- }
1129
-
1130
- function invokeGetter(this: Object, arrayStr: string): Object {
1131
- let result: Object = this;
1132
- const properties = JSON.parse(arrayStr);
1133
- for (let i = 0, n = properties.length; i < n; ++i) {
1134
- // @ts-expect-error callFunction expects this to be a generic Object, so while this works we can't be more specific on types.
1135
- result = result[properties[i]];
1136
- }
1137
- return result;
1138
- }
1139
-
1140
- return rootElement;
1141
- }
1142
-
1143
1113
  get nameElement(): Element|undefined {
1144
1114
  return this.#nameElement;
1145
1115
  }
@@ -1623,13 +1593,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
1623
1593
  static sparseIterationThreshold = 250000;
1624
1594
  }
1625
1595
 
1626
- export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
1627
- constructor() {
1628
- super();
1629
- this.initialize(TextEditor.JavaScript.completeInContext);
1630
- }
1631
- }
1632
-
1633
1596
  export class ObjectPropertiesSectionsTreeExpandController {
1634
1597
  static readonly #propertyPathCache = new WeakMap<UI.TreeOutline.TreeElement, string>();
1635
1598
  static readonly #sectionMap = new WeakMap<RootElement, string>();
@@ -1740,89 +1703,102 @@ export class Renderer implements UI.UIUtils.Renderer {
1740
1703
  }
1741
1704
  }
1742
1705
 
1743
- export class ExpandableTextPropertyValue {
1744
- private readonly text: string;
1745
- private readonly maxLength: number;
1746
- private readonly maxDisplayableTextLength: number;
1747
- readonly #byteCount: number;
1748
- #expanded = false;
1749
- #element: DocumentFragment;
1750
-
1751
- constructor(text: string, maxLength: number) {
1752
- this.#element = document.createDocumentFragment();
1753
- this.text = text;
1754
- this.maxLength = maxLength;
1755
- this.maxDisplayableTextLength = 10000000;
1756
- this.#byteCount = Platform.StringUtilities.countWtf8Bytes(text);
1757
- this.#render();
1758
- }
1759
-
1760
- get element(): DocumentFragment {
1761
- return this.#element;
1762
- }
1763
-
1764
- #render(): void {
1765
- const totalBytesText = i18n.ByteUtilities.bytesToString(this.#byteCount);
1766
- const onContextMenu = (e: Event): void => {
1767
- const {target} = e;
1768
- if (!(target instanceof Element)) {
1769
- return;
1770
- }
1771
- const listItem = target.closest('li');
1772
- const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
1773
- if (!(element instanceof ObjectPropertyTreeElement)) {
1774
- return;
1775
- }
1776
- const contextMenu = element.getContextMenu(e);
1777
- if (this.text.length < this.maxDisplayableTextLength && !this.#expanded) {
1778
- contextMenu.clipboardSection().appendItem(
1779
- i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), this.expandText.bind(this),
1780
- {jslogContext: 'show-more'});
1781
- }
1706
+ interface ExpandableTextViewInput {
1707
+ copyText: () => void;
1708
+ expandText: () => void;
1709
+ expanded: boolean;
1710
+ maxLength: number;
1711
+ byteCount: number;
1712
+ text: string;
1713
+ }
1714
+ type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
1715
+ export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
1716
+ const totalBytesText = i18n.ByteUtilities.bytesToString(input.byteCount);
1717
+ const canExpand = input.text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
1718
+ const onContextMenu = (e: Event): void => {
1719
+ const {target} = e;
1720
+ if (!(target instanceof Element)) {
1721
+ return;
1722
+ }
1723
+ const listItem = target.closest('li');
1724
+ const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
1725
+ if (!(element instanceof ObjectPropertyTreeElement)) {
1726
+ return;
1727
+ }
1728
+ const contextMenu = element.getContextMenu(e);
1729
+ if (canExpand && !input.expanded) {
1782
1730
  contextMenu.clipboardSection().appendItem(
1783
- i18nString(UIStrings.copy), this.copyText.bind(this), {jslogContext: 'copy'});
1784
- void contextMenu.show();
1785
- e.consume(true);
1786
- };
1731
+ i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), input.expandText, {jslogContext: 'show-more'});
1732
+ }
1733
+ contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copy), input.copyText, {jslogContext: 'copy'});
1734
+ void contextMenu.show();
1735
+ e.consume(true);
1736
+ };
1787
1737
 
1788
- const croppedText = this.text.slice(0, this.maxLength);
1738
+ const croppedText = input.text.slice(0, input.maxLength);
1789
1739
 
1790
- // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
1791
- render(
1792
- // clang-format off
1740
+ render(
1741
+ // clang-format off
1793
1742
  html`<span title=${croppedText + '…'} @contextmenu=${onContextMenu}>
1794
- ${this.#expanded ? this.text : croppedText}
1743
+ ${input.expanded ? input.text : croppedText}
1795
1744
  <button
1796
- ?hidden=${this.#expanded}
1797
- @click=${this.#canExpand ? this.expandText.bind(this) : undefined}
1798
- jslog=${ifDefined(this.#canExpand ? VisualLogging.action('expand').track({click: true}) : undefined)}
1799
- class=${this.#canExpand ? 'expandable-inline-button' : 'undisplayable-text'}
1800
- data-text=${this.#canExpand ? i18nString(UIStrings.showMoreS, {PH1: totalBytesText}) :
1745
+ ?hidden=${input.expanded}
1746
+ @click=${canExpand ? input.expandText : undefined}
1747
+ jslog=${ifDefined(canExpand ? VisualLogging.action('expand').track({click: true}) : undefined)}
1748
+ class=${canExpand ? 'expandable-inline-button' : 'undisplayable-text'}
1749
+ data-text=${canExpand ? i18nString(UIStrings.showMoreS, {PH1: totalBytesText}) :
1801
1750
  i18nString(UIStrings.longTextWasTruncatedS, {PH1: totalBytesText})}
1802
1751
  ></button>
1803
1752
  <button
1804
1753
  class=expandable-inline-button
1805
- @click=${this.copyText.bind(this)}
1754
+ @click=${input.copyText}
1806
1755
  data-text=${i18nString(UIStrings.copy)}
1807
1756
  jslog=${VisualLogging.action('copy').track({click: true})}
1808
1757
  ></button>
1809
1758
  </span>`,
1810
- // clang-format on
1811
- this.#element);
1759
+ // clang-format on
1760
+ target);
1761
+ };
1762
+
1763
+ export class ExpandableTextPropertyValue extends UI.Widget.Widget {
1764
+ static readonly MAX_DISPLAYABLE_TEXT_LENGTH = 10000000;
1765
+ static readonly EXPANDABLE_MAX_LENGTH = 50;
1766
+ #text = '';
1767
+ #byteCount = 0;
1768
+ #expanded = false;
1769
+ #maxLength = ExpandableTextPropertyValue.EXPANDABLE_MAX_LENGTH;
1770
+ readonly #view: ExpandableTextView;
1771
+
1772
+ constructor(target?: HTMLElement, view = EXPANDABLE_TEXT_DEFAULT_VIEW) {
1773
+ super(target);
1774
+ this.#view = view;
1812
1775
  }
1813
1776
 
1814
- get #canExpand(): boolean {
1815
- return this.text.length < this.maxDisplayableTextLength;
1777
+ set text(text: string) {
1778
+ this.#text = text;
1779
+ this.#byteCount = Platform.StringUtilities.countWtf8Bytes(text);
1780
+ this.requestUpdate();
1816
1781
  }
1817
1782
 
1818
- private expandText(): void {
1819
- if (!this.#expanded) {
1820
- this.#expanded = true;
1821
- this.#render();
1822
- }
1783
+ set maxLength(maxLength: number) {
1784
+ this.#maxLength = maxLength;
1785
+ this.requestUpdate();
1823
1786
  }
1824
1787
 
1825
- private copyText(): void {
1826
- Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.text);
1788
+ override performUpdate(): void {
1789
+ const input: ExpandableTextViewInput = {
1790
+ copyText: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#text),
1791
+ expandText: () => {
1792
+ if (!this.#expanded) {
1793
+ this.#expanded = true;
1794
+ this.requestUpdate();
1795
+ }
1796
+ },
1797
+ expanded: this.#expanded,
1798
+ byteCount: this.#byteCount,
1799
+ maxLength: this.#maxLength,
1800
+ text: this.#text,
1801
+ };
1802
+ this.#view(input, {}, this.contentElement);
1827
1803
  }
1828
1804
  }
@@ -8,7 +8,6 @@ import type * as Protocol from '../../../../generated/protocol.js';
8
8
  import * as Bindings from '../../../../models/bindings/bindings.js';
9
9
  import type * as CPUProfile from '../../../../models/cpu_profile/cpu_profile.js';
10
10
  import * as Workspace from '../../../../models/workspace/workspace.js';
11
- import * as SourceFrame from '../source_frame/source_frame.js';
12
11
 
13
12
  let performanceInstance: Performance;
14
13
 
@@ -16,7 +15,7 @@ export class Performance {
16
15
  private readonly helper: Helper;
17
16
 
18
17
  private constructor() {
19
- this.helper = new Helper(SourceFrame.SourceFrame.DecoratorType.PERFORMANCE);
18
+ this.helper = new Helper(Workspace.UISourceCode.DecoratorType.PERFORMANCE);
20
19
  }
21
20
 
22
21
  static instance(opts: {
@@ -50,7 +49,8 @@ export class Performance {
50
49
  const lineInfo = node.positionTicks[j];
51
50
  const line = lineInfo.line;
52
51
  const time = lineInfo.ticks * sampleDuration;
53
- this.helper.addLineData(target, node.url, line, time);
52
+ // Since no column number is provided by legacy profile, default to 1 (beginning of line).
53
+ this.helper.addLocationData(target, node.url, {line, column: 1}, time);
54
54
  }
55
55
  }
56
56
  }
@@ -62,13 +62,14 @@ export class Performance {
62
62
  this.helper.scheduleUpdate();
63
63
  return;
64
64
  }
65
- if (!profile.samples) {
65
+ if (!profile.samples || !profile.columns) {
66
66
  return;
67
67
  }
68
68
 
69
69
  for (let i = 1; i < profile.samples.length; ++i) {
70
70
  const line = profile.lines[i];
71
- if (!line) {
71
+ const column = profile.columns?.[i];
72
+ if (!line || !column) {
72
73
  continue;
73
74
  }
74
75
  const node = profile.nodeByIndex(i);
@@ -80,7 +81,7 @@ export class Performance {
80
81
  continue;
81
82
  }
82
83
  const time = profile.timestamps[i] - profile.timestamps[i - 1];
83
- this.helper.addLineData(target, scriptIdOrUrl, line, time);
84
+ this.helper.addLocationData(target, scriptIdOrUrl, {line, column}, time);
84
85
  }
85
86
  this.helper.scheduleUpdate();
86
87
  }
@@ -91,7 +92,7 @@ let memoryInstance: Memory;
91
92
  export class Memory {
92
93
  private readonly helper: Helper;
93
94
  private constructor() {
94
- this.helper = new Helper(SourceFrame.SourceFrame.DecoratorType.MEMORY);
95
+ this.helper = new Helper(Workspace.UISourceCode.DecoratorType.MEMORY);
95
96
  }
96
97
 
97
98
  static instance(opts: {
@@ -124,43 +125,55 @@ export class Memory {
124
125
  return;
125
126
  }
126
127
  const line = node.callFrame.lineNumber + 1;
127
- helper.addLineData(target, script, line, node.selfSize);
128
+ // Since no column number is provided by the heap profile, default to 1 (beginning of line).
129
+ helper.addLocationData(target, script, {line, column: 1}, node.selfSize);
128
130
  }
129
131
  }
130
132
  }
131
133
 
132
134
  export class Helper {
133
- private readonly type: string;
135
+ private readonly type: Workspace.UISourceCode.DecoratorType;
134
136
  private readonly locationPool = new Bindings.LiveLocation.LiveLocationPool();
135
137
  private updateTimer: number|null = null;
136
- private lineData =
137
- new Map<SDK.Target.Target|null, Map<Platform.DevToolsPath.UrlString|number, Map<number, number>>>();
138
-
139
- constructor(type: string) {
138
+ /**
139
+ * Given a location in a script (with line and column numbers being 1-based) stores
140
+ * the time spent at that location in a performance profile.
141
+ */
142
+ private locationData =
143
+ new Map<SDK.Target.Target|null, Map<Platform.DevToolsPath.UrlString|number, Map<number, Map<number, number>>>>();
144
+ constructor(type: Workspace.UISourceCode.DecoratorType) {
140
145
  this.type = type;
141
146
  this.reset();
142
147
  }
143
148
 
144
149
  reset(): void {
145
150
  // The second map uses string keys for script URLs and numbers for scriptId.
146
- this.lineData = new Map();
151
+ this.locationData = new Map();
147
152
  this.scheduleUpdate();
148
153
  }
149
154
 
150
- addLineData(
151
- target: SDK.Target.Target|null, scriptIdOrUrl: Platform.DevToolsPath.UrlString|number, line: number,
152
- data: number): void {
153
- let targetData = this.lineData.get(target);
155
+ /**
156
+ * Stores the time taken running a given script location (line and column)
157
+ */
158
+ addLocationData(
159
+ target: SDK.Target.Target|null, scriptIdOrUrl: Platform.DevToolsPath.UrlString|number,
160
+ {line, column}: {line: number, column: number}, data: number): void {
161
+ let targetData = this.locationData.get(target);
154
162
  if (!targetData) {
155
163
  targetData = new Map();
156
- this.lineData.set(target, targetData);
164
+ this.locationData.set(target, targetData);
157
165
  }
158
166
  let scriptData = targetData.get(scriptIdOrUrl);
159
167
  if (!scriptData) {
160
168
  scriptData = new Map();
161
169
  targetData.set(scriptIdOrUrl, scriptData);
162
170
  }
163
- scriptData.set(line, (scriptData.get(line) || 0) + data);
171
+ let lineData = scriptData.get(line);
172
+ if (!lineData) {
173
+ lineData = new Map();
174
+ scriptData.set(line, lineData);
175
+ }
176
+ lineData.set(column, (lineData.get(column) || 0) + data);
164
177
  }
165
178
 
166
179
  scheduleUpdate(): void {
@@ -176,10 +189,9 @@ export class Helper {
176
189
  private async doUpdate(): Promise<void> {
177
190
  this.locationPool.disposeAll();
178
191
  // Map from sources to line->value profile maps.
179
- const decorationsBySource = new Map<Workspace.UISourceCode.UISourceCode, Map<number, number>>();
192
+ const decorationsBySource = new Map<Workspace.UISourceCode.UISourceCode, Map<number, Map<number, number>>>();
180
193
  const pending: Array<Promise<void>> = [];
181
-
182
- for (const [target, scriptToLineMap] of this.lineData) {
194
+ for (const [target, scriptToLineMap] of this.locationData) {
183
195
  const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;
184
196
  for (const [scriptIdOrUrl, lineToDataMap] of scriptToLineMap) {
185
197
  // debuggerModel is null when the profile is loaded from file.
@@ -187,23 +199,34 @@ export class Helper {
187
199
  const workspace = Workspace.Workspace.WorkspaceImpl.instance();
188
200
  if (debuggerModel) {
189
201
  const workspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
190
- for (const lineToData of lineToDataMap) {
191
- const line = lineToData[0] - 1;
192
- const data = lineToData[1];
193
- const rawLocation = typeof scriptIdOrUrl === 'string' ?
194
- debuggerModel.createRawLocationByURL(scriptIdOrUrl, line, 0) :
195
- debuggerModel.createRawLocationByScriptId(String(scriptIdOrUrl) as Protocol.Runtime.ScriptId, line, 0);
196
- if (rawLocation) {
197
- pending.push(workspaceBinding.rawLocationToUILocation(rawLocation).then(uiLocation => {
198
- if (uiLocation) {
199
- let lineMap = decorationsBySource.get(uiLocation.uiSourceCode);
200
- if (!lineMap) {
201
- lineMap = new Map<number, number>();
202
- decorationsBySource.set(uiLocation.uiSourceCode, lineMap);
203
- }
204
- lineMap.set(uiLocation.lineNumber + 1, data);
202
+ for (const [lineNumber, lineData] of lineToDataMap) {
203
+ // lineData contains profiling data by column.
204
+ for (const [columnNumber, data] of lineData) {
205
+ const zeroBasedLine = lineNumber - 1;
206
+ const zeroBasedColumn = columnNumber - 1;
207
+ if (target) {
208
+ const rawLocation = typeof scriptIdOrUrl === 'string' ?
209
+ debuggerModel.createRawLocationByURL(scriptIdOrUrl, zeroBasedLine, zeroBasedColumn || 0) :
210
+ debuggerModel.createRawLocationByScriptId(
211
+ String(scriptIdOrUrl) as Protocol.Runtime.ScriptId, zeroBasedLine, zeroBasedColumn || 0);
212
+ if (rawLocation) {
213
+ pending.push(workspaceBinding.rawLocationToUILocation(rawLocation).then(uiLocation => {
214
+ if (uiLocation) {
215
+ let lineMap = decorationsBySource.get(uiLocation.uiSourceCode);
216
+ if (!lineMap) {
217
+ lineMap = new Map<number, Map<number, number>>();
218
+ decorationsBySource.set(uiLocation.uiSourceCode, lineMap);
219
+ }
220
+ let columnMap = lineMap.get(lineNumber);
221
+ if (!columnMap) {
222
+ columnMap = new Map<number, number>();
223
+ lineMap.set(lineNumber, columnMap);
224
+ }
225
+ columnMap.set((zeroBasedColumn || 0) + 1, data);
226
+ }
227
+ }));
205
228
  }
206
- }));
229
+ }
207
230
  }
208
231
  }
209
232
  } else if (typeof scriptIdOrUrl === 'string') {
@@ -176,7 +176,7 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
176
176
 
177
177
  this.parentElement.addEventListener('wheel', this.onMouseWheel.bind(this), true);
178
178
  this.parentElement.addEventListener('dblclick', this.resizeWindowMaximum.bind(this), true);
179
- Platform.DOMUtilities.appendStyle(this.parentElement, overviewGridStyles);
179
+ UI.DOMUtilities.appendStyle(this.parentElement, overviewGridStyles);
180
180
 
181
181
  this.leftResizeElement = parentElement.createChild('div', 'overview-grid-window-resizer');
182
182
  UI.UIUtils.installDragHandle(
@@ -33,8 +33,8 @@
33
33
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
34
  */
35
35
 
36
- import * as Platform from '../../../../core/platform/platform.js';
37
36
  import type * as NetworkTimeCalculator from '../../../../models/network_time_calculator/network_time_calculator.js';
37
+ import * as UI from '../../legacy.js';
38
38
  import * as ThemeSupport from '../../theme_support/theme_support.js';
39
39
 
40
40
  import {DEFAULT_FONT_SIZE, getFontFamilyForCanvas} from './Font.js';
@@ -51,7 +51,7 @@ export class TimelineGrid {
51
51
 
52
52
  constructor() {
53
53
  this.element = document.createElement('div');
54
- Platform.DOMUtilities.appendStyle(this.element, timelineGridStyles);
54
+ UI.DOMUtilities.appendStyle(this.element, timelineGridStyles);
55
55
 
56
56
  this.#dividersElement = this.element.createChild('div', 'resources-dividers');
57
57
 
@@ -121,7 +121,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
121
121
  private readonly lazyContent: () => Promise<TextUtils.ContentData.ContentDataOrError>;
122
122
  private prettyInternal: boolean;
123
123
  private rawContent: string|CodeMirror.Text|null;
124
- private formattedMap: Formatter.ScriptFormatter.FormatterSourceMapping|null;
124
+ protected formattedMap: Formatter.ScriptFormatter.FormatterSourceMapping|null;
125
125
  private readonly prettyToggle: UI.Toolbar.ToolbarToggle;
126
126
  private shouldAutoPrettyPrint: boolean;
127
127
  private readonly progressToolbarItem: UI.Toolbar.ToolbarItem;
@@ -400,6 +400,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
400
400
  newSelection = textEditor.createSelection(
401
401
  {lineNumber: start[0], columnNumber: start[1]}, {lineNumber: end[0], columnNumber: end[1]});
402
402
  } else {
403
+ this.formattedMap = null;
403
404
  await this.setContent(this.rawContent || '');
404
405
  this.baseDoc = textEditor.state.doc;
405
406
  const start = this.prettyToRawLocation(startPos.lineNumber, startPos.columnNumber);
@@ -1051,12 +1052,6 @@ export interface Transformer {
1051
1052
  };
1052
1053
  }
1053
1054
 
1054
- export const enum DecoratorType {
1055
- PERFORMANCE = 'performance',
1056
- MEMORY = 'memory',
1057
- COVERAGE = 'coverage',
1058
- }
1059
-
1060
1055
  const config = {
1061
1056
  editable: new CodeMirror.Compartment(),
1062
1057
  language: new CodeMirror.Compartment(),
@@ -1135,8 +1130,7 @@ const searchHighlighter = CodeMirror.ViewPlugin.fromClass(class {
1135
1130
  }
1136
1131
  if (match[0].length) {
1137
1132
  const start = pos + match.index, end = start + match[0].length;
1138
- const current =
1139
- active.currentRange && active.currentRange.from === start && active.currentRange.to === end;
1133
+ const current = active.currentRange?.from === start && active.currentRange.to === end;
1140
1134
  builder.add(start, end, current ? currentSearchMatchDeco : searchMatchDeco);
1141
1135
  } else {
1142
1136
  active.regexp.regex.lastIndex = match.index + 1;