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
@@ -5,6 +5,7 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import type * as Platform from '../../core/platform/platform.js';
7
7
  import * as SDK from '../../core/sdk/sdk.js';
8
+ import * as Formatter from '../formatter/formatter.js';
8
9
  import * as TextUtils from '../text_utils/text_utils.js';
9
10
  import * as Workspace from '../workspace/workspace.js';
10
11
 
@@ -269,6 +270,78 @@ export class ResourceMapping implements SDK.TargetManager.SDKModelObserver<SDK.R
269
270
  uiLocation.uiSourceCode.url(), uiLocation.lineNumber, uiLocation.columnNumber);
270
271
  }
271
272
 
273
+ async functionBoundsAtRawLocation(rawLocation: SDK.DebuggerModel.Location):
274
+ Promise<Workspace.UISourceCode.UIFunctionBounds|null> {
275
+ const script = rawLocation.script();
276
+ if (!script) {
277
+ return null;
278
+ }
279
+ const info = this.infoForTarget(script.debuggerModel.target());
280
+ if (!info) {
281
+ return null;
282
+ }
283
+ const embedderName = script.embedderName();
284
+ if (!embedderName) {
285
+ return null;
286
+ }
287
+ const uiSourceCode = info.getProject().uiSourceCodeForURL(embedderName);
288
+ if (!uiSourceCode) {
289
+ return null;
290
+ }
291
+
292
+ let {lineNumber, columnNumber} = rawLocation;
293
+ lineNumber -= script.lineOffset;
294
+ if (lineNumber === 0) {
295
+ columnNumber -= script.columnOffset;
296
+ }
297
+
298
+ const scopeTreeAndText = script ? await SDK.ScopeTreeCache.scopeTreeForScript(script) : null;
299
+ if (!scopeTreeAndText) {
300
+ return null;
301
+ }
302
+
303
+ // Find the inner-most scope that maps to the given position.
304
+
305
+ const offset = scopeTreeAndText.text.offsetFromPosition(lineNumber, columnNumber);
306
+
307
+ const results = [];
308
+ (function walk(nodes: Formatter.FormatterWorkerPool.ScopeTreeNode[]) {
309
+ for (const node of nodes) {
310
+ if (!(offset >= node.start && offset < node.end)) {
311
+ continue;
312
+ }
313
+ results.push(node);
314
+ walk(node.children);
315
+ }
316
+ })([scopeTreeAndText.scopeTree]);
317
+
318
+ const result = results.findLast(
319
+ node => node.kind === Formatter.FormatterWorkerPool.ScopeKind.FUNCTION ||
320
+ node.kind === Formatter.FormatterWorkerPool.ScopeKind.ARROW_FUNCTION);
321
+ if (!result) {
322
+ return null;
323
+ }
324
+
325
+ // Map back to positions.
326
+ const startPosition = scopeTreeAndText.text.positionFromOffset(result.start);
327
+ const endPosition = scopeTreeAndText.text.positionFromOffset(result.end);
328
+
329
+ startPosition.lineNumber += script.lineOffset;
330
+ if (startPosition.lineNumber === script.lineOffset) {
331
+ startPosition.columnNumber += script.columnOffset;
332
+ }
333
+
334
+ endPosition.lineNumber += script.lineOffset;
335
+ if (endPosition.lineNumber === script.lineOffset) {
336
+ endPosition.columnNumber += script.columnOffset;
337
+ }
338
+
339
+ const name = ''; // TODO(crbug.com/452333154): update ScopeVariableAnalysis to include function name.
340
+ const range = new TextUtils.TextRange.TextRange(
341
+ startPosition.lineNumber, startPosition.columnNumber, endPosition.lineNumber, endPosition.columnNumber);
342
+ return new Workspace.UISourceCode.UIFunctionBounds(uiSourceCode, range, name);
343
+ }
344
+
272
345
  resetForTest(target: SDK.Target.Target): void {
273
346
  const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);
274
347
  const info = resourceTreeModel ? this.#modelToInfo.get(resourceTreeModel) : null;
@@ -8,6 +8,7 @@ import * as Platform from '../../core/platform/platform.js';
8
8
  import * as Root from '../../core/root/root.js';
9
9
  import * as SDK from '../../core/sdk/sdk.js';
10
10
  import * as Protocol from '../../generated/protocol.js';
11
+ import * as Formatter from '../formatter/formatter.js';
11
12
  import * as TextUtils from '../text_utils/text_utils.js';
12
13
  import * as Workspace from '../workspace/workspace.js';
13
14
 
@@ -156,6 +157,55 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
156
157
  }
157
158
  }
158
159
 
160
+ async functionBoundsAtRawLocation(rawLocation: SDK.DebuggerModel.Location):
161
+ Promise<Workspace.UISourceCode.UIFunctionBounds|null> {
162
+ const script = rawLocation.script();
163
+ if (!script) {
164
+ return null;
165
+ }
166
+
167
+ const uiSourceCode = this.#scriptToUISourceCode.get(script);
168
+ if (!uiSourceCode) {
169
+ return null;
170
+ }
171
+
172
+ const scopeTreeAndText = script ? await SDK.ScopeTreeCache.scopeTreeForScript(script) : null;
173
+ if (!scopeTreeAndText) {
174
+ return null;
175
+ }
176
+
177
+ // Find the inner-most scope that maps to the given position.
178
+
179
+ const offset = scopeTreeAndText.text.offsetFromPosition(rawLocation.lineNumber, rawLocation.columnNumber);
180
+
181
+ const results = [];
182
+ (function walk(nodes: Formatter.FormatterWorkerPool.ScopeTreeNode[]) {
183
+ for (const node of nodes) {
184
+ if (!(offset >= node.start && offset < node.end)) {
185
+ continue;
186
+ }
187
+ results.push(node);
188
+ walk(node.children);
189
+ }
190
+ })([scopeTreeAndText.scopeTree]);
191
+
192
+ const result = results.findLast(
193
+ node => node.kind === Formatter.FormatterWorkerPool.ScopeKind.FUNCTION ||
194
+ node.kind === Formatter.FormatterWorkerPool.ScopeKind.ARROW_FUNCTION);
195
+ if (!result) {
196
+ return null;
197
+ }
198
+
199
+ // Map back to positions.
200
+ const startPosition = scopeTreeAndText.text.positionFromOffset(result.start);
201
+ const endPosition = scopeTreeAndText.text.positionFromOffset(result.end);
202
+
203
+ const name = ''; // TODO(crbug.com/452333154): update ScopeVariableAnalysis to include function name.
204
+ const range = new TextUtils.TextRange.TextRange(
205
+ startPosition.lineNumber, startPosition.columnNumber, endPosition.lineNumber, endPosition.columnNumber);
206
+ return new Workspace.UISourceCode.UIFunctionBounds(uiSourceCode, range, name);
207
+ }
208
+
159
209
  private addScript(script: SDK.Script.Script): void {
160
210
  // Ignore live edit scripts here.
161
211
  if (script.isLiveEdit() || script.isBreakpointCondition) {
@@ -89,13 +89,10 @@ const structuredHeaderLink = {
89
89
  linkTitle: 'Structured Headers RFC',
90
90
  };
91
91
 
92
- export class AttributionReportingIssue extends Issue<IssueCode> {
93
- issueDetails: Readonly<Protocol.Audits.AttributionReportingIssueDetails>;
94
-
92
+ export class AttributionReportingIssue extends Issue<Protocol.Audits.AttributionReportingIssueDetails, IssueCode> {
95
93
  constructor(
96
94
  issueDetails: Protocol.Audits.AttributionReportingIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
97
- super(getIssueCode(issueDetails), issuesModel);
98
- this.issueDetails = issueDetails;
95
+ super(getIssueCode(issueDetails), issueDetails, issuesModel);
99
96
  }
100
97
 
101
98
  getCategory(): IssueCategory {
@@ -106,8 +103,9 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
106
103
  const url = new URL('https://wicg.github.io/attribution-reporting-api/validate-headers');
107
104
  url.searchParams.set('header', name);
108
105
 
109
- if (this.issueDetails.invalidParameter) {
110
- url.searchParams.set('json', this.issueDetails.invalidParameter);
106
+ const details = this.details();
107
+ if (details.invalidParameter) {
108
+ url.searchParams.set('json', details.invalidParameter);
111
109
  }
112
110
 
113
111
  return {
@@ -229,7 +227,7 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
229
227
  }
230
228
 
231
229
  primaryKey(): string {
232
- return JSON.stringify(this.issueDetails);
230
+ return JSON.stringify(this.details());
233
231
  }
234
232
 
235
233
  getKind(): IssueKind {
@@ -18,12 +18,9 @@ const UIStrings = {
18
18
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/BounceTrackingIssue.ts', UIStrings);
19
19
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
20
20
 
21
- export class BounceTrackingIssue extends Issue {
22
- readonly #issueDetails: Protocol.Audits.BounceTrackingIssueDetails;
23
-
21
+ export class BounceTrackingIssue extends Issue<Protocol.Audits.BounceTrackingIssueDetails> {
24
22
  constructor(issueDetails: Protocol.Audits.BounceTrackingIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
25
- super(Protocol.Audits.InspectorIssueCode.BounceTrackingIssue, issuesModel);
26
- this.#issueDetails = issueDetails;
23
+ super(Protocol.Audits.InspectorIssueCode.BounceTrackingIssue, issueDetails, issuesModel);
27
24
  }
28
25
 
29
26
  getCategory(): IssueCategory {
@@ -42,23 +39,16 @@ export class BounceTrackingIssue extends Issue {
42
39
  };
43
40
  }
44
41
 
45
- details(): Protocol.Audits.BounceTrackingIssueDetails {
46
- return this.#issueDetails;
47
- }
48
-
49
42
  getKind(): IssueKind {
50
43
  return IssueKind.BREAKING_CHANGE;
51
44
  }
52
45
 
53
46
  primaryKey(): string {
54
- return JSON.stringify(this.#issueDetails);
47
+ return JSON.stringify(this.details());
55
48
  }
56
49
 
57
50
  override trackingSites(): Iterable<string> {
58
- if (this.#issueDetails.trackingSites) {
59
- return this.#issueDetails.trackingSites;
60
- }
61
- return [];
51
+ return this.details().trackingSites;
62
52
  }
63
53
 
64
54
  static fromInspectorIssue(
@@ -22,29 +22,22 @@ const UIStrings = {
22
22
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/ClientHintIssue.ts', UIStrings);
23
23
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
24
24
 
25
- export class ClientHintIssue extends Issue {
26
- private issueDetails: Protocol.Audits.ClientHintIssueDetails;
27
-
25
+ export class ClientHintIssue extends Issue<Protocol.Audits.ClientHintIssueDetails> {
28
26
  constructor(issueDetails: Protocol.Audits.ClientHintIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
29
27
  super(
30
28
  {
31
29
  code: Protocol.Audits.InspectorIssueCode.ClientHintIssue,
32
30
  umaCode: [Protocol.Audits.InspectorIssueCode.ClientHintIssue, issueDetails.clientHintIssueReason].join('::'),
33
31
  },
34
- issuesModel);
35
- this.issueDetails = issueDetails;
32
+ issueDetails, issuesModel);
36
33
  }
37
34
 
38
35
  getCategory(): IssueCategory {
39
36
  return IssueCategory.OTHER;
40
37
  }
41
38
 
42
- details(): Protocol.Audits.ClientHintIssueDetails {
43
- return this.issueDetails;
44
- }
45
-
46
39
  getDescription(): MarkdownIssueDescription|null {
47
- const description = issueDescriptions.get(this.issueDetails.clientHintIssueReason);
40
+ const description = issueDescriptions.get(this.details().clientHintIssueReason);
48
41
  if (!description) {
49
42
  return null;
50
43
  }
@@ -52,11 +45,11 @@ export class ClientHintIssue extends Issue {
52
45
  }
53
46
 
54
47
  override sources(): Iterable<Protocol.Audits.SourceCodeLocation> {
55
- return [this.issueDetails.sourceCodeLocation];
48
+ return [this.details().sourceCodeLocation];
56
49
  }
57
50
 
58
51
  primaryKey(): string {
59
- return JSON.stringify(this.issueDetails);
52
+ return JSON.stringify(this.details());
60
53
  }
61
54
 
62
55
  getKind(): IssueKind {
@@ -38,9 +38,7 @@ const UIStrings = {
38
38
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/ContentSecurityPolicyIssue.ts', UIStrings);
39
39
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
40
40
 
41
- export class ContentSecurityPolicyIssue extends Issue {
42
- #issueDetails: Protocol.Audits.ContentSecurityPolicyIssueDetails;
43
-
41
+ export class ContentSecurityPolicyIssue extends Issue<Protocol.Audits.ContentSecurityPolicyIssueDetails> {
44
42
  constructor(
45
43
  issueDetails: Protocol.Audits.ContentSecurityPolicyIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null,
46
44
  issueId?: Protocol.Audits.IssueId) {
@@ -48,8 +46,7 @@ export class ContentSecurityPolicyIssue extends Issue {
48
46
  Protocol.Audits.InspectorIssueCode.ContentSecurityPolicyIssue,
49
47
  issueDetails.contentSecurityPolicyViolationType,
50
48
  ].join('::');
51
- super(issueCode, issuesModel, issueId);
52
- this.#issueDetails = issueDetails;
49
+ super(issueCode, issueDetails, issuesModel, issueId);
53
50
  }
54
51
 
55
52
  getCategory(): IssueCategory {
@@ -57,7 +54,7 @@ export class ContentSecurityPolicyIssue extends Issue {
57
54
  }
58
55
 
59
56
  primaryKey(): string {
60
- return JSON.stringify(this.#issueDetails, [
57
+ return JSON.stringify(this.details(), [
61
58
  'blockedURL',
62
59
  'contentSecurityPolicyViolationType',
63
60
  'violatedDirective',
@@ -71,19 +68,15 @@ export class ContentSecurityPolicyIssue extends Issue {
71
68
  }
72
69
 
73
70
  getDescription(): MarkdownIssueDescription|null {
74
- const description = issueDescriptions.get(this.#issueDetails.contentSecurityPolicyViolationType);
71
+ const description = issueDescriptions.get(this.details().contentSecurityPolicyViolationType);
75
72
  if (!description) {
76
73
  return null;
77
74
  }
78
75
  return resolveLazyDescription(description);
79
76
  }
80
77
 
81
- details(): Protocol.Audits.ContentSecurityPolicyIssueDetails {
82
- return this.#issueDetails;
83
- }
84
-
85
78
  getKind(): IssueKind {
86
- if (this.#issueDetails.isReportOnly) {
79
+ if (this.details().isReportOnly) {
87
80
  return IssueKind.IMPROVEMENT;
88
81
  }
89
82
  return IssueKind.PAGE_ERROR;
@@ -19,16 +19,13 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieDeprecatio
19
19
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
20
20
 
21
21
  /** TODO(b/305738703): Move this issue into a warning on CookieIssue. **/
22
- export class CookieDeprecationMetadataIssue extends Issue {
23
- readonly #issueDetails: Protocol.Audits.CookieDeprecationMetadataIssueDetails;
24
-
22
+ export class CookieDeprecationMetadataIssue extends Issue<Protocol.Audits.CookieDeprecationMetadataIssueDetails> {
25
23
  constructor(
26
24
  issueDetails: Protocol.Audits.CookieDeprecationMetadataIssueDetails,
27
25
  issuesModel: SDK.IssuesModel.IssuesModel|null) {
28
26
  // Set a distinct code for ReadCookie and SetCookie issues, so they are grouped separately.
29
27
  const issueCode = Protocol.Audits.InspectorIssueCode.CookieDeprecationMetadataIssue + '_' + issueDetails.operation;
30
- super(issueCode, issuesModel);
31
- this.#issueDetails = issueDetails;
28
+ super(issueCode, issueDetails, issuesModel);
32
29
  }
33
30
 
34
31
  getCategory(): IssueCategory {
@@ -36,12 +33,12 @@ export class CookieDeprecationMetadataIssue extends Issue {
36
33
  }
37
34
 
38
35
  getDescription(): MarkdownIssueDescription {
39
- const fileName = this.#issueDetails.operation === 'SetCookie' ? 'cookieWarnMetadataGrantSet.md' :
40
- 'cookieWarnMetadataGrantRead.md';
36
+ const fileName =
37
+ this.details().operation === 'SetCookie' ? 'cookieWarnMetadataGrantSet.md' : 'cookieWarnMetadataGrantRead.md';
41
38
 
42
39
  let optOutText = '';
43
- if (this.#issueDetails.isOptOutTopLevel) {
44
- optOutText = '\n\n (Top level site opt-out: ' + this.#issueDetails.optOutPercentage +
40
+ if (this.details().isOptOutTopLevel) {
41
+ optOutText = '\n\n (Top level site opt-out: ' + this.details().optOutPercentage +
45
42
  '% - [learn more](gracePeriodStagedControlExplainer))';
46
43
  }
47
44
 
@@ -59,16 +56,12 @@ export class CookieDeprecationMetadataIssue extends Issue {
59
56
  };
60
57
  }
61
58
 
62
- details(): Protocol.Audits.CookieDeprecationMetadataIssueDetails {
63
- return this.#issueDetails;
64
- }
65
-
66
59
  getKind(): IssueKind {
67
60
  return IssueKind.BREAKING_CHANGE;
68
61
  }
69
62
 
70
63
  primaryKey(): string {
71
- return JSON.stringify(this.#issueDetails);
64
+ return JSON.stringify(this.details());
72
65
  }
73
66
 
74
67
  static fromInspectorIssue(
@@ -68,27 +68,20 @@ export interface CookieReportInfo {
68
68
  insight?: Protocol.Audits.CookieIssueInsight;
69
69
  }
70
70
 
71
- export class CookieIssue extends Issue {
72
- #issueDetails: Protocol.Audits.CookieIssueDetails;
73
-
74
- constructor(
75
- code: string, issueDetails: Protocol.Audits.CookieIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null,
76
- issueId: Protocol.Audits.IssueId|undefined) {
77
- super(code, issuesModel, issueId);
78
- this.#issueDetails = issueDetails;
79
- }
80
-
71
+ export class CookieIssue extends Issue<Protocol.Audits.CookieIssueDetails> {
81
72
  cookieId(): string {
82
- if (this.#issueDetails.cookie) {
83
- const {domain, path, name} = this.#issueDetails.cookie;
73
+ const details = this.details();
74
+ if (details.cookie) {
75
+ const {domain, path, name} = details.cookie;
84
76
  const cookieId = `${domain};${path};${name}`;
85
77
  return cookieId;
86
78
  }
87
- return this.#issueDetails.rawCookieLine ?? 'no-cookie-info';
79
+ return this.details().rawCookieLine ?? 'no-cookie-info';
88
80
  }
89
81
 
90
82
  primaryKey(): string {
91
- const requestId = this.#issueDetails.request ? this.#issueDetails.request.requestId : 'no-request';
83
+ const details = this.details();
84
+ const requestId = details.request ? details.request.requestId : 'no-request';
92
85
  return `${this.code()}-(${this.cookieId()})-(${requestId})`;
93
86
  }
94
87
 
@@ -210,22 +203,25 @@ export class CookieIssue extends Issue {
210
203
  }
211
204
 
212
205
  override cookies(): Iterable<Protocol.Audits.AffectedCookie> {
213
- if (this.#issueDetails.cookie) {
214
- return [this.#issueDetails.cookie];
206
+ const details = this.details();
207
+ if (details.cookie) {
208
+ return [details.cookie];
215
209
  }
216
210
  return [];
217
211
  }
218
212
 
219
213
  override rawCookieLines(): Iterable<string> {
220
- if (this.#issueDetails.rawCookieLine) {
221
- return [this.#issueDetails.rawCookieLine];
214
+ const details = this.details();
215
+ if (details.rawCookieLine) {
216
+ return [details.rawCookieLine];
222
217
  }
223
218
  return [];
224
219
  }
225
220
 
226
221
  override requests(): Iterable<Protocol.Audits.AffectedRequest> {
227
- if (this.#issueDetails.request) {
228
- return [this.#issueDetails.request];
222
+ const details = this.details();
223
+ if (details.request) {
224
+ return [details.request];
229
225
  }
230
226
  return [];
231
227
  }
@@ -244,27 +240,28 @@ export class CookieIssue extends Issue {
244
240
 
245
241
  override isCausedByThirdParty(): boolean {
246
242
  const outermostFrame = SDK.FrameManager.FrameManager.instance().getOutermostFrame();
247
- return isCausedByThirdParty(outermostFrame, this.#issueDetails.cookieUrl, this.#issueDetails.siteForCookies);
243
+ return isCausedByThirdParty(outermostFrame, this.details().cookieUrl, this.details().siteForCookies);
248
244
  }
249
245
 
250
246
  getKind(): IssueKind {
251
- if (this.#issueDetails.cookieExclusionReasons?.length > 0) {
247
+ if (this.details().cookieExclusionReasons?.length > 0) {
252
248
  return IssueKind.PAGE_ERROR;
253
249
  }
254
250
  return IssueKind.BREAKING_CHANGE;
255
251
  }
256
252
 
257
253
  makeCookieReportEntry(): CookieReportInfo|undefined {
258
- const status = CookieIssue.getCookieStatus(this.#issueDetails);
259
- if (this.#issueDetails.cookie && this.#issueDetails.cookieUrl && status !== undefined) {
260
- const entity = ThirdPartyWeb.ThirdPartyWeb.getEntity(this.#issueDetails.cookieUrl);
254
+ const status = CookieIssue.getCookieStatus(this.details());
255
+ const details = this.details();
256
+ if (details.cookie && details.cookieUrl && status !== undefined) {
257
+ const entity = ThirdPartyWeb.ThirdPartyWeb.getEntity(details.cookieUrl);
261
258
  return {
262
- name: this.#issueDetails.cookie.name,
263
- domain: this.#issueDetails.cookie.domain,
259
+ name: details.cookie.name,
260
+ domain: details.cookie.domain,
264
261
  type: entity?.category,
265
262
  platform: entity?.name,
266
263
  status,
267
- insight: this.#issueDetails.insight,
264
+ insight: this.details().insight,
268
265
  };
269
266
  }
270
267
 
@@ -332,8 +329,8 @@ export class CookieIssue extends Issue {
332
329
  return new SDK.ConsoleModel.ConsoleMessage(
333
330
  issuesModel.target().model(SDK.RuntimeModel.RuntimeModel), Common.Console.FrontendMessageSource.ISSUE_PANEL,
334
331
  Protocol.Log.LogEntryLevel.Warning, UIStrings.consoleTpcdErrorMessage, {
335
- url: this.#issueDetails.request?.url as Platform.DevToolsPath.UrlString | undefined,
336
- affectedResources: {requestId: this.#issueDetails.request?.requestId, issueId: this.issueId},
332
+ url: this.details().request?.url as Platform.DevToolsPath.UrlString | undefined,
333
+ affectedResources: {requestId: this.details().request?.requestId, issueId: this.issueId},
337
334
  isCookieReportIssue: true
338
335
  });
339
336
  }
@@ -115,26 +115,19 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
115
115
  }
116
116
  }
117
117
 
118
- export class CorsIssue extends Issue<IssueCode> {
119
- #issueDetails: Protocol.Audits.CorsIssueDetails;
120
-
118
+ export class CorsIssue extends Issue<Protocol.Audits.CorsIssueDetails, IssueCode> {
121
119
  constructor(
122
120
  issueDetails: Protocol.Audits.CorsIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null,
123
121
  issueId: Protocol.Audits.IssueId|undefined) {
124
- super(getIssueCode(issueDetails), issuesModel, issueId);
125
- this.#issueDetails = issueDetails;
122
+ super(getIssueCode(issueDetails), issueDetails, issuesModel, issueId);
126
123
  }
127
124
 
128
125
  getCategory(): IssueCategory {
129
126
  return IssueCategory.CORS;
130
127
  }
131
128
 
132
- details(): Protocol.Audits.CorsIssueDetails {
133
- return this.#issueDetails;
134
- }
135
-
136
129
  getDescription(): MarkdownIssueDescription|null {
137
- switch (getIssueCode(this.#issueDetails)) {
130
+ switch (getIssueCode(this.details())) {
138
131
  case IssueCode.INSECURE_PRIVATE_NETWORK:
139
132
  return {
140
133
  file: 'corsInsecurePrivateNetwork.md',
@@ -269,16 +262,14 @@ export class CorsIssue extends Issue<IssueCode> {
269
262
  }
270
263
 
271
264
  primaryKey(): string {
272
- return JSON.stringify(this.#issueDetails);
265
+ return JSON.stringify(this.details());
273
266
  }
274
267
 
275
268
  getKind(): IssueKind {
276
- if (this.#issueDetails.isWarning &&
277
- (this.#issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork ||
278
- this.#issueDetails.corsErrorStatus.corsError ===
279
- Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork ||
280
- this.#issueDetails.corsErrorStatus.corsError ===
281
- Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork)) {
269
+ if (this.details().isWarning &&
270
+ (this.details().corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork ||
271
+ this.details().corsErrorStatus.corsError === Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork ||
272
+ this.details().corsErrorStatus.corsError === Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork)) {
282
273
  return IssueKind.BREAKING_CHANGE;
283
274
  }
284
275
  return IssueKind.PAGE_ERROR;
@@ -42,25 +42,22 @@ export function isCrossOriginEmbedderPolicyIssue(reason: Protocol.Audits.Blocked
42
42
  return false;
43
43
  }
44
44
 
45
- export class CrossOriginEmbedderPolicyIssue extends Issue {
46
- #issueDetails: Protocol.Audits.BlockedByResponseIssueDetails;
47
-
45
+ export class CrossOriginEmbedderPolicyIssue extends Issue<Protocol.Audits.BlockedByResponseIssueDetails> {
48
46
  constructor(
49
47
  issueDetails: Protocol.Audits.BlockedByResponseIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
50
- super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issuesModel);
51
- this.#issueDetails = issueDetails;
48
+ super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issueDetails, issuesModel);
52
49
  }
53
50
 
54
51
  primaryKey(): string {
55
- return `${this.code()}-(${this.#issueDetails.request.requestId})`;
52
+ return `${this.code()}-(${this.details().request.requestId})`;
56
53
  }
57
54
 
58
55
  override getBlockedByResponseDetails(): Iterable<Protocol.Audits.BlockedByResponseIssueDetails> {
59
- return [this.#issueDetails];
56
+ return [this.details()];
60
57
  }
61
58
 
62
59
  override requests(): Iterable<Protocol.Audits.AffectedRequest> {
63
- return [this.#issueDetails.request];
60
+ return [this.details().request];
64
61
  }
65
62
 
66
63
  getCategory(): IssueCategory {
@@ -33,35 +33,28 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
33
33
  const strDeprecation = i18n.i18n.registerUIStrings('generated/Deprecation.ts', Deprecation.UIStrings);
34
34
  const i18nLazyDeprecationString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, strDeprecation);
35
35
 
36
- export class DeprecationIssue extends Issue {
37
- #issueDetails: Protocol.Audits.DeprecationIssueDetails;
38
-
36
+ export class DeprecationIssue extends Issue<Protocol.Audits.DeprecationIssueDetails> {
39
37
  constructor(issueDetails: Protocol.Audits.DeprecationIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
40
38
  const issueCode = [
41
39
  Protocol.Audits.InspectorIssueCode.DeprecationIssue,
42
40
  issueDetails.type,
43
41
  ].join('::');
44
- super({code: issueCode, umaCode: 'DeprecationIssue'}, issuesModel);
45
- this.#issueDetails = issueDetails;
42
+ super({code: issueCode, umaCode: 'DeprecationIssue'}, issueDetails, issuesModel);
46
43
  }
47
44
 
48
45
  getCategory(): IssueCategory {
49
46
  return IssueCategory.OTHER;
50
47
  }
51
48
 
52
- details(): Protocol.Audits.DeprecationIssueDetails {
53
- return this.#issueDetails;
54
- }
55
-
56
49
  getDescription(): MarkdownIssueDescription {
57
50
  let messageFunction = (): string => '';
58
- const maybeEnglishMessage = (Deprecation.UIStrings as Record<string, string>)[this.#issueDetails.type];
51
+ const maybeEnglishMessage = (Deprecation.UIStrings as Record<string, string>)[this.details().type];
59
52
  if (maybeEnglishMessage) {
60
53
  messageFunction = i18nLazyDeprecationString(maybeEnglishMessage);
61
54
  }
62
55
 
63
56
  const links = [];
64
- const deprecationMeta = Deprecation.DEPRECATIONS_METADATA[this.#issueDetails.type];
57
+ const deprecationMeta = Deprecation.DEPRECATIONS_METADATA[this.details().type];
65
58
  const feature = deprecationMeta?.chromeStatusFeature ?? 0;
66
59
  if (feature !== 0) {
67
60
  links.push({
@@ -87,14 +80,14 @@ export class DeprecationIssue extends Issue {
87
80
  }
88
81
 
89
82
  override sources(): Iterable<Protocol.Audits.SourceCodeLocation> {
90
- if (this.#issueDetails.sourceCodeLocation) {
91
- return [this.#issueDetails.sourceCodeLocation];
83
+ if (this.details().sourceCodeLocation) {
84
+ return [this.details().sourceCodeLocation];
92
85
  }
93
86
  return [];
94
87
  }
95
88
 
96
89
  primaryKey(): string {
97
- return JSON.stringify(this.#issueDetails);
90
+ return JSON.stringify(this.details());
98
91
  }
99
92
 
100
93
  getKind(): IssueKind {