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
@@ -14,6 +14,7 @@ import * as Root from '../../core/root/root.js';
14
14
  import * as SDK from '../../core/sdk/sdk.js';
15
15
  import * as Logs from '../../models/logs/logs.js';
16
16
  import * as Buttons from '../../ui/components/buttons/buttons.js';
17
+ import * as uiI18n from '../../ui/i18n/i18n.js';
17
18
  import * as UI from '../../ui/legacy/legacy.js';
18
19
  import {Directives, html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
19
20
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
@@ -38,6 +39,10 @@ const UIStrings = {
38
39
  * @description Tooltip text that appears when hovering over the plus button in the Blocked URLs Pane of the Network panel
39
40
  */
40
41
  addPattern: 'Add pattern',
42
+ /**
43
+ * @description Tooltip text that appears when hovering over the plus button in the Blocked URLs Pane of the Network panel
44
+ */
45
+ addRule: 'Add rule',
41
46
  /**
42
47
  * @description Accessible label for the button to add request blocking patterns in the network request blocking tool
43
48
  */
@@ -53,7 +58,13 @@ const UIStrings = {
53
58
  /**
54
59
  * @description Text that shows in the network request blocking panel if no pattern has yet been added.
55
60
  */
56
- noPattern: 'No request throttling or blocking patterns',
61
+ noPattern: 'Nothing throttled or blocked',
62
+ /**
63
+ * @description Text that shows in the network request blocking panel if no pattern has yet been added.
64
+ * @example {Learn more} PH1
65
+ */
66
+ noThrottlingOrBlockingPattern:
67
+ `To throttle or block a network request, add a rule here manually or via the network panel's context menu. {PH1}`,
57
68
  /**
58
69
  * @description Text that shows in the network request blocking panel if no pattern has yet been added.
59
70
  * @example {Add pattern} PH1
@@ -75,8 +86,9 @@ const UIStrings = {
75
86
  textPatternToBlockMatching: 'Text pattern to block matching requests; use * for wildcard',
76
87
  /**
77
88
  * @description Text in Blocked URLs Pane of the Network panel
89
+ * @example {Learn more} PH1
78
90
  */
79
- textEditPattern: 'Text pattern to block or throttle matching requests; use URLPattern syntax.',
91
+ textEditPattern: 'Text pattern to block or throttle matching requests; use URL Pattern syntax. {PH1}',
80
92
  /**
81
93
  * @description Error text for empty list widget input in Request Blocking tool
82
94
  */
@@ -107,13 +119,46 @@ const UIStrings = {
107
119
  */
108
120
  learnMore: 'Learn more',
109
121
  /**
110
- * @description Aria label on a button moving an entry up
122
+ * @description Accessibility label on a `Learn more` link
123
+ */
124
+ learnMoreLabel: 'Learn more about URL pattern syntax',
125
+ /**
126
+ * @description Tooltip on a button moving an entry up
127
+ * @example {*://example.com} PH1
128
+ */
129
+ increasePriority: 'Move up {PH1}',
130
+ /**
131
+ * @description Tooltip on a button moving an entry down
132
+ * @example {*://example.com} PH1
133
+ */
134
+ decreasePriority: 'Move down {PH1}',
135
+ /**
136
+ * @description Tooltip on a checkbox togging the effects for a pattern
137
+ * @example {*://example.com} PH1
138
+ */
139
+ enableThrottlingToggleLabel: 'Throttle or block {PH1}',
140
+ /**
141
+ * @description Tooltip on a combobox selecting the request conditions
111
142
  */
112
- increasePriority: 'Move up (higher patterns are checked first)',
143
+ requestConditionsLabel: 'Request conditions',
113
144
  /**
114
- * @description Aria label on a button moving an entry down
145
+ * @description Aria announcement when a pattern was moved up
115
146
  */
116
- decreasePriority: 'Move down (higher patterns are checked first)',
147
+ patternMovedUp: 'URL pattern was moved up',
148
+ /**
149
+ * @description Aria announcemenet when a pattern was moved down
150
+ */
151
+ patternMovedDown: 'URL pattern was moved down',
152
+ /**
153
+ * @description Text on a button to start editing text
154
+ * @example {*://example.com} PH1
155
+ */
156
+ editPattern: 'Edit {PH1}',
157
+ /**
158
+ * @description Label for an item to remove something
159
+ * @example {*://example.com} PH1
160
+ */
161
+ removePattern: 'Remove {PH1}',
117
162
  } as const;
118
163
  const str_ = i18n.i18n.registerUIStrings('panels/network/RequestConditionsDrawer.ts', UIStrings);
119
164
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -155,26 +200,24 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
155
200
  ? i18nString(UIStrings.noPattern)
156
201
  : i18nString(UIStrings.noNetworkRequestsBlocked)}</span>
157
202
  <div class=empty-state-description>
158
- <span>${i18nString(UIStrings.addPatternToBlock, {PH1: i18nString(UIStrings.addPattern)})}</span>
159
- <x-link
160
- href=${NETWORK_REQUEST_BLOCKING_EXPLANATION_URL}
161
- tabindex=0
162
- class=devtools-link
163
- jslog=${VisualLogging.link().track({click: true, keydown:'Enter|Space'}).context('learn-more')}>
164
- ${i18nString(UIStrings.learnMore)}
165
- </x-link>
203
+ ${individualThrottlingEnabled
204
+ ? uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.noThrottlingOrBlockingPattern, {PH1: learnMore()})
205
+ : html`<span>${i18nString(UIStrings.addPatternToBlock,
206
+ {PH1: i18nString(UIStrings.addPattern)})}</span>${learnMore()}`}
166
207
  </div>
167
208
  <devtools-button
168
209
  @click=${input.addPattern}
169
210
  class=add-button
170
211
  .jslogContext=${'network.add-network-request-blocking-pattern'}
171
- aria-label=${individualThrottlingEnabled ? i18nString(UIStrings.addPatternLabel)
212
+ title=${individualThrottlingEnabled ? i18nString(UIStrings.addPatternLabel)
172
213
  : i18nString(UIStrings.addNetworkRequestBlockingPattern)}
173
214
  .variant=${Buttons.Button.Variant.TONAL}>
174
- ${i18nString(UIStrings.addPattern)}
215
+ ${individualThrottlingEnabled ? i18nString(UIStrings.addRule) : i18nString(UIStrings.addPattern)}
175
216
  </devtools-button>
176
217
  </div>
177
- <devtools-widget .widgetConfig=${UI.Widget.widgetConfig(UI.Widget.VBox)}>${input.list.element}</devtools-widget>
218
+ <devtools-widget .widgetConfig=${UI.Widget.widgetConfig(UI.Widget.VBox)}>
219
+ ${input.list.element}
220
+ </devtools-widget>
178
221
  `,
179
222
  // clang-format on
180
223
  target);
@@ -358,6 +401,12 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
358
401
  const element = document.createElement('div');
359
402
  this.#listElements.set(condition, element);
360
403
  element.classList.add('blocked-url');
404
+ this.updateItem(element, condition, editable, index);
405
+ return element;
406
+ }
407
+
408
+ updateItem(element: HTMLElement, condition: SDK.NetworkManager.RequestCondition, editable: boolean, index: number):
409
+ void {
361
410
  const toggle = (e: Event): void => {
362
411
  if (editable) {
363
412
  e.consume(true);
@@ -375,12 +424,14 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
375
424
  if (Root.Runtime.hostConfig.devToolsIndividualRequestThrottling?.enabled) {
376
425
  const moveUp = (e: Event): void => {
377
426
  if (this.manager.requestConditions.conditionsEnabled) {
427
+ UI.ARIAUtils.LiveAnnouncer.status(i18nString(UIStrings.patternMovedUp));
378
428
  e.consume(true);
379
429
  this.manager.requestConditions.increasePriority(condition);
380
430
  }
381
431
  };
382
432
  const moveDown = (e: Event): void => {
383
433
  if (this.manager.requestConditions.conditionsEnabled) {
434
+ UI.ARIAUtils.LiveAnnouncer.status(i18nString(UIStrings.patternMovedDown));
384
435
  e.consume(true);
385
436
  this.manager.requestConditions.decreasePriority(condition);
386
437
  }
@@ -391,22 +442,25 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
391
442
  <input class=blocked-url-checkbox
392
443
  @click=${toggle}
393
444
  type=checkbox
394
- ?checked=${enabled}
395
- ?disabled=${!editable || !originalOrUpgradedURLPattern}
396
- .jslog=${VisualLogging.toggle().track({ change: true })}>
397
- <devtools-button
398
- .iconName=${'arrow-down'}
399
- .variant=${Buttons.Button.Variant.ICON}
400
- .title=${i18nString(UIStrings.increasePriority)}
401
- .jslogContext=${'increase-priority'}
402
- @click=${moveDown}></devtools-button>
445
+ title=${i18nString(UIStrings.enableThrottlingToggleLabel, {PH1: constructorStringOrWildcardURL})}
446
+ .checked=${enabled}
447
+ .disabled=${!editable || !originalOrUpgradedURLPattern}
448
+ jslog=${VisualLogging.toggle().track({ change: true })}>
403
449
  <devtools-button
404
450
  .iconName=${'arrow-up'}
405
451
  .variant=${Buttons.Button.Variant.ICON}
406
- .title=${i18nString(UIStrings.decreasePriority)}
452
+ .title=${i18nString(UIStrings.decreasePriority, {PH1: constructorStringOrWildcardURL})}
407
453
  .jslogContext=${'decrease-priority'}
454
+ ?disabled=${!editable || !originalOrUpgradedURLPattern}
408
455
  @click=${moveUp}>
409
456
  </devtools-button>
457
+ <devtools-button
458
+ .iconName=${'arrow-down'}
459
+ .variant=${Buttons.Button.Variant.ICON}
460
+ .title=${i18nString(UIStrings.increasePriority, {PH1: constructorStringOrWildcardURL})}
461
+ .jslogContext=${'increase-priority'}
462
+ ?disabled=${!editable || !originalOrUpgradedURLPattern}
463
+ @click=${moveDown}></devtools-button>
410
464
  ${originalOrUpgradedURLPattern ? html`
411
465
  <devtools-tooltip variant=rich jslogcontext=url-pattern id=url-pattern-${index}>
412
466
  <div>hash: ${originalOrUpgradedURLPattern.hash}</div>
@@ -439,22 +493,26 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
439
493
  </devtools-tooltip>`: nothing}
440
494
  <div
441
495
  @click=${toggle}
496
+ ?disabled=${!editable || !originalOrUpgradedURLPattern}
442
497
  class=blocked-url-label
443
498
  aria-details=url-pattern-${index}>
444
499
  ${constructorStringOrWildcardURL}
445
500
  </div>
446
501
  <devtools-widget
447
502
  class=conditions-selector
448
- ?disabled=${!editable}
503
+ title=${i18nString(UIStrings.requestConditionsLabel)}
449
504
  .widgetConfig=${UI.Widget.widgetConfig(
450
505
  MobileThrottling.NetworkThrottlingSelector.NetworkThrottlingSelectorWidget, {
451
506
  variant:
452
507
  MobileThrottling.NetworkThrottlingSelector.NetworkThrottlingSelect.Variant.INDIVIDUAL_REQUEST_CONDITIONS,
453
508
  jslogContext: 'request-conditions',
509
+ disabled: !editable,
454
510
  onConditionsChanged,
455
511
  currentConditions: condition.conditions,
456
512
  })}></devtools-widget>
457
- <devtools-widget .widgetConfig=${widgetConfig(AffectedCountWidget, {condition, drawer: this})}></devtools-widget>`,
513
+ <devtools-widget
514
+ ?disabled=${!editable || !originalOrUpgradedURLPattern}
515
+ .widgetConfig=${widgetConfig(AffectedCountWidget, {condition, drawer: this})}></devtools-widget>`,
458
516
  // clang-format on
459
517
  element);
460
518
  } else {
@@ -464,15 +522,14 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
464
522
  <input class=blocked-url-checkbox
465
523
  @click=${toggle}
466
524
  type=checkbox
467
- ?checked=${condition.enabled}
468
- ?disabled=${!editable}
469
- .jslog=${VisualLogging.toggle().track({ change: true })}>
525
+ .checked=${condition.enabled}
526
+ .disabled=${!editable}
527
+ jslog=${VisualLogging.toggle().track({ change: true })}>
470
528
  <div @click=${toggle} class=blocked-url-label>${wildcardURL}</div>
471
529
  <devtools-widget .widgetConfig=${widgetConfig(AffectedCountWidget, {condition, drawer: this})}></devtools-widget>`,
472
530
  // clang-format on
473
531
  element);
474
532
  }
475
- return element;
476
533
  }
477
534
 
478
535
  private toggleEnabled(): void {
@@ -517,11 +574,12 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
517
574
  const editor = new UI.ListWidget.Editor<SDK.NetworkManager.RequestCondition>();
518
575
  const content = editor.contentElement();
519
576
  const titles = content.createChild('div', 'blocked-url-edit-row');
520
- const label = titles.createChild('div');
577
+ const label = titles.createChild('label');
521
578
  if (Root.Runtime.hostConfig.devToolsIndividualRequestThrottling?.enabled) {
522
- label.textContent = i18nString(UIStrings.textEditPattern);
523
- label.append(UI.XLink.XLink.create(
524
- PATTERN_API_DOCS_URL, i18nString(UIStrings.learnMore), undefined, undefined, 'learn-more'));
579
+ const learnMore = UI.XLink.XLink.create(
580
+ PATTERN_API_DOCS_URL, i18nString(UIStrings.learnMore), undefined, undefined, 'learn-more');
581
+ learnMore.title = i18nString(UIStrings.learnMoreLabel);
582
+ label.append(uiI18n.getFormatLocalizedString(str_, UIStrings.textEditPattern, {PH1: learnMore}));
525
583
  } else {
526
584
  label.textContent = i18nString(UIStrings.textPatternToBlockMatching);
527
585
  }
@@ -549,17 +607,33 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
549
607
  return {valid: true, errorMessage: undefined};
550
608
  };
551
609
  const urlInput = editor.createInput('url', 'text', '', validator);
610
+ label.htmlFor = urlInput.id = 'editor-url-input';
552
611
  fields.createChild('div', 'blocked-url-edit-value').appendChild(urlInput);
553
612
  return editor;
554
613
  }
555
614
 
556
615
  update(): void {
557
616
  const enabled = this.manager.requestConditions.conditionsEnabled;
558
- this.list.clear();
559
- for (const pattern of this.manager.requestConditions.conditions) {
560
- if (Root.Runtime.hostConfig.devToolsIndividualRequestThrottling?.enabled || pattern.wildcardURL) {
561
- this.list.appendItem(pattern, enabled);
562
- }
617
+ const newItems = Array.from(this.manager.requestConditions.conditions.filter(
618
+ pattern => Root.Runtime.hostConfig.devToolsIndividualRequestThrottling?.enabled || pattern.wildcardURL));
619
+
620
+ let oldIndex = 0;
621
+ for (; oldIndex < newItems.length; ++oldIndex) {
622
+ const pattern = newItems[oldIndex];
623
+ this.list.updateItem(
624
+ oldIndex,
625
+ pattern,
626
+ enabled,
627
+ /* focusable=*/ false,
628
+ {
629
+ edit: i18nString(UIStrings.editPattern, {PH1: pattern.constructorStringOrWildcardURL}),
630
+ delete: i18nString(UIStrings.removePattern, {PH1: pattern.constructorStringOrWildcardURL})
631
+ },
632
+ );
633
+ }
634
+
635
+ while (oldIndex < this.list.items.length) {
636
+ this.list.removeItem(oldIndex);
563
637
  }
564
638
  this.requestUpdate();
565
639
  }
@@ -175,6 +175,13 @@
175
175
  color: var(--sys-color-on-tonal-container);
176
176
  }
177
177
 
178
+ .network-log-grid.data-grid tr.selected.network-throttled-row,
179
+ .network-log-grid.data-grid tr.selected.network-throttled-row .devtools-link,
180
+ .network-log-grid.data-grid tr.selected.network-throttled-row .network-cell-subtitle,
181
+ .network-log-grid.data-grid tr.selected.network-throttled-row .network-dim-cell {
182
+ color: var(--sys-color-yellow);
183
+ }
184
+
178
185
  .network-header-subtitle {
179
186
  color: var(--sys-color-token-subtle);
180
187
  }
@@ -250,6 +257,10 @@
250
257
  }
251
258
  }
252
259
 
260
+ td.time-column {
261
+ vertical-align: middle;
262
+ }
263
+
253
264
  .data-grid-data-grid-node devtools-icon[name="arrow-up-down-circle"],
254
265
  .network-log-grid.data-grid.small .icon {
255
266
  width: 16px;
@@ -191,14 +191,16 @@ tr:has([aria-checked].network-fetch-timing-bar-clickable) ~ .network-fetch-timin
191
191
  background-color: var(--network-overview-waiting); /* stylelint-disable-line plugin/use_theme_colors */
192
192
  }
193
193
 
194
- .throttled devtools-icon {
195
- vertical-align: middle;
196
- margin-right: var(--sys-size-3);
197
- color: var(--sys-color-yellow);
198
- }
199
-
200
194
  td.throttled {
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: flex-end;
198
+ gap: var(--sys-size-3);
201
199
  color: var(--sys-color-yellow);
200
+
201
+ devtools-icon {
202
+ color: var(--sys-color-yellow);
203
+ }
202
204
  }
203
205
 
204
206
  .network-timing-bar.receiving,
@@ -32,6 +32,10 @@
32
32
  flex-direction: row;
33
33
  align-items: center;
34
34
  flex: auto;
35
+
36
+ devtools-button {
37
+ flex: none;
38
+ }
35
39
  }
36
40
 
37
41
  .blocked-url-count {
@@ -76,6 +80,11 @@
76
80
  }
77
81
 
78
82
  .conditions-selector {
79
- max-width: 120px;
83
+ width: max-content;
84
+ flex: none;
80
85
  margin: var(--sys-size-3);
81
86
  }
87
+
88
+ [disabled] {
89
+ opacity: 50%;
90
+ }
@@ -434,7 +434,7 @@ export class HeapSnapshotGridNode extends
434
434
  }
435
435
 
436
436
  // Merge with the next range.
437
- if (nextRange && newEndOfRange === nextRange.from) {
437
+ if (newEndOfRange === nextRange?.from) {
438
438
  range.to = nextRange.to;
439
439
  // Remove "show next" button if there is one.
440
440
  this.removeChildByIndex(insertionIndex);
@@ -4,6 +4,8 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import type * as PlatformApi from '../../core/platform/api/api.js';
8
+ import * as Platform from '../../core/platform/platform.js';
7
9
  import type * as HeapSnapshotModel from '../../models/heap_snapshot_model/heap_snapshot_model.js';
8
10
 
9
11
  import type {ChildrenProvider} from './ChildrenProvider.js';
@@ -27,7 +29,7 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
27
29
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
30
  callbacks: Map<number, (arg0: any) => void>;
29
31
  readonly previousCallbacks: Set<number>;
30
- readonly worker: Common.Worker.WorkerWrapper;
32
+ readonly worker: PlatformApi.HostRuntime.Worker;
31
33
  interval?: number;
32
34
  // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
33
35
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -38,8 +40,9 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
38
40
  this.nextCallId = 1;
39
41
  this.callbacks = new Map();
40
42
  this.previousCallbacks = new Set();
41
- this.worker = Common.Worker.WorkerWrapper.fromURL(
42
- new URL('../../entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js', import.meta.url));
43
+ this.worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
44
+ new URL('../../entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js', import.meta.url)
45
+ .toString());
43
46
  this.worker.onmessage = this.messageReceived.bind(this);
44
47
  }
45
48
 
@@ -74,13 +77,15 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
74
77
 
75
78
  callFactoryMethod<T extends Object>(
76
79
  callback: null, objectId: string, methodName: string, proxyConstructor: new(...arg1: any[]) => T,
77
- transfer: Transferable[], ...methodArguments: any[]): T;
80
+ transfer: PlatformApi.HostRuntime.WorkerTransferable[], ...methodArguments: any[]): T;
78
81
  callFactoryMethod<T extends Object>(
79
82
  callback: ((...arg0: any[]) => void), objectId: string, methodName: string,
80
- proxyConstructor: new(...arg1: any[]) => T, transfer: Transferable[], ...methodArguments: any[]): null;
83
+ proxyConstructor: new(...arg1: any[]) => T, transfer: PlatformApi.HostRuntime.WorkerTransferable[],
84
+ ...methodArguments: any[]): null;
81
85
  callFactoryMethod<T extends Object>(
82
86
  callback: ((...arg0: any[]) => void)|null, objectId: string, methodName: string,
83
- proxyConstructor: new(...arg1: any[]) => T, transfer: Transferable[], ...methodArguments: any[]): T|null {
87
+ proxyConstructor: new(...arg1: any[]) => T, transfer: PlatformApi.HostRuntime.WorkerTransferable[],
88
+ ...methodArguments: any[]): T|null {
84
89
  const callId = this.nextCallId++;
85
90
  const newObjectId = this.nextObjectId++;
86
91
 
@@ -164,9 +169,7 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
164
169
  return done;
165
170
  }
166
171
 
167
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
168
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
169
- messageReceived(event: MessageEvent<any>): void {
172
+ messageReceived(event: PlatformApi.HostRuntime.WorkerMessageEvent): void {
170
173
  const data = event.data;
171
174
  if (data.eventName) {
172
175
  if (this.eventHandler) {
@@ -191,9 +194,7 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
191
194
  callback(data.result);
192
195
  }
193
196
 
194
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
195
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
196
- postMessage(message: any, transfer?: Transferable[]): void {
197
+ postMessage(message: unknown, transfer?: PlatformApi.HostRuntime.WorkerTransferable[]): void {
197
198
  this.worker.postMessage(message, transfer);
198
199
  }
199
200
  }
@@ -226,8 +227,8 @@ export class HeapSnapshotProxyObject {
226
227
  }
227
228
 
228
229
  callFactoryMethodPromise<T extends Object>(
229
- methodName: string, proxyConstructor: new(...arg1: any[]) => T, transfer: Transferable[],
230
- ...args: any[]): Promise<T> {
230
+ methodName: string, proxyConstructor: new(...arg1: any[]) => T,
231
+ transfer: PlatformApi.HostRuntime.WorkerTransferable[], ...args: any[]): Promise<T> {
231
232
  return new Promise(
232
233
  resolve => this.worker.callFactoryMethod(
233
234
  resolve, String(this.objectId), methodName, proxyConstructor, transfer, ...args));
@@ -32,7 +32,6 @@ import '../../ui/legacy/legacy.js';
32
32
 
33
33
  import * as Common from '../../core/common/common.js';
34
34
  import * as i18n from '../../core/i18n/i18n.js';
35
- import * as Platform from '../../core/platform/platform.js';
36
35
  import * as SDK from '../../core/sdk/sdk.js';
37
36
  import * as IconButton from '../../ui/components/icon_button/icon_button.js';
38
37
  // eslint-disable-next-line @devtools/es-modules-import
@@ -241,7 +240,7 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp
241
240
  if (!this.toggleRecordAction.enabled()) {
242
241
  return true;
243
242
  }
244
- const toggleButton = Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);
243
+ const toggleButton = UI.DOMUtilities.deepActiveElement(this.element.ownerDocument);
245
244
  const type = this.selectedProfileType;
246
245
  if (!type) {
247
246
  return true;
@@ -451,7 +451,7 @@ export class EditorState {
451
451
  delete step.selectors;
452
452
  }
453
453
  }
454
- if (state.frame && state.frame.length === 0 && 'frame' in step) {
454
+ if (state.frame?.length === 0 && 'frame' in step) {
455
455
  delete step.frame;
456
456
  }
457
457
  return cleanUndefineds(Models.SchemaUtils.parseStep(step));
@@ -176,9 +176,7 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
176
176
  this.#securitySidebarLastItemSetting.get() === this.#cookieControlsTreeElement.elemId) {
177
177
  this.#cookieControlsTreeElement.select();
178
178
  this.#cookieControlsTreeElement.showElement();
179
- } else if (
180
- this.cookieReportTreeElement &&
181
- this.#securitySidebarLastItemSetting.get() === this.cookieReportTreeElement.elemId) {
179
+ } else if (this.#securitySidebarLastItemSetting.get() === this.cookieReportTreeElement?.elemId) {
182
180
  this.cookieReportTreeElement.select();
183
181
  this.cookieReportTreeElement.showElement();
184
182
  } else {
@@ -271,30 +271,29 @@ export class KeybindsSettingsTab extends UI.Widget.VBox implements UI.ListContro
271
271
  }
272
272
 
273
273
  private createListItems(): KeybindsItem[] {
274
- const actions = UI.ActionRegistry.ActionRegistry.instance().actions().sort((actionA, actionB) => {
275
- if (actionA.category() < actionB.category()) {
276
- return -1;
277
- }
278
- if (actionA.category() > actionB.category()) {
279
- return 1;
280
- }
281
- if (actionA.id() < actionB.id()) {
282
- return -1;
283
- }
284
- if (actionA.id() > actionB.id()) {
285
- return 1;
286
- }
287
- return 0;
288
- });
274
+ const actions = UI.ActionRegistry.ActionRegistry.instance()
275
+ .actions()
276
+ .filter(action => action.configurableBindings())
277
+ .sort((actionA, actionB) => {
278
+ if (actionA.category() < actionB.category()) {
279
+ return -1;
280
+ }
281
+ if (actionA.category() > actionB.category()) {
282
+ return 1;
283
+ }
284
+ if (actionA.id() < actionB.id()) {
285
+ return -1;
286
+ }
287
+ if (actionA.id() > actionB.id()) {
288
+ return 1;
289
+ }
290
+ return 0;
291
+ });
289
292
 
290
293
  const items: KeybindsItem[] = [];
291
294
 
292
295
  let currentCategory: UI.ActionRegistration.ActionCategory;
293
296
  actions.forEach(action => {
294
- if (action.id() === 'elements.toggle-element-search') {
295
- return;
296
- }
297
-
298
297
  if (currentCategory !== action.category()) {
299
298
  items.push(action.category());
300
299
  }
@@ -305,8 +304,8 @@ export class KeybindsSettingsTab extends UI.Widget.VBox implements UI.ListContro
305
304
  }
306
305
 
307
306
  onEscapeKeyPressed(event: Event): void {
308
- const deepActiveElement = Platform.DOMUtilities.deepActiveElement(document);
309
- if (this.editingRow && deepActiveElement && deepActiveElement.nodeName === 'INPUT') {
307
+ const deepActiveElement = UI.DOMUtilities.deepActiveElement(document);
308
+ if (this.editingRow && deepActiveElement?.nodeName === 'INPUT') {
310
309
  this.editingRow.onEscapeKeyPressed(event);
311
310
  }
312
311
  }
@@ -595,7 +594,7 @@ export class ShortcutListItem {
595
594
  }
596
595
 
597
596
  onEscapeKeyPressed(event: Event): void {
598
- const activeElement = Platform.DOMUtilities.deepActiveElement(document);
597
+ const activeElement = UI.DOMUtilities.deepActiveElement(document);
599
598
  for (const [shortcut, shortcutInput] of this.shortcutInputs.entries()) {
600
599
  if (activeElement === shortcutInput) {
601
600
  this.onShortcutInputKeyDown(shortcut, shortcutInput as HTMLInputElement, event);
@@ -385,7 +385,7 @@ function getNumberAt(node: CodeMirror.SyntaxNode): {from: number, to: number}|nu
385
385
  }
386
386
  if (node.name === 'NumberLiteral') {
387
387
  const lastChild = node.lastChild;
388
- return {from: node.from, to: lastChild && lastChild.name === 'Unit' ? lastChild.from : node.to};
388
+ return {from: node.from, to: lastChild?.name === 'Unit' ? lastChild.from : node.to};
389
389
  }
390
390
  return null;
391
391
  }
@@ -7,10 +7,10 @@ import * as i18n from '../../core/i18n/i18n.js';
7
7
  import type * as Platform from '../../core/platform/platform.js';
8
8
  import * as SDK from '../../core/sdk/sdk.js';
9
9
  import * as TextUtils from '../../models/text_utils/text_utils.js';
10
- import type * as Workspace from '../../models/workspace/workspace.js';
10
+ import * as Workspace from '../../models/workspace/workspace.js';
11
11
  import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
12
12
  import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
13
- import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
13
+ import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
14
14
  import * as UI from '../../ui/legacy/legacy.js';
15
15
  import * as Coverage from '../coverage/coverage.js';
16
16
 
@@ -123,7 +123,7 @@ export class CoveragePlugin extends Plugin {
123
123
  }
124
124
 
125
125
  private getCoverageManager(): Coverage.CoverageDecorationManager.CoverageDecorationManager|undefined {
126
- return this.uiSourceCode.getDecorationData(SourceFrame.SourceFrame.DecoratorType.COVERAGE);
126
+ return this.uiSourceCode.getDecorationData(Workspace.UISourceCode.DecoratorType.COVERAGE);
127
127
  }
128
128
 
129
129
  override editorInitialized(editor: TextEditor.TextEditor.TextEditor): void {
@@ -132,9 +132,9 @@ export class CoveragePlugin extends Plugin {
132
132
  }
133
133
  }
134
134
 
135
- override decorationChanged(type: SourceFrame.SourceFrame.DecoratorType, editor: TextEditor.TextEditor.TextEditor):
135
+ override decorationChanged(type: Workspace.UISourceCode.DecoratorType, editor: TextEditor.TextEditor.TextEditor):
136
136
  void {
137
- if (type === SourceFrame.SourceFrame.DecoratorType.COVERAGE) {
137
+ if (type === Workspace.UISourceCode.DecoratorType.COVERAGE) {
138
138
  this.startDecoUpdate(editor);
139
139
  }
140
140
  }
@@ -1108,7 +1108,7 @@ export class DebuggerPlugin extends Plugin {
1108
1108
  }
1109
1109
  if (syntaxType === 'new') {
1110
1110
  const callee = syntaxNode.parent?.getChild('Expression');
1111
- if (callee && callee.name === 'VariableName' && state.sliceDoc(callee.from, callee.to) === 'Worker') {
1111
+ if (callee?.name === 'VariableName' && state.sliceDoc(callee.from, callee.to) === 'Worker') {
1112
1112
  asyncCall = syntaxNode.parent;
1113
1113
  }
1114
1114
  }
@@ -1509,7 +1509,7 @@ export class DebuggerPlugin extends Plugin {
1509
1509
  }
1510
1510
 
1511
1511
  const resource = this.getSourceMapResource();
1512
- if (resource && resource.success === null) {
1512
+ if (resource?.success === null) {
1513
1513
  // Don't create the infobar until we know whether loading succeeded or failed.
1514
1514
  return;
1515
1515
  }
@@ -1912,7 +1912,7 @@ export class NavigatorFolderTreeNode extends NavigatorTreeNode {
1912
1912
  }
1913
1913
 
1914
1914
  override wasPopulated(): void {
1915
- if (!this.treeElement || this.treeElement.node !== this) {
1915
+ if (this.treeElement?.node !== this) {
1916
1916
  return;
1917
1917
  }
1918
1918
  this.addChildrenRecursive();
@@ -41,7 +41,7 @@ export class Plugin {
41
41
  void {
42
42
  }
43
43
 
44
- decorationChanged(_type: SourceFrame.SourceFrame.DecoratorType, _editor: TextEditor.TextEditor.TextEditor): void {
44
+ decorationChanged(_type: Workspace.UISourceCode.DecoratorType, _editor: TextEditor.TextEditor.TextEditor): void {
45
45
  }
46
46
 
47
47
  editorExtension(): CodeMirror.Extension {