chrome-devtools-frontend 1.0.1376716 → 1.0.1380117

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 (434) hide show
  1. package/config/gni/devtools_grd_files.gni +15 -7
  2. package/config/gni/devtools_image_files.gni +2 -0
  3. package/front_end/Images/src/animation.svg +3 -0
  4. package/front_end/Images/src/brush-2.svg +3 -0
  5. package/front_end/core/common/SettingRegistration.ts +1 -1
  6. package/front_end/core/host/AidaClient.ts +1 -0
  7. package/front_end/core/host/InspectorFrontendHost.ts +4 -0
  8. package/front_end/core/i18n/ByteUtilities.test.ts +34 -0
  9. package/front_end/core/i18n/ByteUtilities.ts +65 -0
  10. package/front_end/core/i18n/NumberFormatter.ts +75 -0
  11. package/front_end/core/i18n/i18n.ts +4 -0
  12. package/front_end/core/i18n/time-utilities.test.ts +20 -2
  13. package/front_end/core/i18n/time-utilities.ts +125 -86
  14. package/front_end/core/platform/NumberUtilities.test.ts +3 -26
  15. package/front_end/core/platform/NumberUtilities.ts +0 -20
  16. package/front_end/core/root/Runtime.ts +6 -3
  17. package/front_end/core/sdk/CPUThrottlingManager.ts +4 -0
  18. package/front_end/core/sdk/CSSContainerQuery.test.ts +10 -16
  19. package/front_end/core/sdk/CSSContainerQuery.ts +3 -15
  20. package/front_end/core/sdk/CSSMatchedStyles.test.ts +4 -0
  21. package/front_end/core/sdk/CSSMatchedStyles.ts +5 -5
  22. package/front_end/core/sdk/CSSModel.ts +18 -0
  23. package/front_end/core/sdk/CSSPropertyParser.test.ts +16 -1
  24. package/front_end/core/sdk/CSSPropertyParser.ts +2 -2
  25. package/front_end/core/sdk/sdk-meta.ts +8 -0
  26. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +3 -3
  27. package/front_end/generated/ARIAProperties.js +4 -0
  28. package/front_end/generated/InspectorBackendCommands.js +8 -6
  29. package/front_end/generated/SupportedCSSProperties.js +17 -4
  30. package/front_end/generated/protocol-mapping.d.ts +15 -1
  31. package/front_end/generated/protocol-proxy-api.d.ts +14 -1
  32. package/front_end/generated/protocol.ts +26 -2
  33. package/front_end/models/extensions/ExtensionAPI.ts +9 -1
  34. package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +2 -0
  35. package/front_end/models/javascript_metadata/NativeFunctions.js +8 -21
  36. package/front_end/models/live-metrics/web-vitals-injected/{rollup.config.js → rollup.config.mjs} +1 -1
  37. package/front_end/models/persistence/EditFileSystemView.ts +19 -9
  38. package/front_end/models/persistence/WorkspaceSettingsTab.ts +50 -54
  39. package/front_end/models/persistence/editFileSystemView.css +35 -15
  40. package/front_end/models/persistence/workspaceSettingsTab.css +21 -87
  41. package/front_end/models/timeline_model/timeline_model.ts +0 -6
  42. package/front_end/models/trace/Processor.test.ts +18 -17
  43. package/front_end/models/trace/Processor.ts +10 -14
  44. package/front_end/models/trace/README.md +0 -1
  45. package/front_end/models/{timeline_model → trace/extras}/TimelineJSProfile.ts +19 -29
  46. package/front_end/models/{timeline_model/TimelineModelFilter.test.ts → trace/extras/TraceFilter.test.ts} +15 -17
  47. package/front_end/models/trace/extras/TraceFilter.ts +62 -0
  48. package/front_end/models/{timeline_model/TimelineProfileTree.test.ts → trace/extras/TraceTree.test.ts} +44 -43
  49. package/front_end/models/{timeline_model/TimelineProfileTree.ts → trace/extras/TraceTree.ts} +65 -59
  50. package/front_end/models/trace/extras/extras.ts +3 -0
  51. package/front_end/models/trace/handlers/AnimationHandler.ts +0 -8
  52. package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +1 -11
  53. package/front_end/models/trace/handlers/FramesHandler.test.ts +1 -6
  54. package/front_end/models/trace/handlers/FramesHandler.ts +1 -14
  55. package/front_end/models/trace/handlers/GPUHandler.test.ts +0 -2
  56. package/front_end/models/trace/handlers/GPUHandler.ts +1 -25
  57. package/front_end/models/trace/handlers/ImagePaintingHandler.ts +3 -0
  58. package/front_end/models/trace/handlers/InitiatorsHandler.test.ts +0 -1
  59. package/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -20
  60. package/front_end/models/trace/handlers/InvalidationsHandler.test.ts +0 -1
  61. package/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -18
  62. package/front_end/models/trace/handlers/LargestImagePaintHandler.test.ts +2 -2
  63. package/front_end/models/trace/handlers/LargestImagePaintHandler.ts +63 -3
  64. package/front_end/models/trace/handlers/LargestTextPaintHandler.ts +3 -0
  65. package/front_end/models/trace/handlers/LayerTreeHandler.test.ts +0 -2
  66. package/front_end/models/trace/handlers/LayerTreeHandler.ts +1 -18
  67. package/front_end/models/trace/handlers/LayoutShiftsHandler.test.ts +0 -3
  68. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -20
  69. package/front_end/models/trace/handlers/MemoryHandler.test.ts +0 -1
  70. package/front_end/models/trace/handlers/MemoryHandler.ts +3 -0
  71. package/front_end/models/trace/handlers/MetaHandler.test.ts +1 -32
  72. package/front_end/models/trace/handlers/MetaHandler.ts +2 -30
  73. package/front_end/models/trace/handlers/NetworkRequestsHandler.test.ts +0 -26
  74. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +4 -23
  75. package/front_end/models/trace/handlers/PageFramesHandler.ts +3 -0
  76. package/front_end/models/trace/handlers/RendererHandler.test.ts +0 -4
  77. package/front_end/models/trace/handlers/RendererHandler.ts +1 -24
  78. package/front_end/models/trace/handlers/SamplesHandler.test.ts +0 -5
  79. package/front_end/models/trace/handlers/SamplesHandler.ts +0 -26
  80. package/front_end/models/trace/handlers/ScreenshotsHandler.test.ts +0 -1
  81. package/front_end/models/trace/handlers/SelectorStatsHandler.ts +3 -0
  82. package/front_end/models/trace/handlers/ServerTimingsHandler.ts +1 -16
  83. package/front_end/models/trace/handlers/Threads.test.ts +1 -2
  84. package/front_end/models/trace/handlers/UserInteractionsHandler.test.ts +4 -27
  85. package/front_end/models/trace/handlers/UserInteractionsHandler.ts +16 -25
  86. package/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -17
  87. package/front_end/models/trace/handlers/WorkersHandler.test.ts +0 -1
  88. package/front_end/models/trace/handlers/WorkersHandler.ts +0 -23
  89. package/front_end/models/trace/handlers/types.ts +1 -8
  90. package/front_end/models/trace/insights/{CumulativeLayoutShift.test.ts → CLSCulprits.test.ts} +21 -21
  91. package/front_end/models/trace/insights/{CumulativeLayoutShift.ts → CLSCulprits.ts} +24 -5
  92. package/front_end/models/trace/insights/Common.ts +5 -55
  93. package/front_end/models/trace/insights/DocumentLatency.test.ts +2 -2
  94. package/front_end/models/trace/insights/DocumentLatency.ts +26 -6
  95. package/front_end/models/trace/insights/FontDisplay.ts +24 -5
  96. package/front_end/models/trace/insights/InteractionToNextPaint.test.ts +1 -1
  97. package/front_end/models/trace/insights/InteractionToNextPaint.ts +26 -6
  98. package/front_end/models/trace/insights/LCPDiscovery.test.ts +58 -0
  99. package/front_end/models/trace/insights/LCPDiscovery.ts +101 -0
  100. package/front_end/models/trace/insights/{LargestContentfulPaint.test.ts → LCPPhases.test.ts} +6 -28
  101. package/front_end/models/trace/insights/{LargestContentfulPaint.ts → LCPPhases.ts} +37 -38
  102. package/front_end/models/trace/insights/{InsightRunners.ts → Models.ts} +4 -3
  103. package/front_end/models/trace/insights/RenderBlocking.test.ts +1 -1
  104. package/front_end/models/trace/insights/RenderBlocking.ts +33 -28
  105. package/front_end/models/trace/insights/SlowCSSSelector.ts +26 -5
  106. package/front_end/models/trace/insights/{ThirdPartyWeb.test.ts → ThirdParties.test.ts} +3 -3
  107. package/front_end/models/trace/insights/{ThirdPartyWeb.ts → ThirdParties.ts} +24 -5
  108. package/front_end/models/trace/insights/Viewport.test.ts +1 -1
  109. package/front_end/models/trace/insights/Viewport.ts +27 -9
  110. package/front_end/models/trace/insights/insights.ts +1 -1
  111. package/front_end/models/trace/insights/types.ts +11 -9
  112. package/front_end/models/trace/types/TraceEvents.ts +51 -22
  113. package/front_end/panels/application/SharedStorageItemsView.test.ts +3 -3
  114. package/front_end/panels/application/SharedStorageItemsView.ts +5 -3
  115. package/front_end/panels/application/StorageView.ts +3 -3
  116. package/front_end/panels/application/components/StorageMetadataView.ts +1 -2
  117. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +34 -31
  118. package/front_end/panels/coverage/CoverageView.ts +3 -3
  119. package/front_end/panels/elements/ComputedStyleModel.ts +9 -2
  120. package/front_end/panels/elements/ComputedStyleWidget.test.ts +72 -0
  121. package/front_end/panels/elements/ComputedStyleWidget.ts +12 -0
  122. package/front_end/panels/elements/ElementStatePaneWidget.test.ts +84 -30
  123. package/front_end/panels/elements/ElementStatePaneWidget.ts +42 -24
  124. package/front_end/panels/elements/ElementsTreeElement.ts +24 -11
  125. package/front_end/panels/elements/MetricsSidebarPane.ts +12 -7
  126. package/front_end/panels/elements/PropertyMatchers.ts +3 -0
  127. package/front_end/panels/elements/StylePropertiesSection.ts +15 -6
  128. package/front_end/panels/elements/StylePropertyTreeElement.test.ts +3 -1
  129. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -3
  130. package/front_end/panels/elements/stylePropertiesTreeOutline.css +2 -2
  131. package/front_end/panels/explain/components/ConsoleInsight.ts +8 -18
  132. package/front_end/panels/freestyler/AiAgent.test.ts +58 -1
  133. package/front_end/panels/freestyler/AiAgent.ts +58 -3
  134. package/front_end/panels/freestyler/DrJonesFileAgent.test.ts +99 -23
  135. package/front_end/panels/freestyler/DrJonesFileAgent.ts +53 -20
  136. package/front_end/panels/freestyler/DrJonesNetworkAgent.test.ts +15 -7
  137. package/front_end/panels/freestyler/DrJonesNetworkAgent.ts +36 -15
  138. package/front_end/panels/freestyler/DrJonesPerformanceAgent.test.ts +6 -6
  139. package/front_end/panels/freestyler/DrJonesPerformanceAgent.ts +48 -8
  140. package/front_end/panels/freestyler/FreestylerAgent.test.ts +15 -14
  141. package/front_end/panels/freestyler/FreestylerAgent.ts +52 -8
  142. package/front_end/panels/freestyler/FreestylerPanel.test.ts +539 -39
  143. package/front_end/panels/freestyler/FreestylerPanel.ts +349 -215
  144. package/front_end/panels/freestyler/components/FreestylerChatUi.test.ts +126 -34
  145. package/front_end/panels/freestyler/components/FreestylerChatUi.ts +320 -268
  146. package/front_end/panels/freestyler/components/UserActionRow.ts +156 -47
  147. package/front_end/panels/freestyler/components/freestylerChatUi.css +69 -34
  148. package/front_end/panels/freestyler/components/userActionRow.css +40 -67
  149. package/front_end/panels/freestyler/freestyler-meta.ts +3 -11
  150. package/front_end/panels/issues/components/HideIssuesMenu.ts +2 -11
  151. package/front_end/panels/layer_viewer/LayerDetailsView.ts +1 -2
  152. package/front_end/panels/layer_viewer/PaintProfilerView.ts +5 -5
  153. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +46 -0
  154. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +26 -17
  155. package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +25 -19
  156. package/front_end/panels/network/BinaryResourceView.ts +6 -7
  157. package/front_end/panels/network/EventSourceMessagesView.ts +1 -1
  158. package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
  159. package/front_end/panels/network/NetworkLogView.ts +7 -8
  160. package/front_end/panels/network/RequestTimingView.test.ts +35 -1
  161. package/front_end/panels/network/RequestTimingView.ts +96 -0
  162. package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -2
  163. package/front_end/panels/network/networkTimingTable.css +2 -1
  164. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
  165. package/front_end/panels/profiler/HeapProfileView.ts +3 -3
  166. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
  167. package/front_end/panels/profiler/HeapTimelineOverview.ts +12 -12
  168. package/front_end/panels/profiler/IsolateSelector.ts +3 -4
  169. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +1 -1
  170. package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +7 -6
  171. package/front_end/panels/profiler/ProfileView.ts +1 -1
  172. package/front_end/panels/recorder/components/RecordingView.ts +2 -2
  173. package/front_end/panels/recorder/injected/{rollup.config.js → rollup.config.mjs} +1 -1
  174. package/front_end/panels/recorder/recorderController.css +0 -4
  175. package/front_end/panels/security/CookieReportTreeElement.ts +1 -9
  176. package/front_end/panels/security/CookieReportView.ts +120 -0
  177. package/front_end/panels/security/SecurityPanel.ts +8 -2
  178. package/front_end/panels/security/cookieReportView.css +46 -0
  179. package/front_end/panels/security/sidebar.css +1 -2
  180. package/front_end/panels/sensors/LocationsSettingsTab.ts +26 -11
  181. package/front_end/panels/sensors/locationsSettingsTab.css +18 -18
  182. package/front_end/panels/settings/AISettingsTab.ts +6 -15
  183. package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
  184. package/front_end/panels/settings/SettingsScreen.ts +61 -56
  185. package/front_end/panels/settings/aiSettingsTab.css +3 -14
  186. package/front_end/panels/settings/components/SyncSection.ts +1 -2
  187. package/front_end/panels/settings/components/syncSection.css +0 -10
  188. package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +3 -1
  189. package/front_end/panels/settings/keybindsSettingsTab.css +7 -10
  190. package/front_end/panels/settings/settingsScreen.css +27 -125
  191. package/front_end/panels/sources/DebuggerPlugin.ts +9 -4
  192. package/front_end/panels/sources/NavigatorView.ts +11 -13
  193. package/front_end/panels/timeline/ActiveFilters.ts +3 -4
  194. package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -2
  195. package/front_end/panels/timeline/CountersGraph.ts +2 -4
  196. package/front_end/panels/timeline/EventsTimelineTreeView.ts +7 -8
  197. package/front_end/panels/timeline/README.md +2 -1
  198. package/front_end/panels/timeline/TimelineController.ts +14 -4
  199. package/front_end/panels/timeline/TimelineEventOverview.ts +3 -4
  200. package/front_end/panels/timeline/TimelineFilters.ts +3 -4
  201. package/front_end/panels/timeline/TimelineFlameChartDataProvider.test.ts +1 -1
  202. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -10
  203. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -2
  204. package/front_end/panels/timeline/TimelineFlameChartView.ts +21 -12
  205. package/front_end/panels/timeline/TimelineLoader.test.ts +1 -2
  206. package/front_end/panels/timeline/TimelineLoader.ts +3 -4
  207. package/front_end/panels/timeline/TimelineMiniMap.ts +10 -0
  208. package/front_end/panels/timeline/TimelinePanel.ts +20 -8
  209. package/front_end/panels/timeline/TimelineTreeView.test.ts +12 -13
  210. package/front_end/panels/timeline/TimelineTreeView.ts +35 -40
  211. package/front_end/panels/timeline/TimelineUIUtils.test.ts +2 -2
  212. package/front_end/panels/timeline/TimelineUIUtils.ts +12 -14
  213. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +6 -7
  214. package/front_end/panels/timeline/components/LiveMetricsView.test.ts +3 -3
  215. package/front_end/panels/timeline/components/LiveMetricsView.ts +14 -26
  216. package/front_end/panels/timeline/components/MetricCard.test.ts +1 -1
  217. package/front_end/panels/timeline/components/MetricCard.ts +46 -0
  218. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +3 -4
  219. package/front_end/panels/timeline/components/SidebarSingleInsightSet.test.ts +2 -0
  220. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +41 -36
  221. package/front_end/panels/timeline/components/insights/CLSCulprits.ts +19 -33
  222. package/front_end/panels/timeline/components/insights/DocumentLatency.ts +29 -40
  223. package/front_end/panels/timeline/components/insights/FontDisplay.ts +17 -23
  224. package/front_end/panels/timeline/components/insights/Helpers.ts +12 -16
  225. package/front_end/panels/timeline/components/insights/InteractionToNextPaint.ts +14 -26
  226. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +25 -37
  227. package/front_end/panels/timeline/components/insights/LCPPhases.ts +20 -47
  228. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +19 -28
  229. package/front_end/panels/timeline/components/insights/SidebarInsight.ts +1 -2
  230. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +18 -31
  231. package/front_end/panels/timeline/components/insights/Table.ts +5 -3
  232. package/front_end/panels/timeline/components/insights/ThirdParties.ts +18 -25
  233. package/front_end/panels/timeline/components/insights/Viewport.ts +14 -25
  234. package/front_end/panels/timeline/components/liveMetricsView.css +5 -13
  235. package/front_end/panels/timeline/components/metricCard.css +11 -0
  236. package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
  237. package/front_end/panels/timeline/overlays/OverlaysImpl.test.ts +5 -5
  238. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +13 -12
  239. package/front_end/panels/timeline/timelineFlameChartView.css +1 -1
  240. package/front_end/panels/timeline/utils/AICallTree.test.ts +105 -0
  241. package/front_end/panels/timeline/utils/AICallTree.ts +25 -24
  242. package/front_end/testing/EnvironmentHelpers.ts +5 -18
  243. package/front_end/testing/InsightHelpers.ts +4 -4
  244. package/front_end/testing/TraceHelpers.ts +1 -1
  245. package/front_end/third_party/puppeteer/README.chromium +2 -2
  246. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +2 -3
  247. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  248. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +14 -3
  250. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +16 -2
  252. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.d.ts +34 -5
  254. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.d.ts.map +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.js +51 -2
  256. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.js.map +1 -1
  257. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  258. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +10 -8
  259. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
  260. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  261. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
  262. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  263. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.d.ts +14 -4
  264. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.js +57 -23
  266. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts +1 -1
  268. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +13 -10
  270. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.d.ts +15 -4
  272. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.d.ts.map +1 -1
  273. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.js +55 -26
  274. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.js.map +1 -1
  275. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +0 -8
  276. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
  277. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js +2 -11
  278. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
  279. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +2 -1
  280. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  281. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +5 -2
  282. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
  283. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +7 -0
  284. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
  285. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +9 -1
  286. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
  287. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.d.ts.map +1 -1
  288. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js +5 -3
  289. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js.map +1 -1
  290. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts +1 -1
  291. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts.map +1 -1
  292. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js +0 -3
  293. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js.map +1 -1
  294. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
  295. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
  296. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  297. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  298. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  299. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  300. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  301. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  302. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  303. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.d.ts +14 -0
  304. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.d.ts.map +1 -0
  305. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.js +18 -0
  306. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.js.map +1 -0
  307. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +51 -10
  308. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +215 -97
  309. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +2 -3
  310. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  311. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  312. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +14 -3
  313. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  314. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +16 -2
  315. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  316. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +34 -5
  317. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
  318. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.js +51 -2
  319. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.js.map +1 -1
  320. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  321. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +10 -8
  322. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
  323. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  324. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
  325. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  326. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.d.ts +14 -4
  327. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.d.ts.map +1 -1
  328. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.js +57 -23
  329. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.js.map +1 -1
  330. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts +1 -1
  331. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  332. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +13 -10
  333. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
  334. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.d.ts +15 -4
  335. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.d.ts.map +1 -1
  336. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.js +55 -26
  337. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.js.map +1 -1
  338. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +0 -8
  339. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
  340. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js +1 -9
  341. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
  342. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +2 -1
  343. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  344. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +5 -2
  345. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
  346. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +7 -0
  347. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
  348. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +7 -0
  349. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
  350. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.d.ts.map +1 -1
  351. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js +5 -3
  352. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js.map +1 -1
  353. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +1 -1
  354. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -1
  355. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +0 -3
  356. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js.map +1 -1
  357. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
  358. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
  359. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  360. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  361. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  362. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  363. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  364. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.d.ts +14 -0
  365. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.d.ts.map +1 -0
  366. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.js +15 -0
  367. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.js.map +1 -0
  368. package/front_end/third_party/puppeteer/package/lib/types.d.ts +51 -10
  369. package/front_end/third_party/puppeteer/package/package.json +4 -4
  370. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +2 -3
  371. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +21 -3
  372. package/front_end/third_party/puppeteer/package/src/api/Input.ts +57 -8
  373. package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +9 -7
  374. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +1 -0
  375. package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -31
  376. package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +14 -9
  377. package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +71 -26
  378. package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +1 -15
  379. package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +8 -1
  380. package/front_end/third_party/puppeteer/package/src/common/Errors.ts +7 -0
  381. package/front_end/third_party/puppeteer/package/src/common/WaitTask.ts +9 -9
  382. package/front_end/third_party/puppeteer/package/src/environment.ts +1 -4
  383. package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
  384. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  385. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  386. package/front_end/third_party/puppeteer/package/src/util/incremental-id-generator.ts +20 -0
  387. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  388. package/front_end/ui/components/buttons/Button.test.ts +14 -0
  389. package/front_end/ui/components/buttons/Button.ts +27 -4
  390. package/front_end/ui/components/cards/card.css +7 -4
  391. package/front_end/ui/components/dialogs/Dialog.ts +2 -4
  392. package/front_end/ui/components/dialogs/ShortcutDialog.ts +15 -13
  393. package/front_end/ui/components/dialogs/dialog.css +2 -6
  394. package/front_end/ui/components/dialogs/shortcutDialog.css +33 -41
  395. package/front_end/ui/components/docs/freestyler/basic.ts +6 -8
  396. package/front_end/ui/components/docs/freestyler/empty_state.ts +6 -8
  397. package/front_end/ui/components/docs/performance_panel/track_example.html +1 -1
  398. package/front_end/ui/components/markdown_view/MarkdownView.test.ts +39 -17
  399. package/front_end/ui/components/markdown_view/MarkdownView.ts +77 -14
  400. package/front_end/ui/components/markdown_view/markdownView.css +15 -0
  401. package/front_end/ui/components/settings/SettingCheckbox.ts +3 -2
  402. package/front_end/ui/legacy/ContextMenu.ts +2 -2
  403. package/front_end/ui/legacy/InplaceEditor.ts +18 -14
  404. package/front_end/ui/legacy/TabbedPane.ts +0 -14
  405. package/front_end/ui/legacy/UIUtils.ts +0 -7
  406. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +7 -2
  407. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +8 -4
  408. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +20 -11
  409. package/front_end/ui/legacy/components/inline_editor/LinkSwatch.test.ts +19 -0
  410. package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +1 -1
  411. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +1 -1
  412. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +5 -22
  413. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +129 -100
  414. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +4 -2
  415. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.test.ts +9 -4
  416. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.ts +6 -6
  417. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +22 -4
  418. package/front_end/ui/legacy/components/perf_ui/flameChart.css +0 -2
  419. package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.test.ts +49 -0
  420. package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +23 -46
  421. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
  422. package/front_end/ui/legacy/components/utils/ImagePreview.ts +1 -1
  423. package/front_end/ui/legacy/textPrompt.css +1 -1
  424. package/front_end/ui/legacy/toolbar.css +4 -5
  425. package/front_end/ui/visual_logging/KnownContextValues.ts +174 -0
  426. package/front_end/ui/visual_logging/LoggingConfig.ts +6 -2
  427. package/package.json +7 -6
  428. package/scripts/build/ninja/bundle.gni +3 -3
  429. package/scripts/build/{rollup.config.js → rollup.config.mjs} +4 -4
  430. package/scripts/devtools_paths.py +8 -4
  431. package/scripts/eslint_rules/tests/check_test_definitions_test.js +8 -3
  432. package/scripts/tools/update_goldens_v2.py +1 -1
  433. package/front_end/models/timeline_model/TimelineModelFilter.ts +0 -61
  434. /package/front_end/Images/{rollup.config.js → rollup.config.mjs} +0 -0
@@ -5,6 +5,7 @@
5
5
  import * as Common from '../../../../core/common/common.js';
6
6
  import type * as Platform from '../../../../core/platform/platform.js';
7
7
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
8
+ import {raf} from '../../../../testing/DOMHelpers.js';
8
9
  import {describeWithEnvironment} from '../../../../testing/EnvironmentHelpers.js';
9
10
 
10
11
  import * as SourceFrame from './source_frame.js';
@@ -30,4 +31,52 @@ describeWithEnvironment('BinaryResourceViewFactory', () => {
30
31
  assert.strictEqual(
31
32
  await getResourceText(factory.createUtf8View()), 'sending this utf-8 string as a binary message...');
32
33
  });
34
+
35
+ it('returns the right content for the "copy-to-clipboard" getters', async () => {
36
+ const base64content = new TextUtils.ContentData.ContentData(
37
+ 'c2VuZGluZyB0aGlzIHV0Zi04IHN0cmluZyBhcyBhIGJpbmFyeSBtZXNzYWdlLi4u', true, '');
38
+ const factory = new SourceFrame.BinaryResourceViewFactory.BinaryResourceViewFactory(
39
+ TextUtils.StreamingContentData.StreamingContentData.from(base64content),
40
+ 'http://example.com' as Platform.DevToolsPath.UrlString, Common.ResourceType.resourceTypes.WebSocket);
41
+
42
+ assert.strictEqual(factory.base64(), 'c2VuZGluZyB0aGlzIHV0Zi04IHN0cmluZyBhcyBhIGJpbmFyeSBtZXNzYWdlLi4u');
43
+ assert.strictEqual(
44
+ factory.hex(),
45
+ '73656e64696e672074686973207574662d3820737472696e6720617320612062696e617279206d6573736167652e2e2e');
46
+ assert.strictEqual(factory.utf8(), 'sending this utf-8 string as a binary message...');
47
+ });
48
+
49
+ it('produces views for utf8/base64 that update when the StreamingContentData changes', async () => {
50
+ const base64content = new TextUtils.ContentData.ContentData(
51
+ 'c2VuZGluZyB0aGlzIHV0Zi04IHN0cmluZyBhcyBhIGJpbmFyeSBtZXNzYWdlLi4u', true, '');
52
+ const streamingContent = TextUtils.StreamingContentData.StreamingContentData.from(base64content);
53
+ const factory = new SourceFrame.BinaryResourceViewFactory.BinaryResourceViewFactory(
54
+ streamingContent, 'http://example.com' as Platform.DevToolsPath.UrlString,
55
+ Common.ResourceType.resourceTypes.WebSocket);
56
+
57
+ const utf8View = factory.createUtf8View();
58
+ utf8View.markAsRoot();
59
+ utf8View.show(document.body);
60
+ const base64View = factory.createBase64View();
61
+ base64View.markAsRoot();
62
+ base64View.show(document.body);
63
+
64
+ await raf();
65
+ assert.strictEqual(utf8View.textEditor.state.doc.toString(), 'sending this utf-8 string as a binary message...');
66
+ assert.strictEqual(
67
+ base64View.textEditor.state.doc.toString(), 'c2VuZGluZyB0aGlzIHV0Zi04IHN0cmluZyBhcyBhIGJpbmFyeSBtZXNzYWdlLi4u');
68
+
69
+ streamingContent.addChunk(window.btoa('\nadded another line'));
70
+
71
+ await raf();
72
+ assert.strictEqual(
73
+ utf8View.textEditor.state.doc.toString(),
74
+ 'sending this utf-8 string as a binary message...\nadded another line');
75
+ assert.strictEqual(
76
+ base64View.textEditor.state.doc.toString(),
77
+ 'c2VuZGluZyB0aGlzIHV0Zi04IHN0cmluZyBhcyBhIGJpbmFyeSBtZXNzYWdlLi4uCmFkZGVkIGFub3RoZXIgbGluZQ==');
78
+
79
+ utf8View.detach();
80
+ base64View.detach();
81
+ });
33
82
  });
@@ -13,63 +13,38 @@ export class BinaryResourceViewFactory {
13
13
  private streamingContent: TextUtils.StreamingContentData.StreamingContentData;
14
14
  private readonly contentUrl: Platform.DevToolsPath.UrlString;
15
15
  private readonly resourceType: Common.ResourceType.ResourceType;
16
- private arrayPromise: Promise<Uint8Array>|null;
17
- private hexPromise: Promise<string>|null;
18
- private utf8Promise: Promise<string>|null;
16
+
19
17
  constructor(
20
18
  content: TextUtils.StreamingContentData.StreamingContentData, contentUrl: Platform.DevToolsPath.UrlString,
21
19
  resourceType: Common.ResourceType.ResourceType) {
22
20
  this.streamingContent = content;
23
21
  this.contentUrl = contentUrl;
24
22
  this.resourceType = resourceType;
25
- this.arrayPromise = null;
26
- this.hexPromise = null;
27
- this.utf8Promise = null;
28
23
  }
29
24
 
30
- private async fetchContentAsArray(): Promise<Uint8Array> {
31
- if (!this.arrayPromise) {
32
- this.arrayPromise = new Promise(async resolve => {
33
- const fetchResponse = await fetch('data:;base64,' + this.streamingContent.content().base64);
34
- resolve(new Uint8Array(await fetchResponse.arrayBuffer()));
35
- });
36
- }
37
- return await this.arrayPromise;
38
- }
39
-
40
- async hex(): Promise<string> {
41
- if (!this.hexPromise) {
42
- this.hexPromise = new Promise(async resolve => {
43
- const content = await this.fetchContentAsArray();
44
- const hexString = BinaryResourceViewFactory.uint8ArrayToHexString(content);
45
- resolve(hexString);
46
- });
47
- }
48
-
49
- return this.hexPromise;
25
+ hex(): string {
26
+ const binaryString = window.atob(this.base64());
27
+ const array = Uint8Array.from(binaryString, m => m.codePointAt(0) as number);
28
+ return BinaryResourceViewFactory.#uint8ArrayToHexString(array);
50
29
  }
51
30
 
52
31
  base64(): string {
53
32
  return this.streamingContent.content().base64;
54
33
  }
55
34
 
56
- async utf8(): Promise<string> {
57
- if (!this.utf8Promise) {
58
- this.utf8Promise = new Promise(async resolve => {
59
- const content = await this.fetchContentAsArray();
60
- const utf8String = new TextDecoder('utf8').decode(content);
61
- resolve(utf8String);
62
- });
63
- }
64
-
65
- return this.utf8Promise;
35
+ utf8(): string {
36
+ return new TextUtils.ContentData.ContentData(this.base64(), /* isBase64 */ true, 'text/plain', 'utf-8').text;
66
37
  }
67
38
 
68
39
  createBase64View(): ResourceSourceFrame {
69
- return new ResourceSourceFrame(
40
+ const resourceFrame = new ResourceSourceFrame(
70
41
  TextUtils.StaticContentProvider.StaticContentProvider.fromString(
71
42
  this.contentUrl, this.resourceType, this.streamingContent.content().base64),
72
43
  this.resourceType.canonicalMimeType(), {lineNumbers: false, lineWrapping: true});
44
+ this.streamingContent.addEventListener(TextUtils.StreamingContentData.Events.CHUNK_ADDED, () => {
45
+ void resourceFrame.setContent(this.base64());
46
+ });
47
+ return resourceFrame;
73
48
  }
74
49
 
75
50
  createHexView(): StreamingContentHexView {
@@ -77,23 +52,25 @@ export class BinaryResourceViewFactory {
77
52
  }
78
53
 
79
54
  createUtf8View(): ResourceSourceFrame {
80
- const utf8fn = (): Promise<TextUtils.ContentData.ContentData> =>
81
- this.utf8().then(str => new TextUtils.ContentData.ContentData(str, /* isBase64 */ false, 'text/plain'));
82
- const utf8ContentProvider =
83
- new TextUtils.StaticContentProvider.StaticContentProvider(this.contentUrl, this.resourceType, utf8fn);
84
- return new ResourceSourceFrame(
85
- utf8ContentProvider, this.resourceType.canonicalMimeType(), {lineNumbers: true, lineWrapping: true});
55
+ const resourceFrame = new ResourceSourceFrame(
56
+ TextUtils.StaticContentProvider.StaticContentProvider.fromString(
57
+ this.contentUrl, this.resourceType, this.utf8()),
58
+ this.resourceType.canonicalMimeType(), {lineNumbers: true, lineWrapping: true});
59
+ this.streamingContent.addEventListener(TextUtils.StreamingContentData.Events.CHUNK_ADDED, () => {
60
+ void resourceFrame.setContent(this.utf8());
61
+ });
62
+ return resourceFrame;
86
63
  }
87
64
 
88
- static uint8ArrayToHexString(uint8Array: Uint8Array): string {
65
+ static #uint8ArrayToHexString(uint8Array: Uint8Array): string {
89
66
  let output = '';
90
67
  for (let i = 0; i < uint8Array.length; i++) {
91
- output += BinaryResourceViewFactory.numberToHex(uint8Array[i], 2);
68
+ output += BinaryResourceViewFactory.#numberToHex(uint8Array[i], 2);
92
69
  }
93
70
  return output;
94
71
  }
95
72
 
96
- static numberToHex(number: number, padding: number): string {
73
+ static #numberToHex(number: number, padding: number): string {
97
74
  let hex = number.toString(16);
98
75
  while (hex.length < padding) {
99
76
  hex = '0' + hex;
@@ -168,7 +168,7 @@ export class ImageView extends UI.View.SimpleView {
168
168
  this.imagePreviewElement.src = imageSrc;
169
169
  this.imagePreviewElement.alt = i18nString(UIStrings.imageFromS, {PH1: this.url});
170
170
  const size = content.isTextContent ? content.text.length : Platform.StringUtilities.base64ToSize(content.base64);
171
- this.sizeLabel.setText(Platform.NumberUtilities.bytesToString(size));
171
+ this.sizeLabel.setText(i18n.ByteUtilities.bytesToString(size));
172
172
  await loadPromise;
173
173
  this.dimensionsLabel.setText(i18nString(
174
174
  UIStrings.dD, {PH1: this.imagePreviewElement.naturalWidth, PH2: this.imagePreviewElement.naturalHeight}));
@@ -100,7 +100,7 @@ export class ImagePreview {
100
100
  const content = resource.content ? resource.content : resource.url.split('base64,')[1];
101
101
  const contentSize = resource.contentSize();
102
102
  const resourceSize = contentSize ? contentSize : Platform.StringUtilities.base64ToSize(content);
103
- const resourceSizeText = resourceSize > 0 ? Platform.NumberUtilities.bytesToString(resourceSize) : '';
103
+ const resourceSizeText = resourceSize > 0 ? i18n.ByteUtilities.bytesToString(resourceSize) : '';
104
104
 
105
105
  return new Promise(resolve => {
106
106
  const imageElement = document.createElement('img');
@@ -55,7 +55,7 @@
55
55
  }
56
56
 
57
57
  .text-prompt.disabled {
58
- opacity: 50%;
58
+ color: var(--sys-color-state-disabled);
59
59
  cursor: default;
60
60
  }
61
61
 
@@ -331,10 +331,9 @@ select.toolbar-item {
331
331
  height: var(--sys-size-9);
332
332
  border-radius: var(--sys-shape-corner-extra-small);
333
333
 
334
- &:disabled,
335
- &:disabled:hover,
336
- &:disabled:active,
337
- &:disabled:hover:active {
334
+ &:disabled {
335
+ opacity: 100%;
336
+ pointer-events: none;
338
337
  background-color: var(--sys-color-state-disabled-container);
339
338
  color: var(--sys-color-state-disabled);
340
339
 
@@ -389,7 +388,7 @@ select.toolbar-item:focus-visible > * {
389
388
  box-shadow: inset 0 0 0 2px var(--sys-color-state-focus-ring);
390
389
  }
391
390
 
392
- &:not(:has(devtools-button:hover)):hover {
391
+ &:not(:has(devtools-button:hover)):not(.disabled):hover {
393
392
  background-color: var(--sys-color-state-hover-on-subtle);
394
393
  }
395
394
 
@@ -211,11 +211,15 @@ export const knownContextValues = new Set([
211
211
  '75%',
212
212
  '8',
213
213
  '9',
214
+ 'Allowed By Exception',
215
+ 'Allowed',
216
+ 'AllowedByException',
214
217
  'ArrowDown',
215
218
  'ArrowLeft',
216
219
  'ArrowRight',
217
220
  'ArrowUp',
218
221
  'Backspace',
222
+ 'Blocked',
219
223
  'CSS',
220
224
  'CoLoR',
221
225
  'Delete',
@@ -618,6 +622,8 @@ export const knownContextValues = new Set([
618
622
  'changes.reveal-source',
619
623
  'changes.revert',
620
624
  'checked',
625
+ 'chevron-left',
626
+ 'chevron-right',
621
627
  'chrome-ai',
622
628
  'chrome-android-mobile',
623
629
  'chrome-android-mobile-high-end',
@@ -1616,6 +1622,7 @@ export const knownContextValues = new Set([
1616
1622
  'integer-64-bit',
1617
1623
  'integer-8-bit',
1618
1624
  'interactions',
1625
+ 'interactivity',
1619
1626
  'interest-groups',
1620
1627
  'internal',
1621
1628
  'internet-explorer-10',
@@ -1829,6 +1836,168 @@ export const knownContextValues = new Set([
1829
1836
  'lighter',
1830
1837
  'lighthouse',
1831
1838
  'lighthouse-show-settings-toolbar',
1839
+ 'lighthouse.audit-summary.average',
1840
+ 'lighthouse.audit-summary.fail',
1841
+ 'lighthouse.audit-summary.informative',
1842
+ 'lighthouse.audit-summary.pass',
1843
+ 'lighthouse.audit.accesskeys',
1844
+ 'lighthouse.audit.aria-allowed-attr',
1845
+ 'lighthouse.audit.aria-allowed-role',
1846
+ 'lighthouse.audit.aria-command-name',
1847
+ 'lighthouse.audit.aria-conditional-attr',
1848
+ 'lighthouse.audit.aria-deprecated-role',
1849
+ 'lighthouse.audit.aria-dialog-name',
1850
+ 'lighthouse.audit.aria-hidden-body',
1851
+ 'lighthouse.audit.aria-hidden-focus',
1852
+ 'lighthouse.audit.aria-input-field-name',
1853
+ 'lighthouse.audit.aria-meter-name',
1854
+ 'lighthouse.audit.aria-progressbar-name',
1855
+ 'lighthouse.audit.aria-prohibited-attr',
1856
+ 'lighthouse.audit.aria-required-attr',
1857
+ 'lighthouse.audit.aria-required-children',
1858
+ 'lighthouse.audit.aria-required-parent',
1859
+ 'lighthouse.audit.aria-roles',
1860
+ 'lighthouse.audit.aria-text',
1861
+ 'lighthouse.audit.aria-toggle-field-name',
1862
+ 'lighthouse.audit.aria-tooltip-name',
1863
+ 'lighthouse.audit.aria-treeitem-name',
1864
+ 'lighthouse.audit.aria-valid-attr',
1865
+ 'lighthouse.audit.aria-valid-attr-value',
1866
+ 'lighthouse.audit.bf-cache',
1867
+ 'lighthouse.audit.bootup-time',
1868
+ 'lighthouse.audit.button-name',
1869
+ 'lighthouse.audit.bypass',
1870
+ 'lighthouse.audit.canonical',
1871
+ 'lighthouse.audit.charset',
1872
+ 'lighthouse.audit.color-contrast',
1873
+ 'lighthouse.audit.crawlable-anchors',
1874
+ 'lighthouse.audit.critical-request-chains',
1875
+ 'lighthouse.audit.csp-xss',
1876
+ 'lighthouse.audit.cumulative-layout-shift',
1877
+ 'lighthouse.audit.custom-controls-labels',
1878
+ 'lighthouse.audit.custom-controls-roles',
1879
+ 'lighthouse.audit.definition-list',
1880
+ 'lighthouse.audit.deprecations',
1881
+ 'lighthouse.audit.diagnostics',
1882
+ 'lighthouse.audit.dlitem',
1883
+ 'lighthouse.audit.doctype',
1884
+ 'lighthouse.audit.document-title',
1885
+ 'lighthouse.audit.dom-size',
1886
+ 'lighthouse.audit.duplicate-id-aria',
1887
+ 'lighthouse.audit.duplicated-javascript',
1888
+ 'lighthouse.audit.efficient-animated-content',
1889
+ 'lighthouse.audit.empty-heading',
1890
+ 'lighthouse.audit.errors-in-console',
1891
+ 'lighthouse.audit.final-screenshot',
1892
+ 'lighthouse.audit.first-contentful-paint',
1893
+ 'lighthouse.audit.first-meaningful-paint',
1894
+ 'lighthouse.audit.focus-traps',
1895
+ 'lighthouse.audit.focusable-controls',
1896
+ 'lighthouse.audit.font-display',
1897
+ 'lighthouse.audit.font-size',
1898
+ 'lighthouse.audit.form-field-multiple-labels',
1899
+ 'lighthouse.audit.frame-title',
1900
+ 'lighthouse.audit.geolocation-on-start',
1901
+ 'lighthouse.audit.heading-order',
1902
+ 'lighthouse.audit.hreflang',
1903
+ 'lighthouse.audit.html-has-lang',
1904
+ 'lighthouse.audit.html-lang-valid',
1905
+ 'lighthouse.audit.html-xml-lang-mismatch',
1906
+ 'lighthouse.audit.http-status-code',
1907
+ 'lighthouse.audit.identical-links-same-purpose',
1908
+ 'lighthouse.audit.image-alt',
1909
+ 'lighthouse.audit.image-aspect-ratio',
1910
+ 'lighthouse.audit.image-redundant-alt',
1911
+ 'lighthouse.audit.image-size-responsive',
1912
+ 'lighthouse.audit.input-button-name',
1913
+ 'lighthouse.audit.input-image-alt',
1914
+ 'lighthouse.audit.inspector-issues',
1915
+ 'lighthouse.audit.interaction-to-next-paint',
1916
+ 'lighthouse.audit.interactive',
1917
+ 'lighthouse.audit.interactive-element-affordance',
1918
+ 'lighthouse.audit.is-crawlable',
1919
+ 'lighthouse.audit.is-on-https',
1920
+ 'lighthouse.audit.js-libraries',
1921
+ 'lighthouse.audit.label',
1922
+ 'lighthouse.audit.label-content-name-mismatch',
1923
+ 'lighthouse.audit.landmark-one-main',
1924
+ 'lighthouse.audit.largest-contentful-paint',
1925
+ 'lighthouse.audit.largest-contentful-paint-element',
1926
+ 'lighthouse.audit.layout-shifts',
1927
+ 'lighthouse.audit.lcp-lazy-loaded',
1928
+ 'lighthouse.audit.legacy-javascript',
1929
+ 'lighthouse.audit.link-in-text-block',
1930
+ 'lighthouse.audit.link-name',
1931
+ 'lighthouse.audit.link-text',
1932
+ 'lighthouse.audit.list',
1933
+ 'lighthouse.audit.listitem',
1934
+ 'lighthouse.audit.logical-tab-order',
1935
+ 'lighthouse.audit.long-tasks',
1936
+ 'lighthouse.audit.main-thread-tasks',
1937
+ 'lighthouse.audit.mainthread-work-breakdown',
1938
+ 'lighthouse.audit.managed-focus',
1939
+ 'lighthouse.audit.max-potential-fid',
1940
+ 'lighthouse.audit.meta-description',
1941
+ 'lighthouse.audit.meta-refresh',
1942
+ 'lighthouse.audit.meta-viewport',
1943
+ 'lighthouse.audit.metrics',
1944
+ 'lighthouse.audit.modern-image-formats',
1945
+ 'lighthouse.audit.network-requests',
1946
+ 'lighthouse.audit.network-rtt',
1947
+ 'lighthouse.audit.network-server-latency',
1948
+ 'lighthouse.audit.no-document-write',
1949
+ 'lighthouse.audit.non-composited-animations',
1950
+ 'lighthouse.audit.notification-on-start',
1951
+ 'lighthouse.audit.object-alt',
1952
+ 'lighthouse.audit.offscreen-content-hidden',
1953
+ 'lighthouse.audit.offscreen-images',
1954
+ 'lighthouse.audit.paste-preventing-inputs',
1955
+ 'lighthouse.audit.prioritize-lcp-image',
1956
+ 'lighthouse.audit.redirects',
1957
+ 'lighthouse.audit.redirects-http',
1958
+ 'lighthouse.audit.render-blocking-resources',
1959
+ 'lighthouse.audit.resource-summary',
1960
+ 'lighthouse.audit.robots-txt',
1961
+ 'lighthouse.audit.screenshot-thumbnails',
1962
+ 'lighthouse.audit.script-treemap-data',
1963
+ 'lighthouse.audit.select-name',
1964
+ 'lighthouse.audit.server-response-time',
1965
+ 'lighthouse.audit.skip-link',
1966
+ 'lighthouse.audit.speed-index',
1967
+ 'lighthouse.audit.structured-data',
1968
+ 'lighthouse.audit.tabindex',
1969
+ 'lighthouse.audit.table-duplicate-name',
1970
+ 'lighthouse.audit.table-fake-caption',
1971
+ 'lighthouse.audit.target-size',
1972
+ 'lighthouse.audit.td-has-header',
1973
+ 'lighthouse.audit.td-headers-attr',
1974
+ 'lighthouse.audit.th-has-data-cells',
1975
+ 'lighthouse.audit.third-party-cookies',
1976
+ 'lighthouse.audit.third-party-facades',
1977
+ 'lighthouse.audit.third-party-summary',
1978
+ 'lighthouse.audit.total-blocking-time',
1979
+ 'lighthouse.audit.total-byte-weight',
1980
+ 'lighthouse.audit.unminified-css',
1981
+ 'lighthouse.audit.unminified-javascript',
1982
+ 'lighthouse.audit.unsized-images',
1983
+ 'lighthouse.audit.unused-css-rules',
1984
+ 'lighthouse.audit.unused-javascript',
1985
+ 'lighthouse.audit.use-landmarks',
1986
+ 'lighthouse.audit.user-timings',
1987
+ 'lighthouse.audit.uses-http2',
1988
+ 'lighthouse.audit.uses-long-cache-ttl',
1989
+ 'lighthouse.audit.uses-optimized-images',
1990
+ 'lighthouse.audit.uses-passive-event-listeners',
1991
+ 'lighthouse.audit.uses-rel-preconnect',
1992
+ 'lighthouse.audit.uses-responsive-images',
1993
+ 'lighthouse.audit.uses-responsive-images-snapshot',
1994
+ 'lighthouse.audit.uses-text-compression',
1995
+ 'lighthouse.audit.valid-lang',
1996
+ 'lighthouse.audit.valid-source-maps',
1997
+ 'lighthouse.audit.video-caption',
1998
+ 'lighthouse.audit.viewport',
1999
+ 'lighthouse.audit.visual-order-follows-dom',
2000
+ 'lighthouse.audit.work-during-interaction',
1832
2001
  'lighthouse.cancel',
1833
2002
  'lighthouse.cat-a11y',
1834
2003
  'lighthouse.cat-best-practices',
@@ -2168,12 +2337,16 @@ export const knownContextValues = new Set([
2168
2337
  'only-show-third-party',
2169
2338
  'opacity',
2170
2339
  'open-ai-settings',
2340
+ 'open-elements-panel',
2171
2341
  'open-folder',
2172
2342
  'open-in-animations-panel',
2173
2343
  'open-in-containing-folder',
2174
2344
  'open-in-new-tab',
2175
2345
  'open-link-handler',
2176
2346
  'open-memory-inspector',
2347
+ 'open-network-panel',
2348
+ 'open-performance-panel',
2349
+ 'open-sources-panel',
2177
2350
  'open-using',
2178
2351
  'opened-windows',
2179
2352
  'opera-mac',
@@ -2885,6 +3058,7 @@ export const knownContextValues = new Set([
2885
3058
  'stalled',
2886
3059
  'standard-emulated-device-list',
2887
3060
  'start',
3061
+ 'start-new-chat',
2888
3062
  'start-time',
2889
3063
  'start-url',
2890
3064
  'start-view',
@@ -2,6 +2,8 @@
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
4
 
5
+ import * as Root from '../../core/root/root.js';
6
+
5
7
  import {knownContextValues} from './KnownContextValues.js';
6
8
 
7
9
  const LOGGING_ATTRIBUTE = 'jslog';
@@ -124,8 +126,10 @@ function checkContextValue(context: string|number|undefined): void {
124
126
  reportedUnknownVeContext.has(context)) {
125
127
  return;
126
128
  }
127
- const stack = (new Error().stack || '').split('\n').slice(3).join('\n');
128
- console.error(`Unknown VE context: ${context}${stack}`);
129
+ if (Root.Runtime.Runtime.queryParam('debugFrontend')) {
130
+ const stack = (new Error().stack || '').split('\n').slice(3).join('\n');
131
+ console.error(`Unknown VE context: ${context}${stack}`);
132
+ }
129
133
  reportedUnknownVeContext.add(context);
130
134
  }
131
135
 
package/package.json CHANGED
@@ -42,7 +42,9 @@
42
42
  "test": "vpython3 third_party/node/node.py --output scripts/run_on_target.mjs gen/test/run.js"
43
43
  },
44
44
  "devDependencies": {
45
- "@rollup/plugin-node-resolve": "10.0.0",
45
+ "@rollup/plugin-node-resolve": "15.3.0",
46
+ "@rollup/plugin-terser": "0.4.4",
47
+ "@rollup/wasm-node": "4.24.3",
46
48
  "@types/chai": "4.3.15",
47
49
  "@types/codemirror": "5.60.7",
48
50
  "@types/emscripten": "1.39.4",
@@ -57,7 +59,7 @@
57
59
  "@types/webidl2": "23.13.6",
58
60
  "@typescript-eslint/eslint-plugin": "5.59.8",
59
61
  "@typescript-eslint/parser": "5.59.8",
60
- "@web/rollup-plugin-import-meta-assets": "1.0.7",
62
+ "@web/rollup-plugin-import-meta-assets": "2.2.1",
61
63
  "chai": "4.3.4",
62
64
  "chokidar": "3.5.2",
63
65
  "cssnano": "5.1.14",
@@ -87,9 +89,7 @@
87
89
  "puppeteer-core": "23.0.2",
88
90
  "recast": "0.20.5",
89
91
  "rimraf": "3.0.2",
90
- "rollup": "2.79.2",
91
- "rollup-plugin-sourcemaps": "0.6.2",
92
- "rollup-plugin-terser": "7.0.2",
92
+ "rollup-plugin-sourcemaps2": "0.4.2",
93
93
  "sinon": "18.0.0",
94
94
  "source-map-support": "0.5.21",
95
95
  "stylelint": "14.2.0",
@@ -103,7 +103,8 @@
103
103
  "yargs": "17.3.1"
104
104
  },
105
105
  "overrides": {
106
+ "tslib": "2.8.0",
106
107
  "ws": "$ws"
107
108
  },
108
- "version": "1.0.1376716"
109
+ "version": "1.0.1380117"
109
110
  }
@@ -67,7 +67,7 @@ template("bundle") {
67
67
  }
68
68
  } else {
69
69
  node_action(target_name) {
70
- script = "node_modules/rollup/dist/bin/rollup"
70
+ script = "node_modules/@rollup/wasm-node/dist/bin/rollup"
71
71
 
72
72
  forward_variables_from(invoker,
73
73
  [
@@ -78,7 +78,7 @@ template("bundle") {
78
78
 
79
79
  inputs = [
80
80
  invoker.entrypoint,
81
- devtools_location_prepend + "scripts/build/rollup.config.js",
81
+ devtools_location_prepend + "scripts/build/rollup.config.mjs",
82
82
  devtools_location_prepend + "scripts/build/devtools_plugin.js",
83
83
  devtools_location_prepend + "scripts/devtools_paths.js",
84
84
  ]
@@ -90,7 +90,7 @@ template("bundle") {
90
90
  "--silent",
91
91
  "--config",
92
92
  rebase_path(
93
- devtools_location_prepend + "scripts/build/rollup.config.js",
93
+ devtools_location_prepend + "scripts/build/rollup.config.mjs",
94
94
  root_build_dir),
95
95
  "--input",
96
96
  rebase_path(invoker.entrypoint, root_build_dir),
@@ -4,10 +4,10 @@
4
4
 
5
5
  // @ts-check
6
6
 
7
- import sourcemaps from 'rollup-plugin-sourcemaps';
8
- import {terser} from 'rollup-plugin-terser';
7
+ import sourcemaps from 'rollup-plugin-sourcemaps2';
8
+ import terser from '@rollup/plugin-terser';
9
9
 
10
- const devtools_plugin = require('./devtools_plugin.js');
10
+ import { devtoolsPlugin } from './devtools_plugin.js';
11
11
 
12
12
  /** @type {function({configSourcemaps: boolean}): import("rollup").MergedRollupOptions} */
13
13
  // eslint-disable-next-line import/no-default-export
@@ -23,7 +23,7 @@ export default commandLineArgs => ({
23
23
  {
24
24
  name: 'devtools-plugin',
25
25
  resolveId(source, importer) {
26
- return devtools_plugin.devtoolsPlugin(source, importer);
26
+ return devtoolsPlugin(source, importer);
27
27
  },
28
28
  },
29
29
  sourcemaps(),
@@ -72,7 +72,8 @@ def typescript_compiler_path():
72
72
 
73
73
 
74
74
  def hosted_mode_script_path():
75
- return path.join(devtools_root_path(), 'scripts', 'hosted_mode', 'server.js')
75
+ return path.join(devtools_root_path(), 'scripts', 'hosted_mode',
76
+ 'server.js')
76
77
 
77
78
 
78
79
  def esbuild_path():
@@ -94,13 +95,15 @@ def downloaded_chrome_binary_path():
94
95
 
95
96
 
96
97
  def license_checker_path():
97
- return path.join(node_modules_path(), 'license-checker', 'bin', 'license-checker')
98
+ return path.join(node_modules_path(), 'license-checker', 'bin',
99
+ 'license-checker')
98
100
 
99
101
 
100
102
  def rollup_path():
101
103
  return path.join(
102
104
  node_modules_path(),
103
- 'rollup',
105
+ '@rollup',
106
+ 'wasm-node',
104
107
  'dist',
105
108
  'bin',
106
109
  'rollup',
@@ -116,4 +119,5 @@ def package_json_path():
116
119
 
117
120
 
118
121
  def browser_protocol_path():
119
- return path.join(third_party_path(), 'blink', 'public', 'devtools_protocol', 'browser_protocol.pdl')
122
+ return path.join(third_party_path(), 'blink', 'public',
123
+ 'devtools_protocol', 'browser_protocol.pdl')
@@ -72,8 +72,11 @@ ruleTester.run('check_e2e_tests', rule, {
72
72
  },
73
73
  {
74
74
  code: `import {describe, it} from '../../shared/mocha-extensions.js';
75
- // Explaining comment
76
- describe.skipOnPlatforms(['mac'], '[crbug.com/123456]: e2e-test', async () => {
75
+
76
+ describe('e2e-test', async () => {
77
+ // Explaining comment
78
+ it.skipOnPlatforms(['mac'], '[crbug.com/123456]: e2e-test', async () => {
79
+ });
77
80
  });
78
81
  `,
79
82
  filename: 'test/e2e/folder/file.ts',
@@ -152,7 +155,9 @@ ruleTester.run('check_e2e_tests', rule, {
152
155
  },
153
156
  {
154
157
  code: `import {describe, it} from '../../shared/mocha-extensions.js';
155
- describe.skipOnPlatforms(['mac'], 'e2e-test', async () => {
158
+ describe('e2e-test', async () => {
159
+ it.skipOnPlatforms(['mac'], 'e2e-test', async () => {
160
+ });
156
161
  });
157
162
  `,
158
163
  filename: 'test/e2e/folder/file.ts',
@@ -64,5 +64,5 @@ def build_parser():
64
64
  if __name__ == '__main__':
65
65
  main(
66
66
  ProjectConfig(platforms=['linux', 'mac', 'win64'],
67
- builder_prefix='devtools_frontend',
67
+ builder_prefix='dtf',
68
68
  ignore_failed_builders=True), sys.argv[1:])