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
@@ -15,6 +15,7 @@ import type {NetworkRequest} from './NetworkRequest.js';
15
15
  import {Resource} from './Resource.js';
16
16
  import {ExecutionContext, RuntimeModel} from './RuntimeModel.js';
17
17
  import {SDKModel} from './SDKModel.js';
18
+ import {SecurityOrigin} from './SecurityOrigin.js';
18
19
  import {SecurityOriginManager} from './SecurityOriginManager.js';
19
20
  import {StorageKeyManager} from './StorageKeyManager.js';
20
21
  import {Capability, type Target, Type} from './Target.js';
@@ -82,6 +83,37 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
82
83
  return result;
83
84
  }
84
85
 
86
+ /**
87
+ * Finds the first active frame that matches the specified security origin under
88
+ * the given primary page target.
89
+ *
90
+ * Returns `null` if the target has no outermost target or if no matching frame
91
+ * exists.
92
+ *
93
+ * @param primaryPageTarget The primary page target that contains the candidate frames.
94
+ * @param origin The security origin to match.
95
+ * @returns The first matching frame, or `null` if no frame matches.
96
+ */
97
+ static frameForOrigin(
98
+ primaryPageTarget: Target,
99
+ origin: SecurityOrigin,
100
+ ): ResourceTreeFrame|null {
101
+ const outermostTarget = primaryPageTarget.outermostTarget();
102
+ if (!outermostTarget) {
103
+ return null;
104
+ }
105
+ for (const frame of ResourceTreeModel.frames(primaryPageTarget.targetManager())) {
106
+ if (frame.resourceTreeModel().target().outermostTarget() !== outermostTarget) {
107
+ continue;
108
+ }
109
+ if (frame.securityOrigin().isSameOriginWith(origin)) {
110
+ return frame;
111
+ }
112
+ }
113
+
114
+ return null;
115
+ }
116
+
85
117
  static resourceForURL(targetManager: TargetManager, url: Platform.DevToolsPath.UrlString): Resource|null {
86
118
  for (const resourceTreeModel of targetManager.models(ResourceTreeModel)) {
87
119
  const mainFrame = resourceTreeModel.mainFrame;
@@ -500,24 +532,26 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
500
532
  }
501
533
 
502
534
  private getSecurityOriginData(): SecurityOriginData {
503
- const securityOrigins = new Set<string>();
535
+ const securityOrigins: SecurityOrigin[] = [];
504
536
 
505
- let mainSecurityOrigin: string|null = null;
506
- let unreachableMainSecurityOrigin: string|null = null;
537
+ let mainSecurityOrigin: SecurityOrigin|null = null;
538
+ let unreachableMainSecurityOrigin: SecurityOrigin|null = null;
507
539
  for (const frame of this.framesInternal.values()) {
508
- const origin = frame.securityOrigin;
509
- if (!origin) {
510
- continue;
511
- }
512
-
513
- securityOrigins.add(origin);
540
+ const origin = frame.securityOrigin();
514
541
  if (frame.isMainFrame()) {
515
- mainSecurityOrigin = origin;
542
+ mainSecurityOrigin = origin.isOpaque() ? null : origin;
516
543
  if (frame.unreachableUrl()) {
517
- const unreachableParsed = new Common.ParsedURL.ParsedURL(frame.unreachableUrl());
518
- unreachableMainSecurityOrigin = unreachableParsed.securityOrigin();
544
+ const unreachable = SecurityOrigin.create(frame.unreachableUrl());
545
+ unreachableMainSecurityOrigin = unreachable.isOpaque() ? null : unreachable;
519
546
  }
520
547
  }
548
+ if (origin.isOpaque()) {
549
+ continue;
550
+ }
551
+
552
+ if (!securityOrigins.some(existing => existing.isSameOriginWith(origin))) {
553
+ securityOrigins.push(origin);
554
+ }
521
555
  }
522
556
  return {
523
557
  securityOrigins,
@@ -548,9 +582,12 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
548
582
 
549
583
  private updateSecurityOrigins(): void {
550
584
  const data = this.getSecurityOriginData();
551
- this.#securityOriginManager.setMainSecurityOrigin(
552
- data.mainSecurityOrigin || '', data.unreachableMainSecurityOrigin || '');
553
- this.#securityOriginManager.updateSecurityOrigins(data.securityOrigins);
585
+ // TODO(crbug.com/559122726): SecurityOriginManager currently expects string identifiers.
586
+ // Update SecurityOriginManager to store and emit SecurityOrigin objects directly so
587
+ // that the siteId() conversions below can be removed.
588
+ this.#securityOriginManager.setMainSecurityOrigin(data.mainSecurityOrigin?.siteId() || '',
589
+ data.unreachableMainSecurityOrigin?.siteId() || '');
590
+ this.#securityOriginManager.updateSecurityOrigins(new Set(data.securityOrigins.map(o => o.siteId())));
554
591
  }
555
592
 
556
593
  private async updateStorageKeys(): Promise<void> {
@@ -563,9 +600,10 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
563
600
  return this.mainFrame ? await this.mainFrame.getStorageKey(/* forceFetch */ false) : null;
564
601
  }
565
602
 
603
+ // TODO(crbug.com/559122726): Remove siteId() usage and evaluate removing this method in favor of direct SecurityOrigin handling.
566
604
  getMainSecurityOrigin(): string|null {
567
605
  const data = this.getSecurityOriginData();
568
- return data.mainSecurityOrigin || data.unreachableMainSecurityOrigin;
606
+ return data.mainSecurityOrigin?.siteId() || data.unreachableMainSecurityOrigin?.siteId() || null;
569
607
  }
570
608
 
571
609
  onBackForwardCacheNotUsed(event: Protocol.Page.BackForwardCacheNotUsedEvent): void {
@@ -649,7 +687,7 @@ export class ResourceTreeFrame {
649
687
  #name: string|null|undefined;
650
688
  #url: Platform.DevToolsPath.UrlString;
651
689
  #domainAndRegistry: string;
652
- #securityOrigin: string|null;
690
+ #securityOrigin: SecurityOrigin;
653
691
  #securityOriginDetails?: Protocol.Page.SecurityOriginDetails;
654
692
  #storageKey?: Promise<string|null>;
655
693
  #unreachableUrl: Platform.DevToolsPath.UrlString;
@@ -680,7 +718,7 @@ export class ResourceTreeFrame {
680
718
  this.#name = payload?.name;
681
719
  this.#url = payload && payload.url as Platform.DevToolsPath.UrlString || Platform.DevToolsPath.EmptyUrlString;
682
720
  this.#domainAndRegistry = (payload?.domainAndRegistry) || '';
683
- this.#securityOrigin = payload?.securityOrigin ?? null;
721
+ this.#securityOrigin = SecurityOrigin.create(payload?.securityOrigin ?? '');
684
722
  this.#securityOriginDetails = payload?.securityOriginDetails;
685
723
  this.#unreachableUrl =
686
724
  (payload && payload.unreachableUrl as Platform.DevToolsPath.UrlString) || Platform.DevToolsPath.EmptyUrlString;
@@ -729,7 +767,7 @@ export class ResourceTreeFrame {
729
767
  this.#name = framePayload.name;
730
768
  this.#url = framePayload.url as Platform.DevToolsPath.UrlString;
731
769
  this.#domainAndRegistry = framePayload.domainAndRegistry;
732
- this.#securityOrigin = framePayload.securityOrigin;
770
+ this.#securityOrigin = SecurityOrigin.create(framePayload.securityOrigin);
733
771
  this.#securityOriginDetails = framePayload.securityOriginDetails;
734
772
  void this.getStorageKey(/* forceFetch */ true);
735
773
  this.#unreachableUrl =
@@ -779,7 +817,15 @@ export class ResourceTreeFrame {
779
817
  return res.adScriptAncestry || null;
780
818
  }
781
819
 
782
- get securityOrigin(): string|null {
820
+ /**
821
+ * Returns the security origin of this frame.
822
+ *
823
+ * If the frame does not have a valid origin (such as `about:blank`), this
824
+ * method returns a unique opaque origin.
825
+ *
826
+ * @returns The security origin of the frame.
827
+ */
828
+ securityOrigin(): SecurityOrigin {
783
829
  return this.#securityOrigin;
784
830
  }
785
831
 
@@ -1165,10 +1211,13 @@ export class PageDispatcher implements ProtocolProxyApi.PageDispatcher {
1165
1211
  }
1166
1212
 
1167
1213
  SDKModel.register(ResourceTreeModel, {capabilities: Capability.DOM, autostart: true, early: true});
1214
+ /**
1215
+ * Aggregated security origin data for frames belonging to a resource tree model.
1216
+ */
1168
1217
  export interface SecurityOriginData {
1169
- securityOrigins: Set<string>;
1170
- mainSecurityOrigin: string|null;
1171
- unreachableMainSecurityOrigin: string|null;
1218
+ securityOrigins: SecurityOrigin[];
1219
+ mainSecurityOrigin: SecurityOrigin|null;
1220
+ unreachableMainSecurityOrigin: SecurityOrigin|null;
1172
1221
  }
1173
1222
 
1174
1223
  export interface StorageKeyData {
@@ -7,11 +7,12 @@ import type * as Platform from '../platform/platform.js';
7
7
 
8
8
  /**
9
9
  * Internal representation of a security origin:
10
- * - `origin`: A comparable origin string (`<scheme>://<host>[:<port>]` or path-scoped `file://<host>/<path>`).
10
+ * - `origin`: A comparable origin string (`<scheme>://<host>[:<port>]`).
11
+ * - `file`: A path-scoped local file origin (`file://<host>/<path>`).
11
12
  * - `opaque`: An isolated opaque origin uniquely identified by a UUID that never matches any other origin.
12
13
  */
13
- type InternalOrigin =
14
- |{readonly type: 'origin', readonly value: string}|{readonly type: 'opaque', readonly uuid: string};
14
+ type InternalOrigin =|{readonly type: 'origin', readonly value: string}|{readonly type: 'file', readonly value: string}|
15
+ {readonly type: 'opaque', readonly uuid: string};
15
16
 
16
17
  /** Exact string matches that represent an invalid or opaque origin. */
17
18
  const OPAQUE_EXACT_MATCHES = new Set([
@@ -31,12 +32,14 @@ const OPAQUE_PREFIXES = [
31
32
  ] as const;
32
33
 
33
34
  /**
34
- * String prefixes for imported artifact schemes (e.g., HAR recordings, traces).
35
- * Imported entities operate in an isolated origin domain (`imported-har://${domain}`)
36
- * that never matches live web origins (`https://${domain}`).
35
+ * Scheme prefixes for imported artifact data (such as HAR archives and performance traces).
36
+ * DevTools isolates imported artifacts into scheme-scoped and host-scoped origins
37
+ * (`imported-har://${host}`, `imported-trace://${host}`). These origins never match live
38
+ * web origins (`https://${host}`) or other artifact schemes.
37
39
  */
38
40
  export const IMPORTED_ORIGIN_PREFIXES: ReadonlySet<string> = new Set([
39
41
  'imported-har:',
42
+ 'imported-trace:',
40
43
  ]);
41
44
 
42
45
  function isOpaqueUrlString(url: string): boolean {
@@ -69,7 +72,12 @@ function isOpaqueUrlString(url: string): boolean {
69
72
  * `isOpaque()` returns `false` for `file://` URLs, and two `file://` URLs are considered same-origin
70
73
  * only if their full file path and host match exactly.
71
74
  *
72
- * 3. **Opaque Origins**: Opaque contexts (`data:`, `about:blank`, invalid URLs, or synthetic
75
+ * 3. **Imported Artifact Origins (`imported-har:`, `imported-trace:`)**: Custom schemes for imported
76
+ * recordings (such as HAR archives and performance traces) resolve to `<scheme>//<host>`.
77
+ * DevTools isolates imported artifact origins from live web pages (`imported-trace://example.com` != `https://example.com`)
78
+ * and isolates different artifact schemes from each other (`imported-trace://example.com` != `imported-har://example.com`).
79
+ *
80
+ * 4. **Opaque Origins**: Opaque contexts (`data:`, `about:blank`, invalid URLs, or synthetic
73
81
  * opaque origins) are backed by unique UUIDs. An opaque origin never matches any other origin,
74
82
  * even another opaque origin created from the same URL string.
75
83
  */
@@ -85,6 +93,8 @@ export class SecurityOrigin {
85
93
  *
86
94
  * - If the URL is determined to be opaque (e.g. `data:`, `about:blank`, empty, `null`),
87
95
  * a new unique opaque origin is returned.
96
+ * - If the URL is an imported artifact scheme (e.g. `imported-har:`, `imported-trace:`),
97
+ * a scheme-and-host origin (`<scheme>//<host>`) is returned.
88
98
  * - If the URL is a `file://` URL, a path-scoped origin (`file://<authority><path>`) is returned.
89
99
  * - Otherwise, the standard origin (`<scheme>://<host>[:<port>]`) is extracted and returned.
90
100
  *
@@ -95,20 +105,9 @@ export class SecurityOrigin {
95
105
  return SecurityOrigin.createUniqueOpaque();
96
106
  }
97
107
 
98
- // Custom imported schemes (e.g. `imported-har:`) are not supported by standard URL parsers.
99
- // We extract the host to construct a domain-scoped origin (`imported-har://${host}`).
100
- // This isolates imported artifacts from live web pages (`imported-har://example.com` != `https://example.com`),
101
- // while enabling same-origin comparison between requests within the same imported session domain.
102
- for (const prefix of IMPORTED_ORIGIN_PREFIXES) {
103
- if (rawUrl.toLowerCase().startsWith(prefix)) {
104
- const afterScheme = rawUrl.substring(prefix.length).replace(/^\/+/, '');
105
- const slashIndex = afterScheme.indexOf('/');
106
- const host = slashIndex === -1 ? afterScheme : afterScheme.substring(0, slashIndex);
107
- if (!host) {
108
- return SecurityOrigin.createUniqueOpaque();
109
- }
110
- return new SecurityOrigin({type: 'origin', value: `${prefix}//${host.toLowerCase()}`});
111
- }
108
+ const importedOrigin = SecurityOrigin.#tryCreateImportedArtifactOrigin(rawUrl);
109
+ if (importedOrigin) {
110
+ return importedOrigin;
112
111
  }
113
112
 
114
113
  if (rawUrl.toLowerCase().startsWith('file://')) {
@@ -117,7 +116,7 @@ export class SecurityOrigin {
117
116
  return SecurityOrigin.createUniqueOpaque();
118
117
  }
119
118
  const authority = parsed.host + (parsed.port ? ':' + parsed.port : '');
120
- return new SecurityOrigin({type: 'origin', value: `file://${authority}${parsed.path}`});
119
+ return new SecurityOrigin({type: 'file', value: `file://${authority}${parsed.path}`});
121
120
  }
122
121
 
123
122
  const origin = Common.ParsedURL.ParsedURL.extractOrigin(rawUrl as Platform.DevToolsPath.UrlString);
@@ -125,7 +124,35 @@ export class SecurityOrigin {
125
124
  return SecurityOrigin.createUniqueOpaque();
126
125
  }
127
126
 
128
- return new SecurityOrigin({type: 'origin', value: origin});
127
+ return new SecurityOrigin({type: 'origin', value: origin.toLowerCase()});
128
+ }
129
+
130
+ /**
131
+ * Attempts to parse a URL as an imported artifact scheme (such as `imported-har:` or `imported-trace:`).
132
+ *
133
+ * Standard web origins do not match imported artifact origins. If the URL starts with an imported
134
+ * prefix, this helper isolates the origin to `<scheme>//<host>`. If the authority or host is missing,
135
+ * or if the URL cannot be parsed, it returns a unique opaque origin.
136
+ *
137
+ * @param rawUrl The raw URL string to evaluate.
138
+ * @returns A `SecurityOrigin` if the URL matches an imported artifact scheme, or `null` otherwise.
139
+ */
140
+ static #tryCreateImportedArtifactOrigin(rawUrl: string): SecurityOrigin|null {
141
+ const lowerUrl = rawUrl.toLowerCase();
142
+ for (const prefix of IMPORTED_ORIGIN_PREFIXES) {
143
+ if (lowerUrl.startsWith(prefix)) {
144
+ try {
145
+ const parsedUrl = new URL(rawUrl);
146
+ if (!parsedUrl.host) {
147
+ return SecurityOrigin.createUniqueOpaque();
148
+ }
149
+ return new SecurityOrigin({type: 'origin', value: `${parsedUrl.protocol}//${parsedUrl.host.toLowerCase()}`});
150
+ } catch {
151
+ return SecurityOrigin.createUniqueOpaque();
152
+ }
153
+ }
154
+ }
155
+ return null;
129
156
  }
130
157
 
131
158
  /**
@@ -138,6 +165,28 @@ export class SecurityOrigin {
138
165
  return new SecurityOrigin({type: 'opaque', uuid: crypto.randomUUID()});
139
166
  }
140
167
 
168
+ /**
169
+ * Creates an isolated security origin for an imported performance trace.
170
+ *
171
+ * Imported traces isolate to `imported-trace://${authority}` based on the recorded
172
+ * main frame URL. If the URL is missing, invalid, or has no host, this returns a
173
+ * unique opaque origin so that unhosted traces do not share access with each other
174
+ * or live web origins.
175
+ *
176
+ * @param mainFrameURL The URL string of the main frame recorded in the trace.
177
+ */
178
+ static createForImportedTrace(mainFrameURL: string|null|undefined): SecurityOrigin {
179
+ if (!mainFrameURL) {
180
+ return SecurityOrigin.createUniqueOpaque();
181
+ }
182
+ const parsed = Common.ParsedURL.ParsedURL.fromString(mainFrameURL);
183
+ if (!parsed?.host) {
184
+ return SecurityOrigin.createUniqueOpaque();
185
+ }
186
+ const authority = parsed.host + (parsed.port ? `:${parsed.port}` : '');
187
+ return SecurityOrigin.create(`imported-trace://${authority}`);
188
+ }
189
+
141
190
  /**
142
191
  * Checks whether this security origin is equivalent to another security origin.
143
192
  *
@@ -156,7 +205,7 @@ export class SecurityOrigin {
156
205
  return this.#origin.type === 'opaque' && other.#origin.type === 'opaque' &&
157
206
  this.#origin.uuid === other.#origin.uuid;
158
207
  }
159
- return this.#origin.value === other.#origin.value;
208
+ return this.#origin.type === other.#origin.type && this.#origin.value === other.#origin.value;
160
209
  }
161
210
 
162
211
  /**
@@ -170,12 +219,23 @@ export class SecurityOrigin {
170
219
  }
171
220
 
172
221
  /**
173
- * Returns a stable string representation of this origin for identification, storage keys,
174
- * or debugging logs.
222
+ * Returns whether this origin represents a local file origin (`file://`).
223
+ */
224
+ isFile(): boolean {
225
+ return this.#origin.type === 'file';
226
+ }
227
+
228
+ /**
229
+ * Returns a stable string identifier for display, logging, or storage keys.
230
+ *
231
+ * WARNING: Do not compare `siteId()` strings to verify origin equality or
232
+ * enforce security boundaries. Always use `isSameOriginWith()` instead.
175
233
  *
176
- * - For standard origins, returns the serialized origin string (e.g. `https://example.com:8080`).
177
- * - For file origins, returns the path-scoped origin (e.g. `file:///path/to/file.html`).
178
- * - For opaque origins, returns the unique UUID string.
234
+ * Return formats:
235
+ * - Standard origins: `<scheme>://<host>[:<port>]` (e.g., `https://example.com:8080`).
236
+ * - File origins: `file://<authority><path>` (e.g., `file:///path/to/file.html`).
237
+ * - Opaque origins: A bare UUID string (e.g., `3fa85f64-5717-4562-b3fc-2c963f66afa6`).
238
+ * Note: Opaque site IDs do not have URI schemes and are not valid URLs.
179
239
  */
180
240
  siteId(): string {
181
241
  return this.#origin.type === 'opaque' ? this.#origin.uuid : this.#origin.value;
@@ -8,6 +8,7 @@ import * as Platform from '../platform/platform.js';
8
8
  import * as ProtocolClient from '../protocol_client/protocol_client.js';
9
9
 
10
10
  import {SDKModel, type SDKModelConstructor} from './SDKModel.js';
11
+ import {SecurityOrigin} from './SecurityOrigin.js';
11
12
  import type {TargetManager} from './TargetManager.js';
12
13
 
13
14
  export class Target extends ProtocolClient.InspectorBackend.TargetBase {
@@ -15,6 +16,8 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
15
16
  #name: string;
16
17
  #inspectedURL: Platform.DevToolsPath.UrlString = Platform.DevToolsPath.EmptyUrlString;
17
18
  #inspectedURLName = '';
19
+ /** Caches the parsed security origin for `#inspectedURL`. */
20
+ #inspectedSecurityOrigin: SecurityOrigin|null = null;
18
21
  readonly #capabilitiesMask: number;
19
22
  #type: Type;
20
23
  readonly #parentTarget: Target|null;
@@ -206,8 +209,23 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
206
209
  return this.#inspectedURL;
207
210
  }
208
211
 
212
+ /**
213
+ * Returns the security origin for this target's inspected URL.
214
+ *
215
+ * The target caches the origin until `setInspectedURL()` changes the URL.
216
+ * If the URL is empty or invalid, this method returns a unique opaque origin.
217
+ * An opaque origin does not match any other origin.
218
+ */
219
+ inspectedSecurityOrigin(): SecurityOrigin {
220
+ if (!this.#inspectedSecurityOrigin) {
221
+ this.#inspectedSecurityOrigin = SecurityOrigin.create(this.#inspectedURL);
222
+ }
223
+ return this.#inspectedSecurityOrigin;
224
+ }
225
+
209
226
  setInspectedURL(inspectedURL: Platform.DevToolsPath.UrlString): void {
210
227
  this.#inspectedURL = inspectedURL;
228
+ this.#inspectedSecurityOrigin = null;
211
229
  const parsedURL = Common.ParsedURL.ParsedURL.fromString(inspectedURL);
212
230
  this.#inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : '#' + this.#id;
213
231
  this.#targetManager.onInspectedURLChange(this);
@@ -26,6 +26,7 @@ import * as CrashReportContextModel from './CrashReportContextModel.js';
26
26
  import * as CSSContainerQuery from './CSSContainerQuery.js';
27
27
  import * as CSSFontFace from './CSSFontFace.js';
28
28
  import * as CSSLayer from './CSSLayer.js';
29
+ import * as CSSLocation from './CSSLocation.js';
29
30
  import * as CSSMatchedStyles from './CSSMatchedStyles.js';
30
31
  import * as CSSMedia from './CSSMedia.js';
31
32
  import * as CSSMetadata from './CSSMetadata.js';
@@ -115,6 +116,7 @@ export {
115
116
  CSSContainerQuery,
116
117
  CSSFontFace,
117
118
  CSSLayer,
119
+ CSSLocation,
118
120
  CSSMatchedStyles,
119
121
  CSSMedia,
120
122
  CSSMetadata,
@@ -214,6 +214,8 @@ export class MainImpl {
214
214
  };
215
215
  this.#universe = new Foundation.Universe.Universe(creationOptions);
216
216
  Root.DevToolsContext.setGlobalInstance(this.#universe.context as Root.DevToolsContext.WritableDevToolsContext);
217
+ // Needed to allow CD4A to access the server bridge class.
218
+ (globalThis as unknown as {universe: Foundation.Universe.Universe}).universe = this.#universe;
217
219
 
218
220
  // Mark 'cache-disabled' as requiring user interaction when multiple CDP clients are attached.
219
221
  if (Root.Runtime.Runtime.queryParam('hasOtherClients')) {
@@ -552,6 +554,7 @@ export class MainImpl {
552
554
  inspectorView.displaySelectOverrideFolderInfobar(event.data);
553
555
  });
554
556
  await inspectorView.createToolbars();
557
+ inspectorView.renderStatusBar();
555
558
  Host.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();
556
559
 
557
560
  // Initialize elements for the live announcer functionality for a11y.
@@ -669,7 +672,7 @@ export class MainImpl {
669
672
  }
670
673
 
671
674
  #redispatchClipboardEvent(event: Event): void {
672
- const eventCopy = new CustomEvent('clipboard-' + event.type, {bubbles: true});
675
+ const eventCopy = new CustomEvent('clipboard-' + event.type, {bubbles: true, composed: true});
673
676
  // @ts-expect-error Used in ElementsTreeOutline
674
677
  eventCopy['original'] = event;
675
678
  const document = event.target && (event.target as HTMLElement).ownerDocument;
@@ -702,6 +705,10 @@ export class MainImpl {
702
705
  UI.InspectorView.InspectorView.instance().onSuspendStateChanged(suspended);
703
706
  }
704
707
 
708
+ redispatchClipboardEventForTest(event: Event): void {
709
+ this.#redispatchClipboardEvent(event);
710
+ }
711
+
705
712
  static instanceForTest: MainImpl|null = null;
706
713
  }
707
714
 
@@ -38,6 +38,7 @@ export class Universe {
38
38
  // directly on the `Universe`.
39
39
  readonly context: Root.DevToolsContext.DevToolsContext;
40
40
  readonly autofillManager: AutofillManager.AutofillManager.AutofillManager;
41
+ readonly cd4aBridge: CommentManager.CD4ABridge.CD4ABridge|null = null;
41
42
  readonly supportsEmulation: boolean;
42
43
  readonly initAutomaticFilesystem: boolean;
43
44
  readonly fileSystemWorkspaceBinding: Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding;
@@ -81,17 +82,11 @@ export class Universe {
81
82
  const multitargetNetworkManager = new SDK.NetworkManager.MultitargetNetworkManager(targetManager);
82
83
  context.set(SDK.NetworkManager.MultitargetNetworkManager, multitargetNetworkManager);
83
84
 
84
- const workspace = new Workspace.Workspace.WorkspaceImpl();
85
- context.set(Workspace.Workspace.WorkspaceImpl, workspace);
86
-
87
- const fileManager = new Workspace.FileManager.FileManager();
88
- context.set(Workspace.FileManager.FileManager, fileManager);
89
-
90
85
  this.supportsEmulation = options.supportsEmulation;
91
86
  let deviceModeModel = null;
92
87
  if (options.supportsEmulation) {
93
- deviceModeModel = new Emulation.DeviceModeModel.DeviceModeModel(targetManager, settings,
94
- multitargetNetworkManager, fileManager);
88
+ deviceModeModel =
89
+ new Emulation.DeviceModeModel.DeviceModeModel(targetManager, settings, multitargetNetworkManager);
95
90
  context.set(Emulation.DeviceModeModel.DeviceModeModel, deviceModeModel);
96
91
  }
97
92
 
@@ -130,6 +125,11 @@ export class Universe {
130
125
 
131
126
  const domModelUndoStack = new SDK.DOMModel.DOMModelUndoStack();
132
127
  context.set(SDK.DOMModel.DOMModelUndoStack, domModelUndoStack);
128
+ const workspace = new Workspace.Workspace.WorkspaceImpl();
129
+ context.set(Workspace.Workspace.WorkspaceImpl, workspace);
130
+
131
+ const fileManager = new Workspace.FileManager.FileManager();
132
+ context.set(Workspace.FileManager.FileManager, fileManager);
133
133
 
134
134
  if (automaticFileSystemManager) {
135
135
  const automaticFileSystemWorkspaceBinding =
@@ -215,7 +215,6 @@ export class Universe {
215
215
 
216
216
  const domIssuesManager = new IssuesManager.DOMIssuesManager.DOMIssuesManager(issuesManager, targetManager);
217
217
  context.set(IssuesManager.DOMIssuesManager.DOMIssuesManager, domIssuesManager);
218
-
219
218
  const javaScriptMetadata = new JavaScriptMetadata.JavaScriptMetadata.JavaScriptMetadataImpl();
220
219
  context.set(JavaScriptMetadata.JavaScriptMetadata.JavaScriptMetadataImpl, javaScriptMetadata);
221
220
 
@@ -234,6 +233,11 @@ export class Universe {
234
233
  const commentManager = new CommentManager.CommentManager.CommentManager();
235
234
  context.set(CommentManager.CommentManager.CommentManager, commentManager);
236
235
 
236
+ if (options.hostConfig.devToolsComments?.enabled ?? Root.Runtime.hostConfig.devToolsComments?.enabled) {
237
+ this.cd4aBridge = new CommentManager.CD4ABridge.CD4ABridge(commentManager, targetManager, networkLog);
238
+ context.set(CommentManager.CD4ABridge.CD4ABridge, this.cd4aBridge);
239
+ }
240
+
237
241
  this.autofillManager = new AutofillManager.AutofillManager.AutofillManager(targetManager, frameManager);
238
242
  context.set(AutofillManager.AutofillManager.AutofillManager, this.autofillManager);
239
243
  }
@@ -241,6 +245,7 @@ export class Universe {
241
245
  // TODO(crbug.com/542394587): Should be `Symbol.dispose`
242
246
  dispose(): void {
243
247
  // TODO(crbug.com/542394587): Track these in a DisposableStack.
248
+ this.cd4aBridge?.dispose();
244
249
  this.context.get(Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager).dispose();
245
250
  if (this.initAutomaticFilesystem) {
246
251
  this.context.get(Persistence.AutomaticFileSystemManager.AutomaticFileSystemManager).dispose();
@@ -273,7 +278,6 @@ export class Universe {
273
278
  get commentManager(): CommentManager.CommentManager.CommentManager {
274
279
  return this.context.get(CommentManager.CommentManager.CommentManager);
275
280
  }
276
-
277
281
  get cpuThrottlingManager(): SDK.CPUThrottlingManager.CPUThrottlingManager {
278
282
  return this.context.get(SDK.CPUThrottlingManager.CPUThrottlingManager);
279
283
  }
@@ -302,7 +306,6 @@ export class Universe {
302
306
  get domIssuesManager(): IssuesManager.DOMIssuesManager.DOMIssuesManager {
303
307
  return this.context.get(IssuesManager.DOMIssuesManager.DOMIssuesManager);
304
308
  }
305
-
306
309
  get domModelUndoStack(): SDK.DOMModel.DOMModelUndoStack {
307
310
  return this.context.get(SDK.DOMModel.DOMModelUndoStack);
308
311
  }
@@ -70,6 +70,10 @@ export const UIStrings = {
70
70
  * @description Translation is not needed, this will never be exposed in production code.
71
71
  */
72
72
  ExampleBrowserProcessDeprecation: "This is an example for showing the code required for a browser process reported deprecation.",
73
+ /**
74
+ * @description Warning displayed to developers that they are using the Fenced Frame API which has been deprecated and is scheduled to be removed.
75
+ */
76
+ FencedFrame: "Fenced Frame API is deprecated and scheduled for removal.",
73
77
  /**
74
78
  * @description A deprecation warning shown in the DevTools Issues tab. It's shown when one of the Protected Audience APIs like `navigator.joinAdInterestGroup`, `navigator.getInterestGroupAdAuctionData` or `navigator.runAdAuction` are called.
75
79
  */
@@ -349,6 +353,10 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
349
353
  "chromeStatusFeature": 5095987863486464,
350
354
  "milestone": 151
351
355
  },
356
+ "FencedFrame": {
357
+ "chromeStatusFeature": 6366274495053824,
358
+ "milestone": 156
359
+ },
352
360
  "IdentityInCanMakePaymentEvent": {
353
361
  "chromeStatusFeature": 5190978431352832
354
362
  },