chrome-devtools-frontend 1.0.1669021 → 1.0.1672557

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 (302) hide show
  1. package/.agents/skills/fixing-skipped-tests/SKILL.md +6 -6
  2. package/.agents/skills/gerrit-cli/SKILL.md +4 -10
  3. package/.agents/skills/gerrit-cli/references/commands.md +45 -2
  4. package/.agents/skills/gerrit-cli/references/workflows.md +7 -0
  5. package/.agents/skills/gerrit-cli/scripts/import_upstream.py +34 -152
  6. package/config/typescript/tsconfig.eslint.json +1 -1
  7. package/docs/contributing/settings-experiments-features.md +2 -8
  8. package/docs/ecosystem/automatic_workspace_folders.md +0 -19
  9. package/eslint.config.mjs +5 -5
  10. package/front_end/core/common/Lazy.ts +3 -3
  11. package/front_end/core/common/SettingRegistration.ts +0 -7
  12. package/front_end/core/common/Settings.ts +0 -38
  13. package/front_end/core/host/UserMetrics.ts +187 -953
  14. package/front_end/core/host/UserMetricsEnums.ts +949 -0
  15. package/front_end/core/root/Runtime.ts +21 -138
  16. package/front_end/core/sdk/CSSMetadata.ts +70 -65
  17. package/front_end/core/sdk/CategorizedBreakpoint.ts +0 -1
  18. package/front_end/core/sdk/ChildTargetManager.ts +0 -2
  19. package/front_end/core/sdk/EmulationModel.ts +0 -2
  20. package/front_end/core/sdk/EventBreakpointsModel.ts +0 -4
  21. package/front_end/core/sdk/NetworkManager.ts +0 -3
  22. package/front_end/core/sdk/PageResourceLoader.ts +9 -9
  23. package/front_end/core/sdk/RehydratingConnection.ts +52 -4
  24. package/front_end/core/sdk/Target.ts +0 -4
  25. package/front_end/devtools_compatibility.js +886 -0
  26. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +7 -6
  27. package/front_end/entrypoints/main/ExecutionContextSelector.ts +0 -1
  28. package/front_end/entrypoints/main/MainImpl.ts +18 -22
  29. package/front_end/foundation/Universe.ts +7 -2
  30. package/front_end/generated/InspectorBackendCommands.ts +3 -10
  31. package/front_end/generated/{SupportedCSSProperties.js → SupportedCSSProperties.ts} +16 -0
  32. package/front_end/generated/protocol-mapping.d.ts +0 -42
  33. package/front_end/generated/protocol-proxy-api.d.ts +0 -38
  34. package/front_end/generated/protocol.ts +9 -169
  35. package/front_end/models/ai_assistance/AiAgent2.ts +11 -3
  36. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  37. package/front_end/models/ai_assistance/AiHistoryStorage.ts +8 -5
  38. package/front_end/models/ai_assistance/AiSetting.ts +108 -0
  39. package/front_end/models/ai_assistance/AiUtils.ts +47 -0
  40. package/front_end/models/ai_assistance/ChangeManager.ts +1 -0
  41. package/front_end/models/ai_assistance/ExtensionScope.ts +3 -12
  42. package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -18
  43. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -0
  44. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +42 -17
  45. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
  46. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -2
  47. package/front_end/models/ai_assistance/agents/StorageAgent.ts +253 -155
  48. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
  49. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  50. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +12 -6
  51. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +3 -1
  52. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -0
  53. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +4 -3
  54. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +1 -1
  55. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -0
  56. package/front_end/models/ai_assistance/injected.ts +1 -0
  57. package/front_end/models/ai_assistance/performance/AICallTree.ts +1 -0
  58. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  59. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  60. package/front_end/models/ai_assistance/skills/performance.md +10 -0
  61. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +52 -5
  62. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +4 -4
  63. package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +4 -4
  64. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +5 -4
  65. package/front_end/models/ai_assistance/tools/GetStyles.ts +5 -4
  66. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +5 -4
  67. package/front_end/models/ai_assistance/tools/README.md +1 -1
  68. package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +63 -0
  69. package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -5
  70. package/front_end/models/ai_assistance/tools/Tool.ts +118 -24
  71. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +2 -0
  72. package/front_end/models/badges/UserBadges.ts +2 -0
  73. package/front_end/models/bindings/NetworkProject.ts +5 -0
  74. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -0
  75. package/front_end/models/bindings/ResourceUtils.ts +3 -0
  76. package/front_end/models/crux-manager/CrUXManager.ts +1 -0
  77. package/front_end/models/emulation/DeviceModeModel.ts +140 -7
  78. package/front_end/models/emulation/EmulatedDevices.ts +246 -793
  79. package/front_end/models/issues_manager/IssuesManager.ts +10 -2
  80. package/front_end/models/live-metrics/LiveMetrics.ts +41 -9
  81. package/front_end/models/logs/LogManager.ts +8 -5
  82. package/front_end/models/logs/NetworkLog.ts +1 -0
  83. package/front_end/models/persistence/IsolatedFileSystemManager.ts +21 -3
  84. package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -0
  85. package/front_end/models/project_settings/ProjectSettingsModel.ts +8 -12
  86. package/front_end/models/trace/Processor.ts +42 -10
  87. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +12 -19
  88. package/front_end/models/trace/handlers/MetaHandler.ts +38 -5
  89. package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
  90. package/front_end/models/trace/insights/CharacterSet.ts +1 -1
  91. package/front_end/models/trace/insights/Common.ts +21 -2
  92. package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
  93. package/front_end/models/trace/insights/LCPBreakdown.ts +7 -6
  94. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  95. package/front_end/models/trace/insights/ModernHTTP.ts +7 -3
  96. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
  97. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  98. package/front_end/models/trace/insights/ThirdParties.ts +5 -2
  99. package/front_end/models/trace/insights/types.ts +11 -6
  100. package/front_end/models/trace/types/Configuration.ts +5 -0
  101. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +3 -1
  102. package/front_end/models/workspace/IgnoreListManager.ts +2 -0
  103. package/front_end/models/workspace/UISourceCode.ts +2 -0
  104. package/front_end/models/workspace_diff/WorkspaceDiff.ts +4 -0
  105. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -22
  106. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -7
  107. package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -0
  108. package/front_end/panels/ai_assistance/components/ChatMessage.ts +79 -34
  109. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +1 -2
  110. package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
  111. package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -106
  112. package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
  113. package/front_end/panels/application/application.ts +0 -10
  114. package/front_end/panels/application/components/components.ts +0 -4
  115. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +0 -5
  116. package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +6 -12
  117. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +5 -3
  118. package/front_end/panels/console/ConsoleFormat.ts +2 -62
  119. package/front_end/panels/console/ConsoleViewMessage.ts +14 -7
  120. package/front_end/panels/elements/ElementsTreeElement.ts +1 -2
  121. package/front_end/panels/emulation/AdvancedApp.ts +1 -2
  122. package/front_end/panels/emulation/DeviceModeToolbar.ts +83 -69
  123. package/front_end/panels/emulation/DeviceModeView.ts +4 -134
  124. package/front_end/panels/emulation/DeviceModeWrapper.ts +52 -69
  125. package/front_end/panels/emulation/MediaQueryInspector.ts +2 -2
  126. package/front_end/panels/emulation/emulation-meta.ts +12 -12
  127. package/front_end/panels/issues/IssuesPane.ts +3 -1
  128. package/front_end/panels/lighthouse/LighthouseController.ts +6 -0
  129. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +17 -21
  130. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +206 -126
  131. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
  132. package/front_end/panels/mobile_throttling/CalibrationController.ts +1 -1
  133. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +3 -3
  134. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +6 -6
  135. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +14 -12
  136. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +13 -13
  137. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +10 -10
  138. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +28 -28
  139. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +6 -6
  140. package/front_end/panels/network/RequestHeadersView.ts +1 -1
  141. package/front_end/panels/network/ResourceChunkView.ts +243 -144
  142. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +52 -29
  143. package/front_end/panels/network/ResourceWebSocketFrameView.ts +21 -35
  144. package/front_end/panels/network/resourceChunkView.css +41 -36
  145. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +21 -12
  146. package/front_end/panels/profiler/profiler.ts +4 -0
  147. package/front_end/panels/recorder/RecorderPanel.ts +6 -14
  148. package/front_end/panels/sensors/LocationsSettingsTab.ts +7 -7
  149. package/front_end/panels/settings/AISettingsTab.ts +75 -31
  150. package/front_end/panels/settings/SettingsScreen.ts +8 -13
  151. package/front_end/panels/settings/components/SyncSection.ts +3 -4
  152. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +650 -18
  153. package/front_end/panels/settings/emulation/devicesSettingsTab.css +18 -0
  154. package/front_end/panels/settings/settings-meta.ts +0 -1
  155. package/front_end/panels/sources/CategorizedBreakpointL10n.ts +0 -2
  156. package/front_end/panels/sources/DebuggerPausedMessage.ts +11 -5
  157. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  158. package/front_end/panels/sources/EditingLocationHistoryManager.ts +12 -9
  159. package/front_end/panels/sources/SourcesPanel.ts +19 -17
  160. package/front_end/panels/sources/SourcesView.ts +191 -96
  161. package/front_end/panels/sources/TabbedEditorContainer.ts +3 -4
  162. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -5
  163. package/front_end/panels/timeline/TimelinePanel.ts +2 -0
  164. package/front_end/panels/timeline/TimelineUIUtils.ts +15 -0
  165. package/front_end/panels/timeline/components/CWVMetrics.ts +16 -3
  166. package/front_end/panels/timeline/components/cwvMetrics.css +4 -0
  167. package/front_end/panels/timeline/components/liveMetricsView.css +0 -17
  168. package/front_end/panels/timeline/components/metricValueStyles.css +17 -0
  169. package/front_end/panels/timeline/timeline-meta.ts +3 -5
  170. package/front_end/third_party/chromium/README.chromium +1 -1
  171. package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
  172. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  173. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  174. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
  175. package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
  176. package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
  177. package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
  178. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  179. package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
  180. package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
  181. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  182. package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
  183. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  184. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  185. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  186. package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
  187. package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
  188. package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
  189. package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
  190. package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
  191. package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
  192. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  193. package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
  194. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
  195. package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
  196. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1332 -193
  197. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  198. package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
  199. package/front_end/third_party/puppeteer/README.chromium +2 -2
  200. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +64 -15
  201. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +65 -16
  202. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +50 -7
  203. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts +2 -1
  206. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +5 -5
  208. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts +2 -1
  210. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +8 -6
  212. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js +3 -0
  215. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +16 -1
  218. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts +5 -1
  220. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js +11 -6
  222. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.d.ts.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js +5 -0
  225. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +10 -0
  228. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +4 -3
  230. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts +27 -2
  232. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +12 -1
  234. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
  235. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +2 -2
  236. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +2 -2
  238. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  240. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +2 -0
  241. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
  242. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +2 -1
  243. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
  244. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +5 -4
  245. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
  246. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  247. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  248. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  250. package/front_end/third_party/puppeteer/package/lib/types.d.ts +64 -15
  251. package/front_end/third_party/puppeteer/package/package.json +2 -2
  252. package/front_end/third_party/puppeteer/package/src/api/Page.ts +50 -7
  253. package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +9 -7
  254. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +9 -6
  255. package/front_end/third_party/puppeteer/package/src/bidi/Dialog.ts +4 -0
  256. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +24 -1
  257. package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +11 -6
  258. package/front_end/third_party/puppeteer/package/src/cdp/Dialog.ts +7 -0
  259. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +11 -0
  260. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +7 -3
  261. package/front_end/third_party/puppeteer/package/src/common/Debug.ts +30 -5
  262. package/front_end/third_party/puppeteer/package/src/common/util.ts +2 -2
  263. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
  264. package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +6 -4
  265. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  266. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  267. package/front_end/tsconfig.compatibility.json +2 -1
  268. package/front_end/tsconfig.json +1 -1
  269. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  270. package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
  271. package/front_end/ui/components/settings/SettingCheckbox.ts +4 -7
  272. package/front_end/ui/components/settings/settings.ts +1 -2
  273. package/front_end/ui/legacy/Treeoutline.ts +52 -30
  274. package/front_end/ui/legacy/components/object_ui/CSSStyleSanitizer.ts +74 -0
  275. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +6 -1
  276. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +47 -54
  277. package/front_end/ui/legacy/components/object_ui/object_ui.ts +2 -0
  278. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -27
  279. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +10 -12
  280. package/front_end/ui/settings/SettingUIRegistration.ts +0 -8
  281. package/front_end/ui/visual_logging/KnownContextValues.ts +37 -0
  282. package/inspector_overlay/tsconfig.json +8 -2
  283. package/package.json +3 -2
  284. package/.agents/skills/gerrit-cli/scripts/gerrit_client_wrapper.py +0 -47
  285. package/front_end/core/sdk/CSSModel.test.api.ts +0 -102
  286. package/front_end/core/sdk/DOMModel.test.api.ts +0 -104
  287. package/front_end/foundation/Universe.test.api.ts +0 -73
  288. package/front_end/panels/application/SharedStorageEventsView.ts +0 -128
  289. package/front_end/panels/application/SharedStorageItemsView.ts +0 -179
  290. package/front_end/panels/application/SharedStorageListTreeElement.ts +0 -65
  291. package/front_end/panels/application/SharedStorageModel.ts +0 -249
  292. package/front_end/panels/application/SharedStorageTreeElement.ts +0 -40
  293. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +0 -191
  294. package/front_end/panels/application/components/SharedStorageMetadataView.ts +0 -133
  295. package/front_end/panels/application/components/sharedStorageAccessGrid.css +0 -29
  296. package/front_end/panels/application/components/sharedStorageMetadataView.css +0 -29
  297. package/front_end/panels/application/sharedStorageEventsView.css +0 -9
  298. package/front_end/panels/network/OriginalResourceChunkView.ts +0 -340
  299. package/front_end/panels/network/originalResourceChunkView.css +0 -49
  300. package/front_end/ui/components/settings/SettingDeprecationWarning.ts +0 -47
  301. package/front_end/ui/components/settings/settingDeprecationWarning.css +0 -14
  302. /package/front_end/generated/{ARIAProperties.js → ARIAProperties.ts} +0 -0
@@ -1,109 +1,90 @@
1
1
  // Copyright 2016 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
- /* eslint-disable @devtools/no-imperative-dom-api */
5
4
 
6
5
  import type * as Common from '../../core/common/common.js';
7
6
  import * as Root from '../../core/root/root.js';
8
7
  import * as SDK from '../../core/sdk/sdk.js';
9
8
  import type * as Protocol from '../../generated/protocol.js';
10
9
  import * as EmulationModel from '../../models/emulation/emulation.js';
10
+ import * as Geometry from '../../models/geometry/geometry.js';
11
11
  import * as UI from '../../ui/legacy/legacy.js';
12
+ import {html, render} from '../../ui/lit/lit.js';
12
13
 
13
14
  import {DeviceModeView} from './DeviceModeView.js';
14
- import type {InspectedPagePlaceholder} from './InspectedPagePlaceholder.js';
15
+ import {InspectedPagePlaceholder} from './InspectedPagePlaceholder.js';
15
16
 
16
- let deviceModeWrapperInstance: DeviceModeWrapper;
17
+ const {widget} = UI.Widget;
18
+ interface ViewInput {
19
+ showDeviceMode: boolean;
20
+ }
21
+ type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
22
+ export const DEFAULT_VIEW: View = (input, output, target) => {
23
+ // clang-format off
24
+ render(input.showDeviceMode ?
25
+ html`<devtools-widget ${widget(DeviceModeView)}>
26
+ ${widget(() => InspectedPagePlaceholder.instance(), {minimumSize: new Geometry.Size(1, 1)})}
27
+ </devtools-widget>` :
28
+ widget(() => InspectedPagePlaceholder.instance(), {minimumSize: new Geometry.Size(150, 150)}),
29
+ target);
30
+ // clang-format on
31
+ };
17
32
 
18
33
  export class DeviceModeWrapper extends UI.Widget.VBox {
19
- private readonly inspectedPagePlaceholder: InspectedPagePlaceholder;
20
- private deviceModeView: DeviceModeView|null;
21
34
  private readonly toggleDeviceModeAction: UI.ActionRegistration.Action;
22
35
  private showDeviceModeSetting: Common.Settings.Setting<boolean>;
36
+ readonly #view: View;
23
37
 
24
- private constructor(inspectedPagePlaceholder: InspectedPagePlaceholder) {
25
- super();
26
- this.inspectedPagePlaceholder = inspectedPagePlaceholder;
27
- this.deviceModeView = null;
38
+ constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
39
+ super(element);
40
+ this.#view = view;
28
41
  this.toggleDeviceModeAction = UI.ActionRegistry.ActionRegistry.instance().getAction('emulation.toggle-device-mode');
29
42
  const model = EmulationModel.DeviceModeModel.DeviceModeModel.instance();
30
43
  this.showDeviceModeSetting = model.enabledSetting();
31
44
  this.showDeviceModeSetting.setRequiresUserAction(Boolean(Root.Runtime.Runtime.queryParam('hasOtherClients')));
32
- this.showDeviceModeSetting.addChangeListener(this.update.bind(this, false));
33
- SDK.TargetManager.TargetManager.instance().addModelListener(
34
- SDK.OverlayModel.OverlayModel, SDK.OverlayModel.Events.SCREENSHOT_REQUESTED,
35
- this.screenshotRequestedFromOverlay, this);
36
- this.update(true);
45
+ this.showDeviceModeSetting.addChangeListener(this.requestUpdate.bind(this));
46
+ SDK.TargetManager.TargetManager.instance().addModelListener(SDK.OverlayModel.OverlayModel,
47
+ SDK.OverlayModel.Events.SCREENSHOT_REQUESTED,
48
+ this.screenshotRequestedFromOverlay, this);
49
+ this.requestUpdate();
37
50
  }
38
51
 
39
- static instance(opts: {
40
- forceNew: boolean|null,
41
- inspectedPagePlaceholder: InspectedPagePlaceholder|null,
42
- } = {forceNew: null, inspectedPagePlaceholder: null}): DeviceModeWrapper {
43
- const {forceNew, inspectedPagePlaceholder} = opts;
44
- if (!deviceModeWrapperInstance || forceNew) {
45
- if (!inspectedPagePlaceholder) {
46
- throw new Error(
47
- `Unable to create DeviceModeWrapper: inspectedPagePlaceholder must be provided: ${new Error().stack}`);
48
- }
49
-
50
- deviceModeWrapperInstance = new DeviceModeWrapper(inspectedPagePlaceholder);
52
+ static #setNonEmulatedAvailableSize(): void {
53
+ const model = EmulationModel.DeviceModeModel.DeviceModeModel.instance();
54
+ if (model.type() !== EmulationModel.DeviceModeModel.Type.None) {
55
+ return;
51
56
  }
52
57
 
53
- return deviceModeWrapperInstance;
58
+ const zoomFactor = UI.ZoomManager.ZoomManager.instance().zoomFactor();
59
+ const rect = InspectedPagePlaceholder.instance().element.getBoundingClientRect();
60
+ const availableSize =
61
+ new Geometry.Size(Math.max(rect.width * zoomFactor, 1), Math.max(rect.height * zoomFactor, 1));
62
+ model.setAvailableSize(availableSize, availableSize);
54
63
  }
55
64
 
56
- toggleDeviceMode(): void {
57
- this.showDeviceModeSetting.set(!this.showDeviceModeSetting.get());
58
- }
59
-
60
- isDeviceModeOn(): boolean {
61
- return this.showDeviceModeSetting.get();
62
- }
65
+ static captureScreenshot(fullSize?: boolean, clip?: Protocol.Page.Viewport): boolean {
66
+ const model = EmulationModel.DeviceModeModel.DeviceModeModel.instance();
63
67
 
64
- captureScreenshot(fullSize?: boolean, clip?: Protocol.Page.Viewport): boolean {
65
- if (!this.deviceModeView) {
66
- this.deviceModeView = new DeviceModeView();
67
- }
68
- this.deviceModeView.setNonEmulatedAvailableSize(this.inspectedPagePlaceholder.element);
68
+ this.#setNonEmulatedAvailableSize();
69
69
  if (fullSize) {
70
- void this.deviceModeView.captureFullSizeScreenshot();
70
+ void model.captureFullSizeScreenshot();
71
71
  } else if (clip) {
72
- void this.deviceModeView.captureAreaScreenshot(clip);
72
+ void model.captureAreaScreenshot(clip);
73
73
  } else {
74
- void this.deviceModeView.captureScreenshot();
74
+ void model.captureScreenshot();
75
75
  }
76
76
  return true;
77
77
  }
78
78
 
79
79
  private screenshotRequestedFromOverlay(event: Common.EventTarget.EventTargetEvent<Protocol.Page.Viewport>): void {
80
80
  const clip = event.data;
81
- this.captureScreenshot(false, clip);
81
+ DeviceModeWrapper.captureScreenshot(false, clip);
82
82
  }
83
83
 
84
- update(force?: boolean): void {
84
+ override performUpdate(): void {
85
85
  this.toggleDeviceModeAction.setToggled(this.showDeviceModeSetting.get());
86
86
 
87
- const shouldShow = this.showDeviceModeSetting.get();
88
- if (!force && shouldShow === this.deviceModeView?.isShowing()) {
89
- return;
90
- }
91
-
92
- if (shouldShow) {
93
- if (!this.deviceModeView) {
94
- this.deviceModeView = new DeviceModeView();
95
- }
96
- this.deviceModeView.show(this.element);
97
- this.inspectedPagePlaceholder.clearMinimumSize();
98
- this.inspectedPagePlaceholder.show(this.deviceModeView.element);
99
- } else {
100
- if (this.deviceModeView) {
101
- this.deviceModeView.exitHingeMode();
102
- this.deviceModeView.detach();
103
- }
104
- this.inspectedPagePlaceholder.restoreMinimumSize();
105
- this.inspectedPagePlaceholder.show(this.element);
106
- }
87
+ this.#view({showDeviceMode: this.showDeviceModeSetting.get()}, undefined, this.contentElement);
107
88
  }
108
89
  }
109
90
 
@@ -111,7 +92,7 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
111
92
  handleAction(context: UI.Context.Context, actionId: string): boolean {
112
93
  switch (actionId) {
113
94
  case 'emulation.capture-screenshot':
114
- return DeviceModeWrapper.instance().captureScreenshot();
95
+ return DeviceModeWrapper.captureScreenshot();
115
96
 
116
97
  case 'emulation.capture-node-screenshot': {
117
98
  const node = context.flavor(SDK.DOMModel.DOMNode);
@@ -170,18 +151,20 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
170
151
  clip.y *= zoom;
171
152
  clip.width *= zoom;
172
153
  clip.height *= zoom;
173
- DeviceModeWrapper.instance().captureScreenshot(false, clip);
154
+ DeviceModeWrapper.captureScreenshot(false, clip);
174
155
  }
175
156
  void captureClip();
176
157
  return true;
177
158
  }
178
159
 
179
160
  case 'emulation.capture-full-height-screenshot':
180
- return DeviceModeWrapper.instance().captureScreenshot(true);
161
+ return DeviceModeWrapper.captureScreenshot(true);
181
162
 
182
- case 'emulation.toggle-device-mode':
183
- DeviceModeWrapper.instance().toggleDeviceMode();
163
+ case 'emulation.toggle-device-mode': {
164
+ const model = EmulationModel.DeviceModeModel.DeviceModeModel.instance();
165
+ model.toggleDeviceMode();
184
166
  return true;
167
+ }
185
168
  }
186
169
  return false;
187
170
  }
@@ -16,8 +16,8 @@ import mediaQueryInspectorStyles from './mediaQueryInspector.css.js';
16
16
 
17
17
  const UIStrings = {
18
18
  /**
19
- * @description A context menu item/command in the Media Query Inspector of the Device Toolbar.
20
- * Takes the user to the source code where this media query actually came from.
19
+ * @description A context menu item in the media query inspector of the device mode toolbar.
20
+ * Takes the user to the source code where this media query came from.
21
21
  */
22
22
  revealInSourceCode: 'Reveal in source code',
23
23
  } as const;
@@ -11,11 +11,11 @@ import type * as Emulation from './emulation.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Title of an action in the emulation tool to toggle device mode
14
+ * @description Title of an action in the emulation tool to toggle device mode.
15
15
  */
16
16
  toggleDeviceToolbar: 'Toggle device toolbar',
17
17
  /**
18
- * @description Title of an action in the emulation tool to capture screenshot
18
+ * @description Title of an action in the emulation tool to capture screenshot.
19
19
  */
20
20
  captureScreenshot: 'Capture screenshot',
21
21
  /**
@@ -25,38 +25,38 @@ const UIStrings = {
25
25
  captureFullSizeScreenshot: 'Capture full size screenshot',
26
26
  /**
27
27
  * @description Title of an action in the emulation tool to capture a screenshot of just this node.
28
- * Node refers to a HTML element/node.
28
+ * Node refers to an HTML element/node.
29
29
  */
30
30
  captureNodeScreenshot: 'Capture node screenshot',
31
31
  /**
32
- * @description Command in the Device Mode Toolbar, to show media query boundaries in the UI.
33
- * https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
32
+ * @description Command in the device mode toolbar to show media query boundaries in the UI.
33
+ * https://web.dev/learn/design/media-queries
34
34
  */
35
35
  showMediaQueries: 'Show media queries',
36
36
  /**
37
- * @description A tag of Mobile related settings that can be searched in the command menu if the
37
+ * @description A tag of mobile-related settings that can be searched in the command menu if the
38
38
  * user doesn't know the exact name of the tool. Device refers to e.g. phone/tablet.
39
39
  */
40
40
  device: 'device',
41
41
  /**
42
- * @description Command in the Device Mode Toolbar, to hide media query boundaries in the UI.
43
- * https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
42
+ * @description Command in the device mode toolbar to hide media query boundaries in the UI.
43
+ * https://web.dev/learn/design/media-queries
44
44
  */
45
45
  hideMediaQueries: 'Hide media queries',
46
46
  /**
47
47
  * @description Command that shows measuring rulers next to the emulated device.
48
48
  */
49
- showRulers: 'Show rulers in the Device Mode toolbar',
49
+ showRulers: 'Show rulers in the device mode toolbar',
50
50
  /**
51
51
  * @description Command that hides measuring rulers next to the emulated device.
52
52
  */
53
- hideRulers: 'Hide rulers in the Device Mode toolbar',
53
+ hideRulers: 'Hide rulers in the device mode toolbar',
54
54
  /**
55
- * @description Command that shows a frame (like a picture frame) around the emulated device.
55
+ * @description Command that shows a frame around the emulated device.
56
56
  */
57
57
  showDeviceFrame: 'Show device frame',
58
58
  /**
59
- * @description Command that hides a frame (like a picture frame) around the emulated device.
59
+ * @description Command that hides a frame around the emulated device.
60
60
  */
61
61
  hideDeviceFrame: 'Hide device frame',
62
62
 
@@ -274,7 +274,9 @@ export class IssuesPane extends UI.Widget.VBox {
274
274
  const issueCounter = new IssueCounter.IssueCounter.IssueCounter();
275
275
  issueCounter.data = {
276
276
  clickHandler: () => {
277
- this.focus();
277
+ const summary = IssueCounter.IssueCounter.getIssueCountsEnumeration(
278
+ IssuesManager.IssuesManager.IssuesManager.instance(), false);
279
+ UI.ARIAUtils.LiveAnnouncer.alert(summary);
278
280
  },
279
281
  tooltipCallback: () => {
280
282
  const issueEnumeration = IssueCounter.IssueCounter.getIssueCountsEnumeration(
@@ -10,6 +10,7 @@ import * as SDK from '../../core/sdk/sdk.js';
10
10
  import * as Protocol from '../../generated/protocol.js';
11
11
  import * as EmulationModel from '../../models/emulation/emulation.js';
12
12
  import type * as LighthouseModel from '../../models/lighthouse/lighthouse.js';
13
+ import * as UI from '../../ui/legacy/legacy.js';
13
14
  import * as Emulation from '../emulation/emulation.js';
14
15
 
15
16
  import type {LighthouseRun as LighthouseRunType, ProtocolService} from './LighthouseProtocolService.js';
@@ -298,6 +299,11 @@ class LighthouseRun {
298
299
  emulationModel.enabledSetting().set(true);
299
300
  emulationModel.deviceOutlineSetting().set(true);
300
301
 
302
+ // The emulation model is currently coupled to the UI.
303
+ // We must wait for the device mode view to render so that it can
304
+ // initialize the model with the available spatial constraints.
305
+ await UI.Widget.Widget.allUpdatesComplete;
306
+
301
307
  for (const device of EmulationModel.EmulatedDevices.EmulatedDevicesList.instance().standard()) {
302
308
  if (device.title === 'Moto G Power') {
303
309
  emulationModel.emulate(EmulationModel.DeviceModeModel.Type.Device, device, device.modes[0], 1);
@@ -13,11 +13,9 @@ import {LinearMemoryHighlightChipList} from './LinearMemoryHighlightChipList.js'
13
13
  import linearMemoryInspectorStyles from './linearMemoryInspector.css.js';
14
14
  import {formatAddress, parseAddress} from './LinearMemoryInspectorUtils.js';
15
15
  import {
16
- type AddressInputChangedEvent,
17
- type HistoryNavigationEvent,
16
+ LinearMemoryNavigator,
18
17
  Mode,
19
18
  Navigation,
20
- type PageNavigationEvent,
21
19
  } from './LinearMemoryNavigator.js';
22
20
  import {LinearMemoryValueInterpreter} from './LinearMemoryValueInterpreter.js';
23
21
  import type {ByteSelectedEvent, ResizeEvent} from './LinearMemoryViewer.js';
@@ -117,9 +115,9 @@ export interface ViewInput {
117
115
  canGoBackInHistory: boolean;
118
116
  canGoForwardInHistory: boolean;
119
117
  onRefreshRequest: () => void;
120
- onAddressChange: (e: AddressInputChangedEvent) => void;
121
- onNavigatePage: (e: PageNavigationEvent) => void;
122
- onNavigateHistory: (e: HistoryNavigationEvent) => boolean;
118
+ onAddressChange: (address: string, mode: Mode) => void;
119
+ onNavigatePage: (navigation: Navigation) => void;
120
+ onNavigateHistory: (navigation: Navigation) => boolean;
123
121
  onJumpToAddress: (address: number) => void;
124
122
  onDeleteMemoryHighlight: (info: HighlightInfo) => void;
125
123
  onByteSelected: (e: ByteSelectedEvent) => void;
@@ -148,20 +146,19 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: Record<string, unknown>,
148
146
  render(html`
149
147
  <style>${linearMemoryInspectorStyles}</style>
150
148
  <div class="view">
151
- <devtools-linear-memory-inspector-navigator
152
- .data=${
153
- {
149
+ <devtools-widget class="navigator-widget"
150
+ ${widget(LinearMemoryNavigator, {
154
151
  address: navigatorAddressToShow,
155
152
  valid: navigatorAddressIsValid,
156
153
  mode: input.currentNavigatorMode,
157
154
  error: errorMsg,
158
155
  canGoBackInHistory: input.canGoBackInHistory,
159
156
  canGoForwardInHistory: input.canGoForwardInHistory,
160
- }}
161
- @refreshrequested=${input.onRefreshRequest}
162
- @addressinputchanged=${input.onAddressChange}
163
- @pagenavigation=${input.onNavigatePage}
164
- @historynavigation=${input.onNavigateHistory}></devtools-linear-memory-inspector-navigator>
157
+ onRefreshRequest: input.onRefreshRequest,
158
+ onAddressChange: input.onAddressChange,
159
+ onNavigatePage: input.onNavigatePage,
160
+ onNavigateHistory: input.onNavigateHistory,
161
+ })}></devtools-widget>
165
162
  ${widget(LinearMemoryHighlightChipList, {
166
163
  highlightInfos: highlightedMemoryAreas,
167
164
  focusedMemoryHighlight,
@@ -403,8 +400,7 @@ export class LinearMemoryInspector extends Common.ObjectWrapper.eventMixin<Event
403
400
  void this.requestUpdate();
404
401
  }
405
402
 
406
- #onAddressChange(e: AddressInputChangedEvent): void {
407
- const {address, mode} = e.data;
403
+ #onAddressChange(address: string, mode: Mode): void {
408
404
  const isValid = isValidAddress(address, this.#outerMemoryLength);
409
405
  const newAddress = parseAddress(address);
410
406
  this.#currentNavigatorAddressLine = address;
@@ -444,13 +440,13 @@ export class LinearMemoryInspector extends Common.ObjectWrapper.eventMixin<Event
444
440
  void this.requestUpdate();
445
441
  }
446
442
 
447
- #navigateHistory(e: HistoryNavigationEvent): boolean {
448
- return e.data === Navigation.FORWARD ? this.#history.rollover() : this.#history.rollback();
443
+ #navigateHistory(navigation: Navigation): boolean {
444
+ return navigation === Navigation.FORWARD ? this.#history.rollover() : this.#history.rollback();
449
445
  }
450
446
 
451
- #navigatePage(e: PageNavigationEvent): void {
452
- const newAddress =
453
- e.data === Navigation.FORWARD ? this.#address + this.#numBytesPerPage : this.#address - this.#numBytesPerPage;
447
+ #navigatePage(navigation: Navigation): void {
448
+ const newAddress = navigation === Navigation.FORWARD ? this.#address + this.#numBytesPerPage :
449
+ this.#address - this.#numBytesPerPage;
454
450
  const addressInRange = Math.max(0, Math.min(newAddress, this.#outerMemoryLength - 1));
455
451
  this.#jumpToAddress(addressInRange);
456
452
  }