chrome-devtools-frontend 1.0.1652307 → 1.0.1656291

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 (267) hide show
  1. package/.agents/skills/fixing-skipped-tests/SKILL.md +32 -0
  2. package/.agents/skills/migrate-chromium-test/SKILL.md +144 -0
  3. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +116 -0
  4. package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +82 -0
  5. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +123 -0
  6. package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +125 -0
  7. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +75 -0
  8. package/AUTHORS +1 -0
  9. package/config/owner/COMMON_OWNERS +0 -4
  10. package/docs/get_the_code.md +1 -2
  11. package/docs/playbook.md +1 -1
  12. package/docs/ui_engineering.md +3 -1
  13. package/eslint.config.mjs +0 -5
  14. package/front_end/Tests.js +1 -0
  15. package/front_end/core/common/Settings.ts +47 -30
  16. package/front_end/core/sdk/CPUThrottlingManager.ts +23 -167
  17. package/front_end/core/sdk/CSSMetadata.ts +23 -0
  18. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +8 -4
  19. package/front_end/core/sdk/ConsoleModel.ts +13 -11
  20. package/front_end/core/sdk/DOMDebuggerModel.ts +11 -5
  21. package/front_end/core/sdk/DOMModel.ts +4 -0
  22. package/front_end/core/sdk/EmulationModel.ts +4 -0
  23. package/front_end/core/sdk/EventBreakpointsModel.ts +9 -5
  24. package/front_end/core/sdk/IsolateManager.ts +6 -6
  25. package/front_end/core/sdk/ResourceTreeModel.ts +8 -5
  26. package/front_end/core/sdk/TargetManager.ts +17 -0
  27. package/front_end/entrypoints/devtools_app/devtools_app.ts +0 -1
  28. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +459 -74
  29. package/front_end/entrypoints/main/MainImpl.ts +12 -42
  30. package/front_end/foundation/Universe.ts +116 -3
  31. package/front_end/generated/InspectorBackendCommands.ts +11 -6
  32. package/front_end/generated/SupportedCSSProperties.js +124 -34
  33. package/front_end/generated/protocol-mapping.d.ts +8 -0
  34. package/front_end/generated/protocol-proxy-api.d.ts +15 -0
  35. package/front_end/generated/protocol.ts +94 -1
  36. package/front_end/models/ai_assistance/AiConversation.ts +2 -7
  37. package/front_end/models/ai_assistance/README.md +4 -3
  38. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
  39. package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +1 -1
  40. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
  41. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +13 -320
  42. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
  43. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -358
  44. package/front_end/models/ai_assistance/ai_assistance.ts +6 -8
  45. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +295 -0
  46. package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +0 -1
  47. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +0 -2
  48. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +10 -10
  49. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +12 -11
  50. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -6
  51. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -14
  52. package/front_end/models/ai_assistance/skills/accessibility.md +4 -2
  53. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +142 -0
  54. package/front_end/models/ai_assistance/tools/GetStyles.ts +1 -1
  55. package/front_end/models/ai_assistance/tools/README.md +21 -1
  56. package/front_end/models/ai_assistance/tools/{ResolveLighthousePath.ts → ResolveDevtoolsNodePath.ts} +18 -17
  57. package/front_end/models/ai_assistance/tools/Tool.ts +6 -1
  58. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +4 -2
  59. package/front_end/models/autofill_manager/AutofillManager.ts +6 -15
  60. package/front_end/models/bindings/NetworkProject.ts +4 -8
  61. package/front_end/models/breakpoints/BreakpointManager.ts +9 -9
  62. package/front_end/models/emulation/DeviceModeModel.ts +24 -0
  63. package/front_end/models/emulation/EmulatedDevices.ts +108 -0
  64. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +36 -0
  65. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +8 -0
  66. package/front_end/models/issues_manager/IssuesManager.ts +10 -6
  67. package/front_end/models/javascript_metadata/JavaScriptMetadata.ts +4 -5
  68. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  69. package/front_end/models/live-metrics/LiveMetrics.ts +6 -6
  70. package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +5 -5
  71. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +3 -3
  72. package/front_end/models/logs/LogManager.ts +25 -10
  73. package/front_end/models/logs/NetworkLog.ts +24 -19
  74. package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -13
  75. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +26 -14
  76. package/front_end/models/persistence/IsolatedFileSystem.ts +9 -11
  77. package/front_end/models/persistence/IsolatedFileSystemManager.ts +22 -11
  78. package/front_end/models/persistence/NetworkPersistenceManager.ts +73 -44
  79. package/front_end/models/persistence/PersistenceImpl.ts +4 -5
  80. package/front_end/models/project_settings/ProjectSettingsModel.ts +12 -11
  81. package/front_end/models/trace/EntityMapper.ts +1 -1
  82. package/front_end/models/trace/handlers/ScreenshotsHandler.ts +14 -59
  83. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +12 -38
  84. package/front_end/panels/ai_assistance/ExportConversation.ts +4 -1
  85. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  86. package/front_end/panels/application/DeviceBoundSessionsView.ts +15 -3
  87. package/front_end/panels/application/FrameDetailsView.ts +2 -1
  88. package/front_end/panels/application/IndexedDBViews.ts +38 -36
  89. package/front_end/panels/application/ServiceWorkersView.ts +23 -16
  90. package/front_end/panels/application/components/AdsView.ts +4 -0
  91. package/front_end/panels/autofill/AutofillView.ts +1 -1
  92. package/front_end/panels/autofill/autofill-meta.ts +3 -2
  93. package/front_end/panels/common/CPUThrottlingOption.ts +142 -0
  94. package/front_end/panels/common/ThrottlingUtils.ts +9 -4
  95. package/front_end/panels/common/common.ts +1 -1
  96. package/front_end/panels/console/ConsoleViewMessage.ts +45 -0
  97. package/front_end/panels/elements/AccessibilityTreeUtils.ts +26 -15
  98. package/front_end/panels/elements/AccessibilityTreeView.ts +12 -9
  99. package/front_end/panels/elements/ElementsPanel.ts +0 -74
  100. package/front_end/panels/elements/ElementsTreeOutline.ts +5 -4
  101. package/front_end/panels/emulation/DeviceModeToolbar.ts +46 -45
  102. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +118 -68
  103. package/front_end/panels/layer_viewer/Layers3DView.ts +1 -1
  104. package/front_end/panels/layer_viewer/layerTreeOutline.css +20 -13
  105. package/front_end/panels/layers/LayersPanel.ts +1 -1
  106. package/front_end/panels/mobile_throttling/CalibrationController.ts +6 -5
  107. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +1 -1
  108. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +40 -13
  109. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +13 -17
  110. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +79 -30
  111. package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +5 -0
  112. package/front_end/panels/network/LinkPreloadGenerator.ts +101 -0
  113. package/front_end/panels/network/NetworkLogView.ts +28 -9
  114. package/front_end/panels/network/NetworkPanel.ts +1 -63
  115. package/front_end/panels/network/RequestInitiatorView.ts +29 -4
  116. package/front_end/panels/network/components/HeaderSectionRow.css +9 -7
  117. package/front_end/panels/network/components/HeaderSectionRow.ts +20 -1
  118. package/front_end/panels/network/components/RequestHeaderSection.css +5 -3
  119. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -2
  120. package/front_end/panels/network/components/RequestHeadersView.css +1 -1
  121. package/front_end/panels/network/network.ts +2 -0
  122. package/front_end/panels/profiler/HeapSnapshotView.ts +121 -33
  123. package/front_end/panels/profiler/ModuleUIStrings.ts +4 -0
  124. package/front_end/panels/security/SecurityPanel.ts +36 -23
  125. package/front_end/panels/settings/SettingsScreen.ts +18 -103
  126. package/front_end/panels/settings/settings-meta.ts +0 -24
  127. package/front_end/panels/timeline/TimelineController.ts +3 -2
  128. package/front_end/panels/timeline/TimelineHistoryManager.ts +38 -37
  129. package/front_end/panels/timeline/TimelinePanel.ts +52 -11
  130. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +20 -18
  131. package/front_end/panels/timeline/components/LiveMetricsView.ts +38 -38
  132. package/front_end/panels/timeline/components/MetricCard.ts +18 -18
  133. package/front_end/panels/timeline/components/liveMetricsView.css +6 -6
  134. package/front_end/panels/timeline/components/metricCard.css +4 -4
  135. package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -0
  136. package/front_end/panels/utils/utils.ts +25 -24
  137. package/front_end/panels/whats_new/ReleaseNoteText.ts +3 -3
  138. package/front_end/panels/whats_new/resources/WNDT.md +1 -1
  139. package/front_end/third_party/chromium/README.chromium +1 -1
  140. package/front_end/third_party/puppeteer/README.chromium +2 -2
  141. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +34 -55
  142. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +96 -83
  143. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +10 -1
  144. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +3 -2
  152. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.d.ts +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.js +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +2 -1
  162. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.js.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -2
  166. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +5 -2
  168. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +23 -13
  173. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +4 -1
  176. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Input.js +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.js.map +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
  182. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +3 -41
  183. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  184. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +4 -2
  188. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts +5 -0
  190. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts +1 -1
  194. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js +5 -5
  196. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/types.d.ts +34 -55
  200. package/front_end/third_party/puppeteer/package/package.json +4 -4
  201. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
  202. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -3
  203. package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +3 -1
  204. package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +3 -2
  205. package/front_end/third_party/puppeteer/package/src/api/Realm.ts +1 -2
  206. package/front_end/third_party/puppeteer/package/src/api/Target.ts +1 -1
  207. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +1 -2
  208. package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +3 -1
  209. package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +1 -3
  210. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +13 -3
  211. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +1 -1
  212. package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +24 -13
  213. package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +4 -1
  214. package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +1 -1
  215. package/front_end/third_party/puppeteer/package/src/cdp/LifecycleWatcher.ts +1 -4
  216. package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +2 -4
  217. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -76
  218. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +1 -4
  219. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -1
  220. package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +5 -0
  221. package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
  222. package/front_end/third_party/puppeteer/package/src/util/httpUtils.ts +5 -5
  223. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  224. package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -1
  225. package/front_end/ui/components/dialogs/Dialog.ts +3 -0
  226. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -7
  227. package/front_end/ui/helpers/OpenInNewTab.ts +15 -7
  228. package/front_end/ui/legacy/InspectorDrawerView.ts +7 -5
  229. package/front_end/ui/legacy/ListWidget.ts +12 -0
  230. package/front_end/ui/legacy/SplitWidget.ts +12 -11
  231. package/front_end/ui/legacy/TabbedPane.ts +1 -108
  232. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -0
  233. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +192 -139
  234. package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +89 -0
  235. package/front_end/ui/legacy/components/data_grid/dataGrid.css +10 -0
  236. package/front_end/ui/legacy/components/data_grid/data_grid.ts +3 -1
  237. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +8 -1
  238. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +110 -17
  239. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +89 -40
  240. package/front_end/ui/legacy/treeoutline.css +1 -1
  241. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  242. package/package.json +4 -3
  243. package/front_end/Images/navigationControls.png +0 -0
  244. package/front_end/Images/navigationControls_2x.png +0 -0
  245. package/front_end/Images/popoverArrows.png +0 -0
  246. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -746
  247. package/front_end/entrypoints/greendev_floaty/floaty.css +0 -301
  248. package/front_end/entrypoints/greendev_floaty/floaty.html +0 -38
  249. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -415
  250. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +0 -834
  251. package/front_end/models/ai_assistance/agents/GreenDevAgentAntigravityCliSocketClient.ts +0 -53
  252. package/front_end/models/ai_assistance/agents/GreenDevAgentGeminiCliSocketClient.ts +0 -117
  253. package/front_end/models/annotations/AnnotationRepository.ts +0 -238
  254. package/front_end/models/annotations/AnnotationType.ts +0 -10
  255. package/front_end/models/annotations/README.md +0 -7
  256. package/front_end/models/annotations/annotations.ts +0 -6
  257. package/front_end/models/greendev/Prototypes.ts +0 -68
  258. package/front_end/models/greendev/README.md +0 -5
  259. package/front_end/models/greendev/greendev.ts +0 -5
  260. package/front_end/panels/common/Annotation.ts +0 -184
  261. package/front_end/panels/common/AnnotationManager.ts +0 -208
  262. package/front_end/panels/common/annotation.css +0 -40
  263. package/front_end/panels/greendev/GreenDevPanel.css +0 -282
  264. package/front_end/panels/greendev/GreenDevPanel.ts +0 -364
  265. package/front_end/panels/greendev/GreenDevShared.ts +0 -13
  266. package/front_end/panels/greendev/greendev-meta.ts +0 -52
  267. package/front_end/panels/greendev/greendev.ts +0 -9
@@ -24,10 +24,12 @@
24
24
  }
25
25
 
26
26
  .call-to-action-body {
27
+ display: flex;
28
+ gap: var(--sys-size-4);
27
29
  padding: 6px 0;
28
- margin-left: 9.5px;
30
+ margin-left: var(--sys-size-1);
29
31
  border-left: 2px solid var(--issue-color-yellow);
30
- padding-left: 18px;
32
+ padding-left: 11px;
31
33
  line-height: 20px;
32
34
  }
33
35
 
@@ -56,7 +58,7 @@
56
58
  }
57
59
 
58
60
  .inline-icon {
59
- vertical-align: middle;
61
+ margin-top: var(--sys-size-2);
60
62
  }
61
63
 
62
64
  @media (forced-colors: active) {
@@ -83,9 +83,8 @@ function renderProvisionalHeadersWarning(isRequestCached: boolean): Lit.LitTempl
83
83
  return html`
84
84
  <div class="call-to-action">
85
85
  <div class="call-to-action-body">
86
+ <devtools-icon class="inline-icon medium" name='warning-filled'></devtools-icon>
86
87
  <div class="explanation" title=${cautionTitle}>
87
- <devtools-icon class="inline-icon medium" name='warning-filled'>
88
- </devtools-icon>
89
88
  ${cautionText} <devtools-link href="https://developer.chrome.com/docs/devtools/network/reference/#provisional-headers" class="link">${i18nString(UIStrings.learnMore)}</devtools-link>
90
89
  </div>
91
90
  </div>
@@ -128,7 +128,7 @@ div.raw-headers-row {
128
128
  }
129
129
 
130
130
  .inline-icon {
131
- vertical-align: middle;
131
+ vertical-align: sub;
132
132
  }
133
133
 
134
134
  .header-grid-container {
@@ -31,6 +31,7 @@ import './NetworkPanel.js';
31
31
 
32
32
  import * as BinaryResourceView from './BinaryResourceView.js';
33
33
  import * as EventSourceMessagesView from './EventSourceMessagesView.js';
34
+ import * as LinkPreloadGenerator from './LinkPreloadGenerator.js';
34
35
  import * as NetworkConfigView from './NetworkConfigView.js';
35
36
  import * as NetworkDataGridNode from './NetworkDataGridNode.js';
36
37
  import * as NetworkFrameGrouper from './NetworkFrameGrouper.js';
@@ -60,6 +61,7 @@ import * as SignedExchangeInfoView from './SignedExchangeInfoView.js';
60
61
  export {
61
62
  BinaryResourceView,
62
63
  EventSourceMessagesView,
64
+ LinkPreloadGenerator,
63
65
  NetworkConfigView,
64
66
  NetworkDataGridNode,
65
67
  NetworkFrameGrouper,
@@ -151,6 +151,32 @@ const UIStrings = {
151
151
  * objects retained by event handlers
152
152
  */
153
153
  objectsRetainedByEventHandlers: 'Objects retained by Event Handlers',
154
+ /**
155
+ * @description An option which will filter the heap snapshot to show only
156
+ * objects attributed to a specific native context (roughly, a JavaScript
157
+ * realm such as a frame). PH1 is a name identifying the context
158
+ * (often a URL) which may be empty, PH2 is the id of the native context
159
+ * object, and PH3 is the context's attributed size.
160
+ * @example {https://example.com/ } PH1
161
+ * @example {1234} PH2
162
+ * @example {1.2 MB} PH3
163
+ */
164
+ objectsAttributedToNativeContextS: 'Native context {PH1}@{PH2} ({PH3})',
165
+ /**
166
+ * @description An option which will filter the heap snapshot to show only
167
+ * objects which are shared between multiple native contexts (roughly,
168
+ * JavaScript realms such as frames). PH1 is their total size.
169
+ * @example {1.2 MB} PH1
170
+ */
171
+ objectsSharedBetweenNativeContextsS: 'Objects shared between native contexts ({PH1})',
172
+ /**
173
+ * @description An option which will filter the heap snapshot to show only
174
+ * objects which could not be attributed to any single native context
175
+ * (roughly, a JavaScript realm such as a frame). PH1 is their
176
+ * total size.
177
+ * @example {1.2 MB} PH1
178
+ */
179
+ objectsNotAttributedToNativeContextS: 'Objects not attributed to a native context ({PH1})',
154
180
  /**
155
181
  * @description Text for the summary view
156
182
  */
@@ -266,6 +292,19 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
266
292
  // eslint-disable-next-line @typescript-eslint/naming-convention
267
293
  const moduleUIstr_ = i18n.i18n.registerUIStrings('panels/profiler/ModuleUIStrings.ts', ModuleUIStrings.UIStrings);
268
294
  const moduleI18nString = i18n.i18n.getLocalizedString.bind(undefined, moduleUIstr_);
295
+
296
+ interface NamedFilter {
297
+ uiName: string;
298
+ filterName: string;
299
+ }
300
+
301
+ interface FilterOption {
302
+ uiName: string;
303
+ profileIndex: number;
304
+ filterName?: string;
305
+ disabled?: boolean;
306
+ }
307
+
269
308
  export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayDelegate, UI.SearchableView.Searchable {
270
309
  searchResults: number[] = [];
271
310
  profile: HeapProfileHeader;
@@ -293,6 +332,8 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
293
332
  readonly perspectiveSelect: UI.Toolbar.ToolbarComboBox;
294
333
  baseSelect: UI.Toolbar.ToolbarComboBox;
295
334
  readonly filterSelect: UI.Toolbar.ToolbarComboBox;
335
+ #filterOptions: FilterOption[] = [];
336
+ #nativeContextFilters: NamedFilter[] = [];
296
337
  readonly classNameFilter: UI.Toolbar.ToolbarInput;
297
338
  readonly selectedSizeText: UI.Toolbar.ToolbarText;
298
339
  readonly resetRetainersButton: UI.Toolbar.ToolbarButton;
@@ -556,6 +597,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
556
597
  const heapSnapshotProxy = await this.profile.loadPromise;
557
598
 
558
599
  void this.retrieveStatistics(heapSnapshotProxy);
600
+ void this.updateNativeContextFilters(heapSnapshotProxy);
559
601
  if (this.dataGrid) {
560
602
  void this.dataGrid.setDataSource(heapSnapshotProxy, 0);
561
603
  }
@@ -611,6 +653,52 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
611
653
  return statistics;
612
654
  }
613
655
 
656
+ async updateNativeContextFilters(heapSnapshotProxy: HeapSnapshotModel.HeapSnapshotProxy.HeapSnapshotProxy):
657
+ Promise<void> {
658
+ const sizes = await heapSnapshotProxy.getNativeContextSizes();
659
+ const filters: NamedFilter[] = [];
660
+
661
+ // List the individual native contexts first, sorted by attributed size
662
+ // (largest first), then the shared and unattributed buckets.
663
+ const nativeContexts = sizes.nativeContexts.toSorted((a, b) => b.attributedSize - a.attributedSize);
664
+ for (const nativeContext of nativeContexts) {
665
+ // Drop the "system / NativeContext" boilerplate (and any "Detached "
666
+ // marker) so the label shows just the distinguishing part of the name
667
+ // (e.g. the URL). The remaining name (if any) is followed by the native
668
+ // context object id, e.g. "Native context https://example.com @1234".
669
+ let name = nativeContext.nodeName;
670
+ if (name.startsWith('Detached ')) {
671
+ name = name.substring('Detached '.length);
672
+ }
673
+ if (name.startsWith('system / NativeContext / ')) {
674
+ name = name.substring('system / NativeContext / '.length);
675
+ } else if (name.startsWith('system / NativeContext')) {
676
+ name = name.substring('system / NativeContext'.length);
677
+ }
678
+ filters.push({
679
+ uiName: i18nString(UIStrings.objectsAttributedToNativeContextS, {
680
+ PH1: name ? `${name} ` : '',
681
+ PH2: nativeContext.nodeId,
682
+ PH3: i18n.ByteUtilities.bytesToString(nativeContext.attributedSize),
683
+ }),
684
+ filterName: `nativeContext_${nativeContext.nodeIndex}`,
685
+ });
686
+ }
687
+ filters.push({
688
+ uiName: i18nString(UIStrings.objectsSharedBetweenNativeContextsS,
689
+ {PH1: i18n.ByteUtilities.bytesToString(sizes.sharedSize)}),
690
+ filterName: 'sharedNativeContext',
691
+ });
692
+ filters.push({
693
+ uiName: i18nString(UIStrings.objectsNotAttributedToNativeContextS,
694
+ {PH1: i18n.ByteUtilities.bytesToString(sizes.noAttributionSize)}),
695
+ filterName: 'noNativeContext',
696
+ });
697
+
698
+ this.#nativeContextFilters = filters;
699
+ this.updateFilterOptions();
700
+ }
701
+
614
702
  onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent<IdsRangeChangedEvent>): void {
615
703
  const {minId, maxId} = event.data;
616
704
  this.selectedSizeText.setText(
@@ -775,7 +863,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
775
863
  this.performSearch(this.currentSearch, false);
776
864
  }
777
865
 
778
- static readonly ALWAYS_AVAILABLE_FILTERS: ReadonlyArray<{uiName: string, filterName: string}> = [
866
+ static readonly ALWAYS_AVAILABLE_FILTERS: readonly NamedFilter[] = [
779
867
  {uiName: i18nString(UIStrings.duplicatedStrings), filterName: 'duplicatedStrings'},
780
868
  {uiName: i18nString(UIStrings.objectsRetainedByDetachedDomNodes), filterName: 'objectsRetainedByDetachedDomNodes'},
781
869
  {uiName: i18nString(UIStrings.objectsRetainedByContexts), filterName: 'objectsRetainedByContexts'},
@@ -784,16 +872,9 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
784
872
  ];
785
873
 
786
874
  changeFilter(): void {
787
- let selectedIndex = this.filterSelect.selectedIndex();
788
- let filterName = undefined;
789
- const indexOfFirstAlwaysAvailableFilter =
790
- this.filterSelect.size() - HeapSnapshotView.ALWAYS_AVAILABLE_FILTERS.length;
791
- if (selectedIndex >= indexOfFirstAlwaysAvailableFilter) {
792
- filterName =
793
- HeapSnapshotView.ALWAYS_AVAILABLE_FILTERS[selectedIndex - indexOfFirstAlwaysAvailableFilter].filterName;
794
- selectedIndex = 0;
795
- }
796
- const profileIndex = selectedIndex - 1;
875
+ const selectedOption = this.#filterOptions[this.filterSelect.selectedIndex()];
876
+ const profileIndex = selectedOption?.profileIndex ?? -1;
877
+ const filterName = selectedOption?.filterName;
797
878
  if (!this.dataGrid) {
798
879
  return;
799
880
  }
@@ -1024,10 +1105,20 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
1024
1105
  updateFilterOptions(): void {
1025
1106
  const list = this.profiles();
1026
1107
  const selectedIndex = this.filterSelect.selectedIndex();
1027
- const originalSize = this.filterSelect.size();
1108
+ const selectedOption = this.#filterOptions[selectedIndex];
1109
+ const filterOptions: FilterOption[] = [];
1110
+ const createOption = (filterOption: FilterOption): HTMLOptionElement => {
1111
+ filterOptions.push(filterOption);
1112
+ const option = this.filterSelect.createOption(filterOption.uiName);
1113
+ option.disabled = Boolean(filterOption.disabled);
1114
+ return option;
1115
+ };
1116
+ const createSeparator = (): HTMLOptionElement => {
1117
+ return createOption({uiName: '\u2014'.repeat(18), profileIndex: -1, disabled: true});
1118
+ };
1028
1119
 
1029
1120
  this.filterSelect.removeOptions();
1030
- this.filterSelect.createOption(i18nString(UIStrings.allObjects));
1121
+ createOption({uiName: i18nString(UIStrings.allObjects), profileIndex: -1});
1031
1122
  for (let i = 0; i < list.length; ++i) {
1032
1123
  let title;
1033
1124
  if (!i) {
@@ -1035,34 +1126,31 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
1035
1126
  } else {
1036
1127
  title = i18nString(UIStrings.objectsAllocatedBetweenSAndS, {PH1: list[i - 1].title, PH2: list[i].title});
1037
1128
  }
1038
- this.filterSelect.createOption(title);
1129
+ createOption({uiName: title, profileIndex: i});
1039
1130
  }
1040
1131
 
1041
- // Create a dividing line using em dashes.
1042
- const dividerIndex = this.filterSelect.size();
1043
- const divider = this.filterSelect.createOption('\u2014'.repeat(18));
1044
- (divider).disabled = true;
1132
+ createSeparator();
1045
1133
 
1046
1134
  for (const filter of HeapSnapshotView.ALWAYS_AVAILABLE_FILTERS) {
1047
- this.filterSelect.createOption(filter.uiName);
1135
+ createOption({uiName: filter.uiName, profileIndex: -1, filterName: filter.filterName});
1048
1136
  }
1049
1137
 
1050
- const newSize = this.filterSelect.size();
1051
-
1052
- if (selectedIndex > -1) {
1053
- const distanceFromEnd = originalSize - selectedIndex;
1054
- if (distanceFromEnd <= HeapSnapshotView.ALWAYS_AVAILABLE_FILTERS.length) {
1055
- // If one of the always-available filters was selected, then select the
1056
- // same filter again even though its index may have changed.
1057
- this.filterSelect.setSelectedIndex(newSize - distanceFromEnd);
1058
- } else if (selectedIndex >= dividerIndex) {
1059
- // If the select list is now shorter than it was, such that we can't
1060
- // keep the index unchanged, set it to -1, which causes it to be blank.
1061
- this.filterSelect.setSelectedIndex(-1);
1062
- } else {
1063
- this.filterSelect.setSelectedIndex(selectedIndex);
1138
+ if (this.#nativeContextFilters.length > 0) {
1139
+ createSeparator();
1140
+ for (const filter of this.#nativeContextFilters) {
1141
+ createOption({uiName: filter.uiName, profileIndex: -1, filterName: filter.filterName});
1064
1142
  }
1065
1143
  }
1144
+
1145
+ this.#filterOptions = filterOptions;
1146
+
1147
+ if (selectedOption) {
1148
+ const newSelectedIndex = this.#filterOptions.findIndex(option => {
1149
+ return !option.disabled && option.profileIndex === selectedOption.profileIndex &&
1150
+ option.filterName === selectedOption.filterName;
1151
+ });
1152
+ this.filterSelect.setSelectedIndex(newSelectedIndex);
1153
+ }
1066
1154
  }
1067
1155
 
1068
1156
  updateControls(): void {
@@ -53,6 +53,10 @@ export const UIStrings = {
53
53
  * @description Text to indicate the status of a heap snapshot in the Performance Pane
54
54
  */
55
55
  buildingLocations: 'Building locations…',
56
+ /**
57
+ * @description Text to indicate the status of a heap snapshot in the Performance Pane
58
+ */
59
+ calculatingNativeContextAttribution: 'Calculating native context attribution…',
56
60
  /**
57
61
  * @description Text to indicate the status of a heap snapshot in the Performance Pane
58
62
  */
@@ -12,7 +12,7 @@ import * as Protocol from '../../generated/protocol.js';
12
12
  import * as NetworkForward from '../../panels/network/forward/forward.js';
13
13
  import {createIcon, type Icon} from '../../ui/kit/kit.js';
14
14
  import * as UI from '../../ui/legacy/legacy.js';
15
- import {html, render} from '../../ui/lit/lit.js';
15
+ import {html, render, type TemplateResult} from '../../ui/lit/lit.js';
16
16
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
17
17
 
18
18
  import lockIconStyles from './lockIcon.css.js';
@@ -510,26 +510,31 @@ export function getSecurityStateIconForOverview(
510
510
  return createIcon(iconName, className);
511
511
  }
512
512
 
513
- export function createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
513
+ function renderHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): TemplateResult {
514
514
  const schemeSeparator = '://';
515
515
  const index = url.indexOf(schemeSeparator);
516
516
 
517
517
  // If the separator is not found, just display the text without highlighting.
518
518
  if (index === -1) {
519
- const text = document.createElement('span');
520
- text.textContent = url;
521
- return text;
519
+ return html`<span>${url}</span>`;
522
520
  }
523
521
 
524
- const highlightedUrl = document.createElement('span');
525
- highlightedUrl.classList.add('highlighted-url');
526
522
  const scheme = url.substr(0, index);
527
523
  const content = url.substr(index + schemeSeparator.length);
528
- highlightedUrl.createChild('span', 'url-scheme-' + securityState).textContent = scheme;
529
- highlightedUrl.createChild('span', 'url-scheme-separator').textContent = schemeSeparator;
530
- highlightedUrl.createChild('span').textContent = content;
531
524
 
532
- return highlightedUrl;
525
+ return html`
526
+ <span class="highlighted-url">
527
+ <span class=${`url-scheme-${securityState}`}>${scheme}</span>
528
+ <span class="url-scheme-separator">${schemeSeparator}</span>
529
+ <span>${content}</span>
530
+ </span>`;
531
+ }
532
+
533
+ export function createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
534
+ const fragment = document.createDocumentFragment();
535
+ // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
536
+ render(renderHighlightedUrl(url, securityState), fragment);
537
+ return fragment.firstElementChild as Element;
533
538
  }
534
539
 
535
540
  export interface ViewInput {
@@ -1315,11 +1320,14 @@ export class SecurityMainView extends UI.Widget.VBox {
1315
1320
  }
1316
1321
 
1317
1322
  export class SecurityOriginView extends UI.Widget.VBox {
1318
- private readonly originLockIcon: HTMLElement;
1323
+ readonly #origin: Platform.DevToolsPath.UrlString;
1324
+ readonly #originDisplay: HTMLElement;
1325
+
1319
1326
  constructor(origin: Platform.DevToolsPath.UrlString, originState: OriginState) {
1320
1327
  super({jslog: `${VisualLogging.pane('security.origin-view')}`});
1321
1328
  this.registerRequiredCSS(originViewStyles, lockIconStyles);
1322
1329
  this.setMinimumSize(200, 100);
1330
+ this.#origin = origin;
1323
1331
 
1324
1332
  this.element.classList.add('security-origin-view');
1325
1333
 
@@ -1328,13 +1336,8 @@ export class SecurityOriginView extends UI.Widget.VBox {
1328
1336
  titleDiv.textContent = i18nString(UIStrings.origin);
1329
1337
  UI.ARIAUtils.markAsHeading(titleDiv, 1);
1330
1338
 
1331
- const originDisplay = titleSection.createChild('div', 'origin-display');
1332
- this.originLockIcon = originDisplay.createChild('span');
1333
- const icon = getSecurityStateIconForDetailedView(
1334
- originState.securityState, `security-property security-property-${originState.securityState}`);
1335
- this.originLockIcon.appendChild(icon);
1336
-
1337
- originDisplay.appendChild(createHighlightedUrl(origin, originState.securityState));
1339
+ this.#originDisplay = titleSection.createChild('div', 'origin-display');
1340
+ this.#renderOriginDisplay(originState.securityState);
1338
1341
 
1339
1342
  const originNetworkDiv = titleSection.createChild('div', 'view-network-button');
1340
1343
  const originNetworkButton = UI.UIUtils.createTextButton(i18nString(UIStrings.viewRequestsInNetworkPanel), event => {
@@ -1573,10 +1576,20 @@ export class SecurityOriginView extends UI.Widget.VBox {
1573
1576
  }
1574
1577
 
1575
1578
  setSecurityState(newSecurityState: Protocol.Security.SecurityState): void {
1576
- this.originLockIcon.removeChildren();
1577
- const icon = getSecurityStateIconForDetailedView(
1578
- newSecurityState, `security-property security-property-${newSecurityState}`);
1579
- this.originLockIcon.appendChild(icon);
1579
+ this.#renderOriginDisplay(newSecurityState);
1580
+ }
1581
+
1582
+ #renderOriginDisplay(securityState: Protocol.Security.SecurityState): void {
1583
+ const icon =
1584
+ getSecurityStateIconForDetailedView(securityState, `security-property security-property-${securityState}`);
1585
+
1586
+ // clang-format off
1587
+ // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
1588
+ render(html`
1589
+ ${icon}
1590
+ ${renderHighlightedUrl(this.#origin, securityState)}
1591
+ `, this.#originDisplay);
1592
+ // clang-format on
1580
1593
  }
1581
1594
  }
1582
1595
 
@@ -11,14 +11,13 @@ import * as Common from '../../core/common/common.js';
11
11
  import * as Host from '../../core/host/host.js';
12
12
  import * as i18n from '../../core/i18n/i18n.js';
13
13
  import * as Root from '../../core/root/root.js';
14
- import * as GreenDev from '../../models/greendev/greendev.js';
15
14
  import * as Buttons from '../../ui/components/buttons/buttons.js';
16
15
  import * as UIHelpers from '../../ui/helpers/helpers.js';
17
16
  import {type Card, createIcon, Link} from '../../ui/kit/kit.js';
18
17
  import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
19
18
  import * as Components from '../../ui/legacy/components/utils/utils.js';
20
19
  import * as UI from '../../ui/legacy/legacy.js';
21
- import {html, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
20
+ import {html, render} from '../../ui/lit/lit.js';
22
21
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
23
22
  import {PanelUtils} from '../utils/utils.js';
24
23
 
@@ -51,11 +50,6 @@ const UIStrings = {
51
50
  * @description Message shown in the experiments panel to warn users about any possible unstable features.
52
51
  */
53
52
  theseExperimentsCouldBeUnstable: 'Warning: These experiments could be unstable or unreliable.',
54
- /**
55
- * @description Message shown in the GreenDev prototypes panel to warn users about any possible unstable features.
56
- */
57
- greenDevUnstable:
58
- 'Warning: All these features are prototype and very unstable. They exist for user testing and are not designed to be relied on.',
59
53
  /**
60
54
  * @description Message to display if a setting change requires a reload of DevTools
61
55
  */
@@ -276,14 +270,14 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
276
270
  );
277
271
 
278
272
  for (const sectionCategory of explicitSectionOrder) {
279
- const settingsForSection = preRegisteredSettings.filter(
280
- setting => setting.category === sectionCategory && GenericSettingsTab.isSettingVisible(setting));
273
+ const settingsForSection = preRegisteredSettings.filter(setting => setting.category === sectionCategory &&
274
+ GenericSettingsTab.isSettingVisible(setting));
281
275
  this.createSectionElement(sectionCategory, settingsForSection);
282
276
  }
283
277
 
284
- const restoreAndReloadButton = UI.UIUtils.createTextButton(
285
- i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload,
286
- {jslogContext: 'settings.restore-defaults-and-reload'});
278
+ const restoreAndReloadButton =
279
+ UI.UIUtils.createTextButton(i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload,
280
+ {jslogContext: 'settings.restore-defaults-and-reload'});
287
281
  this.containerElement.appendChild(restoreAndReloadButton);
288
282
 
289
283
  function restoreAndReload(): void {
@@ -335,8 +329,8 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
335
329
  this.createStandardSectionElement(sectionName, settings, element);
336
330
  }
337
331
 
338
- private createSectionElement(
339
- category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[]): void {
332
+ private createSectionElement(category: Common.Settings.SettingCategory,
333
+ settings: Common.Settings.SettingRegistration[]): void {
340
334
  // Always create the EXTENSIONS section and append the link handling control.
341
335
  if (category === Common.Settings.SettingCategory.EXTENSIONS) {
342
336
  this.createExtensionSection(settings);
@@ -350,9 +344,8 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
350
344
  }
351
345
  }
352
346
 
353
- private createStandardSectionElement(
354
- category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[],
355
- content?: Element): void {
347
+ private createStandardSectionElement(category: Common.Settings.SettingCategory,
348
+ settings: Common.Settings.SettingRegistration[], content?: Element): void {
356
349
  const uiSectionName = Common.Settings.getLocalizedSettingsCategory(category);
357
350
  const sectionElement = document.createElement('div');
358
351
  for (const settingRegistration of settings) {
@@ -399,15 +392,14 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
399
392
 
400
393
  const filterSection = this.containerElement.createChild('div');
401
394
  filterSection.classList.add('experiments-filter');
402
- render(
403
- html`
395
+ render(html`
404
396
  <devtools-toolbar>
405
397
  <devtools-toolbar-input autofocus type="filter" placeholder=${
406
- i18nString(UIStrings.searchExperiments)} style="flex-grow:1" @change=${
407
- this.#onFilterChanged.bind(this)}></devtools-toolbar-input>
398
+ i18nString(UIStrings.searchExperiments)} style="flex-grow:1" @change=${
399
+ this.#onFilterChanged.bind(this)}></devtools-toolbar-input>
408
400
  </devtools-toolbar>
409
401
  `,
410
- filterSection);
402
+ filterSection);
411
403
  this.renderExperiments('');
412
404
  }
413
405
 
@@ -455,8 +447,8 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
455
447
  return subsection;
456
448
  }
457
449
 
458
- private createExperimentCheckbox(experiment: Root.Runtime.Experiment|Root.Runtime.HostExperiment):
459
- HTMLParagraphElement {
450
+ private createExperimentCheckbox(experiment: Root.Runtime.Experiment|
451
+ Root.Runtime.HostExperiment): HTMLParagraphElement {
460
452
  const checkbox =
461
453
  UI.UIUtils.CheckboxLabel.createWithStringLiteral(experiment.title, experiment.isEnabled(), experiment.name);
462
454
  checkbox.classList.add('experiment-label');
@@ -547,8 +539,8 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
547
539
  }
548
540
  export class Revealer implements
549
541
  Common.Revealer.Revealer<Root.Runtime.Experiment|Root.Runtime.HostExperiment|Common.Settings.Setting<unknown>> {
550
- async reveal(object: Root.Runtime.Experiment|Root.Runtime.HostExperiment|Common.Settings.Setting<unknown>):
551
- Promise<void> {
542
+ async reveal(object: Root.Runtime.Experiment|Root.Runtime.HostExperiment|
543
+ Common.Settings.Setting<unknown>): Promise<void> {
552
544
  const context = UI.Context.Context.instance();
553
545
  if (object instanceof Root.Runtime.Experiment || object instanceof Root.Runtime.HostExperiment) {
554
546
  Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();
@@ -599,80 +591,3 @@ export interface ShowSettingsScreenOptions {
599
591
  name?: string;
600
592
  focusTabHeader?: boolean;
601
593
  }
602
-
603
- export class GreenDevSettingsTab extends UI.Widget.VBox implements SettingsTab {
604
- #view: View;
605
-
606
- constructor(view = GREENDEV_VIEW) {
607
- super({jslog: `${VisualLogging.pane('greendev-prototypes')}`});
608
- this.element.id = 'greendev-prototypes-tab-content';
609
-
610
- this.#view = view;
611
-
612
- this.requestUpdate();
613
- }
614
-
615
- highlightObject(_object: Object): void {
616
- }
617
-
618
- override performUpdate(): Promise<void>|void {
619
- const settings = GreenDev.Prototypes.instance().settings();
620
- this.#view({settings}, {}, this.element);
621
- }
622
- }
623
-
624
- interface GreenDevViewInput {
625
- settings: GreenDev.GreenDevSettings;
626
- }
627
-
628
- type View = (input: GreenDevViewInput, output: object, target: HTMLElement) => void;
629
- const GREENDEV_VIEW: View = (input, _output, target) => {
630
- // clang-format off
631
- render(html`
632
- <div class="settings-card-container">
633
- <devtools-card .heading=${'GreenDev prototypes'}>
634
- <div class="experiments-warning-subsection">
635
- <devtools-icon .name=${'warning'}></devtools-icon>
636
- <span>${i18nString(UIStrings.greenDevUnstable)}</span>
637
- </div>
638
- <div class="settings-experiments-block">
639
- ${renderPrototypeCheckboxes(input.settings, ['aiAnnotations', 'beyondStylingGemini', 'beyondStylingAntigravity', 'emulationCapabilities'])}
640
- </div>
641
- </devtools-card>
642
- </div>
643
- `, target);
644
- // clang-format on
645
- };
646
-
647
- const GREENDEV_PROTOTYPE_NAMES: Record<keyof GreenDev.GreenDevSettings, string> = {
648
- aiAnnotations: 'AI auto-annotations',
649
- beyondStylingGemini: 'Beyond Styling (Gemini CLI)',
650
- beyondStylingAntigravity: 'Beyond Styling (Antigravity CLI)',
651
- emulationCapabilities: 'Emulation Capabilities',
652
- };
653
-
654
- function renderPrototypeCheckboxes(
655
- settings: GreenDev.GreenDevSettings,
656
- keys: Array<keyof GreenDev.GreenDevSettings>,
657
- ): TemplateResult {
658
- const {bindToSetting} = UI.UIUtils;
659
-
660
- function showChangeWarning(): void {
661
- UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
662
- i18nString(UIStrings.settingsChangedReloadDevTools));
663
- }
664
- // clang-format off
665
- const checkboxes = Object.keys(settings).map(name => {
666
- const settingName = name as keyof GreenDev.GreenDevSettings;
667
- if(!keys.includes(settingName)) {
668
- return nothing;
669
- }
670
- const setting = settings[settingName];
671
- const title = GREENDEV_PROTOTYPE_NAMES[settingName];
672
- return html`<p class="settings-experiment">
673
- <devtools-checkbox @change=${showChangeWarning} title=${title} ${bindToSetting(setting)}>${title}</devtools-checkbox>
674
- </p>`;
675
- });
676
- return html`${checkboxes}`;
677
- // clang-format on
678
- }
@@ -24,14 +24,6 @@ const UIStrings = {
24
24
  * @description Text in Settings Screen of the Settings
25
25
  */
26
26
  experiments: 'Experiments',
27
- /**
28
- * @description Text in Settings Screen of the Settings
29
- */
30
- greenDevProtoTypes: 'GreenDev',
31
- /**
32
- * @description Command for showing the GreenDev tab in the Settings Screen
33
- */
34
- showGreenDev: 'Show GreenDev',
35
27
  /**
36
28
  * @description Title of Ignore list settings
37
29
  */
@@ -162,22 +154,6 @@ UI.ViewManager.registerViewExtension({
162
154
  iconName: 'clear-list',
163
155
  });
164
156
 
165
- UI.ViewManager.registerViewExtension({
166
- location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,
167
- id: 'greendev-prototypes',
168
- title: i18nLazyString(UIStrings.greenDevProtoTypes),
169
- commandPrompt: i18nLazyString(UIStrings.showGreenDev),
170
- order: 101,
171
- async loadView() {
172
- const Settings = await loadSettingsModule();
173
- return new Settings.SettingsScreen.GreenDevSettingsTab();
174
- },
175
- iconName: 'experiment',
176
- condition: config => {
177
- return Boolean(config?.devToolsGreenDevUi?.enabled);
178
- },
179
- });
180
-
181
157
  UI.ViewManager.registerViewExtension({
182
158
  location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,
183
159
  id: 'keybinds',
@@ -11,6 +11,7 @@ import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
11
11
  import * as LiveMetrics from '../../models/live-metrics/live-metrics.js';
12
12
  import * as Trace from '../../models/trace/trace.js';
13
13
  import * as PanelCommon from '../../panels/common/common.js';
14
+ import * as MobileThrottling from '../../panels/mobile_throttling/mobile_throttling.js';
14
15
  import * as Tracing from '../../services/tracing/tracing.js';
15
16
 
16
17
  import * as RecordingMetadata from './RecordingMetadata.js';
@@ -355,9 +356,9 @@ export class TimelineController implements Tracing.TracingManager.TracingManager
355
356
  // temporarily disable throttling whilst the final trace event collection
356
357
  // takes place. Once it is done, we re-enable it (this is the existing
357
358
  // behaviour within DevTools; the throttling settling is sticky + global).
358
- const throttlingManager = SDK.CPUThrottlingManager.CPUThrottlingManager.instance();
359
+ const throttlingManager = MobileThrottling.ThrottlingManager.throttlingManager();
359
360
  const optionDuringRecording = throttlingManager.cpuThrottlingOption();
360
- throttlingManager.setCPUThrottlingOption(SDK.CPUThrottlingManager.NoThrottlingOption);
361
+ throttlingManager.setCPUThrottlingOption(PanelCommon.CPUThrottlingOption.NoThrottlingOption);
361
362
 
362
363
  this.client.loadingStarted();
363
364