chrome-devtools-frontend 1.0.1690531 → 1.0.1695017

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 (304) hide show
  1. package/.agents/skills/devtools-model-management/SKILL.md +3 -3
  2. package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
  3. package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
  4. package/.gitmodules +0 -4
  5. package/AUTHORS +3 -0
  6. package/config/typescript/tsconfig.base.json +1 -0
  7. package/docs/get_the_code.md +4 -9
  8. package/front_end/Images/src/comment-mode-cursor.svg +23 -0
  9. package/front_end/Tests.js +1 -1
  10. package/front_end/application_tokens.css +5 -0
  11. package/front_end/core/common/ColorConverter.ts +3 -3
  12. package/front_end/core/host/UserMetrics.ts +27 -0
  13. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
  14. package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
  15. package/front_end/core/sdk/CSSLocation.ts +32 -0
  16. package/front_end/core/sdk/CSSModel.ts +2 -22
  17. package/front_end/core/sdk/CSSQuery.ts +2 -1
  18. package/front_end/core/sdk/CSSRule.ts +29 -0
  19. package/front_end/core/sdk/DebuggerModel.ts +5 -1
  20. package/front_end/core/sdk/NetworkManager.ts +2 -0
  21. package/front_end/core/sdk/NetworkRequest.ts +14 -1
  22. package/front_end/core/sdk/NetworkRequestAccess.ts +41 -22
  23. package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
  24. package/front_end/core/sdk/SecurityOrigin.ts +89 -29
  25. package/front_end/core/sdk/Target.ts +18 -0
  26. package/front_end/core/sdk/sdk.ts +2 -0
  27. package/front_end/entrypoints/main/MainImpl.ts +8 -1
  28. package/front_end/foundation/Universe.ts +14 -11
  29. package/front_end/generated/Deprecation.ts +8 -0
  30. package/front_end/generated/InspectorBackendCommands.ts +9 -8
  31. package/front_end/generated/SupportedCSSProperties.ts +13 -3
  32. package/front_end/generated/protocol.ts +24 -0
  33. package/front_end/models/ai_assistance/AiAgent2.ts +42 -9
  34. package/front_end/models/ai_assistance/AiConversation.ts +6 -6
  35. package/front_end/models/ai_assistance/README.md +5 -3
  36. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
  37. package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
  38. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
  39. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
  40. package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
  41. package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
  42. package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
  43. package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
  44. package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
  45. package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
  46. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
  47. package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
  48. package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
  49. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
  50. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
  51. package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
  52. package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
  53. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
  54. package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
  55. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
  56. package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
  57. package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
  58. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
  59. package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
  60. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
  61. package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
  62. package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
  63. package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
  64. package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
  65. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
  66. package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
  67. package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
  68. package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
  69. package/front_end/models/ai_assistance/tools/README.md +4 -2
  70. package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
  71. package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
  72. package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
  73. package/front_end/models/comment_manager/CommentManager.ts +50 -8
  74. package/front_end/models/comment_manager/comment_manager.ts +2 -0
  75. package/front_end/models/emulation/DeviceModeModel.ts +37 -47
  76. package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
  77. package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
  78. package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
  79. package/front_end/models/trace/ModelImpl.ts +2 -0
  80. package/front_end/models/trace/Processor.ts +6 -4
  81. package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
  82. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
  83. package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
  84. package/front_end/models/trace/types/Configuration.ts +7 -0
  85. package/front_end/models/trace/types/TraceEvents.ts +20 -4
  86. package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
  87. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
  88. package/front_end/panels/accessibility/accessibility.ts +2 -0
  89. package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
  90. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
  91. package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
  92. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
  93. package/front_end/panels/animation/AnimationTimeline.ts +1 -0
  94. package/front_end/panels/application/CrashReportContextView.ts +0 -1
  95. package/front_end/panels/application/FrameDetailsView.ts +5 -4
  96. package/front_end/panels/application/IndexedDBViews.ts +4 -4
  97. package/front_end/panels/application/indexedDBViews.css +0 -14
  98. package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
  99. package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
  100. package/front_end/panels/coverage/coverageView.css +8 -8
  101. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +4 -5
  102. package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
  103. package/front_end/panels/elements/ElementsTreeElement.ts +39 -12
  104. package/front_end/panels/elements/ElementsTreeOutline.ts +183 -107
  105. package/front_end/panels/elements/ShortcutTreeElement.ts +4 -0
  106. package/front_end/panels/elements/StylePropertiesSection.ts +1 -34
  107. package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
  108. package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -0
  109. package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
  110. package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
  111. package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
  112. package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
  113. package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
  114. package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
  115. package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
  116. package/front_end/panels/elements/components/queryContainer.css +2 -2
  117. package/front_end/panels/elements/elementsTreeOutline.css +20 -4
  118. package/front_end/panels/event_listeners/eventListenersView.css +1 -1
  119. package/front_end/panels/issues/AffectedElementsView.ts +3 -0
  120. package/front_end/panels/issues/issues.ts +2 -0
  121. package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
  122. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
  123. package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
  124. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
  125. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
  126. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
  127. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
  128. package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
  129. package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
  130. package/front_end/panels/media/TickingFlameChart.ts +3 -2
  131. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
  132. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
  133. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
  134. package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
  135. package/front_end/panels/network/RequestHeadersView.ts +46 -10
  136. package/front_end/panels/network/components/RequestHeadersView.css +12 -0
  137. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
  138. package/front_end/panels/profiler/HeapProfileView.ts +1 -1
  139. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  140. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  141. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
  142. package/front_end/panels/recorder/RecordingListView.ts +0 -6
  143. package/front_end/panels/recorder/RecordingView.ts +0 -6
  144. package/front_end/panels/recorder/controlButton.css +10 -10
  145. package/front_end/panels/recorder/startView.css +1 -1
  146. package/front_end/panels/screencast/ScreencastView.ts +4 -2
  147. package/front_end/panels/search/SearchView.ts +1 -1
  148. package/front_end/panels/security/SecurityPanel.ts +46 -35
  149. package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
  150. package/front_end/panels/timeline/TimelinePanel.ts +0 -17
  151. package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
  152. package/front_end/panels/timeline/components/insights/checklist.css +1 -1
  153. package/front_end/panels/timeline/components/insights/table.css +3 -3
  154. package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
  155. package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
  156. package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
  157. package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
  158. package/front_end/panels/timeline/timelinePanel.css +0 -74
  159. package/front_end/panels/web_audio/webAudio.css +5 -5
  160. package/front_end/third_party/chromium/README.chromium +1 -1
  161. package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
  162. package/front_end/third_party/diff/DiffWrapper.ts +1 -8
  163. package/front_end/third_party/puppeteer/README.chromium +2 -2
  164. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +183 -4
  165. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
  166. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -3
  167. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +84 -11
  169. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts +75 -0
  171. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
  172. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
  173. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
  174. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
  175. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
  177. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -1
  179. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +7 -0
  181. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
  182. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts +31 -0
  183. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
  184. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
  185. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
  186. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
  187. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
  188. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
  189. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
  190. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -0
  191. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +23 -0
  193. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  194. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +6 -1
  195. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
  196. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -0
  197. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts +31 -0
  199. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
  200. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
  201. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
  202. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
  203. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
  205. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +7 -4
  207. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
  209. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -1
  211. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +42 -0
  213. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts +2 -2
  215. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
  217. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -0
  219. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +24 -3
  221. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +23 -2
  223. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +49 -3
  225. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  227. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  228. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
  230. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
  232. package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
  233. package/front_end/third_party/puppeteer/package/package.json +4 -4
  234. package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
  235. package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
  236. package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
  237. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
  238. package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
  239. package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
  240. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
  241. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
  242. package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
  243. package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
  244. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
  245. package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
  246. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
  247. package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
  248. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
  249. package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
  250. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  251. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  252. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +194 -0
  253. package/front_end/tsconfig.json +1 -2
  254. package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
  255. package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
  256. package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
  257. package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
  258. package/front_end/ui/comments/comments-meta.ts +21 -0
  259. package/front_end/ui/comments/comments.ts +2 -0
  260. package/front_end/ui/comments/commentsOverlay.css +22 -3
  261. package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
  262. package/front_end/ui/kit/icons/Icon.ts +0 -1
  263. package/front_end/ui/kit/link/Link.ts +8 -1
  264. package/front_end/ui/legacy/InspectorView.ts +17 -1
  265. package/front_end/ui/legacy/SplitWidget.ts +16 -2
  266. package/front_end/ui/legacy/StatusBar.ts +78 -0
  267. package/front_end/ui/legacy/Toolbar.ts +4 -0
  268. package/front_end/ui/legacy/Treeoutline.ts +78 -11
  269. package/front_end/ui/legacy/UIUtils.ts +2 -1
  270. package/front_end/ui/legacy/ViewRegistration.ts +1 -0
  271. package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
  272. package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
  273. package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
  274. package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
  275. package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
  276. package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
  277. package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
  278. package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
  279. package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
  280. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +113 -51
  281. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
  282. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +16 -97
  283. package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
  284. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
  285. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
  286. package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
  287. package/front_end/ui/legacy/inspectorCommon.css +30 -6
  288. package/front_end/ui/legacy/legacy.ts +2 -0
  289. package/front_end/ui/legacy/statusBar.css +18 -0
  290. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  291. package/inspector_overlay/main.ts +8 -8
  292. package/mcp/mcp.ts +5 -0
  293. package/package.json +2 -9
  294. package/front_end/Images/generate-css-vars.js +0 -52
  295. package/front_end/Images/rollup.config.mjs +0 -36
  296. package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
  297. package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
  298. package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
  299. package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
  300. package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
  301. package/front_end/panels/timeline/enable-easter-egg.js +0 -20
  302. package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
  303. package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
  304. package/inspector_overlay/loadCSS.rollup.js +0 -29
@@ -626,11 +626,14 @@ export class AiAssistancePanel extends UI.Panel.Panel {
626
626
  };
627
627
  #textInputValue = '';
628
628
 
629
- constructor(private view: View = defaultView, {aidaClient, aidaAvailability}: {
629
+ private view: View;
630
+
631
+ constructor(view: View|undefined = defaultView, {aidaClient, aidaAvailability}: {
630
632
  aidaClient: Host.AidaClient.AidaClient,
631
633
  aidaAvailability: Host.AidaClient.AidaAccessPreconditions,
632
634
  }) {
633
635
  super(AiAssistancePanel.panelName);
636
+ this.view = view;
634
637
  this.registerRequiredCSS(aiAssistancePanelStyles);
635
638
  this.#aiAssistanceEnabledSetting = this.#getAiAssistanceEnabledSetting();
636
639
 
@@ -730,8 +733,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
730
733
  onTextSubmit: async (text: string, imageInput?: Host.AidaClient.Part,
731
734
  multimodalInputType?: AiAssistanceModel.AiAgent.MultimodalInputType) => {
732
735
  const submit = (): void => {
733
- Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceQuerySubmitted);
734
- void this.#startConversation(text, imageInput, multimodalInputType);
736
+ void this.#submitQuery(text, imageInput, multimodalInputType);
735
737
  };
736
738
 
737
739
  const seenSetting = Common.Settings.Settings.instance().resolve(
@@ -1505,11 +1507,10 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1505
1507
  return;
1506
1508
  }
1507
1509
 
1508
- Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceQuerySubmitted);
1509
1510
  if (this.#conversation && this.#conversation.isBlockedByOrigin) {
1510
1511
  this.#handleNewChatRequest();
1511
1512
  }
1512
- await this.#startConversation(predefinedPrompt);
1513
+ await this.#submitQuery(predefinedPrompt);
1513
1514
  } else {
1514
1515
  this.#viewOutput.chatView?.focusTextInput();
1515
1516
  }
@@ -1589,7 +1590,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1589
1590
  }
1590
1591
 
1591
1592
  this.#updateConversationState(conversation);
1592
- await this.#doConversation(conversation.history);
1593
+ await this.#consumeResponseStream(conversation.history);
1593
1594
  }
1594
1595
 
1595
1596
  #handleNewChatRequest(): void {
@@ -1707,7 +1708,11 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1707
1708
  }
1708
1709
  }
1709
1710
 
1710
- async #startConversation(
1711
+ /**
1712
+ * Submits a user query turn to the active conversation and streams the response.
1713
+ * Executes on every turn (both initial prompt and follow-up turns).
1714
+ */
1715
+ async #submitQuery(
1711
1716
  text: string,
1712
1717
  imageInput?: Host.AidaClient.Part,
1713
1718
  multimodalInputType?: AiAssistanceModel.AiAgent.MultimodalInputType,
@@ -1715,13 +1720,18 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1715
1720
  if (!this.#conversation) {
1716
1721
  return;
1717
1722
  }
1718
- // Cancel any previous in-flight conversation.
1723
+ // Cancel any previous in-flight query.
1719
1724
  this.#cancel();
1725
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceQuerySubmitted);
1720
1726
  const signal = this.#runAbortController.signal;
1721
1727
 
1722
- // If a different context is provided, it must be from the same origin.
1728
+ // Initial conversation boundary (turn 1 only).
1723
1729
  if (this.#conversation.isEmpty) {
1724
1730
  Badges.UserBadges.instance().recordAction(Badges.BadgeAction.STARTED_AI_CONVERSATION);
1731
+ // Note: Prior to September 2026 (crrev.com/c/8366147), this event erroneously logged on every query
1732
+ // turn because this method was named #startConversation. It is now correctly
1733
+ // restricted to conversation initialization.
1734
+ void VisualLogging.logFunctionCall(`start-conversation-${this.#conversation.type}`, 'ui');
1725
1735
  }
1726
1736
 
1727
1737
  let multimodalInput: AiAssistanceModel.AiAgent.MultimodalInput|undefined;
@@ -1733,9 +1743,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1733
1743
  };
1734
1744
  }
1735
1745
 
1736
- void VisualLogging.logFunctionCall(`start-conversation-${this.#conversation.type}`, 'ui');
1737
-
1738
- await this.#doConversation(
1746
+ await this.#consumeResponseStream(
1739
1747
  this.#conversation.run(
1740
1748
  text,
1741
1749
  {
@@ -1746,9 +1754,11 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1746
1754
  );
1747
1755
  }
1748
1756
 
1749
- async #doConversation(
1750
- items: Iterable<AiAssistanceModel.AiAgent.ResponseData, void, void>|
1751
- AsyncIterable<AiAssistanceModel.AiAgent.ResponseData, void, void>): Promise<void> {
1757
+ /**
1758
+ * Consumes response items (live generator or historic array) and drives UI updates.
1759
+ */
1760
+ async #consumeResponseStream(items: Iterable<AiAssistanceModel.AiAgent.ResponseData, void, void>|
1761
+ AsyncIterable<AiAssistanceModel.AiAgent.ResponseData, void, void>): Promise<void> {
1752
1762
  const release = await this.#mutex.acquire();
1753
1763
  try {
1754
1764
  let systemMessage: ModelChatMessage = {
@@ -19,10 +19,9 @@ import * as Trace from '../../../models/trace/trace.js';
19
19
  import * as Workspace from '../../../models/workspace/workspace.js';
20
20
  import * as PanelsCommon from '../../../panels/common/common.js';
21
21
  import * as TraceBounds from '../../../services/trace_bounds/trace_bounds.js';
22
- import * as Marked from '../../../third_party/marked/marked.js';
23
22
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
24
23
  import * as Input from '../../../ui/components/input/input.js';
25
- import type * as MarkdownView from '../../../ui/components/markdown_view/markdown_view.js';
24
+ import * as MarkdownView from '../../../ui/components/markdown_view/markdown_view.js';
26
25
  import * as Snackbars from '../../../ui/components/snackbars/snackbars.js';
27
26
  import * as UIHelpers from '../../../ui/helpers/helpers.js';
28
27
  import type * as PerfUI from '../../../ui/legacy/components/perf_ui/perf_ui.js';
@@ -614,7 +613,7 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
614
613
  <div class="user-query-wrapper">
615
614
  <section class=${messageClasses} jslog=${VisualLogging.section('question')}>
616
615
  ${imageInput}
617
- <div class="message-content">${renderTextAsMarkdown(message.text, input.markdownRenderer)}</div>
616
+ <div class="message-content">${MarkdownView.MarkdownView.renderTextAsMarkdown(message.text, input.markdownRenderer)}</div>
618
617
  </section>
619
618
  </div>
620
619
  `, target);
@@ -643,7 +642,7 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
643
642
  (part, index) => {
644
643
  const isLastPart = index === message.parts.length - 1;
645
644
  if (part.type === 'answer') {
646
- return html`<p>${renderTextAsMarkdown(part.text, input.markdownRenderer, { animate: !input.isReadOnly && input.isLoading && isLastPart && input.isLastMessage })}</p>`;
645
+ return html`<p>${MarkdownView.MarkdownView.renderTextAsMarkdown(part.text, input.markdownRenderer, { animate: !input.isReadOnly && input.isLoading && isLastPart && input.isLastMessage })}</p>`;
647
646
  }
648
647
  if (part.type === 'widget') {
649
648
  return html`${Lit.Directives.until(renderWidgets(part.widgets, {wrapperClass: 'main-widgets-wrapper'}))}`;
@@ -662,36 +661,6 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
662
661
 
663
662
  export type View = typeof DEFAULT_VIEW;
664
663
 
665
- function renderTextAsMarkdown(text: string, markdownRenderer: MarkdownView.MarkdownView.MarkdownLitRenderer,
666
- {animate, ref: refFn}: {
667
- animate?: boolean,
668
- ref?: (element?: Element) => void,
669
- } = {}): Lit.TemplateResult {
670
- let tokens = [];
671
- try {
672
- tokens = Marked.Marked.lexer(text);
673
- for (const token of tokens) {
674
- // Try to render all the tokens to make sure that
675
- // they all have a template defined for them. If there
676
- // isn't any template defined for a token, we'll fallback
677
- // to rendering the text as plain text instead of markdown.
678
- markdownRenderer.renderToken(token);
679
- }
680
- } catch {
681
- // The tokens were not parsed correctly or
682
- // one of the tokens are not supported, so we
683
- // continue to render this as text.
684
- return html`${text}`;
685
- }
686
-
687
- // clang-format off
688
- return html`<devtools-markdown-view
689
- .data=${{tokens, renderer: markdownRenderer, animationEnabled: animate} as MarkdownView.MarkdownView.MarkdownViewData}
690
- ${refFn ? ref(refFn) : Lit.nothing}>
691
- </devtools-markdown-view>`;
692
- // clang-format on
693
- }
694
-
695
664
  export function titleForStep(step: Step): string {
696
665
  return step.title ?? `${lockedString(UIStringsNotTranslate.investigating)}…`;
697
666
  }
@@ -754,7 +723,9 @@ function renderStepDetails({
754
723
  }): Lit.LitTemplate {
755
724
  const sideEffects =
756
725
  isLast && step.state.type === 'needs_approval' ? renderSideEffectConfirmationUi(step) : Lit.nothing;
757
- const thought = step.thought ? html`<p>${renderTextAsMarkdown(step.thought, markdownRenderer)}</p>` : Lit.nothing;
726
+ const thought = step.thought ?
727
+ html`<p>${MarkdownView.MarkdownView.renderTextAsMarkdown(step.thought, markdownRenderer)}</p>` :
728
+ Lit.nothing;
758
729
 
759
730
  // clang-format off
760
731
  const contextDetails = step.contextDetails ?
@@ -3,13 +3,14 @@
3
3
  // Use of this source code is governed by a BSD-style license that can be
4
4
  // found in the LICENSE file.
5
5
 
6
+ import '../../../ui/kit/kit.js';
7
+
6
8
  import * as Host from '../../../core/host/host.js';
7
9
  import * as i18n from '../../../core/i18n/i18n.js';
8
10
  import * as Root from '../../../core/root/root.js';
9
11
  import * as uiI18n from '../../../ui/i18n/i18n.js';
10
12
  import * as UI from '../../../ui/legacy/legacy.js';
11
13
  import {html, type LitTemplate, render} from '../../../ui/lit/lit.js';
12
- import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
13
14
 
14
15
  import disabledWidgetStyles from './disabledWidget.css.js';
15
16
 
@@ -85,14 +86,14 @@ function renderConsentViewContents(
85
86
  }
86
87
 
87
88
  // eslint-disable-next-line @devtools/no-imperative-dom-api
88
- const settingsLink = document.createElement('span');
89
+ const settingsLink = document.createElement('devtools-link');
89
90
  settingsLink.textContent = i18nString(UIStrings.settingsLink);
90
91
  settingsLink.classList.add('link');
91
92
  UI.ARIAUtils.markAsLink(settingsLink);
92
93
  settingsLink.addEventListener('click', () => {
93
94
  void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
94
95
  });
95
- settingsLink.setAttribute('jslog', `${VisualLogging.action('open-ai-settings').track({click: true})}`);
96
+ settingsLink.jslogContext = 'open-ai-settings';
96
97
 
97
98
  let consentViewContents: HTMLSpanElement;
98
99
  if (hostConfig.devToolsAiAssistancePerformanceAgent?.enabled) {
@@ -1213,6 +1213,7 @@ export class NodeUI {
1213
1213
  return;
1214
1214
  }
1215
1215
  this.element.setAttribute('data-backend-node-id', String(node.backendNodeId()));
1216
+ this.element.setAttribute('data-target-id', node.domModel().target().id());
1216
1217
  this.#node = node;
1217
1218
  this.nodeChanged();
1218
1219
  const link = PanelsCommon.DOMLinkifier.Linkifier.instance().linkify(node, {
@@ -213,7 +213,6 @@ export class CrashReportContextView extends UI.Widget.VBox {
213
213
  frameId,
214
214
  displayName,
215
215
  isMain: frame?.isMainFrame() ?? false,
216
- origin: frame?.securityOrigin || '',
217
216
  entries: frameEntries,
218
217
  };
219
218
  })
@@ -351,7 +351,7 @@ function renderDocumentSection(input: FrameDetailsViewInput): LitTemplate {
351
351
  </div>
352
352
  </devtools-report-value>
353
353
  ${maybeRenderUnreachableURL(input.frame?.unreachableUrl())}
354
- ${maybeRenderOrigin(input.frame?.securityOrigin)}
354
+ ${maybeRenderOrigin(input.frame?.securityOrigin())}
355
355
  ${renderOwnerElement(input.linkTargetDOMNode)}
356
356
  ${maybeRenderCreationStacktrace(input.creationStackTrace)}
357
357
  ${maybeRenderAdStatus(input.frame?.adFrameType(), input.frame?.adFrameStatus())}
@@ -414,12 +414,13 @@ function renderNetworkLinkForUnreachableURL(unreachableUrlString: Platform.DevTo
414
414
  return nothing;
415
415
  }
416
416
 
417
- function maybeRenderOrigin(securityOrigin: string|null): LitTemplate {
418
- if (securityOrigin && securityOrigin !== '://') {
417
+ function maybeRenderOrigin(securityOrigin: SDK.SecurityOrigin.SecurityOrigin|undefined): LitTemplate {
418
+ if (securityOrigin && !securityOrigin.isOpaque()) {
419
+ const originString = securityOrigin.siteId();
419
420
  return html`
420
421
  <devtools-report-key>${i18nString(UIStrings.origin)}</devtools-report-key>
421
422
  <devtools-report-value>
422
- <div class="text-ellipsis" title=${securityOrigin}>${securityOrigin}</div>
423
+ <div class="text-ellipsis" title=${originString}>${originString}</div>
423
424
  </devtools-report-value>
424
425
  `;
425
426
  }
@@ -289,14 +289,14 @@ const populateContextMenu = (e: CustomEvent<UI.ContextMenu.ContextMenu>): void =
289
289
  const renderDataGrid = (input: IndexedDBDataViewInput): LitTemplate => {
290
290
  const keyPath = input.isIndex && input.index ? input.index.keyPath : input.objectStore.keyPath;
291
291
  // clang-format off
292
- return html`<devtools-data-grid striped style="flex: auto;" name=${i18nString(UIStrings.indexedDb)} .template=${html`
292
+ return html`<devtools-data-grid row-height="auto" striped style="flex: auto;" name=${i18nString(UIStrings.indexedDb)} .template=${html`
293
293
  <style>${indexedDBViewsStyles}</style>
294
294
  <table>
295
295
  <tr>
296
296
  <th id="number" fixed width="50px">#</th>
297
- <th id="key">${renderKeyColumnHeader(i18nString(UIStrings.keyString), keyPath)}</th>
298
- ${input.isIndex ? html`<th id="primary-key">${renderKeyColumnHeader(i18nString(UIStrings.primaryKey), input.objectStore.keyPath)}</th>` : nothing}
299
- <th id="value">${i18nString(UIStrings.valueString)}</th>
297
+ <th id="key" weight="2">${renderKeyColumnHeader(i18nString(UIStrings.keyString), keyPath)}</th>
298
+ ${input.isIndex ? html`<th id="primary-key" weight="2">${renderKeyColumnHeader(i18nString(UIStrings.primaryKey), input.objectStore.keyPath)}</th>` : nothing}
299
+ <th id="value" weight="8">${i18nString(UIStrings.valueString)}</th>
300
300
  </tr>
301
301
  ${repeat(input.entries, (_entry, index) => index, (entry, index) => {
302
302
  return html`
@@ -32,20 +32,6 @@
32
32
  color: inherit;
33
33
  }
34
34
 
35
- :host-context(.indexed-db-data-view) .section,
36
- :host-context(.indexed-db-data-view) .section > .header,
37
- :host-context(.indexed-db-data-view) .section > .header .title {
38
- margin: 0;
39
- min-height: inherit;
40
- line-height: inherit;
41
- }
42
-
43
- :host-context(.indexed-db-data-view) .data-grid .data-container td .section .header .title {
44
- white-space: nowrap;
45
- text-overflow: ellipsis;
46
- overflow: hidden;
47
- }
48
-
49
35
  .indexed-db-key-path {
50
36
  color: var(--sys-color-error);
51
37
  white-space: pre-wrap;
@@ -232,18 +232,25 @@ export class ConsoleContextSelector implements SDK.TargetManager.SDKModelObserve
232
232
  return i18nString(UIStrings.extension);
233
233
  }
234
234
  const sameTargetParentFrame = frame?.sameTargetParentFrame();
235
+ const executionContextOrigin =
236
+ executionContext.origin ? SDK.SecurityOrigin.SecurityOrigin.create(executionContext.origin) : null;
235
237
  // TODO(crbug.com/1159332): Understand why condition involves the sameTargetParentFrame.
236
- if (!frame || !sameTargetParentFrame || sameTargetParentFrame.securityOrigin !== executionContext.origin) {
238
+ if (!frame || !sameTargetParentFrame ||
239
+ !sameTargetParentFrame.securityOrigin().isSameOriginWith(executionContextOrigin)) {
237
240
  const url = Common.ParsedURL.ParsedURL.fromString(executionContext.origin);
238
241
  if (url) {
239
242
  return url.domain();
240
243
  }
241
244
  }
242
245
 
243
- if (frame?.securityOrigin) {
244
- const domain = new Common.ParsedURL.ParsedURL(frame.securityOrigin).domain();
245
- if (domain) {
246
- return domain;
246
+ if (frame) {
247
+ const origin = frame.securityOrigin();
248
+ if (!origin.isOpaque()) {
249
+ const domain =
250
+ Common.ParsedURL.ParsedURL.fromString(origin.siteId() as Platform.DevToolsPath.UrlString)?.domain();
251
+ if (domain) {
252
+ return domain;
253
+ }
247
254
  }
248
255
  }
249
256
  return 'IFrame';
@@ -288,7 +288,7 @@ const hoverButtonObserver = new IntersectionObserver(results => {
288
288
  }
289
289
  });
290
290
 
291
- function appendOrShow(parent: Element, child: DocumentFragment|UI.Widget.Widget): void {
291
+ function appendOrShow(parent: Element, child: DocumentFragment|UI.Widget.AnyWidget|HTMLElement): void {
292
292
  if (child instanceof UI.Widget.Widget) {
293
293
  child.show(parent, null, /* suppressOprhanWidgetError=*/ true);
294
294
  } else {
@@ -795,7 +795,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
795
795
  if (shouldFormatMessage && parameters[i].type === 'string') {
796
796
  appendOrShow(formattedResult, this.linkifyStringAsFragment(parameters[i].description || ''));
797
797
  } else {
798
- formattedResult.appendChild(this.formatParameter(parameters[i], false, true));
798
+ appendOrShow(formattedResult, this.formatParameter(parameters[i], false, true));
799
799
  }
800
800
  if (i < parameters.length - 1) {
801
801
  UI.UIUtils.createTextChild(formattedResult, ' ');
@@ -804,10 +804,12 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
804
804
  return formattedResult;
805
805
  }
806
806
 
807
- protected formatParameter(
808
- output: SDK.RemoteObject.RemoteObject, forceObjectFormat?: boolean, includePreview?: boolean): HTMLElement {
807
+ protected formatParameter(output: SDK.RemoteObject.RemoteObject, forceObjectFormat?: boolean,
808
+ includePreview?: boolean): HTMLElement|UI.Widget.AnyWidget {
809
809
  if (output.customPreview()) {
810
- return new ObjectUI.CustomPreviewComponent.CustomPreviewComponent(output).element as HTMLElement;
810
+ const component = new ObjectUI.CustomPreviewComponent.CustomPreviewComponent();
811
+ component.object = output;
812
+ return component;
811
813
  }
812
814
 
813
815
  const outputType = forceObjectFormat ? 'object' : (output.subtype || output.type);
@@ -1185,11 +1187,13 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
1185
1187
  for (const token of tokens) {
1186
1188
  switch (token.type) {
1187
1189
  case 'generic': {
1188
- formattedResult.append(this.formatParameter(token.value, true /* force */, false /* includePreview */));
1190
+ appendOrShow(formattedResult,
1191
+ this.formatParameter(token.value, true /* force */, false /* includePreview */));
1189
1192
  break;
1190
1193
  }
1191
1194
  case 'optimal': {
1192
- formattedResult.append(this.formatParameter(token.value, false /* force */, true /* includePreview */));
1195
+ appendOrShow(formattedResult,
1196
+ this.formatParameter(token.value, false /* force */, true /* includePreview */));
1193
1197
  break;
1194
1198
  }
1195
1199
  case 'string': {
@@ -2271,7 +2275,7 @@ export class ConsoleTableMessageView extends ConsoleViewMessage {
2271
2275
  formattedResult.classList.add('console-message-text');
2272
2276
  const tableElement = formattedResult.createChild('div', 'console-message-formatted-table');
2273
2277
  const dataGridContainer = tableElement.createChild('span');
2274
- tableElement.appendChild(this.formatParameter(actualTable, true, false));
2278
+ appendOrShow(tableElement, this.formatParameter(actualTable, true, false));
2275
2279
  const shadowRoot = dataGridContainer.attachShadow({mode: 'open'});
2276
2280
  const dataGridWidget = this.dataGrid.asWidget();
2277
2281
  dataGridWidget.markAsRoot();
@@ -10,7 +10,7 @@
10
10
 
11
11
  .coverage-toolbar-container {
12
12
  display: flex;
13
- border-bottom: 1px solid var(--sys-color-divider);
13
+ border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
14
14
  flex: 0 0 auto;
15
15
  }
16
16
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  .coverage-toolbar-summary {
22
22
  background-color: var(--sys-color-cdt-base-container);
23
- border-top: 1px solid var(--sys-color-divider);
23
+ border-top: var(--sys-size-1) solid var(--sys-color-divider);
24
24
  padding-left: 5px;
25
25
  flex: 0 0 19px;
26
26
  display: flex;
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  .coverage-toolbar-summary .coverage-message {
31
- padding-top: 2px;
31
+ padding-top: var(--sys-size-2);
32
32
  padding-left: 1ex;
33
33
  text-overflow: ellipsis;
34
34
  white-space: nowrap;
@@ -45,7 +45,7 @@
45
45
  .prerender-page {
46
46
  justify-content: center;
47
47
  align-items: center;
48
- padding: 20px;
48
+ padding: var(--sys-size-9);
49
49
  }
50
50
 
51
51
  .bfcache-page .message,
@@ -56,14 +56,14 @@
56
56
 
57
57
  .inline-button {
58
58
  display: inline-flex;
59
- border: 1px solid var(--sys-color-neutral-outline);
60
- border-radius: 4px;
59
+ border: var(--sys-size-1) solid var(--sys-color-neutral-outline);
60
+ border-radius: var(--sys-shape-corner-extra-small);
61
61
  position: relative;
62
62
  vertical-align: sub;
63
- margin: 2px;
63
+ margin: var(--sys-size-2);
64
64
  background-color: var(--sys-color-cdt-base-container);
65
65
  justify-content: center;
66
- width: 28px;
66
+ width: var(--sys-size-12);
67
67
  }
68
68
 
69
69
  .inline-button:hover {
@@ -428,14 +428,13 @@ function renderFontMetrics(font: string, fontMetricInfo: FontMetric[]): Template
428
428
  ${fontMetricInfo.map(({label, values}) => html`
429
429
  <div>
430
430
  <h3>${label}</h3>
431
- ${renderGroup(values, 'font-info', `${font}/${label}`)}
431
+ ${renderGroup(values, 'font-info', `${font}/${label}`, label)}
432
432
  </div>`)}
433
433
  </div>`;
434
434
  }
435
435
 
436
- function renderGroup(
437
- values: Array<{title: string, nodes: Array<number|UnusedDeclaration|Protocol.CSS.CSSMedia>}>, type: string,
438
- path = ''): TemplateResult {
436
+ function renderGroup(values: Array<{title: string, nodes: Array<number|UnusedDeclaration|Protocol.CSS.CSSMedia>}>,
437
+ type: string, path = '', groupLabel = ''): TemplateResult {
439
438
  const total = values.reduce((prev, curr) => prev + curr.nodes.length, 0);
440
439
 
441
440
  // clang-format off
@@ -449,7 +448,7 @@ function renderGroup(
449
448
  <div class="title">${title}</div>
450
449
  <button data-type=${type} data-path=${path} data-label=${title}
451
450
  jslog=${VisualLogging.action().track({click: true}).context(`css-overview.${type}`)}
452
- aria-label=${`${title}: ${itemLabel}`}>
451
+ aria-label=${`${groupLabel ? `${groupLabel}, ` : ''}${title}: ${itemLabel}`}>
453
452
  <div class="details">${itemLabel}</div>
454
453
  <div class="bar-container">
455
454
  <div class="bar" style=${styleMap({width})}></div>
@@ -11,7 +11,7 @@
11
11
 
12
12
  .developer-resource-view-toolbar-container {
13
13
  display: flex;
14
- border-bottom: 1px solid var(--sys-color-divider);
14
+ border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
15
15
  flex: 0 0 auto;
16
16
  }
17
17
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  .developer-resource-view-toolbar-summary {
23
23
  background-color: var(--sys-color-cdt-base-container);
24
- border-top: 1px solid var(--sys-color-divider);
24
+ border-top: var(--sys-size-1) solid var(--sys-color-divider);
25
25
  padding-left: 5px;
26
26
  flex: 0 0 19px;
27
27
  display: flex;
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .developer-resource-view-toolbar-summary .developer-resource-view-message {
32
- padding-top: 2px;
32
+ padding-top: var(--sys-size-2);
33
33
  padding-left: 1ex;
34
34
  text-overflow: ellipsis;
35
35
  white-space: nowrap;
@@ -864,9 +864,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
864
864
  input.onExpand,
865
865
  input.issues,
866
866
  )}</span>` : nothing}
867
- ${input.isHovered || input.isSelected ? html`
868
- <div class="selection fill ${input.editorState ? 'hidden' : ''}" style=${`margin-left: ${-input.indent}px`}></div>
869
- ` : nothing}
867
+ <div class="selection fill ${input.editorState ? 'hidden' : ''}" style=${`margin-left: ${-input.indent}px`}></div>
870
868
  <div class=${classMap(gutterContainerClasses)}
871
869
  style="left: ${-input.indent}px"
872
870
  @click=${input.onGutterClick}>
@@ -1148,7 +1146,7 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
1148
1146
  moveDirection?: string) => void;
1149
1147
  runPendingUpdates?: () => void;
1150
1148
  focusOutline?: () => void;
1151
- setMultilineEditing?: (multilineEditing: EditorHandles|null) => void;
1149
+ setMultilineEditing?: (multilineEditing: EditorHandles|null, node?: SDK.DOMModel.DOMNode) => void;
1152
1150
  visibleWidth?: () => number;
1153
1151
 
1154
1152
  #view: View;
@@ -1293,6 +1291,20 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
1293
1291
 
1294
1292
  this.editing = null;
1295
1293
  this.expandAllButtonElement = null;
1294
+
1295
+ this.contentElement.addEventListener('dblclick', (event: MouseEvent) => {
1296
+ if (!this.node || this.editing || this.isClosingTag) {
1297
+ return;
1298
+ }
1299
+ if (!this.isDOMNodeSelected) {
1300
+ this.selectDOMNode?.(this.node, true);
1301
+ this.isDOMNodeSelected = true;
1302
+ }
1303
+ const target = (event.composedPath()[0] || event.target) as Element;
1304
+ if (this.startEditingTarget(target)) {
1305
+ event.preventDefault();
1306
+ }
1307
+ });
1296
1308
  }
1297
1309
 
1298
1310
  static visibleShadowRoots(node: SDK.DOMModel.DOMNode): SDK.DOMModel.DOMNode[] {
@@ -1368,6 +1380,14 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
1368
1380
  // editorState) is happening. Doing an update would break editing
1369
1381
  // (crbug.com/515639787).
1370
1382
  if (this.editing && !this.#editorState) {
1383
+ if (this.initialEdit) {
1384
+ const edit = this.initialEdit;
1385
+ this.initialEdit = null;
1386
+ this.onInitialEditCompleted?.();
1387
+ if (edit.isEditAsHTML) {
1388
+ edit.editAsHTMLCallback?.(false);
1389
+ }
1390
+ }
1371
1391
  return;
1372
1392
  }
1373
1393
  this.updateDecorations();
@@ -2243,13 +2263,14 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
2243
2263
  }
2244
2264
  }
2245
2265
 
2246
- private async startEditingAsHTML(
2247
- commitCallback: (arg0: string, arg1: string) => void, disposeCallback: () => void,
2248
- maybeInitialValue: string|null): Promise<void> {
2249
- if (maybeInitialValue === null) {
2266
+ private async startEditingAsHTML(commitCallback: (arg0: string, arg1: string) => void, disposeCallback: () => void,
2267
+ maybeInitialValue: string|null|undefined): Promise<void> {
2268
+ if (maybeInitialValue === null || maybeInitialValue === undefined) {
2269
+ disposeCallback();
2250
2270
  return;
2251
2271
  }
2252
2272
  if (this.editing) {
2273
+ disposeCallback();
2253
2274
  return;
2254
2275
  }
2255
2276
 
@@ -2338,7 +2359,7 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
2338
2359
  this.requestUpdate();
2339
2360
  resize.call(this);
2340
2361
  this.editing = {commit: commit.bind(this), cancel: dispose.bind(this), resize: resize.bind(this)};
2341
- this.setMultilineEditing?.(this.editing);
2362
+ this.setMultilineEditing?.(this.editing, this.node);
2342
2363
  await this.updateComplete;
2343
2364
  this.#editorRef?.focus();
2344
2365
 
@@ -2705,7 +2726,9 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
2705
2726
  }
2706
2727
 
2707
2728
  const node = this.node;
2708
- void node.getOuterHTML().then(this.startEditingAsHTML.bind(this, commitChange, disposeCallback));
2729
+ void node.getOuterHTML()
2730
+ .then(this.startEditingAsHTML.bind(this, commitChange, disposeCallback))
2731
+ .catch(disposeCallback);
2709
2732
  }
2710
2733
 
2711
2734
  #highlightSearchResults(): void {
@@ -3012,8 +3035,8 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
3012
3035
  };
3013
3036
  this.widget.runPendingUpdates = () => outline.runPendingUpdates();
3014
3037
  this.widget.focusOutline = () => outline.focus();
3015
- this.widget.setMultilineEditing = multilineEditing => {
3016
- outline.domTreeWidget?.setMultilineEditing(multilineEditing);
3038
+ this.widget.setMultilineEditing = (multilineEditing, n) => {
3039
+ outline.domTreeWidget?.setMultilineEditing(multilineEditing, n ?? this.nodeInternal);
3017
3040
  };
3018
3041
  this.widget.visibleWidth = () => outline.domTreeWidget?.visibleWidth ?? outline.visibleWidth();
3019
3042
  }
@@ -3117,6 +3140,10 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
3117
3140
  this.widget.onunbind();
3118
3141
  }
3119
3142
 
3143
+ override ensureSelection(): void {
3144
+ // Selection element is rendered in DEFAULT_VIEW via ElementsTreeWidget.
3145
+ }
3146
+
3120
3147
  static animateOnDOMUpdate(treeElement: ElementsTreeElement): void {
3121
3148
  treeElement.widget.animateOnDOMUpdate();
3122
3149
  }