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
@@ -14,8 +14,8 @@ import * as Badges from '../../models/badges/badges.js';
14
14
  import * as Bindings from '../../models/bindings/bindings.js';
15
15
  import * as TextUtils from '../../models/text_utils/text_utils.js';
16
16
  import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
17
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
18
17
  import * as Tooltips from '../../ui/components/tooltips/tooltips.js';
18
+ import {createIcon, Icon} from '../../ui/kit/kit.js';
19
19
  import * as ColorPicker from '../../ui/legacy/components/color_picker/color_picker.js';
20
20
  import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
21
21
  import * as UI from '../../ui/legacy/legacy.js';
@@ -56,7 +56,7 @@ const {html, nothing, render, Directives: {classMap}} = Lit;
56
56
  const ASTUtils = SDK.CSSPropertyParser.ASTUtils;
57
57
  const FlexboxEditor = ElementsComponents.StylePropertyEditor.FlexboxEditor;
58
58
  const GridEditor = ElementsComponents.StylePropertyEditor.GridEditor;
59
- const MasonryEditor = ElementsComponents.StylePropertyEditor.MasonryEditor;
59
+ const GridLanesEditor = ElementsComponents.StylePropertyEditor.GridLanesEditor;
60
60
 
61
61
  const UIStrings = {
62
62
  /**
@@ -109,9 +109,9 @@ const UIStrings = {
109
109
  */
110
110
  gridEditorButton: 'Open `grid` editor',
111
111
  /**
112
- * @description Title of the button that opens the CSS Masonry editor in the Styles panel.
112
+ * @description Title of the button that opens the CSS Grid Lanes editor in the Styles panel.
113
113
  */
114
- masonryEditorButton: 'Open `masonry` editor',
114
+ gridLanesEditorButton: 'Open `grid-lanes` editor',
115
115
  /**
116
116
  * @description A context menu item in Styles panel to copy CSS declaration as JavaScript property.
117
117
  */
@@ -201,7 +201,7 @@ export class EnvFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatch
201
201
  }
202
202
  }
203
203
  // clang-format off
204
- export class FlexGridRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.FlexGridMasonryMatch) {
204
+ export class FlexGridRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.FlexGridGridLanesMatch) {
205
205
  // clang-format on
206
206
  readonly #treeElement: StylePropertyTreeElement|null;
207
207
  readonly #stylesPane: StylesSidebarPane;
@@ -211,7 +211,7 @@ export class FlexGridRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
211
211
  this.#stylesPane = stylesPane;
212
212
  }
213
213
 
214
- override render(match: SDK.CSSPropertyParserMatchers.FlexGridMasonryMatch, context: RenderingContext): Node[] {
214
+ override render(match: SDK.CSSPropertyParserMatchers.FlexGridGridLanesMatch, context: RenderingContext): Node[] {
215
215
  const children = Renderer.render(ASTUtils.siblings(ASTUtils.declValue(match.node)), context).nodes;
216
216
  if (!this.#treeElement?.editable()) {
217
217
  return children;
@@ -220,14 +220,14 @@ export class FlexGridRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
220
220
  `${this.#treeElement.section().getSectionIdx()}_${this.#treeElement.section().nextEditorTriggerButtonIdx}`;
221
221
 
222
222
  function getEditorClass(layoutType: SDK.CSSPropertyParserMatchers.LayoutType): typeof FlexboxEditor|
223
- typeof GridEditor|typeof MasonryEditor {
223
+ typeof GridEditor|typeof GridLanesEditor {
224
224
  switch (layoutType) {
225
225
  case SDK.CSSPropertyParserMatchers.LayoutType.FLEX:
226
226
  return FlexboxEditor;
227
227
  case SDK.CSSPropertyParserMatchers.LayoutType.GRID:
228
228
  return GridEditor;
229
- case SDK.CSSPropertyParserMatchers.LayoutType.MASONRY:
230
- return MasonryEditor;
229
+ case SDK.CSSPropertyParserMatchers.LayoutType.GRID_LANES:
230
+ return GridLanesEditor;
231
231
  }
232
232
  }
233
233
 
@@ -237,8 +237,8 @@ export class FlexGridRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
237
237
  return i18nString(UIStrings.flexboxEditorButton);
238
238
  case SDK.CSSPropertyParserMatchers.LayoutType.GRID:
239
239
  return i18nString(UIStrings.gridEditorButton);
240
- case SDK.CSSPropertyParserMatchers.LayoutType.MASONRY:
241
- return i18nString(UIStrings.masonryEditorButton);
240
+ case SDK.CSSPropertyParserMatchers.LayoutType.GRID_LANES:
241
+ return i18nString(UIStrings.gridLanesEditorButton);
242
242
  }
243
243
  }
244
244
 
@@ -248,8 +248,8 @@ export class FlexGridRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
248
248
  return Host.UserMetrics.SwatchType.FLEX;
249
249
  case SDK.CSSPropertyParserMatchers.LayoutType.GRID:
250
250
  return Host.UserMetrics.SwatchType.GRID;
251
- case SDK.CSSPropertyParserMatchers.LayoutType.MASONRY:
252
- return Host.UserMetrics.SwatchType.MASONRY;
251
+ case SDK.CSSPropertyParserMatchers.LayoutType.GRID_LANES:
252
+ return Host.UserMetrics.SwatchType.GRID_LANES;
253
253
  }
254
254
  }
255
255
 
@@ -1134,7 +1134,7 @@ export class LinkableNameRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1134
1134
  return;
1135
1135
  }
1136
1136
 
1137
- const icon = IconButton.Icon.create('animation', 'open-in-animations-panel');
1137
+ const icon = createIcon('animation', 'open-in-animations-panel');
1138
1138
  icon.setAttribute('jslog', `${VisualLogging.link('open-in-animations-panel').track({click: true})}`);
1139
1139
  icon.setAttribute('role', 'button');
1140
1140
  icon.setAttribute('title', i18nString(UIStrings.jumpToAnimationsPanel));
@@ -1170,7 +1170,7 @@ export class BezierRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.B
1170
1170
  return nodes;
1171
1171
  }
1172
1172
  const swatchPopoverHelper = this.#treeElement.parentPane().swatchPopoverHelper();
1173
- const icon = IconButton.Icon.create('bezier-curve-filled', 'bezier-swatch-icon');
1173
+ const icon = createIcon('bezier-curve-filled', 'bezier-swatch-icon');
1174
1174
  icon.setAttribute('jslog', `${VisualLogging.showStyleEditor('bezier')}`);
1175
1175
  icon.tabIndex = -1;
1176
1176
  icon.addEventListener('click', () => {
@@ -1954,7 +1954,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
1954
1954
  private expandedDueToFilter = false;
1955
1955
  valueElement: HTMLElement|null = null;
1956
1956
  nameElement: HTMLElement|null = null;
1957
- private expandElement: IconButton.Icon.Icon|null = null;
1957
+ private expandElement: Icon|null = null;
1958
1958
  private originalPropertyText = '';
1959
1959
  private hasBeenEditedIncrementally = false;
1960
1960
  private prompt: CSSPropertyPrompt|null = null;
@@ -2338,7 +2338,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
2338
2338
  this.#tooltipKeyCounts.clear();
2339
2339
  this.updateState();
2340
2340
  if (this.isExpandable()) {
2341
- this.expandElement = IconButton.Icon.create('triangle-right', 'expand-icon');
2341
+ this.expandElement = createIcon('triangle-right', 'expand-icon');
2342
2342
  this.expandElement.setAttribute('jslog', `${VisualLogging.expand().track({click: true})}`);
2343
2343
  }
2344
2344
 
@@ -2641,7 +2641,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
2641
2641
  if (hint) {
2642
2642
  const wrapper = document.createElement('span');
2643
2643
  wrapper.classList.add('hint-wrapper');
2644
- const hintIcon = new IconButton.Icon.Icon();
2644
+ const hintIcon = new Icon();
2645
2645
  hintIcon.name = 'info';
2646
2646
  hintIcon.classList.add('hint', 'small');
2647
2647
  hintIcon.tabIndex = -1;
@@ -44,7 +44,7 @@ import * as SDK from '../../core/sdk/sdk.js';
44
44
  import * as Protocol from '../../generated/protocol.js';
45
45
  import * as Bindings from '../../models/bindings/bindings.js';
46
46
  import * as TextUtils from '../../models/text_utils/text_utils.js';
47
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
47
+ import {createIcon, Icon} from '../../ui/kit/kit.js';
48
48
  import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
49
49
  import * as Components from '../../ui/legacy/components/utils/utils.js';
50
50
  import * as UI from '../../ui/legacy/legacy.js';
@@ -1504,15 +1504,14 @@ export class SectionBlock {
1504
1504
  readonly #titleElement: Element|null;
1505
1505
  sections: StylePropertiesSection[];
1506
1506
  #expanded = false;
1507
- #icon: IconButton.Icon.Icon|undefined;
1507
+ #icon: Icon|undefined;
1508
1508
  constructor(titleElement: Element|null, expandable?: boolean, expandedByDefault?: boolean) {
1509
1509
  this.#titleElement = titleElement;
1510
1510
  this.sections = [];
1511
1511
  this.#expanded = expandedByDefault ?? false;
1512
1512
 
1513
1513
  if (expandable && titleElement instanceof HTMLElement) {
1514
- this.#icon =
1515
- IconButton.Icon.create(this.#expanded ? 'triangle-down' : 'triangle-right', 'section-block-expand-icon');
1514
+ this.#icon = createIcon(this.#expanded ? 'triangle-down' : 'triangle-right', 'section-block-expand-icon');
1516
1515
  titleElement.classList.toggle('empty-section', !this.#expanded);
1517
1516
  UI.ARIAUtils.setExpanded(titleElement, this.#expanded);
1518
1517
  titleElement.appendChild(this.#icon);
@@ -1964,7 +1963,7 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
1964
1963
  if (!iconInfo) {
1965
1964
  continue;
1966
1965
  }
1967
- const icon = new IconButton.Icon.Icon();
1966
+ const icon = new Icon();
1968
1967
  icon.name = iconInfo.iconName;
1969
1968
  icon.classList.add('extra-small');
1970
1969
  icon.style.transform = `rotate(${iconInfo.rotate}deg) scale(${iconInfo.scaleX * 1.1}, ${iconInfo.scaleY * 1.1})`;
@@ -6,7 +6,7 @@
6
6
  import * as Common from '../../core/common/common.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as SDK from '../../core/sdk/sdk.js';
9
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
9
+ import {createIcon} from '../../ui/kit/kit.js';
10
10
  import * as UI from '../../ui/legacy/legacy.js';
11
11
 
12
12
  import * as ElementsComponents from './components/components.js';
@@ -97,7 +97,7 @@ export class TopLayerContainer extends UI.TreeOutline.TreeElement {
97
97
  ElementsComponents.AdornerManager.RegisteredAdorners.TOP_LAYER);
98
98
  const adornerContent = document.createElement('span');
99
99
  adornerContent.classList.add('adorner-with-icon');
100
- const linkIcon = IconButton.Icon.create('select-element');
100
+ const linkIcon = createIcon('select-element');
101
101
  const adornerText = document.createElement('span');
102
102
  adornerText.textContent = `top-layer (${topLayerElementIndex})`;
103
103
  adornerContent.append(linkIcon);
@@ -26,7 +26,7 @@ export enum RegisteredAdorners {
26
26
  CONTAINER = 'container',
27
27
  FLEX = 'flex',
28
28
  GRID = 'grid',
29
- MASONRY = 'masonry',
29
+ GRID_LANES = 'grid-lanes',
30
30
  MEDIA = 'media',
31
31
  POPOVER = 'popover',
32
32
  REVEAL = 'reveal',
@@ -56,9 +56,9 @@ export function getRegisteredAdorner(which: RegisteredAdorners): RegisteredAdorn
56
56
  category: AdornerCategories.LAYOUT,
57
57
  enabledByDefault: true,
58
58
  };
59
- case RegisteredAdorners.MASONRY:
59
+ case RegisteredAdorners.GRID_LANES:
60
60
  return {
61
- name: 'masonry',
61
+ name: 'grid-lanes',
62
62
  category: AdornerCategories.LAYOUT,
63
63
  enabledByDefault: true,
64
64
  };
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import '../../../ui/components/icon_button/icon_button.js';
6
+ import '../../../ui/kit/kit.js';
7
7
  import '../../../ui/components/node_text/node_text.js';
8
8
 
9
9
  import * as i18n from '../../../core/i18n/i18n.js';
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import '../../../ui/components/icon_button/icon_button.js';
6
+ import '../../../ui/kit/kit.js';
7
7
 
8
8
  import * as i18n from '../../../core/i18n/i18n.js';
9
9
  import {html, render} from '../../../ui/lit/lit.js';
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import '../../../ui/components/icon_button/icon_button.js';
6
+ import '../../../ui/kit/kit.js';
7
7
  import '../../../ui/components/node_text/node_text.js';
8
8
 
9
9
  import * as SDK from '../../../core/sdk/sdk.js';
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import '../../../ui/components/icon_button/icon_button.js';
6
+ import '../../../ui/kit/kit.js';
7
7
 
8
8
  import * as i18n from '../../../core/i18n/i18n.js';
9
9
  import * as Lit from '../../../ui/lit/lit.js';
@@ -187,20 +187,20 @@ declare global {
187
187
  }
188
188
  }
189
189
 
190
- export class MasonryEditor extends StylePropertyEditor {
191
- readonly jslogContext = 'cssMasonryEditor';
192
- protected override readonly editableProperties: EditableProperty[] = MasonryEditableProperties;
190
+ export class GridLanesEditor extends StylePropertyEditor {
191
+ readonly jslogContext = 'cssGridLanesEditor';
192
+ protected override readonly editableProperties: EditableProperty[] = GridLanesEditableProperties;
193
193
 
194
194
  protected override findIcon(query: string, computedProperties: Map<string, string>): IconInfo|null {
195
195
  return findGridContainerIcon(query, computedProperties);
196
196
  }
197
197
  }
198
198
 
199
- customElements.define('devtools-masonry-editor', MasonryEditor);
199
+ customElements.define('devtools-grid-lanes-editor', GridLanesEditor);
200
200
 
201
201
  declare global {
202
202
  interface HTMLElementTagNameMap {
203
- 'devtools-masonry-editor': MasonryEditor;
203
+ 'devtools-grid-lanes-editor': GridLanesEditor;
204
204
  }
205
205
  }
206
206
 
@@ -301,7 +301,7 @@ export const GridEditableProperties = [
301
301
  },
302
302
  ];
303
303
 
304
- export const MasonryEditableProperties = [
304
+ export const GridLanesEditableProperties = [
305
305
  {
306
306
  propertyName: 'align-content',
307
307
  propertyValues: [
@@ -128,11 +128,56 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
128
128
  return;
129
129
  }
130
130
  const result = await object.callFunction(function(this: Element) {
131
+ function getFrameOffset(frame: Element|null): {x: number, y: number} {
132
+ if (!frame) {
133
+ return {x: 0, y: 0};
134
+ }
135
+
136
+ // The offset of the frame's content relative to the frame element
137
+ // contains the border width and the padding.
138
+ // The border width.
139
+ const borderTop = frame.clientTop;
140
+ const borderLeft = frame.clientLeft;
141
+
142
+ // The padding can be retrieved via computed styles.
143
+ const styles = window.getComputedStyle(frame);
144
+ const paddingTop = parseFloat(styles.paddingTop);
145
+ const paddingLeft = parseFloat(styles.paddingLeft);
146
+
147
+ // The position of the frame in it's parent.
148
+ const rect = frame.getBoundingClientRect();
149
+
150
+ // The offset of the parent frame's content relative to the
151
+ // document. If there is no parent frame, the offset is 0.
152
+ // In case of OOPiF, there is no access to the parent frame's
153
+ // offset.
154
+ const parentFrameOffset = getFrameOffset(frame.ownerDocument.defaultView?.frameElement ?? null);
155
+
156
+ // The scroll position of the frame.
157
+ const scrollX = frame.ownerDocument.defaultView?.scrollX ?? 0;
158
+ const scrollY = frame.ownerDocument.defaultView?.scrollY ?? 0;
159
+
160
+ return {
161
+ x: parentFrameOffset.x + rect.left + borderLeft + paddingLeft + scrollX,
162
+ y: parentFrameOffset.y + rect.top + borderTop + paddingTop + scrollY,
163
+ };
164
+ }
165
+
166
+ // The bounding client rect of the node relative to the viewport.
131
167
  const rect = this.getBoundingClientRect();
132
- const docRect = this.ownerDocument.documentElement.getBoundingClientRect();
168
+ const frameOffset = getFrameOffset(this.ownerDocument.defaultView?.frameElement ?? null);
169
+
170
+ // The scroll position of the frame.
171
+ const scrollX = this.ownerDocument.defaultView?.scrollX ?? 0;
172
+ const scrollY = this.ownerDocument.defaultView?.scrollY ?? 0;
173
+
174
+ // The offset of the node's content relative to the top-level
175
+ // document is the sum of the element offset relative to the
176
+ // document's viewport, the document's scroll position, and the
177
+ // parent's offset relative to the top-level document.
133
178
  return JSON.stringify({
134
- x: rect.left - docRect.left,
135
- y: rect.top - docRect.top,
179
+ x: rect.left + frameOffset.x + scrollX,
180
+ y: rect.top + frameOffset.y + scrollY,
136
181
  width: rect.width,
137
182
  height: rect.height,
138
183
  scale: 1,
@@ -529,9 +529,10 @@ function renderSignInFooter(onGoToSignIn: () => void): Lit.LitTemplate {
529
529
  .variant=${Buttons.Button.Variant.PRIMARY}
530
530
  .jslogContext=${'update-settings'}
531
531
  >
532
- ${UIStrings.signIn}
532
+ ${i18nString(UIStrings.signIn)}
533
533
  </devtools-button>
534
534
  </div>`;
535
+ // clang-format on
535
536
  }
536
537
 
537
538
  function renderConsentReminderFooter(onReminderSettingsLink: () => void, onConsentReminderConfirmed: () => void): Lit.LitTemplate {
@@ -541,9 +542,9 @@ function renderConsentReminderFooter(onReminderSettingsLink: () => void, onConse
541
542
  <div class="buttons">
542
543
  <devtools-button
543
544
  @click=${onReminderSettingsLink}
544
- .variant=${Buttons.Button.Variant.TONAL}
545
- jslogContext=${'settings'}
546
- title=${'Settings'}
545
+ .variant=${Buttons.Button.Variant.TONAL}
546
+ .jslogContext=${'settings'}
547
+ .title=${'Settings'}
547
548
  >
548
549
  Settings
549
550
  </devtools-button>
@@ -557,6 +558,7 @@ function renderConsentReminderFooter(onReminderSettingsLink: () => void, onConse
557
558
  Continue
558
559
  </devtools-button>
559
560
  </div>`;
561
+ // clang-format on
560
562
  }
561
563
 
562
564
  function renderInsightFooter(noLogging: ViewInput['noLogging'], selectedRating: ViewInput['selectedRating'], callbacks: ViewInput['callbacks']): Lit.LitTemplate {
@@ -12,8 +12,8 @@ import type * as Protocol from '../../generated/protocol.js';
12
12
  import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
13
13
  import * as Logs from '../../models/logs/logs.js';
14
14
  import type * as NetworkForward from '../../panels/network/forward/forward.js';
15
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
16
15
  import * as RequestLinkIcon from '../../ui/components/request_link_icon/request_link_icon.js';
16
+ import {Icon} from '../../ui/kit/kit.js';
17
17
  import * as Components from '../../ui/legacy/components/utils/utils.js';
18
18
  import * as UI from '../../ui/legacy/legacy.js';
19
19
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
@@ -180,7 +180,7 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
180
180
  const frameCell = document.createElement('td');
181
181
  frameCell.classList.add('affected-resource-cell');
182
182
  if (frame) {
183
- const icon = new IconButton.Icon.Icon();
183
+ const icon = new Icon();
184
184
  icon.name = 'code-circle';
185
185
  icon.classList.add('link', 'elements-panel', 'medium');
186
186
  icon.onclick = async () => {
@@ -109,7 +109,7 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
109
109
  const element = document.createElement('tr');
110
110
  element.classList.add('affected-resource-directive');
111
111
 
112
- const details = issue.issueDetails;
112
+ const details = issue.details();
113
113
 
114
114
  switch (issueCode) {
115
115
  case IssuesManager.AttributionReportingIssue.IssueCode.INVALID_REGISTER_SOURCE_HEADER:
@@ -154,7 +154,7 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
154
154
 
155
155
  async #appendElementOrEmptyCell(
156
156
  parent: HTMLElement, issue: IssuesManager.AttributionReportingIssue.AttributionReportingIssue): Promise<void> {
157
- const details = issue.issueDetails;
157
+ const details = issue.details();
158
158
  if (details.violatingNodeId !== undefined) {
159
159
  const target = issue.model()?.target() || null;
160
160
  parent.appendChild(await this.createElementCell(
@@ -7,8 +7,8 @@ import * as Common from '../../core/common/common.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
9
9
  import * as Adorners from '../../ui/components/adorners/adorners.js';
10
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
11
10
  import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
11
+ import {Icon} from '../../ui/kit/kit.js';
12
12
  import * as UI from '../../ui/legacy/legacy.js';
13
13
 
14
14
  import * as Components from './components/components.js';
@@ -93,7 +93,7 @@ export class IssueKindView extends UI.TreeOutline.TreeElement {
93
93
  const header = document.createElement('div');
94
94
  header.classList.add('header');
95
95
 
96
- const issueKindIcon = new IconButton.Icon.Icon();
96
+ const issueKindIcon = new Icon();
97
97
  issueKindIcon.name = IssueCounter.IssueCounter.getIssueKindIconName(this.#kind);
98
98
  issueKindIcon.classList.add('leading-issue-icon', 'extra-large');
99
99
 
@@ -12,9 +12,9 @@ import type {AggregatedIssue} from '../../models/issues_manager/IssueAggregator.
12
12
  import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
13
13
  import * as NetworkForward from '../../panels/network/forward/forward.js';
14
14
  import * as Adorners from '../../ui/components/adorners/adorners.js';
15
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
16
15
  import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
17
16
  import * as MarkdownView from '../../ui/components/markdown_view/markdown_view.js';
17
+ import {Icon} from '../../ui/kit/kit.js';
18
18
  import * as UI from '../../ui/legacy/legacy.js';
19
19
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
20
20
 
@@ -159,7 +159,7 @@ class AffectedMixedContentView extends AffectedResourcesView {
159
159
 
160
160
  let count = 0;
161
161
  for (const issue of mixedContentIssues) {
162
- const details = issue.getDetails();
162
+ const details = issue.details();
163
163
  this.appendAffectedMixedContent(details);
164
164
  count++;
165
165
  }
@@ -221,7 +221,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
221
221
  affectedResources: UI.TreeOutline.TreeElement;
222
222
  readonly #affectedResourceViews: AffectedResourcesView[];
223
223
  #aggregatedIssuesCount: HTMLElement|null;
224
- #issueKindIcon: IconButton.Icon.Icon|null = null;
224
+ #issueKindIcon: Icon|null = null;
225
225
  #hasBeenExpandedBefore: boolean;
226
226
  #throttle: Common.Throttler.Throttler;
227
227
  #needsUpdateOnExpand = true;
@@ -336,7 +336,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
336
336
  #appendHeader(): void {
337
337
  const header = document.createElement('div');
338
338
  header.classList.add('header');
339
- this.#issueKindIcon = new IconButton.Icon.Icon();
339
+ this.#issueKindIcon = new Icon();
340
340
  this.#issueKindIcon.classList.add('leading-issue-icon', 'extra-large');
341
341
  this.#aggregatedIssuesCount = document.createElement('span');
342
342
  const countAdorner = new Adorners.Adorner.Adorner();
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import * as SDK from '../../core/sdk/sdk.js';
7
8
  import * as UI from '../../ui/legacy/legacy.js';
8
9
  import type * as Timeline from '../timeline/timeline.js';
9
10
 
@@ -61,9 +62,10 @@ UI.ViewManager.registerViewExtension({
61
62
  order: 66,
62
63
  hasToolbar: false,
63
64
  isPreviewFeature: true,
64
- async loadView() {
65
+ async loadView(universe) {
65
66
  const Timeline = await loadTimelineModule();
66
- return Timeline.TimelinePanel.TimelinePanel.instance({forceNew: null});
67
+ const resourceLoader = universe.context.get(SDK.PageResourceLoader.PageResourceLoader);
68
+ return Timeline.TimelinePanel.TimelinePanel.instance({forceNew: true, resourceLoader});
67
69
  },
68
70
  });
69
71
 
@@ -3,10 +3,10 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import '../../../ui/components/icon_button/icon_button.js';
6
+ import '../../../ui/kit/kit.js';
7
7
 
8
8
  import * as i18n from '../../../core/i18n/i18n.js';
9
- import * as Lit from '../../../ui/lit/lit.js';
9
+ import {Directives, html, render, type TemplateResult} from '../../../ui/lit/lit.js';
10
10
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
11
11
 
12
12
  import linearMemoryHighlightChipListStyles from './linearMemoryHighlightChipList.css.js';
@@ -28,76 +28,54 @@ const UIStrings = {
28
28
  const str_ = i18n.i18n.registerUIStrings(
29
29
  'panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts', UIStrings);
30
30
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
31
- const {render, html} = Lit;
31
+ const {classMap} = Directives;
32
32
 
33
33
  export interface LinearMemoryHighlightChipListData {
34
34
  highlightInfos: HighlightInfo[];
35
35
  focusedMemoryHighlight?: HighlightInfo;
36
- }
37
-
38
- export class DeleteMemoryHighlightEvent extends Event {
39
- static readonly eventName = 'deletememoryhighlight';
40
- data: HighlightInfo;
41
-
42
- constructor(highlightInfo: HighlightInfo) {
43
- super(DeleteMemoryHighlightEvent.eventName, {bubbles: true, composed: true});
44
- this.data = highlightInfo;
45
- }
46
- }
47
-
48
- export class JumpToHighlightedMemoryEvent extends Event {
49
- static readonly eventName = 'jumptohighlightedmemory';
50
- data: number;
51
-
52
- constructor(address: number) {
53
- super(JumpToHighlightedMemoryEvent.eventName);
54
- this.data = address;
55
- }
36
+ jumpToAddress?: (address: number) => void;
37
+ deleteHighlight?: (highlightInfo: HighlightInfo) => void;
56
38
  }
57
39
 
58
40
  export class LinearMemoryHighlightChipList extends HTMLElement {
59
41
  readonly #shadow = this.attachShadow({mode: 'open'});
60
42
  #highlightedAreas: HighlightInfo[] = [];
61
43
  #focusedMemoryHighlight?: HighlightInfo;
44
+ #jumpToAddress?: (address: number) => void;
45
+ #deleteHighlight?: (highlightInfo: HighlightInfo) => void;
62
46
 
63
47
  set data(data: LinearMemoryHighlightChipListData) {
64
48
  this.#highlightedAreas = data.highlightInfos;
65
49
  this.#focusedMemoryHighlight = data.focusedMemoryHighlight;
50
+ this.#jumpToAddress = data.jumpToAddress;
51
+ this.#deleteHighlight = data.deleteHighlight;
66
52
  this.#render();
67
53
  }
68
54
 
69
55
  #render(): void {
70
56
  // Disabled until https://crbug.com/1079231 is fixed.
71
57
  // clang-format off
72
- const chips = [];
73
- for (const highlightInfo of this.#highlightedAreas) {
74
- chips.push(this.#createChip(highlightInfo));
75
- }
76
- const result = html`
77
- <style>${linearMemoryHighlightChipListStyles}</style>
78
- <div class="highlight-chip-list">
79
- ${chips}
80
- </div>
81
- `;
82
- render(result, this.#shadow, { host: this });
58
+ render(html`
59
+ <style>${linearMemoryHighlightChipListStyles}</style>
60
+ <div class="highlight-chip-list">
61
+ ${this.#highlightedAreas.map(highlightInfo => this.#createChip(highlightInfo))}
62
+ </div>`, this.#shadow);
83
63
  // clang-format on
84
64
  }
85
65
 
86
- #createChip(highlightInfo: HighlightInfo): Lit.TemplateResult {
66
+ #createChip(highlightInfo: HighlightInfo): TemplateResult {
87
67
  const expressionName = highlightInfo.name || '<anonymous>';
88
68
  const expressionType = highlightInfo.type;
89
69
  const isFocused = highlightInfo === this.#focusedMemoryHighlight;
90
- const classMap = {
91
- focused: isFocused,
92
- 'highlight-chip': true,
93
- };
94
70
  // Disabled until https://crbug.com/1079231 is fixed.
95
71
  // clang-format off
96
72
  return html`
97
- <div class=${Lit.Directives.classMap(classMap)}>
98
- <button class="jump-to-highlight-button" title=${i18nString(UIStrings.jumpToAddress)}
99
- jslog=${VisualLogging.action('linear-memory-inspector.jump-to-highlight').track({click:true})}
100
- @click=${():void => this.#onJumpToHighlightClick(highlightInfo.startAddress)}>
73
+ <div class=${classMap({focused: isFocused, 'highlight-chip': true})}>
74
+ <button class="jump-to-highlight-button"
75
+ title=${i18nString(UIStrings.jumpToAddress)}
76
+ jslog=${VisualLogging.action('linear-memory-inspector.jump-to-highlight')
77
+ .track({click:true})}
78
+ @click=${() => this.#onJumpToHighlightClick(highlightInfo.startAddress)}>
101
79
  <span class="source-code">
102
80
  <span class="value">${expressionName}</span>
103
81
  <span class="separator">: </span>
@@ -106,23 +84,23 @@ export class LinearMemoryHighlightChipList extends HTMLElement {
106
84
  </button>
107
85
  <div class="delete-highlight-container">
108
86
  <button class="delete-highlight-button" title=${i18nString(UIStrings.deleteHighlight)}
109
- jslog=${VisualLogging.action('linear-memory-inspector.delete-highlight').track({click:true})}
110
- @click=${():void => this.#onDeleteHighlightClick(highlightInfo)}>
87
+ jslog=${VisualLogging.action('linear-memory-inspector.delete-highlight')
88
+ .track({click:true})}
89
+ @click=${() => this.#onDeleteHighlightClick(highlightInfo)}>
111
90
  <devtools-icon name="cross" class="medium">
112
91
  </devtools-icon>
113
92
  </button>
114
93
  </div>
115
- </div>
116
- `;
94
+ </div>`;
117
95
  // clang-format off
118
96
  }
119
97
 
120
98
  #onJumpToHighlightClick(startAddress: number): void {
121
- this.dispatchEvent(new JumpToHighlightedMemoryEvent(startAddress));
99
+ this.#jumpToAddress?.(startAddress);
122
100
  }
123
101
 
124
- #onDeleteHighlightClick(highlight:HighlightInfo): void {
125
- this.dispatchEvent(new DeleteMemoryHighlightEvent(highlight));
102
+ #onDeleteHighlightClick(highlight: HighlightInfo): void {
103
+ this.#deleteHighlight?.(highlight);
126
104
  }
127
105
  }
128
106