chrome-devtools-frontend 1.0.1548980 → 1.0.1550444

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 (323) hide show
  1. package/docs/contributing/settings-experiments-features.md +35 -0
  2. package/docs/styleguide/ux/components.md +53 -12
  3. package/docs/styleguide/ux/images/cards.png +0 -0
  4. package/docs/styleguide/ux/patterns.md +27 -0
  5. package/docs/ui_engineering.md +2 -2
  6. package/eslint.config.mjs +1 -0
  7. package/front_end/Tests.js +2 -0
  8. package/front_end/core/host/InspectorFrontendHost.ts +26 -558
  9. package/front_end/core/host/InspectorFrontendHostAPI.ts +6 -3
  10. package/front_end/core/host/InspectorFrontendHostStub.ts +558 -0
  11. package/front_end/core/host/ResourceLoader.ts +9 -23
  12. package/front_end/core/host/UserMetrics.ts +4 -4
  13. package/front_end/core/root/DevToolsContext.ts +4 -0
  14. package/front_end/core/root/Runtime.ts +10 -0
  15. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
  16. package/front_end/core/sdk/CSSModel.ts +24 -24
  17. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -11
  18. package/front_end/core/sdk/CSSQuery.ts +1 -1
  19. package/front_end/core/sdk/CSSRule.ts +2 -2
  20. package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
  21. package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
  22. package/front_end/core/sdk/DOMModel.ts +3 -0
  23. package/front_end/core/sdk/NetworkManager.ts +41 -41
  24. package/front_end/core/sdk/NetworkRequest.ts +4 -0
  25. package/front_end/core/sdk/OverlayModel.ts +2 -2
  26. package/front_end/core/sdk/PageResourceLoader.ts +71 -38
  27. package/front_end/core/sdk/SourceMap.ts +6 -0
  28. package/front_end/core/sdk/SourceMapCache.ts +21 -0
  29. package/front_end/core/sdk/SourceMapManager.ts +14 -7
  30. package/front_end/core/sdk/SourceMapScopesInfo.ts +6 -2
  31. package/front_end/core/sdk/TargetManager.ts +14 -2
  32. package/front_end/core/sdk/sdk-meta.ts +13 -0
  33. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
  34. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +1 -1
  35. package/front_end/entrypoints/main/MainImpl.ts +5 -4
  36. package/front_end/foundation/Universe.ts +8 -1
  37. package/front_end/generated/Deprecation.ts +18 -4
  38. package/front_end/generated/InspectorBackendCommands.ts +38 -33
  39. package/front_end/generated/SupportedCSSProperties.js +41 -41
  40. package/front_end/generated/protocol-mapping.d.ts +20 -0
  41. package/front_end/generated/protocol-proxy-api.d.ts +17 -0
  42. package/front_end/generated/protocol.ts +146 -35
  43. package/front_end/models/ai_assistance/AiConversation.ts +5 -4
  44. package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
  45. package/front_end/models/ai_assistance/ChangeManager.ts +4 -4
  46. package/front_end/models/ai_assistance/ConversationHandler.ts +0 -15
  47. package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -6
  48. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +135 -3
  49. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +24 -0
  50. package/front_end/models/bindings/CompilerScriptMapping.ts +43 -0
  51. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +19 -0
  52. package/front_end/models/bindings/ResourceMapping.ts +73 -0
  53. package/front_end/models/bindings/ResourceScriptMapping.ts +50 -0
  54. package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
  55. package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
  56. package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
  57. package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
  58. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
  59. package/front_end/models/issues_manager/CookieIssue.ts +27 -30
  60. package/front_end/models/issues_manager/CorsIssue.ts +8 -17
  61. package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
  62. package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
  63. package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
  64. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
  65. package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
  66. package/front_end/models/issues_manager/GenericIssue.ts +28 -16
  67. package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
  68. package/front_end/models/issues_manager/Issue.ts +12 -4
  69. package/front_end/models/issues_manager/IssueAggregator.ts +8 -2
  70. package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
  71. package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
  72. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
  73. package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
  74. package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
  75. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
  76. package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
  77. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
  78. package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
  79. package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
  80. package/front_end/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  81. package/front_end/models/javascript_metadata/NativeFunctions.js +7 -16
  82. package/front_end/models/source_map_scopes/FunctionCodeResolver.snapshot.txt +98 -0
  83. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +270 -0
  84. package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
  85. package/front_end/models/workspace/UISourceCode.ts +51 -44
  86. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +76 -34
  87. package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -0
  88. package/front_end/panels/ai_assistance/components/ChatView.ts +23 -11
  89. package/front_end/panels/application/AppManifestView.ts +7 -6
  90. package/front_end/panels/application/ApplicationPanelSidebar.ts +21 -21
  91. package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
  92. package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
  93. package/front_end/panels/application/FrameDetailsView.ts +5 -6
  94. package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
  95. package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
  96. package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
  97. package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
  98. package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
  99. package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
  100. package/front_end/panels/application/ServiceWorkersView.ts +2 -2
  101. package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
  102. package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
  103. package/front_end/panels/application/StorageView.ts +2 -2
  104. package/front_end/panels/application/TrustTokensTreeElement.ts +4 -8
  105. package/front_end/panels/application/components/PermissionsPolicySection.ts +202 -158
  106. package/front_end/panels/application/components/ProtocolHandlersView.ts +118 -81
  107. package/front_end/panels/application/components/ServiceWorkerRouterView.ts +47 -41
  108. package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
  109. package/front_end/panels/application/components/StorageMetadataView.ts +31 -34
  110. package/front_end/panels/application/components/TrustTokensView.ts +77 -69
  111. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
  112. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +1 -1
  113. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
  114. package/front_end/panels/changes/ChangesSidebar.ts +2 -0
  115. package/front_end/panels/changes/CombinedDiffView.ts +2 -0
  116. package/front_end/panels/common/AnnotationManager.ts +71 -0
  117. package/front_end/panels/common/PersistenceUtils.ts +6 -7
  118. package/front_end/panels/common/common.ts +1 -0
  119. package/front_end/panels/console/ConsolePrompt.ts +4 -4
  120. package/front_end/panels/console/ConsoleView.ts +5 -4
  121. package/front_end/panels/console/ConsoleViewMessage.ts +16 -15
  122. package/front_end/panels/console/console-meta.ts +0 -13
  123. package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
  124. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
  125. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -1
  126. package/front_end/panels/elements/CSSRuleValidator.ts +7 -7
  127. package/front_end/panels/elements/CSSRuleValidatorHelper.ts +2 -2
  128. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
  129. package/front_end/panels/elements/ElementsPanel.ts +49 -0
  130. package/front_end/panels/elements/ElementsTreeElement.ts +172 -121
  131. package/front_end/panels/elements/ElementsTreeOutline.ts +11 -3
  132. package/front_end/panels/elements/LayoutPane.ts +12 -10
  133. package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
  134. package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
  135. package/front_end/panels/elements/StylePropertyTreeElement.ts +18 -18
  136. package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
  137. package/front_end/panels/elements/TopLayerContainer.ts +2 -2
  138. package/front_end/panels/elements/components/AdornerManager.ts +3 -3
  139. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  140. package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
  141. package/front_end/panels/elements/components/QueryContainer.ts +1 -1
  142. package/front_end/panels/elements/components/StylePropertyEditor.ts +7 -7
  143. package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
  144. package/front_end/panels/explain/components/ConsoleInsight.ts +6 -4
  145. package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
  146. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
  147. package/front_end/panels/issues/IssueKindView.ts +2 -2
  148. package/front_end/panels/issues/IssueView.ts +4 -4
  149. package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
  150. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +28 -50
  151. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +15 -11
  152. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
  153. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
  154. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
  155. package/front_end/panels/media/PlayerListView.ts +100 -73
  156. package/front_end/panels/media/playerListView.css +5 -0
  157. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
  158. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -5
  159. package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
  160. package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
  161. package/front_end/panels/network/NetworkItemView.ts +4 -4
  162. package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
  163. package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
  164. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  165. package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
  166. package/front_end/panels/network/components/DirectSocketConnectionView.ts +17 -0
  167. package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
  168. package/front_end/panels/network/resourceChunkView.css +4 -0
  169. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
  170. package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
  171. package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
  172. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  173. package/front_end/panels/recorder/components/CreateRecordingView.ts +1 -1
  174. package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
  175. package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
  176. package/front_end/panels/recorder/components/RecordingView.ts +1 -1
  177. package/front_end/panels/recorder/components/StepView.ts +1 -1
  178. package/front_end/panels/screencast/ScreencastView.ts +8 -8
  179. package/front_end/panels/search/SearchView.ts +1 -1
  180. package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
  181. package/front_end/panels/security/CookieControlsView.ts +1 -1
  182. package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
  183. package/front_end/panels/security/SecurityPanel.ts +5 -5
  184. package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
  185. package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
  186. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
  187. package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -5
  188. package/front_end/panels/settings/SettingsScreen.ts +7 -8
  189. package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
  190. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -1
  191. package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -6
  192. package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
  193. package/front_end/panels/sources/BreakpointsView.ts +1 -1
  194. package/front_end/panels/sources/CSSPlugin.ts +4 -4
  195. package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
  196. package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
  197. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +40 -23
  198. package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -5
  199. package/front_end/panels/sources/NavigatorView.ts +4 -4
  200. package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -16
  201. package/front_end/panels/sources/OutlineQuickOpen.ts +23 -23
  202. package/front_end/panels/sources/ProfilePlugin.ts +21 -12
  203. package/front_end/panels/sources/SourcesView.ts +2 -2
  204. package/front_end/panels/sources/TabbedEditorContainer.ts +4 -5
  205. package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
  206. package/front_end/panels/sources/UISourceCodeFrame.ts +5 -6
  207. package/front_end/panels/sources/filteredUISourceCodeListProvider.css +41 -0
  208. package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
  209. package/front_end/panels/timeline/TimelinePanel.ts +29 -25
  210. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +3 -3
  211. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
  212. package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
  213. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
  214. package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
  215. package/front_end/panels/timeline/components/OriginMap.ts +1 -1
  216. package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
  217. package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -1
  218. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -1
  219. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
  220. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
  221. package/front_end/panels/timeline/docs/flame_chart_migration.md +11 -16
  222. package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
  223. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
  224. package/front_end/panels/timeline/timeline-meta.ts +3 -2
  225. package/front_end/panels/utils/utils.ts +18 -3
  226. package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -20
  227. package/front_end/panels/whats_new/resources/WNDT.md +8 -8
  228. package/front_end/third_party/chromium/README.chromium +1 -1
  229. package/front_end/third_party/puppeteer/third_party/mitt/README.chromium +1 -0
  230. package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -0
  231. package/front_end/third_party/puppeteer/third_party/rxjs/README.chromium +1 -0
  232. package/front_end/ui/components/adorners/Adorner.ts +21 -1
  233. package/front_end/ui/components/annotations/AnnotationRepository.ts +98 -0
  234. package/front_end/ui/components/annotations/AnnotationType.ts +10 -0
  235. package/front_end/ui/components/annotations/annotations.ts +6 -0
  236. package/front_end/ui/components/buttons/Button.ts +2 -2
  237. package/front_end/ui/components/buttons/FloatingButton.ts +2 -2
  238. package/front_end/ui/components/chrome_link/ChromeLink.ts +1 -1
  239. package/front_end/ui/components/dialogs/ButtonDialog.ts +1 -1
  240. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  241. package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -0
  242. package/front_end/ui/components/diff_view/DiffView.ts +1 -1
  243. package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
  244. package/front_end/ui/components/highlighting/HighlightElement.ts +16 -2
  245. package/front_end/ui/components/highlighting/MarkupHighlight.ts +162 -0
  246. package/front_end/ui/components/highlighting/highlighting.ts +7 -0
  247. package/front_end/ui/components/icon_button/FileSourceIcon.ts +2 -2
  248. package/front_end/ui/components/icon_button/IconButton.ts +2 -2
  249. package/front_end/ui/components/icon_button/icon_button.ts +0 -2
  250. package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
  251. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +2 -2
  252. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +1 -1
  253. package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
  254. package/front_end/ui/components/list/List.ts +184 -0
  255. package/front_end/ui/components/list/list.css +90 -0
  256. package/front_end/ui/components/{cards/cards.ts → list/lists.ts} +3 -3
  257. package/front_end/ui/components/markdown_view/CodeBlock.ts +1 -1
  258. package/front_end/ui/components/markdown_view/MarkdownImage.ts +4 -4
  259. package/front_end/ui/components/markdown_view/MarkdownLink.ts +1 -1
  260. package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
  261. package/front_end/ui/components/menus/Menu.ts +1 -1
  262. package/front_end/ui/components/menus/SelectMenu.ts +1 -1
  263. package/front_end/ui/components/node_text/NodeText.ts +1 -1
  264. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +1 -1
  265. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
  266. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  267. package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +1 -1
  268. package/front_end/ui/components/report_view/ReportView.ts +1 -1
  269. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +2 -2
  270. package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
  271. package/front_end/ui/components/settings/SettingDeprecationWarning.ts +2 -2
  272. package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
  273. package/front_end/ui/components/spinners/Spinner.ts +1 -1
  274. package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
  275. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -0
  276. package/front_end/ui/components/survey_link/SurveyLink.ts +2 -2
  277. package/front_end/ui/components/switch/SwitchImpl.ts +1 -1
  278. package/front_end/ui/components/text_editor/TextEditor.ts +1 -0
  279. package/front_end/ui/components/text_editor/config.ts +2 -2
  280. package/front_end/ui/components/text_prompt/TextPrompt.ts +1 -1
  281. package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
  282. package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
  283. package/front_end/ui/kit/cards/Card.docs.ts +43 -0
  284. package/front_end/ui/{components/icon_button → kit/icons}/Icon.docs.ts +3 -4
  285. package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +6 -4
  286. package/front_end/ui/kit/kit.ts +6 -0
  287. package/front_end/ui/legacy/Infobar.ts +3 -3
  288. package/front_end/ui/legacy/InspectorView.ts +3 -3
  289. package/front_end/ui/legacy/SearchableView.ts +2 -2
  290. package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
  291. package/front_end/ui/legacy/SoftDropDown.ts +2 -2
  292. package/front_end/ui/legacy/TabbedPane.ts +106 -8
  293. package/front_end/ui/legacy/Toolbar.ts +3 -3
  294. package/front_end/ui/legacy/Treeoutline.ts +2 -2
  295. package/front_end/ui/legacy/UIUtils.ts +4 -188
  296. package/front_end/ui/legacy/ViewManager.ts +27 -12
  297. package/front_end/ui/legacy/ViewRegistration.ts +21 -22
  298. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
  299. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
  300. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +4 -4
  301. package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
  302. package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
  303. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
  304. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -4
  305. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +73 -35
  306. package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +11 -2
  307. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
  308. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +23 -31
  309. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +11 -27
  310. package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -15
  311. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +18 -65
  312. package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -1
  313. package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
  314. package/front_end/ui/legacy/tabbedPane.css +10 -0
  315. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  316. package/inspector_overlay/README.md +3 -3
  317. package/mcp/HostBindings.ts +310 -0
  318. package/mcp/mcp.ts +18 -0
  319. package/mcp/tsconfig.json +6 -1
  320. package/package.json +26 -24
  321. /package/front_end/ui/{components → kit}/cards/Card.ts +0 -0
  322. /package/front_end/ui/{components → kit}/cards/card.css +0 -0
  323. /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
@@ -37,7 +37,7 @@ export interface LayoutProperties {
37
37
  isFlex: boolean;
38
38
  isGrid: boolean;
39
39
  isSubgrid: boolean;
40
- isMasonry: boolean;
40
+ isGridLanes: boolean;
41
41
  isContainer: boolean;
42
42
  hasScroll: boolean;
43
43
  }
@@ -52,8 +52,8 @@ export class CSSModel extends SDKModel<EventTypes> {
52
52
  readonly #styleLoader: ComputedStyleLoader;
53
53
  readonly #stylePollingThrottler = new Common.Throttler.Throttler(StylePollingInterval);
54
54
  readonly #styleSheetIdsForURL =
55
- new Map<Platform.DevToolsPath.UrlString, Map<string, Set<Protocol.CSS.StyleSheetId>>>();
56
- readonly #styleSheetIdToHeader = new Map<Protocol.CSS.StyleSheetId, CSSStyleSheetHeader>();
55
+ new Map<Platform.DevToolsPath.UrlString, Map<string, Set<Protocol.DOM.StyleSheetId>>>();
56
+ readonly #styleSheetIdToHeader = new Map<Protocol.DOM.StyleSheetId, CSSStyleSheetHeader>();
57
57
  #cachedMatchedCascadeNode: DOMNode|null = null;
58
58
  #cachedMatchedCascadePromise: Promise<CSSMatchedStyles|null>|null = null;
59
59
  #cssPropertyTracker: CSSPropertyTracker|null = null;
@@ -183,7 +183,7 @@ export class CSSModel extends SDKModel<EventTypes> {
183
183
  }
184
184
 
185
185
  async setStyleText(
186
- styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string,
186
+ styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string,
187
187
  majorChange: boolean): Promise<boolean> {
188
188
  try {
189
189
  await this.ensureOriginalStyleSheetText(styleSheetId);
@@ -204,7 +204,7 @@ export class CSSModel extends SDKModel<EventTypes> {
204
204
  }
205
205
  }
206
206
 
207
- async setSelectorText(styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string):
207
+ async setSelectorText(styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string):
208
208
  Promise<boolean> {
209
209
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
210
210
 
@@ -226,7 +226,7 @@ export class CSSModel extends SDKModel<EventTypes> {
226
226
  }
227
227
 
228
228
  async setPropertyRulePropertyName(
229
- styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string): Promise<boolean> {
229
+ styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string): Promise<boolean> {
230
230
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
231
231
 
232
232
  try {
@@ -247,7 +247,7 @@ export class CSSModel extends SDKModel<EventTypes> {
247
247
  }
248
248
  }
249
249
 
250
- async setKeyframeKey(styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string):
250
+ async setKeyframeKey(styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange, text: string):
251
251
  Promise<boolean> {
252
252
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
253
253
 
@@ -367,7 +367,7 @@ export class CSSModel extends SDKModel<EventTypes> {
367
367
  return await CSSMatchedStyles.create(payload);
368
368
  }
369
369
 
370
- async getClassNames(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string[]> {
370
+ async getClassNames(styleSheetId: Protocol.DOM.StyleSheetId): Promise<string[]> {
371
371
  const {classNames} = await this.agent.invoke_collectClassNames({styleSheetId});
372
372
  return classNames || [];
373
373
  }
@@ -392,7 +392,7 @@ export class CSSModel extends SDKModel<EventTypes> {
392
392
  (styles.get('grid-template-columns')?.startsWith('subgrid') ||
393
393
  styles.get('grid-template-rows')?.startsWith('subgrid'))) ??
394
394
  false;
395
- const isMasonry = display === 'masonry' || display === 'inline-masonry';
395
+ const isGridLanes = display === 'grid-lanes' || display === 'inline-grid-lanes';
396
396
  const containerType = styles.get('container-type');
397
397
  const isContainer = Boolean(containerType) && containerType !== '' && containerType !== 'normal';
398
398
  const hasScroll = Boolean(styles.get('scroll-snap-type')) && styles.get('scroll-snap-type') !== 'none';
@@ -401,7 +401,7 @@ export class CSSModel extends SDKModel<EventTypes> {
401
401
  isFlex,
402
402
  isGrid,
403
403
  isSubgrid,
404
- isMasonry,
404
+ isGridLanes,
405
405
  isContainer,
406
406
  hasScroll,
407
407
  };
@@ -502,7 +502,7 @@ export class CSSModel extends SDKModel<EventTypes> {
502
502
  }
503
503
 
504
504
  async setMediaText(
505
- styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange,
505
+ styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
506
506
  newMediaText: string): Promise<boolean> {
507
507
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
508
508
 
@@ -524,7 +524,7 @@ export class CSSModel extends SDKModel<EventTypes> {
524
524
  }
525
525
 
526
526
  async setContainerQueryText(
527
- styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange,
527
+ styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
528
528
  newContainerQueryText: string): Promise<boolean> {
529
529
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
530
530
 
@@ -547,7 +547,7 @@ export class CSSModel extends SDKModel<EventTypes> {
547
547
  }
548
548
 
549
549
  async setSupportsText(
550
- styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange,
550
+ styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
551
551
  newSupportsText: string): Promise<boolean> {
552
552
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
553
553
 
@@ -569,7 +569,7 @@ export class CSSModel extends SDKModel<EventTypes> {
569
569
  }
570
570
 
571
571
  async setScopeText(
572
- styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange,
572
+ styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
573
573
  newScopeText: string): Promise<boolean> {
574
574
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
575
575
 
@@ -590,7 +590,7 @@ export class CSSModel extends SDKModel<EventTypes> {
590
590
  }
591
591
  }
592
592
 
593
- async addRule(styleSheetId: Protocol.CSS.StyleSheetId, ruleText: string, ruleLocation: TextUtils.TextRange.TextRange):
593
+ async addRule(styleSheetId: Protocol.DOM.StyleSheetId, ruleText: string, ruleLocation: TextUtils.TextRange.TextRange):
594
594
  Promise<CSSStyleRule|null> {
595
595
  try {
596
596
  await this.ensureOriginalStyleSheetText(styleSheetId);
@@ -657,7 +657,7 @@ export class CSSModel extends SDKModel<EventTypes> {
657
657
  return this.#fontFaces.get(src);
658
658
  }
659
659
 
660
- styleSheetHeaderForId(id: Protocol.CSS.StyleSheetId): CSSStyleSheetHeader|null {
660
+ styleSheetHeaderForId(id: Protocol.DOM.StyleSheetId): CSSStyleSheetHeader|null {
661
661
  return this.#styleSheetIdToHeader.get(id) || null;
662
662
  }
663
663
 
@@ -665,11 +665,11 @@ export class CSSModel extends SDKModel<EventTypes> {
665
665
  return [...this.#styleSheetIdToHeader.values()];
666
666
  }
667
667
 
668
- fireStyleSheetChanged(styleSheetId: Protocol.CSS.StyleSheetId, edit?: Edit): void {
668
+ fireStyleSheetChanged(styleSheetId: Protocol.DOM.StyleSheetId, edit?: Edit): void {
669
669
  this.dispatchEventToListeners(Events.StyleSheetChanged, {styleSheetId, edit});
670
670
  }
671
671
 
672
- private ensureOriginalStyleSheetText(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string|null> {
672
+ private ensureOriginalStyleSheetText(styleSheetId: Protocol.DOM.StyleSheetId): Promise<string|null> {
673
673
  const header = this.styleSheetHeaderForId(styleSheetId);
674
674
  if (!header) {
675
675
  return Promise.resolve(null);
@@ -732,7 +732,7 @@ export class CSSModel extends SDKModel<EventTypes> {
732
732
  this.dispatchEventToListeners(Events.StyleSheetAdded, styleSheetHeader);
733
733
  }
734
734
 
735
- styleSheetRemoved(id: Protocol.CSS.StyleSheetId): void {
735
+ styleSheetRemoved(id: Protocol.DOM.StyleSheetId): void {
736
736
  const header = this.#styleSheetIdToHeader.get(id);
737
737
  console.assert(Boolean(header));
738
738
  if (!header) {
@@ -760,7 +760,7 @@ export class CSSModel extends SDKModel<EventTypes> {
760
760
  this.dispatchEventToListeners(Events.StyleSheetRemoved, header);
761
761
  }
762
762
 
763
- getStyleSheetIdsForURL(url: Platform.DevToolsPath.UrlString): Protocol.CSS.StyleSheetId[] {
763
+ getStyleSheetIdsForURL(url: Platform.DevToolsPath.UrlString): Protocol.DOM.StyleSheetId[] {
764
764
  const frameIdToStyleSheetIds = this.#styleSheetIdsForURL.get(url);
765
765
  if (!frameIdToStyleSheetIds) {
766
766
  return [];
@@ -773,7 +773,7 @@ export class CSSModel extends SDKModel<EventTypes> {
773
773
  return result;
774
774
  }
775
775
 
776
- async setStyleSheetText(styleSheetId: Protocol.CSS.StyleSheetId, newText: string, majorChange: boolean):
776
+ async setStyleSheetText(styleSheetId: Protocol.DOM.StyleSheetId, newText: string, majorChange: boolean):
777
777
  Promise<string|null> {
778
778
  const header = this.#styleSheetIdToHeader.get(styleSheetId);
779
779
  if (!header) {
@@ -799,7 +799,7 @@ export class CSSModel extends SDKModel<EventTypes> {
799
799
  return null;
800
800
  }
801
801
 
802
- async getStyleSheetText(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string|null> {
802
+ async getStyleSheetText(styleSheetId: Protocol.DOM.StyleSheetId): Promise<string|null> {
803
803
  const response = await this.agent.invoke_getStyleSheetText({styleSheetId});
804
804
  if (response.getError()) {
805
805
  return null;
@@ -953,7 +953,7 @@ export enum Events {
953
953
  }
954
954
 
955
955
  export interface StyleSheetChangedEvent {
956
- styleSheetId: Protocol.CSS.StyleSheetId;
956
+ styleSheetId: Protocol.DOM.StyleSheetId;
957
957
  edit?: Edit;
958
958
  }
959
959
 
@@ -999,7 +999,7 @@ export class Edit {
999
999
 
1000
1000
  export class CSSLocation {
1001
1001
  readonly #cssModel: CSSModel;
1002
- styleSheetId: Protocol.CSS.StyleSheetId;
1002
+ styleSheetId: Protocol.DOM.StyleSheetId;
1003
1003
  url: Platform.DevToolsPath.UrlString;
1004
1004
  lineNumber: number;
1005
1005
  columnNumber: number;
@@ -1075,25 +1075,25 @@ export class CustomFunctionMatcher extends matcherBase(CustomFunctionMatch) {
1075
1075
  export const enum LayoutType {
1076
1076
  FLEX = 'flex',
1077
1077
  GRID = 'grid',
1078
- MASONRY = 'masonry'
1078
+ GRID_LANES = 'grid-lanes',
1079
1079
  }
1080
1080
 
1081
- export class FlexGridMasonryMatch implements Match {
1081
+ export class FlexGridGridLanesMatch implements Match {
1082
1082
  constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode, readonly layoutType: LayoutType) {
1083
1083
  }
1084
1084
  }
1085
1085
 
1086
1086
  // clang-format off
1087
- export class FlexGridMasonryMatcher extends matcherBase(FlexGridMasonryMatch) {
1087
+ export class FlexGridGridLanesMatcher extends matcherBase(FlexGridGridLanesMatch) {
1088
1088
  // clang-format on
1089
1089
  static readonly FLEX = ['flex', 'inline-flex', 'block flex', 'inline flex'];
1090
1090
  static readonly GRID = ['grid', 'inline-grid', 'block grid', 'inline grid'];
1091
- static readonly MASONRY = ['masonry', 'inline-masonry', 'block masonry', 'inline masonry'];
1091
+ static readonly GRID_LANES = ['grid-lanes', 'inline-grid-lanes', 'block grid-lanes', 'inline grid-lanes'];
1092
1092
  override accepts(propertyName: string): boolean {
1093
1093
  return propertyName === 'display';
1094
1094
  }
1095
1095
 
1096
- override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): FlexGridMasonryMatch|null {
1096
+ override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): FlexGridGridLanesMatch|null {
1097
1097
  if (node.name !== 'Declaration') {
1098
1098
  return null;
1099
1099
  }
@@ -1105,14 +1105,14 @@ export class FlexGridMasonryMatcher extends matcherBase(FlexGridMasonryMatch) {
1105
1105
  .map(node => matching.getComputedText(node).trim())
1106
1106
  .filter(value => value);
1107
1107
  const text = values.join(' ');
1108
- if (FlexGridMasonryMatcher.FLEX.includes(text)) {
1109
- return new FlexGridMasonryMatch(matching.ast.text(node), node, LayoutType.FLEX);
1108
+ if (FlexGridGridLanesMatcher.FLEX.includes(text)) {
1109
+ return new FlexGridGridLanesMatch(matching.ast.text(node), node, LayoutType.FLEX);
1110
1110
  }
1111
- if (FlexGridMasonryMatcher.GRID.includes(text)) {
1112
- return new FlexGridMasonryMatch(matching.ast.text(node), node, LayoutType.GRID);
1111
+ if (FlexGridGridLanesMatcher.GRID.includes(text)) {
1112
+ return new FlexGridGridLanesMatch(matching.ast.text(node), node, LayoutType.GRID);
1113
1113
  }
1114
- if (FlexGridMasonryMatcher.MASONRY.includes(text)) {
1115
- return new FlexGridMasonryMatch(matching.ast.text(node), node, LayoutType.MASONRY);
1114
+ if (FlexGridGridLanesMatcher.GRID_LANES.includes(text)) {
1115
+ return new FlexGridGridLanesMatch(matching.ast.text(node), node, LayoutType.GRID_LANES);
1116
1116
  }
1117
1117
  return null;
1118
1118
  }
@@ -14,7 +14,7 @@ type CSSQueryPayload =
14
14
  export abstract class CSSQuery {
15
15
  text = '';
16
16
  range?: TextUtils.TextRange.TextRange|null;
17
- styleSheetId?: Protocol.CSS.StyleSheetId;
17
+ styleSheetId?: Protocol.DOM.StyleSheetId;
18
18
  protected cssModel: CSSModel;
19
19
 
20
20
  constructor(cssModel: CSSModel) {
@@ -17,7 +17,7 @@ import type {CSSStyleSheetHeader} from './CSSStyleSheetHeader.js';
17
17
  import {CSSSupports} from './CSSSupports.js';
18
18
 
19
19
  function styleSheetHeaderForRule(
20
- cssModel: CSSModel, {styleSheetId}: {styleSheetId?: Protocol.CSS.StyleSheetId}): CSSStyleSheetHeader|null {
20
+ cssModel: CSSModel, {styleSheetId}: {styleSheetId?: Protocol.DOM.StyleSheetId}): CSSStyleSheetHeader|null {
21
21
  return styleSheetId && cssModel.styleSheetHeaderForId(styleSheetId) || null;
22
22
  }
23
23
 
@@ -143,7 +143,7 @@ export class CSSStyleRule extends CSSRule {
143
143
  selectors: [{text: selectorText, value: undefined}],
144
144
  },
145
145
  style: {
146
- styleSheetId: '0' as Protocol.CSS.StyleSheetId,
146
+ styleSheetId: '0' as Protocol.DOM.StyleSheetId,
147
147
  range: new TextUtils.TextRange.TextRange(0, 0, 0, 0),
148
148
  shorthandEntries: [],
149
149
  cssProperties: [],
@@ -15,7 +15,7 @@ export class CSSStyleDeclaration {
15
15
  readonly #cssModel: CSSModel;
16
16
  parentRule: CSSRule|null;
17
17
  #allProperties: CSSProperty[] = [];
18
- styleSheetId?: Protocol.CSS.StyleSheetId;
18
+ styleSheetId?: Protocol.DOM.StyleSheetId;
19
19
  range: TextUtils.TextRange.TextRange|null = null;
20
20
  cssText?: string;
21
21
  #shorthandValues = new Map<string, string>();
@@ -30,7 +30,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
30
30
 
31
31
  export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentProvider, FrameAssociated {
32
32
  #cssModel: CSSModel;
33
- id: Protocol.CSS.StyleSheetId;
33
+ id: Protocol.DOM.StyleSheetId;
34
34
  frameId: Protocol.Page.FrameId;
35
35
  sourceURL: Platform.DevToolsPath.UrlString;
36
36
  hasSourceURL: boolean;
@@ -1800,6 +1800,9 @@ class DOMDispatcher implements ProtocolProxyApi.DOMDispatcher {
1800
1800
  constructor(domModel: DOMModel) {
1801
1801
  this.#domModel = domModel;
1802
1802
  }
1803
+ adoptedStyleSheetsModified(_params: Protocol.DOM.AdoptedStyleSheetsModifiedEvent): void {
1804
+ // TODO: implementation
1805
+ }
1803
1806
 
1804
1807
  documentUpdated(): void {
1805
1808
  this.#domModel.documentUpdated();
@@ -6,7 +6,6 @@ import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
6
6
  import * as Protocol from '../../generated/protocol.js';
7
7
  import * as TextUtils from '../../models/text_utils/text_utils.js';
8
8
  import * as Common from '../common/common.js';
9
- import * as Host from '../host/host.js';
10
9
  import * as i18n from '../i18n/i18n.js';
11
10
  import * as Platform from '../platform/platform.js';
12
11
  import * as Root from '../root/root.js';
@@ -1404,7 +1403,11 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1404
1403
  sendBufferSize: event.options.sendBufferSize,
1405
1404
  receiveBufferSize: event.options.receiveBufferSize,
1406
1405
  dnsQueryType: event.options.dnsQueryType,
1407
- }
1406
+ multicastLoopback: event.options.multicastLoopback,
1407
+ multicastTimeToLive: event.options.multicastTimeToLive,
1408
+ multicastAllowAddressSharing: event.options.multicastAllowAddressSharing,
1409
+ },
1410
+ joinedMulticastGroups: new Set(),
1408
1411
  };
1409
1412
  networkRequest.setResourceType(Common.ResourceType.resourceTypes.DirectSocket);
1410
1413
  networkRequest.setIssueTime(event.timestamp, event.timestamp);
@@ -1502,10 +1505,28 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1502
1505
  this.updateNetworkRequest(networkRequest);
1503
1506
  }
1504
1507
 
1505
- directUDPSocketJoinedMulticastGroup(_event: Protocol.Network.DirectUDPSocketJoinedMulticastGroupEvent): void {
1508
+ directUDPSocketJoinedMulticastGroup(event: Protocol.Network.DirectUDPSocketJoinedMulticastGroupEvent): void {
1509
+ const networkRequest = this.#requestsById.get(event.identifier);
1510
+ if (!networkRequest?.directSocketInfo) {
1511
+ return;
1512
+ }
1513
+ if (!networkRequest.directSocketInfo.joinedMulticastGroups) {
1514
+ networkRequest.directSocketInfo.joinedMulticastGroups = new Set();
1515
+ }
1516
+ if (!networkRequest.directSocketInfo.joinedMulticastGroups.has(event.IPAddress)) {
1517
+ networkRequest.directSocketInfo.joinedMulticastGroups.add(event.IPAddress);
1518
+ this.updateNetworkRequest(networkRequest);
1519
+ }
1506
1520
  }
1507
1521
 
1508
- directUDPSocketLeftMulticastGroup(_event: Protocol.Network.DirectUDPSocketLeftMulticastGroupEvent): void {
1522
+ directUDPSocketLeftMulticastGroup(event: Protocol.Network.DirectUDPSocketLeftMulticastGroupEvent): void {
1523
+ const networkRequest = this.#requestsById.get(event.identifier);
1524
+ if (!networkRequest?.directSocketInfo?.joinedMulticastGroups) {
1525
+ return;
1526
+ }
1527
+ if (networkRequest.directSocketInfo.joinedMulticastGroups.delete(event.IPAddress)) {
1528
+ this.updateNetworkRequest(networkRequest);
1529
+ }
1509
1530
  }
1510
1531
 
1511
1532
  trustTokenOperationDone(event: Protocol.Network.TrustTokenOperationDoneEvent): void {
@@ -1912,8 +1933,10 @@ export class RequestConditions extends Common.ObjectWrapper.ObjectWrapper<Reques
1912
1933
  promises.push(agent.invoke_overrideNetworkState({
1913
1934
  offline,
1914
1935
  latency: globalConditions?.latency ?? 0,
1915
- downloadThroughput: !globalConditions || globalConditions.download < 0 ? 0 : globalConditions.download,
1916
- uploadThroughput: !globalConditions || globalConditions.upload < 0 ? 0 : globalConditions.upload,
1936
+ downloadThroughput: globalConditions?.download ?? -1,
1937
+ uploadThroughput: globalConditions?.upload ?? -1,
1938
+ connectionType: globalConditions ? NetworkManager.connectionType(globalConditions) :
1939
+ Protocol.Network.ConnectionType.None,
1917
1940
  }));
1918
1941
  }
1919
1942
 
@@ -1955,8 +1978,6 @@ export namespace RequestConditions {
1955
1978
  }
1956
1979
  }
1957
1980
 
1958
- let multiTargetNetworkManagerInstance: MultitargetNetworkManager|null;
1959
-
1960
1981
  export class AppliedNetworkConditions {
1961
1982
  constructor(
1962
1983
  readonly conditions: Conditions, readonly appliedNetworkConditionsId: string, readonly urlPattern?: string) {
@@ -1965,6 +1986,7 @@ export class AppliedNetworkConditions {
1965
1986
 
1966
1987
  export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrapper<MultitargetNetworkManager.EventTypes>
1967
1988
  implements SDKModelObserver<NetworkManager> {
1989
+ readonly #targetManager: TargetManager;
1968
1990
  #userAgentOverride = '';
1969
1991
  #userAgentMetadataOverride: Protocol.Emulation.UserAgentMetadata|null = null;
1970
1992
  #customAcceptedEncodings: Protocol.Network.ContentEncoding[]|null = null;
@@ -1981,8 +2003,9 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
1981
2003
  #customUserAgent?: string;
1982
2004
  #isBlocking = false;
1983
2005
 
1984
- constructor() {
2006
+ constructor(targetManager: TargetManager) {
1985
2007
  super();
2008
+ this.#targetManager = targetManager;
1986
2009
 
1987
2010
  // TODO(allada) Remove these and merge it with request interception.
1988
2011
  const blockedPatternChanged: () => void = () => {
@@ -1993,22 +2016,24 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
1993
2016
  RequestConditions.Events.REQUEST_CONDITIONS_CHANGED, blockedPatternChanged);
1994
2017
  this.updateBlockedPatterns();
1995
2018
 
1996
- TargetManager.instance().observeModels(NetworkManager, this);
2019
+ this.#targetManager.observeModels(NetworkManager, this);
1997
2020
  }
1998
2021
 
1999
2022
  static instance(opts: {
2000
2023
  forceNew: boolean|null,
2024
+ targetManager?: TargetManager,
2001
2025
  } = {forceNew: null}): MultitargetNetworkManager {
2002
- const {forceNew} = opts;
2003
- if (!multiTargetNetworkManagerInstance || forceNew) {
2004
- multiTargetNetworkManagerInstance = new MultitargetNetworkManager();
2026
+ const {forceNew, targetManager} = opts;
2027
+ if (!Root.DevToolsContext.globalInstance().has(MultitargetNetworkManager) || forceNew) {
2028
+ Root.DevToolsContext.globalInstance().set(
2029
+ MultitargetNetworkManager, new MultitargetNetworkManager(targetManager ?? TargetManager.instance()));
2005
2030
  }
2006
2031
 
2007
- return multiTargetNetworkManagerInstance;
2032
+ return Root.DevToolsContext.globalInstance().get(MultitargetNetworkManager);
2008
2033
  }
2009
2034
 
2010
2035
  static dispose(): void {
2011
- multiTargetNetworkManagerInstance = null;
2036
+ Root.DevToolsContext.globalInstance().delete(MultitargetNetworkManager);
2012
2037
  }
2013
2038
 
2014
2039
  static patchUserAgentWithChromeVersion(uaString: string): string {
@@ -2296,7 +2321,7 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
2296
2321
  }
2297
2322
 
2298
2323
  async getCertificate(origin: string): Promise<string[]> {
2299
- const target = TargetManager.instance().primaryPageTarget();
2324
+ const target = this.#targetManager.primaryPageTarget();
2300
2325
  if (!target) {
2301
2326
  return [];
2302
2327
  }
@@ -2307,31 +2332,6 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
2307
2332
  return certificate.tableNames;
2308
2333
  }
2309
2334
 
2310
- async loadResource(url: Platform.DevToolsPath.UrlString): Promise<{
2311
- success: boolean,
2312
- content: string,
2313
- errorDescription: Host.ResourceLoader.LoadErrorDescription,
2314
- }> {
2315
- const headers: Record<string, string> = {};
2316
-
2317
- const currentUserAgent = this.currentUserAgent();
2318
- if (currentUserAgent) {
2319
- headers['User-Agent'] = currentUserAgent;
2320
- }
2321
-
2322
- if (Common.Settings.Settings.instance().moduleSetting('cache-disabled').get()) {
2323
- headers['Cache-Control'] = 'no-cache';
2324
- }
2325
-
2326
- const allowRemoteFilePaths =
2327
- Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get();
2328
-
2329
- return await new Promise(
2330
- resolve => Host.ResourceLoader.load(url, headers, (success, _responseHeaders, content, errorDescription) => {
2331
- resolve({success, content, errorDescription});
2332
- }, allowRemoteFilePaths));
2333
- }
2334
-
2335
2335
  appliedRequestConditions(requestInternal: NetworkRequest): AppliedNetworkConditions|undefined {
2336
2336
  if (!requestInternal.appliedNetworkConditionsId) {
2337
2337
  return undefined;
@@ -2215,6 +2215,9 @@ export interface DirectSocketCreateOptions {
2215
2215
  sendBufferSize?: number;
2216
2216
  receiveBufferSize?: number;
2217
2217
  dnsQueryType?: Protocol.Network.DirectSocketDnsQueryType;
2218
+ multicastLoopback?: boolean;
2219
+ multicastTimeToLive?: number;
2220
+ multicastAllowAddressSharing?: boolean;
2218
2221
  }
2219
2222
 
2220
2223
  export interface DirectSocketOpenInfo {
@@ -2230,6 +2233,7 @@ export interface DirectSocketInfo {
2230
2233
  errorMessage?: string;
2231
2234
  createOptions: DirectSocketCreateOptions;
2232
2235
  openInfo?: DirectSocketOpenInfo;
2236
+ joinedMulticastGroups?: Set<string>;
2233
2237
  }
2234
2238
 
2235
2239
  export interface DirectSocketChunk {
@@ -784,7 +784,7 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
784
784
  export class WindowControls {
785
785
  readonly #cssModel: CSSModel;
786
786
  #originalStylesheetText: string|undefined;
787
- #stylesheetId?: Protocol.CSS.StyleSheetId;
787
+ #stylesheetId?: Protocol.DOM.StyleSheetId;
788
788
  #currentUrl: Platform.DevToolsPath.UrlString|undefined;
789
789
 
790
790
  #config: Protocol.Overlay.WindowControlsOverlayConfig = {
@@ -874,7 +874,7 @@ export class WindowControls {
874
874
  return header?.sourceURL;
875
875
  }
876
876
 
877
- #fetchCurrentStyleSheet(cssSourceUrl: Platform.DevToolsPath.UrlString): Protocol.CSS.StyleSheetId|undefined {
877
+ #fetchCurrentStyleSheet(cssSourceUrl: Platform.DevToolsPath.UrlString): Protocol.DOM.StyleSheetId|undefined {
878
878
  const stylesheetIds = this.#cssModel.getStyleSheetIdsForURL(cssSourceUrl);
879
879
  return stylesheetIds.length > 0 ? stylesheetIds[0] : undefined;
880
880
  }