chrome-devtools-frontend 1.0.1675430 → 1.0.1678416

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 (308) hide show
  1. package/AUTHORS +1 -0
  2. package/WATCHLISTS +0 -4
  3. package/front_end/core/common/EventTarget.ts +0 -5
  4. package/front_end/core/common/Settings.ts +0 -66
  5. package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
  6. package/front_end/core/host/UserMetrics.ts +5 -0
  7. package/front_end/core/root/Runtime.ts +5 -5
  8. package/front_end/core/sdk/CSSMetadata.ts +5 -9
  9. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -34
  10. package/front_end/core/sdk/DebuggerModel.ts +92 -57
  11. package/front_end/core/sdk/EmulationModel.ts +2 -1
  12. package/front_end/core/sdk/NetworkManager.ts +16 -2
  13. package/front_end/core/sdk/OverlayModel.ts +19 -9
  14. package/front_end/core/sdk/OverlayPersistentHighlighter.ts +10 -4
  15. package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
  16. package/front_end/core/sdk/SDKSettings.ts +117 -0
  17. package/front_end/core/sdk/Script.ts +9 -53
  18. package/front_end/core/sdk/sdk-meta.ts +0 -431
  19. package/front_end/devtools_compatibility.js +1 -0
  20. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
  21. package/front_end/entrypoints/inspector_main/InspectorMain.ts +6 -5
  22. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +14 -15
  23. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +157 -0
  24. package/front_end/entrypoints/main/MainImpl.ts +32 -0
  25. package/front_end/entrypoints/shell/shell.ts +0 -1
  26. package/front_end/foundation/Universe.ts +8 -0
  27. package/front_end/generated/InspectorBackendCommands.ts +8 -8
  28. package/front_end/generated/SupportedCSSProperties.ts +53 -4
  29. package/front_end/generated/protocol-mapping.d.ts +27 -21
  30. package/front_end/generated/protocol-proxy-api.d.ts +22 -17
  31. package/front_end/generated/protocol.ts +43 -18
  32. package/front_end/models/ai_assistance/AiAgent2.ts +47 -2
  33. package/front_end/models/ai_assistance/AiConversation.ts +22 -5
  34. package/front_end/models/ai_assistance/README.md +52 -26
  35. package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
  36. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
  37. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -194
  38. package/front_end/models/ai_assistance/agents/StorageAgent.ts +21 -87
  39. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
  40. package/front_end/models/ai_assistance/ai_assistance.ts +24 -0
  41. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
  42. package/front_end/models/ai_assistance/contexts/StorageContext.ts +100 -0
  43. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
  44. package/front_end/models/ai_assistance/skills/README.md +63 -1
  45. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  46. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
  47. package/front_end/models/ai_assistance/skills/accessibility.md +7 -0
  48. package/front_end/models/ai_assistance/skills/performance.md +15 -1
  49. package/front_end/models/ai_assistance/skills/sources.md +16 -0
  50. package/front_end/models/ai_assistance/skills/storage.md +31 -0
  51. package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +107 -0
  52. package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +122 -0
  53. package/front_end/models/ai_assistance/tools/GetResourceContent.ts +127 -0
  54. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
  55. package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
  56. package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
  57. package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
  58. package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +95 -0
  59. package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
  60. package/front_end/models/ai_assistance/tools/RunLighthouse.ts +89 -0
  61. package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
  62. package/front_end/models/ai_assistance/tools/Tool.ts +26 -1
  63. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +22 -0
  64. package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
  65. package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
  66. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
  67. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
  68. package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
  69. package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
  70. package/front_end/models/comment_manager/CommentManager.ts +141 -0
  71. package/front_end/models/comment_manager/comment_manager.ts +9 -0
  72. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
  73. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
  74. package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  75. package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  76. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  77. package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
  78. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
  79. package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
  80. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  81. package/front_end/models/persistence/persistence-meta.ts +9 -9
  82. package/front_end/models/trace/types/TraceEvents.ts +36 -0
  83. package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
  84. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +25 -0
  85. package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
  86. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -0
  87. package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
  88. package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
  89. package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
  90. package/front_end/panels/accessibility/accessibility.ts +2 -0
  91. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
  92. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
  93. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  94. package/front_end/panels/ai_assistance/components/ChatMessage.ts +92 -12
  95. package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
  96. package/front_end/panels/application/ApplicationPanelSidebar.ts +10 -4
  97. package/front_end/panels/application/IndexedDBViews.ts +65 -63
  98. package/front_end/panels/application/StorageView.ts +116 -45
  99. package/front_end/panels/application/WebMCPView.ts +16 -7
  100. package/front_end/panels/application/application-meta.ts +11 -0
  101. package/front_end/panels/application/components/AdsView.ts +1 -1
  102. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
  103. package/front_end/panels/common/BadgeNotification.ts +8 -8
  104. package/front_end/panels/common/ExtensionPanel.ts +9 -8
  105. package/front_end/panels/common/ExtensionServer.ts +21 -1
  106. package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
  107. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
  108. package/front_end/panels/common/PersistenceUtils.ts +2 -2
  109. package/front_end/panels/common/common.ts +0 -97
  110. package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
  111. package/front_end/panels/console/ConsolePanel.ts +4 -0
  112. package/front_end/panels/console/ConsolePinPane.ts +2 -2
  113. package/front_end/panels/console/ConsolePrompt.ts +12 -0
  114. package/front_end/panels/console/ConsoleView.ts +31 -20
  115. package/front_end/panels/console/ConsoleViewMessage.ts +37 -13
  116. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
  117. package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
  118. package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -1
  119. package/front_end/panels/elements/ElementsTreeElement.ts +455 -372
  120. package/front_end/panels/elements/LayoutPane.ts +2 -8
  121. package/front_end/panels/elements/StylePropertyTreeElement.ts +16 -15
  122. package/front_end/panels/elements/elements-meta.ts +152 -10
  123. package/front_end/panels/elements/elements.ts +0 -2
  124. package/front_end/panels/emulation/DeviceModeView.ts +9 -1
  125. package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
  126. package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
  127. package/front_end/panels/lighthouse/LighthouseController.ts +3 -2
  128. package/front_end/panels/media/PlayerMessagesView.ts +149 -68
  129. package/front_end/panels/network/BinaryResourceView.ts +134 -81
  130. package/front_end/panels/network/EventSourceMessagesView.ts +10 -10
  131. package/front_end/panels/network/FetchHeaderCommenting.ts +291 -0
  132. package/front_end/panels/network/NetworkConfigView.ts +10 -10
  133. package/front_end/panels/network/NetworkDataGridNode.ts +14 -14
  134. package/front_end/panels/network/NetworkItemView.ts +27 -28
  135. package/front_end/panels/network/NetworkLogView.ts +137 -38
  136. package/front_end/panels/network/NetworkLogViewColumns.ts +35 -35
  137. package/front_end/panels/network/NetworkManageCustomHeadersView.ts +1 -1
  138. package/front_end/panels/network/NetworkPanel.ts +2 -2
  139. package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
  140. package/front_end/panels/network/RequestCookiesView.ts +4 -4
  141. package/front_end/panels/network/RequestHeadersView.ts +5 -5
  142. package/front_end/panels/network/RequestPayloadView.ts +4 -3
  143. package/front_end/panels/network/RequestTimingView.ts +8 -8
  144. package/front_end/panels/network/ResourceChunkView.ts +1 -1
  145. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
  146. package/front_end/panels/network/ResourceWebSocketFrameView.ts +16 -16
  147. package/front_end/panels/network/binaryResourceView.css +14 -12
  148. package/front_end/panels/network/components/DirectSocketConnectionView.ts +2 -2
  149. package/front_end/panels/network/components/HeaderSectionRow.ts +1 -1
  150. package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -2
  151. package/front_end/panels/network/network-meta.ts +1 -1
  152. package/front_end/panels/network/network.ts +2 -0
  153. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -1
  154. package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
  155. package/front_end/panels/profiler/heapProfiler.css +0 -9
  156. package/front_end/panels/recorder/RecorderPanel.ts +2 -3
  157. package/front_end/panels/screencast/ScreencastView.ts +148 -138
  158. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
  159. package/front_end/panels/sources/BreakpointsView.ts +2 -2
  160. package/front_end/panels/sources/DebuggerPlugin.ts +10 -59
  161. package/front_end/panels/sources/NavigatorView.ts +2 -1
  162. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  163. package/front_end/panels/sources/SourcesPanel.ts +23 -73
  164. package/front_end/panels/sources/SourcesView.ts +248 -157
  165. package/front_end/panels/sources/TabbedEditorContainer.ts +118 -23
  166. package/front_end/panels/sources/UISourceCodeFrame.ts +5 -9
  167. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
  168. package/front_end/panels/sources/sources-meta.ts +52 -0
  169. package/front_end/panels/timeline/TimelineController.ts +36 -64
  170. package/front_end/panels/timeline/TimelinePanel.ts +11 -8
  171. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
  172. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
  173. package/front_end/panels/timeline/timelinePanel.css +0 -10
  174. package/front_end/panels/utils/utils.ts +7 -7
  175. package/front_end/services/tracing/PerformanceTracing.ts +5 -17
  176. package/front_end/third_party/chromium/README.chromium +1 -1
  177. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  178. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  179. package/front_end/third_party/codemirror.next/package.json +2 -2
  180. package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
  181. package/front_end/ui/comments/CommentAnchorResolver.ts +430 -35
  182. package/front_end/ui/comments/CommentOverlayManager.ts +635 -0
  183. package/front_end/ui/comments/CommentsOverlayWidget.ts +134 -0
  184. package/front_end/ui/comments/comments.ts +4 -0
  185. package/front_end/ui/comments/commentsOverlay.css +49 -0
  186. package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
  187. package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
  188. package/front_end/ui/components/dialogs/dialogs.ts +4 -0
  189. package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
  190. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
  191. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
  192. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
  193. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
  194. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
  195. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
  196. package/front_end/ui/components/text_editor/text_editor.ts +4 -0
  197. package/front_end/ui/legacy/Toolbar.ts +1 -1
  198. package/front_end/ui/legacy/UIUtils.ts +0 -56
  199. package/front_end/ui/legacy/View.ts +10 -4
  200. package/front_end/ui/legacy/Widget.ts +10 -1
  201. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -1
  202. package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
  203. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
  204. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +507 -209
  205. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
  206. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
  207. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
  208. package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +38 -20
  209. package/front_end/ui/legacy/components/source_frame/JSONView.ts +12 -2
  210. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -3
  211. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +37 -6
  212. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +22 -4
  213. package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
  214. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  215. package/mcp/mcp.ts +6 -1
  216. package/package.json +6 -6
  217. package/front_end/Images/toolbarResizerVertical.png +0 -0
  218. package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
  219. package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
  220. package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
  221. package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
  222. package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
  223. package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
  224. package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
  225. package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
  226. package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
  227. package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
  228. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
  229. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
  230. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
  231. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
  232. package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
  233. package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
  234. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
  235. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
  236. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
  237. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
  238. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
  239. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
  240. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
  241. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
  242. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
  243. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
  244. package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
  245. package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
  246. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
  247. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
  248. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
  249. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
  250. package/front_end/emulated_devices/iPad-landscape.svg +0 -73
  251. package/front_end/emulated_devices/iPad-portrait.svg +0 -76
  252. package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
  253. package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
  254. package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
  255. package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
  256. package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
  257. package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
  258. package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  259. package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  260. package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  261. package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  262. package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  263. package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  264. package/front_end/emulated_devices/optimized/README.md +0 -9
  265. package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  266. package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  267. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  268. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  269. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  270. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  271. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  272. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  273. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  274. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  275. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  276. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  277. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  278. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  279. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  280. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  281. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  282. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  283. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  284. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  285. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  286. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  287. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  288. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  289. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  290. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  291. package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
  292. package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
  293. package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  294. package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  295. package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  296. package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  297. package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  298. package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  299. package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
  300. package/front_end/models/ai_assistance/agents/README.md +0 -136
  301. package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +0 -89
  302. package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -27
  303. /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
  304. /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
  305. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
  306. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
  307. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
  308. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
@@ -42,7 +42,7 @@ const UIStrings = {
42
42
  /**
43
43
  * @description Data grid name for Direct Socket Chunk data grids
44
44
  */
45
- directSocketChunk: 'Direct Socket Chunk',
45
+ directSocketChunk: 'Direct socket chunk',
46
46
  /**
47
47
  * @description Example for placeholder text. Note: "(direct)?socket)" is an example code and should not be translated.
48
48
  */
@@ -49,39 +49,39 @@ const UIStrings = {
49
49
  */
50
50
  sOpcodeS: '{PH1} (Opcode {PH2})',
51
51
  /**
52
- * @description Op codes continuation frame of map in Resource Web Socket Frame View of the Network panel
52
+ * @description WebSocket opcode (operation code) name for a continuation frame in WebSocket messages view of the Network panel. In the WebSocket protocol, an opcode defines the frame payload type; continuation frames split large messages into multiple chunks.
53
53
  */
54
- continuationFrame: 'Continuation Frame',
54
+ continuationFrame: 'Continuation frame',
55
55
  /**
56
- * @description Op codes text frame of map in Resource Web Socket Frame View of the Network panel
56
+ * @description WebSocket opcode (operation code) name for a text message frame in WebSocket messages view of the Network panel. In the WebSocket protocol, an opcode defines the frame payload type.
57
57
  */
58
- textMessage: 'Text Message',
58
+ textMessage: 'Text message',
59
59
  /**
60
- * @description Op codes binary frame of map in Resource Web Socket Frame View of the Network panel
60
+ * @description WebSocket opcode (operation code) name for a binary message frame in WebSocket messages view of the Network panel. In the WebSocket protocol, an opcode defines the frame payload type.
61
61
  */
62
- binaryMessage: 'Binary Message',
62
+ binaryMessage: 'Binary message',
63
63
  /**
64
- * @description Op codes continuation frame of map in Resource Web Socket Frame View of the Network panel indicating that the web socket connection has been closed.
64
+ * @description WebSocket opcode (operation code) name for a connection close frame in WebSocket messages view of the Network panel. In the WebSocket protocol, an opcode defines the frame payload type.
65
65
  */
66
- connectionCloseMessage: 'Connection Close Message',
66
+ connectionCloseMessage: 'Connection close message',
67
67
  /**
68
- * @description Op codes ping frame of map in Resource Web Socket Frame View of the Network panel
68
+ * @description WebSocket opcode (operation code) name for a ping frame in WebSocket messages view of the Network panel. In the WebSocket protocol, an opcode defines the frame payload type; ping frames check connection liveness.
69
69
  */
70
- pingMessage: 'Ping Message',
70
+ pingMessage: 'Ping message',
71
71
  /**
72
- * @description Op codes pong frame of map in Resource Web Socket Frame View of the Network panel
72
+ * @description WebSocket opcode (operation code) name for a pong frame in WebSocket messages view of the Network panel. In the WebSocket protocol, an opcode defines the frame payload type; pong frames reply to ping frames.
73
73
  */
74
- pongMessage: 'Pong Message',
74
+ pongMessage: 'Pong message',
75
75
  /**
76
- * @description Data grid name for Web Socket Frame data grids
76
+ * @description Accessible name for WebSocket message data grid in WebSocket messages view of the Network panel.
77
77
  */
78
- webSocketFrame: 'Web Socket Frame',
78
+ webSocketFrame: 'WebSocket frame',
79
79
  /**
80
- * @description Text for something not available
80
+ * @description Text shown when a value is not available in WebSocket messages view of the Network panel.
81
81
  */
82
82
  na: 'N/A',
83
83
  /**
84
- * @description Example for placeholder text
84
+ * @description Placeholder text for filter input in WebSocket messages view of the Network panel.
85
85
  */
86
86
  filterUsingRegex: 'Filter using regex (example: (web)?socket)',
87
87
  } as const;
@@ -4,18 +4,20 @@
4
4
  * found in the LICENSE file.
5
5
  */
6
6
 
7
- .panel.network devtools-toolbar.binary-view-toolbar {
8
- border-top: 1px solid var(--sys-color-divider);
9
- border-bottom: 0;
10
- padding-left: 5px;
11
- flex: none;
12
- }
7
+ @scope to (devtools-widget > *) {
8
+ .panel.network devtools-toolbar.binary-view-toolbar {
9
+ border-top: 1px solid var(--sys-color-divider);
10
+ border-bottom: 0;
11
+ padding-left: 5px;
12
+ flex: none;
13
+ }
13
14
 
14
- .binary-view-copied-text {
15
- opacity: 100%;
16
- }
15
+ .binary-view-copied-text {
16
+ opacity: 100%;
17
+ }
17
18
 
18
- .binary-view-copied-text.fadeout {
19
- opacity: 0%;
20
- transition: opacity 1s;
19
+ .binary-view-copied-text.fadeout {
20
+ opacity: 0%;
21
+ transition: opacity 1s;
22
+ }
21
23
  }
@@ -27,11 +27,11 @@ const UIStrings = {
27
27
  /**
28
28
  * @description Section header for a list of the main aspects of a direct socket connection
29
29
  */
30
- openInfo: 'Open Info',
30
+ openInfo: 'Open info',
31
31
  /**
32
32
  * @description Text in Connection info View of the Network panel
33
33
  */
34
- type: 'DirectSocket Type',
34
+ type: 'DirectSocket type',
35
35
  /**
36
36
  * @description Text in Connection info View of the Network panel
37
37
  */
@@ -46,7 +46,7 @@ const UIStrings = {
46
46
  /**
47
47
  * @description Description of which letters the name of an HTTP header may contain (a-z, A-Z, 0-9, '-', or '_').
48
48
  */
49
- headerNamesOnlyLetters: 'Header names should contain only letters, digits, hyphens or underscores',
49
+ headerNamesOnlyLetters: 'Header names should contain only letters, digits, hyphens, or underscores',
50
50
  /**
51
51
  * @description Text that is usually a hyperlink to more documentation
52
52
  */
@@ -65,7 +65,7 @@ const UIStrings = {
65
65
  /**
66
66
  * @description Detailed text for a success status in the Network panel
67
67
  */
68
- theOperationsResultWasServedFrom: 'The operations result was served from cache.',
68
+ theOperationsResultWasServedFrom: 'The operation’s result was served from cache.',
69
69
  /**
70
70
  * @description Detailed text for a success status in the Network panel
71
71
  */
@@ -87,7 +87,7 @@ const UIStrings = {
87
87
  /**
88
88
  * @description Text for an error status in the Network panel
89
89
  */
90
- theServersResponseWasMalformedOr: 'The servers response was malformed or otherwise invalid.',
90
+ theServersResponseWasMalformedOr: 'The server’s response was malformed or otherwise invalid.',
91
91
  /**
92
92
  * @description Text for an error status in the Network panel
93
93
  */
@@ -26,7 +26,7 @@ const UIStrings = {
26
26
  /**
27
27
  * @description Command for showing the 'Network request blocking' tool
28
28
  */
29
- showRequestConditions: 'Show Request conditions',
29
+ showRequestConditions: 'Show request conditions',
30
30
  /**
31
31
  * @description Title of the 'Request conditions' tool in the bottom drawer
32
32
  */
@@ -31,6 +31,7 @@ import './NetworkPanel.js';
31
31
 
32
32
  import * as BinaryResourceView from './BinaryResourceView.js';
33
33
  import * as EventSourceMessagesView from './EventSourceMessagesView.js';
34
+ import * as FetchHeaderCommenting from './FetchHeaderCommenting.js';
34
35
  import * as LinkPreloadGenerator from './LinkPreloadGenerator.js';
35
36
  import * as NetworkConfigView from './NetworkConfigView.js';
36
37
  import * as NetworkDataGridNode from './NetworkDataGridNode.js';
@@ -61,6 +62,7 @@ import * as SignedExchangeInfoView from './SignedExchangeInfoView.js';
61
62
  export {
62
63
  BinaryResourceView,
63
64
  EventSourceMessagesView,
65
+ FetchHeaderCommenting,
64
66
  LinkPreloadGenerator,
65
67
  NetworkConfigView,
66
68
  NetworkDataGridNode,
@@ -111,7 +111,6 @@ export class HeapDetachedElementsDataGridNode extends DataGrid.DataGrid.DataGrid
111
111
  return count;
112
112
  }
113
113
 
114
- // FIXME: is it a partial dupe of front_end/panels/elements/ElementsTreeOutlineRenderer.ts?
115
114
  #renderNode(node: SDK.DOMModel.DOMNode, target: HTMLElement): void {
116
115
  render(
117
116
  html`
@@ -453,7 +453,6 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
453
453
  const retainmentViewHeader = document.createElement('div');
454
454
  retainmentViewHeader.classList.add('heap-snapshot-view-resizer');
455
455
  const retainingPathsTitleDiv = retainmentViewHeader.createChild('div', 'title');
456
- retainmentViewHeader.createChild('div', 'verticalResizerIcon');
457
456
  const retainingPathsTitle = retainingPathsTitleDiv.createChild('span');
458
457
  retainingPathsTitle.textContent = i18nString(UIStrings.retainers);
459
458
 
@@ -1350,7 +1349,6 @@ export class AllocationPerspective extends Perspective {
1350
1349
  const resizer = document.createElement('div');
1351
1350
  resizer.classList.add('heap-snapshot-view-resizer');
1352
1351
  const title = resizer.createChild('div', 'title').createChild('span');
1353
- resizer.createChild('div', 'verticalResizerIcon');
1354
1352
  title.textContent = i18nString(UIStrings.liveObjects);
1355
1353
  this.allocationSplitWidget.hideDefaultResizer();
1356
1354
  this.allocationSplitWidget.installResizer(resizer);
@@ -100,15 +100,6 @@
100
100
  white-space: nowrap;
101
101
  }
102
102
 
103
- .heap-snapshot-view .heap-snapshot-view-resizer .verticalResizerIcon {
104
- /* stylelint-disable-next-line custom-property-pattern */
105
- background-image: var(--image-file-toolbarResizerVertical);
106
- background-repeat: no-repeat;
107
- background-position: center;
108
- flex: 0 0 28px;
109
- margin-left: auto;
110
- }
111
-
112
103
  .heap-snapshot-view .heap-snapshot-view-resizer .title > span {
113
104
  display: inline-block;
114
105
  padding-top: 3px;
@@ -13,10 +13,9 @@ import * as Bindings from '../../models/bindings/bindings.js';
13
13
  import * as EmulationModel from '../../models/emulation/emulation.js';
14
14
  import * as PublicExtensions from '../../models/extensions/extensions.js';
15
15
  import type * as Trace from '../../models/trace/trace.js';
16
- import * as PanelCommon from '../../panels/common/common.js';
17
16
  import * as Tracing from '../../services/tracing/tracing.js';
18
17
  import * as Buttons from '../../ui/components/buttons/buttons.js';
19
- import type * as Dialogs from '../../ui/components/dialogs/dialogs.js';
18
+ import * as Dialogs from '../../ui/components/dialogs/dialogs.js';
20
19
  import type * as Menus from '../../ui/components/menus/menus.js';
21
20
  import * as UI from '../../ui/legacy/legacy.js';
22
21
  import {Directives, html, type LitTemplate, render} from '../../ui/lit/lit.js';
@@ -1668,7 +1667,7 @@ export class RecorderPanel extends UI.Widget.VBox<DocumentFragment> {
1668
1667
  return true;
1669
1668
  }
1670
1669
 
1671
- const result = await PanelCommon.TypeToAllowDialog.show({
1670
+ const result = await Dialogs.TypeToAllowDialog.TypeToAllowDialog.show({
1672
1671
  jslogContext: {
1673
1672
  input: 'confirm-import-recording-input',
1674
1673
  dialog: 'confirm-import-recording-dialog',
@@ -214,7 +214,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
214
214
  if (el instanceof HTMLCanvasElement) {
215
215
  output.focusCanvas = (): void => el.focus();
216
216
  canvasElement = el;
217
- ScreencastView.repaintScreencastCanvas(el, input);
217
+ repaintScreencastCanvas(el, input);
218
218
  }
219
219
  })}></canvas>
220
220
  <div
@@ -225,7 +225,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
225
225
  })}
226
226
  ${ref(el => {
227
227
  if (el instanceof HTMLElement && canvasElement && input.elementTitleData?.visible && !el.classList.contains('hidden')) {
228
- ScreencastView.clampTooltipPosition(canvasElement, el, input.highlightModel);
228
+ clampTooltipPosition(canvasElement, el, input.highlightModel);
229
229
  }
230
230
  })}>
231
231
  <span class="screencast-tag-name">${input.elementTitleData?.tagName ?? nothing}</span>
@@ -239,6 +239,141 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
239
239
  // clang-format on
240
240
  };
241
241
 
242
+ function repaintScreencastCanvas(el: HTMLCanvasElement, input: CanvasRenderingInput): void {
243
+ const context = el.getContext('2d');
244
+ if (!context) {
245
+ return;
246
+ }
247
+
248
+ const model = input.highlightModel;
249
+ const config = input.highlightConfig;
250
+
251
+ const canvasWidth = el.getBoundingClientRect().width;
252
+ const canvasHeight = el.getBoundingClientRect().height;
253
+ el.width = window.devicePixelRatio * canvasWidth;
254
+ el.height = window.devicePixelRatio * canvasHeight;
255
+
256
+ context.save();
257
+ context.scale(window.devicePixelRatio, window.devicePixelRatio);
258
+
259
+ if (model && config) {
260
+ context.save();
261
+ const quads = [];
262
+ const isTransparent = (color: Protocol.DOM.RGBA): boolean => Boolean(color.a && color.a === 0);
263
+ if (model.content && config.contentColor && !isTransparent(config.contentColor)) {
264
+ quads.push({quad: model.content, color: config.contentColor});
265
+ }
266
+ if (model.padding && config.paddingColor && !isTransparent(config.paddingColor)) {
267
+ quads.push({quad: model.padding, color: config.paddingColor});
268
+ }
269
+ if (model.border && config.borderColor && !isTransparent(config.borderColor)) {
270
+ quads.push({quad: model.border, color: config.borderColor});
271
+ }
272
+ if (model.margin && config.marginColor && !isTransparent(config.marginColor)) {
273
+ quads.push({quad: model.margin, color: config.marginColor});
274
+ }
275
+
276
+ for (let i = quads.length - 1; i > 0; --i) {
277
+ drawOutlinedQuadWithClip(context, quads[i].quad, quads[i - 1].quad, quads[i].color);
278
+ }
279
+ if (quads.length > 0) {
280
+ drawOutlinedQuad(context, quads[0].quad, quads[0].color);
281
+ }
282
+ context.globalCompositeOperation = 'destination-over';
283
+ }
284
+
285
+ if (input.screencastImage) {
286
+ context.drawImage(input.screencastImage, 0, input.screenOffsetTop * input.screenZoom,
287
+ input.screencastImage.naturalWidth * input.imageZoom,
288
+ input.screencastImage.naturalHeight * input.imageZoom);
289
+ }
290
+ context.restore();
291
+ }
292
+
293
+ function cssColor(color: Protocol.DOM.RGBA): string {
294
+ if (!color) {
295
+ return 'transparent';
296
+ }
297
+ return Common.Color.Legacy.fromRGBA([color.r, color.g, color.b, color.a !== undefined ? color.a : 1])
298
+ .asString(Common.Color.Format.RGBA) ||
299
+ '';
300
+ }
301
+
302
+ function quadToPath(context: CanvasRenderingContext2D, quad: Protocol.DOM.Quad): CanvasRenderingContext2D {
303
+ context.beginPath();
304
+ context.moveTo(quad[0], quad[1]);
305
+ context.lineTo(quad[2], quad[3]);
306
+ context.lineTo(quad[4], quad[5]);
307
+ context.lineTo(quad[6], quad[7]);
308
+ context.closePath();
309
+ return context;
310
+ }
311
+
312
+ function drawOutlinedQuad(context: CanvasRenderingContext2D, quad: Protocol.DOM.Quad,
313
+ fillColor: Protocol.DOM.RGBA): void {
314
+ context.save();
315
+ context.lineWidth = 2;
316
+ quadToPath(context, quad).clip();
317
+ context.fillStyle = cssColor(fillColor);
318
+ context.fill();
319
+ context.restore();
320
+ }
321
+
322
+ function drawOutlinedQuadWithClip(context: CanvasRenderingContext2D, quad: Protocol.DOM.Quad,
323
+ clipQuad: Protocol.DOM.Quad, fillColor: Protocol.DOM.RGBA): void {
324
+ context.fillStyle = cssColor(fillColor);
325
+ context.save();
326
+ context.lineWidth = 0;
327
+ quadToPath(context, quad).fill();
328
+ context.globalCompositeOperation = 'destination-out';
329
+ context.fillStyle = 'red';
330
+ quadToPath(context, clipQuad).fill();
331
+ context.restore();
332
+ }
333
+
334
+ function clampTooltipPosition(canvas: HTMLCanvasElement, titleElement: HTMLElement,
335
+ model?: Protocol.DOM.BoxModel|null): void {
336
+ if (!model) {
337
+ return;
338
+ }
339
+ const canvasWidth = canvas.getBoundingClientRect().width;
340
+ const canvasHeight = canvas.getBoundingClientRect().height;
341
+ const titleWidth = titleElement.offsetWidth;
342
+ const titleHeight = titleElement.offsetHeight;
343
+
344
+ const anchorTop = model.margin[1];
345
+ const anchorBottom = model.margin[7];
346
+
347
+ const arrowHeight = 7;
348
+ let arrowDirection: 'up'|'down'|undefined;
349
+
350
+ let boxX = Math.max(2, model.margin[0]);
351
+ if (boxX + titleWidth > canvasWidth) {
352
+ boxX = canvasWidth - titleWidth - 2;
353
+ }
354
+
355
+ let boxY;
356
+ if (anchorTop > canvasHeight) {
357
+ boxY = canvasHeight - titleHeight - arrowHeight;
358
+ arrowDirection = 'down';
359
+ } else if (anchorBottom < 0) {
360
+ boxY = arrowHeight;
361
+ arrowDirection = 'up';
362
+ } else if (anchorBottom + titleHeight + arrowHeight < canvasHeight) {
363
+ boxY = anchorBottom + arrowHeight - 4;
364
+ arrowDirection = 'up';
365
+ } else if (anchorTop - titleHeight - arrowHeight > 0) {
366
+ boxY = anchorTop - titleHeight - arrowHeight + 3;
367
+ arrowDirection = 'down';
368
+ } else {
369
+ boxY = arrowHeight;
370
+ }
371
+
372
+ titleElement.style.top = `${boxY}px`;
373
+ titleElement.style.left = `${boxX}px`;
374
+ titleElement.classList.toggle('arrow-up', arrowDirection === 'up');
375
+ titleElement.classList.toggle('arrow-down', arrowDirection === 'down');
376
+ }
242
377
  export class ScreencastView extends UI.Widget.Widget implements SDK.OverlayModel.Highlighter {
243
378
  readonly #view: View;
244
379
  #viewOutput: ViewOutput;
@@ -373,6 +508,8 @@ export class ScreencastView extends UI.Widget.Widget implements SDK.OverlayModel
373
508
  this.requestNavigationHistoryEvent, this);
374
509
  this.resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.CachedResourcesLoaded,
375
510
  this.requestNavigationHistoryEvent, this);
511
+ this.resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.FrameNavigatedWithinDocument,
512
+ this.onFrameNavigated, this);
376
513
  }
377
514
  }
378
515
 
@@ -653,98 +790,6 @@ export class ScreencastView extends UI.Widget.Widget implements SDK.OverlayModel
653
790
  return model;
654
791
  }
655
792
 
656
- static repaintScreencastCanvas(el: HTMLCanvasElement, input: CanvasRenderingInput): void {
657
- const context = el.getContext('2d');
658
- if (!context) {
659
- return;
660
- }
661
-
662
- const model = input.highlightModel;
663
- const config = input.highlightConfig;
664
-
665
- const canvasWidth = el.getBoundingClientRect().width;
666
- const canvasHeight = el.getBoundingClientRect().height;
667
- el.width = window.devicePixelRatio * canvasWidth;
668
- el.height = window.devicePixelRatio * canvasHeight;
669
-
670
- context.save();
671
- context.scale(window.devicePixelRatio, window.devicePixelRatio);
672
-
673
- if (model && config) {
674
- context.save();
675
- const quads = [];
676
- const isTransparent = (color: Protocol.DOM.RGBA): boolean => Boolean(color.a && color.a === 0);
677
- if (model.content && config.contentColor && !isTransparent(config.contentColor)) {
678
- quads.push({quad: model.content, color: config.contentColor});
679
- }
680
- if (model.padding && config.paddingColor && !isTransparent(config.paddingColor)) {
681
- quads.push({quad: model.padding, color: config.paddingColor});
682
- }
683
- if (model.border && config.borderColor && !isTransparent(config.borderColor)) {
684
- quads.push({quad: model.border, color: config.borderColor});
685
- }
686
- if (model.margin && config.marginColor && !isTransparent(config.marginColor)) {
687
- quads.push({quad: model.margin, color: config.marginColor});
688
- }
689
-
690
- for (let i = quads.length - 1; i > 0; --i) {
691
- ScreencastView.drawOutlinedQuadWithClip(context, quads[i].quad, quads[i - 1].quad, quads[i].color);
692
- }
693
- if (quads.length > 0) {
694
- ScreencastView.drawOutlinedQuad(context, quads[0].quad, quads[0].color);
695
- }
696
- context.globalCompositeOperation = 'destination-over';
697
- }
698
-
699
- if (input.screencastImage) {
700
- context.drawImage(input.screencastImage, 0, input.screenOffsetTop * input.screenZoom,
701
- input.screencastImage.naturalWidth * input.imageZoom,
702
- input.screencastImage.naturalHeight * input.imageZoom);
703
- }
704
- context.restore();
705
- }
706
-
707
- private static cssColor(color: Protocol.DOM.RGBA): string {
708
- if (!color) {
709
- return 'transparent';
710
- }
711
- return Common.Color.Legacy.fromRGBA([color.r, color.g, color.b, color.a !== undefined ? color.a : 1])
712
- .asString(Common.Color.Format.RGBA) ||
713
- '';
714
- }
715
-
716
- private static quadToPath(context: CanvasRenderingContext2D, quad: Protocol.DOM.Quad): CanvasRenderingContext2D {
717
- context.beginPath();
718
- context.moveTo(quad[0], quad[1]);
719
- context.lineTo(quad[2], quad[3]);
720
- context.lineTo(quad[4], quad[5]);
721
- context.lineTo(quad[6], quad[7]);
722
- context.closePath();
723
- return context;
724
- }
725
-
726
- private static drawOutlinedQuad(context: CanvasRenderingContext2D, quad: Protocol.DOM.Quad,
727
- fillColor: Protocol.DOM.RGBA): void {
728
- context.save();
729
- context.lineWidth = 2;
730
- ScreencastView.quadToPath(context, quad).clip();
731
- context.fillStyle = ScreencastView.cssColor(fillColor);
732
- context.fill();
733
- context.restore();
734
- }
735
-
736
- private static drawOutlinedQuadWithClip(context: CanvasRenderingContext2D, quad: Protocol.DOM.Quad,
737
- clipQuad: Protocol.DOM.Quad, fillColor: Protocol.DOM.RGBA): void {
738
- context.fillStyle = ScreencastView.cssColor(fillColor);
739
- context.save();
740
- context.lineWidth = 0;
741
- ScreencastView.quadToPath(context, quad).fill();
742
- context.globalCompositeOperation = 'destination-out';
743
- context.fillStyle = 'red';
744
- ScreencastView.quadToPath(context, clipQuad).fill();
745
- context.restore();
746
- }
747
-
748
793
  private drawElementTitle(): void {
749
794
  if (!this.node) {
750
795
  if (this.#elementTitleData.visible) {
@@ -773,50 +818,6 @@ export class ScreencastView extends UI.Widget.Widget implements SDK.OverlayModel
773
818
  }
774
819
  }
775
820
 
776
- static clampTooltipPosition(canvas: HTMLCanvasElement, titleElement: HTMLElement,
777
- model?: Protocol.DOM.BoxModel|null): void {
778
- if (!model) {
779
- return;
780
- }
781
- const canvasWidth = canvas.getBoundingClientRect().width;
782
- const canvasHeight = canvas.getBoundingClientRect().height;
783
- const titleWidth = titleElement.offsetWidth;
784
- const titleHeight = titleElement.offsetHeight;
785
-
786
- const anchorTop = model.margin[1];
787
- const anchorBottom = model.margin[7];
788
-
789
- const arrowHeight = 7;
790
- let arrowDirection: 'up'|'down'|undefined;
791
-
792
- let boxX = Math.max(2, model.margin[0]);
793
- if (boxX + titleWidth > canvasWidth) {
794
- boxX = canvasWidth - titleWidth - 2;
795
- }
796
-
797
- let boxY;
798
- if (anchorTop > canvasHeight) {
799
- boxY = canvasHeight - titleHeight - arrowHeight;
800
- arrowDirection = 'down';
801
- } else if (anchorBottom < 0) {
802
- boxY = arrowHeight;
803
- arrowDirection = 'up';
804
- } else if (anchorBottom + titleHeight + arrowHeight < canvasHeight) {
805
- boxY = anchorBottom + arrowHeight - 4;
806
- arrowDirection = 'up';
807
- } else if (anchorTop - titleHeight - arrowHeight > 0) {
808
- boxY = anchorTop - titleHeight - arrowHeight + 3;
809
- arrowDirection = 'down';
810
- } else {
811
- boxY = arrowHeight;
812
- }
813
-
814
- titleElement.style.top = `${boxY}px`;
815
- titleElement.style.left = `${boxX}px`;
816
- titleElement.classList.toggle('arrow-up', arrowDirection === 'up');
817
- titleElement.classList.toggle('arrow-down', arrowDirection === 'down');
818
- }
819
-
820
821
  private viewportDimensions(): {width: number, height: number} {
821
822
  const gutterSize = 30;
822
823
  const bordersSize = BORDERS_SIZE;
@@ -848,6 +849,8 @@ export class ScreencastView extends UI.Widget.Widget implements SDK.OverlayModel
848
849
  this.requestNavigationHistoryEvent, this);
849
850
  this.resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.CachedResourcesLoaded,
850
851
  this.requestNavigationHistoryEvent, this);
852
+ this.resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigatedWithinDocument,
853
+ this.onFrameNavigated, this);
851
854
  }
852
855
  }
853
856
 
@@ -904,6 +907,13 @@ export class ScreencastView extends UI.Widget.Widget implements SDK.OverlayModel
904
907
  void this.requestNavigationHistory();
905
908
  }
906
909
 
910
+ private onFrameNavigated(event: Common.EventTarget.EventTargetEvent<SDK.ResourceTreeModel.ResourceTreeFrame>): void {
911
+ const frame = event.data;
912
+ if (frame.isOutermostFrame()) {
913
+ this.requestNavigationHistoryEvent();
914
+ }
915
+ }
916
+
907
917
  private async requestNavigationHistory(): Promise<void> {
908
918
  const history = this.resourceTreeModel ? await this.resourceTreeModel.navigationHistory() : null;
909
919
  if (!history) {
@@ -20,7 +20,7 @@ const CITATIONS_TOOLTIP_ID = 'sources-ai-code-completion-citations-tooltip';
20
20
 
21
21
  export class AiCodeCompletionPlugin extends Plugin {
22
22
  #editor?: TextEditor.TextEditor.TextEditor;
23
- #aiCodeCompletionDisclaimer?: PanelCommon.AiCodeCompletionDisclaimer;
23
+ #aiCodeCompletionDisclaimer?: TextEditor.AiCodeCompletionDisclaimer.AiCodeCompletionDisclaimer;
24
24
  #aiCodeCompletionDisclaimerContainer = document.createElement('div');
25
25
  #aiCodeCompletionDisclaimerToolbarItem = new UI.Toolbar.ToolbarItem(this.#aiCodeCompletionDisclaimerContainer);
26
26
  #aiCodeCompletionCitationsToolbar?: PanelCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
@@ -103,7 +103,7 @@ export class AiCodeCompletionPlugin extends Plugin {
103
103
  if (this.#aiCodeCompletionDisclaimer) {
104
104
  return;
105
105
  }
106
- this.#aiCodeCompletionDisclaimer = new PanelCommon.AiCodeCompletionDisclaimer();
106
+ this.#aiCodeCompletionDisclaimer = new TextEditor.AiCodeCompletionDisclaimer.AiCodeCompletionDisclaimer();
107
107
  this.#aiCodeCompletionDisclaimer.disclaimerTooltipId = DISCLAIMER_TOOLTIP_ID;
108
108
  this.#aiCodeCompletionDisclaimer.spinnerTooltipId = SPINNER_TOOLTIP_ID;
109
109
  this.#aiCodeCompletionDisclaimer.disclaimerTextVariant = 'sources';
@@ -170,9 +170,9 @@ export class BreakpointsSidebarController implements UI.ContextFlavorListener.Co
170
170
  Breakpoints.BreakpointManager.Events.BreakpointAdded, this.#onBreakpointAdded, this);
171
171
  this.#breakpointManager.addEventListener(
172
172
  Breakpoints.BreakpointManager.Events.BreakpointRemoved, this.#onBreakpointRemoved, this);
173
- this.#breakpointsActiveSetting = settings.moduleSetting('breakpoints-active');
173
+ this.#breakpointsActiveSetting = settings.resolve(SDK.SDKSettings.breakpointsActiveSettingDescriptor);
174
174
  this.#breakpointsActiveSetting.addChangeListener(this.update, this);
175
- this.#pauseOnUncaughtExceptionSetting = settings.moduleSetting('pause-on-uncaught-exception');
175
+ this.#pauseOnUncaughtExceptionSetting = settings.resolve(SDK.SDKSettings.pauseOnUncaughtExceptionSettingDescriptor);
176
176
  this.#pauseOnUncaughtExceptionSetting.addChangeListener(this.update, this);
177
177
  this.#pauseOnCaughtExceptionSetting = settings.resolve(SDK.SDKSettings.pauseOnCaughtExceptionSettingDescriptor);
178
178
  this.#pauseOnCaughtExceptionSetting.addChangeListener(this.update, this);