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
@@ -217,11 +217,11 @@ export class PaintProfilerView extends Common.ObjectWrapper.eventMixin<EventType
217
217
  if (!snapshot) {
218
218
  this.update();
219
219
  this.populatePieChart(0, []);
220
- this.selectionWindowInternal.setEnabled(false);
220
+ this.selectionWindowInternal.setResizeEnabled(false);
221
221
  return;
222
222
  }
223
223
 
224
- this.selectionWindowInternal.setEnabled(true);
224
+ this.selectionWindowInternal.setResizeEnabled(true);
225
225
  this.progressBanner.classList.remove('hidden');
226
226
  this.updateImage();
227
227
 
@@ -370,8 +370,8 @@ export class PaintProfilerView extends Common.ObjectWrapper.eventMixin<EventType
370
370
  return null;
371
371
  }
372
372
 
373
- const screenLeft = (this.selectionWindowInternal.windowLeft || 0) * this.canvas.width;
374
- const screenRight = (this.selectionWindowInternal.windowRight || 0) * this.canvas.width;
373
+ const screenLeft = (this.selectionWindowInternal.windowLeftRatio || 0) * this.canvas.width;
374
+ const screenRight = (this.selectionWindowInternal.windowRightRatio || 0) * this.canvas.width;
375
375
  const barLeft = Math.floor(screenLeft / this.outerBarWidth);
376
376
  const barRight = Math.floor((screenRight + this.innerBarWidth - this.barPaddingWidth / 2) / this.outerBarWidth);
377
377
  const stepLeft = Platform.NumberUtilities.clamp(barLeft * this.samplesPerBar, 0, this.log.length - 1);
@@ -409,7 +409,7 @@ export class PaintProfilerView extends Common.ObjectWrapper.eventMixin<EventType
409
409
  this.snapshot = null;
410
410
  this.profiles = null;
411
411
  this.selectionWindowInternal.reset();
412
- this.selectionWindowInternal.setEnabled(false);
412
+ this.selectionWindowInternal.setResizeEnabled(false);
413
413
  }
414
414
  override wasShown(): void {
415
415
  super.wasShown();
@@ -11,6 +11,7 @@ import * as LighthouseReport from '../../third_party/lighthouse/report/report.js
11
11
  import * as Components from '../../ui/legacy/components/utils/utils.js';
12
12
  import * as UI from '../../ui/legacy/legacy.js';
13
13
  import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
14
+ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
14
15
 
15
16
  import type {
16
17
  NodeDetailsJSON, ReportJSON, RunnerResultArtifacts, SourceLocationDetailsJSON} from './LighthouseReporterTypes.js';
@@ -92,6 +93,10 @@ export class LighthouseReportRenderer {
92
93
  // @ts-ignore Expose Artifacts on DOM for e2e tests
93
94
  reportEl._lighthouseArtifactsForTesting = artifacts;
94
95
 
96
+ // This should block the report rendering as we need visual logging ready
97
+ // before the user starts interacting with the report.
98
+ LighthouseReportRenderer.installVisualLogging(reportEl);
99
+
95
100
  // Linkifying requires the target be loaded. Do not block the report
96
101
  // from rendering, as this is just an embellishment and the main target
97
102
  // could take awhile to load.
@@ -177,4 +182,45 @@ export class LighthouseReportRenderer {
177
182
  origHTMLElement.appendChild(element);
178
183
  }
179
184
  }
185
+
186
+ static installVisualLogging(el: Element): void {
187
+ for (const auditEl of el.getElementsByClassName('lh-audit')) {
188
+ const summaryEl = auditEl.querySelector('summary');
189
+ if (!summaryEl) {
190
+ continue;
191
+ }
192
+
193
+ const id = auditEl.id;
194
+ if (!id) {
195
+ continue;
196
+ }
197
+
198
+ auditEl.setAttribute('jslog', `${VisualLogging.item(`lighthouse.audit.${id}`)}`);
199
+
200
+ let state: string|undefined;
201
+ for (const className of auditEl.classList) {
202
+ switch (className) {
203
+ case 'lh-audit--pass':
204
+ state = 'pass';
205
+ break;
206
+ case 'lh-audit--average':
207
+ state = 'average';
208
+ break;
209
+ case 'lh-audit--fail':
210
+ state = 'fail';
211
+ break;
212
+ case 'lh-audit--informative':
213
+ state = 'informative';
214
+ break;
215
+ }
216
+ }
217
+
218
+ if (!state) {
219
+ continue;
220
+ }
221
+
222
+ summaryEl.setAttribute(
223
+ 'jslog', `${VisualLogging.expand(`lighthouse.audit-summary.${state}`).track({click: true})}`);
224
+ }
225
+ }
180
226
  }
@@ -5,6 +5,8 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import type * as SDK from '../../core/sdk/sdk.js';
8
+ import * as Buttons from '../../ui/components/buttons/buttons.js';
9
+ import * as Cards from '../../ui/components/cards/cards.js';
8
10
  import * as UI from '../../ui/legacy/legacy.js';
9
11
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
10
12
 
@@ -14,11 +16,11 @@ const UIStrings = {
14
16
  /**
15
17
  *@description Text in Throttling Settings Tab of the Network panel
16
18
  */
17
- networkThrottlingProfiles: 'Network Throttling Profiles',
19
+ networkThrottlingProfiles: 'Network throttling profiles',
18
20
  /**
19
21
  *@description Text of add conditions button in Throttling Settings Tab of the Network panel
20
22
  */
21
- addCustomProfile: 'Add custom profile...',
23
+ addCustomProfile: 'Add profile',
22
24
  /**
23
25
  *@description A value in milliseconds
24
26
  *@example {3} PH1
@@ -129,26 +131,33 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox implements
129
131
 
130
132
  this.element.setAttribute('jslog', `${VisualLogging.pane('throttling-conditions')}`);
131
133
 
132
- const header = this.contentElement.createChild('div', 'header');
133
- header.textContent = i18nString(UIStrings.networkThrottlingProfiles);
134
- UI.ARIAUtils.markAsHeading(header, 1);
135
-
136
- const addButton =
137
- UI.UIUtils.createTextButton(i18nString(UIStrings.addCustomProfile), this.addButtonClicked.bind(this), {
138
- className: 'add-conditions-button',
139
- jslogContext: 'network.add-conditions',
140
- });
141
- this.contentElement.appendChild(addButton);
142
-
134
+ const settingsContent =
135
+ this.contentElement.createChild('div', 'settings-card-container-wrapper').createChild('div');
136
+ settingsContent.classList.add('settings-card-container', 'ignore-list-settings');
137
+
138
+ const addButton = new Buttons.Button.Button();
139
+ addButton.classList.add('add-conditions-button');
140
+ addButton.data = {
141
+ variant: Buttons.Button.Variant.OUTLINED,
142
+ iconName: 'plus',
143
+ jslogContext: 'network.add-conditions',
144
+ };
145
+ addButton.textContent = i18nString(UIStrings.addCustomProfile);
146
+ addButton.addEventListener('click', () => this.addButtonClicked());
147
+
148
+ const listContainer = settingsContent.createChild('div');
149
+ const card = new Cards.Card.Card();
150
+ settingsContent.appendChild(card);
151
+ card.data = {
152
+ heading: i18nString(UIStrings.networkThrottlingProfiles),
153
+ content: [listContainer, addButton],
154
+ };
143
155
  this.list = new UI.ListWidget.ListWidget(this);
144
156
  this.list.element.classList.add('conditions-list');
145
-
146
- this.list.show(this.contentElement);
157
+ this.list.show(listContainer);
147
158
 
148
159
  this.customSetting = Common.Settings.Settings.instance().moduleSetting('custom-network-conditions');
149
160
  this.customSetting.addChangeListener(this.conditionsUpdated, this);
150
-
151
- this.setDefaultFocusedElement(addButton);
152
161
  }
153
162
 
154
163
  override wasShown(): void {
@@ -4,27 +4,13 @@
4
4
  * found in the LICENSE file.
5
5
  */
6
6
 
7
- :host {
8
- overflow: hidden;
9
- }
10
-
11
- .header {
12
- padding: 0 0 6px;
13
- border-bottom: 1px solid var(--sys-color-divider);
14
- font-size: 18px;
15
- font-weight: normal;
16
- flex: none;
17
- }
18
-
19
7
  .add-conditions-button {
20
- flex: none;
21
- margin: 10px 5px;
22
- min-width: 140px;
23
- align-self: flex-start;
8
+ margin-bottom: var(--sys-size-5);
9
+ border: none;
24
10
  }
25
11
 
26
12
  .conditions-list {
27
- min-width: 640px;
13
+ margin-top: var(--sys-size-3);
28
14
  flex: auto;
29
15
  }
30
16
 
@@ -38,7 +24,9 @@
38
24
  }
39
25
 
40
26
  .conditions-list-text {
41
- flex: 0 0 80px;
27
+ text-overflow: ellipsis;
28
+ overflow: hidden;
29
+ flex: 0 0 50px;
42
30
  user-select: none;
43
31
  color: var(--sys-color-on-surface);
44
32
  text-align: center;
@@ -57,12 +45,15 @@
57
45
  .conditions-list-title {
58
46
  text-align: start;
59
47
  display: flex;
60
- flex: auto;
48
+ flex-grow: 1;
61
49
  align-items: flex-start;
62
50
  }
63
51
 
64
52
  .conditions-list-title-text {
65
53
  flex: auto;
54
+ text-overflow: ellipsis;
55
+ overflow: hidden;
56
+ white-space: nowrap;
66
57
  }
67
58
 
68
59
  .conditions-list-separator {
@@ -110,3 +101,18 @@
110
101
  .editor-buttons {
111
102
  margin-top: 10px;
112
103
  }
104
+
105
+ .settings-card-container-wrapper {
106
+ scrollbar-gutter: stable;
107
+ padding-bottom: var(--sys-size-8);
108
+ overflow: auto;
109
+ position: absolute;
110
+ inset: var(--sys-size-8) 0 0;
111
+ }
112
+
113
+ .settings-card-container {
114
+ display: flex;
115
+ flex-direction: column;
116
+ align-items: center;
117
+ gap: var(--sys-size-9);
118
+ }
@@ -84,7 +84,7 @@ export class BinaryResourceView extends UI.Widget.VBox {
84
84
  new BinaryViewObject(
85
85
  'base64', i18n.i18n.lockedString('Base64'), i18nString(UIStrings.copiedAsBase),
86
86
  this.binaryResourceViewFactory.createBase64View.bind(this.binaryResourceViewFactory),
87
- () => Promise.resolve(this.binaryResourceViewFactory.base64())),
87
+ this.binaryResourceViewFactory.base64.bind(this.binaryResourceViewFactory)),
88
88
  new BinaryViewObject(
89
89
  'hex', i18nString(UIStrings.hexViewer), i18nString(UIStrings.copiedAsHex),
90
90
  this.binaryResourceViewFactory.createHexView.bind(this.binaryResourceViewFactory),
@@ -105,7 +105,7 @@ export class BinaryResourceView extends UI.Widget.VBox {
105
105
 
106
106
  const copyButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.copyToClipboard), 'copy');
107
107
  copyButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, _event => {
108
- void this.copySelectedViewToClipboard();
108
+ this.copySelectedViewToClipboard();
109
109
  }, this);
110
110
  this.toolbar.appendToolbarItem(copyButton);
111
111
 
@@ -129,12 +129,12 @@ export class BinaryResourceView extends UI.Widget.VBox {
129
129
  return binaryViewObject || null;
130
130
  }
131
131
 
132
- private async copySelectedViewToClipboard(): Promise<void> {
132
+ private copySelectedViewToClipboard(): void {
133
133
  const viewObject = this.getCurrentViewObject();
134
134
  if (!viewObject) {
135
135
  return;
136
136
  }
137
- Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(await viewObject.content());
137
+ Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(viewObject.content());
138
138
  this.copiedText.setText(viewObject.copiedMessage);
139
139
  this.copiedText.element.classList.remove('fadeout');
140
140
  function addFadeoutClass(this: BinaryResourceView): void {
@@ -208,13 +208,12 @@ export class BinaryViewObject {
208
208
  type: string;
209
209
  label: string;
210
210
  copiedMessage: string;
211
- content: () => Promise<string>;
211
+ content: () => string;
212
212
  private createViewFn: () => UI.Widget.Widget;
213
213
  private view: UI.Widget.Widget|null;
214
214
 
215
215
  constructor(
216
- type: string, label: string, copiedMessage: string, createViewFn: () => UI.Widget.Widget,
217
- content: () => Promise<string>) {
216
+ type: string, label: string, copiedMessage: string, createViewFn: () => UI.Widget.Widget, content: () => string) {
218
217
  this.type = type;
219
218
  this.label = label;
220
219
  this.copiedMessage = copiedMessage;
@@ -100,7 +100,7 @@ export class EventSourceMessagesView extends UI.Widget.VBox {
100
100
  refreshCallback: undefined,
101
101
  });
102
102
  this.dataGrid.setStriped(true);
103
- this.dataGrid.setStickToBottom(true);
103
+ this.dataGrid.setEnableAutoScrollToBottom(true);
104
104
  this.dataGrid.setRowContextMenuCallback(this.onRowContextMenu.bind(this));
105
105
  this.dataGrid.markColumnAsSortedBy('time', DataGrid.DataGrid.Order.Ascending);
106
106
  this.sortItems();
@@ -1406,7 +1406,7 @@ export class NetworkRequestNode extends NetworkNode {
1406
1406
  }
1407
1407
 
1408
1408
  private renderSizeCell(cell: HTMLElement): void {
1409
- const resourceSize = Platform.NumberUtilities.bytesToString(this.requestInternal.resourceSize);
1409
+ const resourceSize = i18n.ByteUtilities.bytesToString(this.requestInternal.resourceSize);
1410
1410
 
1411
1411
  if (this.requestInternal.cachedInMemory()) {
1412
1412
  UI.UIUtils.createTextChild(cell, i18nString(UIStrings.memoryCache));
@@ -1419,7 +1419,7 @@ export class NetworkRequestNode extends NetworkNode {
1419
1419
  UI.UIUtils.createTextChild(cell, i18n.i18n.lockedString('(ServiceWorker router)'));
1420
1420
  let tooltipText;
1421
1421
  if (serviceWorkerRouterInfo.matchedSourceType === Protocol.Network.ServiceWorkerRouterSource.Network) {
1422
- const transferSize = Platform.NumberUtilities.bytesToString(this.requestInternal.transferSize);
1422
+ const transferSize = i18n.ByteUtilities.bytesToString(this.requestInternal.transferSize);
1423
1423
  tooltipText = i18nString(
1424
1424
  UIStrings.matchedToServiceWorkerRouterWithNetworkSource,
1425
1425
  {PH1: ruleIdMatched, PH2: transferSize, PH3: resourceSize});
@@ -1449,7 +1449,7 @@ export class NetworkRequestNode extends NetworkNode {
1449
1449
  UI.Tooltip.Tooltip.install(cell, i18nString(UIStrings.servedFromDiskCacheResourceSizeS, {PH1: resourceSize}));
1450
1450
  cell.classList.add('network-dim-cell');
1451
1451
  } else {
1452
- const transferSize = Platform.NumberUtilities.bytesToString(this.requestInternal.transferSize);
1452
+ const transferSize = i18n.ByteUtilities.bytesToString(this.requestInternal.transferSize);
1453
1453
  UI.UIUtils.createTextChild(cell, transferSize);
1454
1454
  UI.Tooltip.Tooltip.install(cell, `${transferSize} transferred over network, resource size: ${resourceSize}`);
1455
1455
  }
@@ -1144,7 +1144,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1144
1144
  this.handleContextMenuForRequest(contextMenu, request);
1145
1145
  }
1146
1146
  });
1147
- this.dataGrid.setStickToBottom(true);
1147
+ this.dataGrid.setEnableAutoScrollToBottom(true);
1148
1148
  this.dataGrid.setName('network-log');
1149
1149
  this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.LAST);
1150
1150
  this.dataGrid.element.classList.add('network-log-grid');
@@ -1272,26 +1272,26 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1272
1272
  this.summaryToolbarInternal.appendSeparator();
1273
1273
  appendChunk(
1274
1274
  i18nString(UIStrings.sSTransferred, {
1275
- PH1: Platform.NumberUtilities.bytesToString(selectedTransferSize),
1276
- PH2: Platform.NumberUtilities.bytesToString(transferSize),
1275
+ PH1: i18n.ByteUtilities.bytesToString(selectedTransferSize),
1276
+ PH2: i18n.ByteUtilities.bytesToString(transferSize),
1277
1277
  }),
1278
1278
  i18nString(UIStrings.sBSBTransferredOverNetwork, {PH1: selectedTransferSize, PH2: transferSize}));
1279
1279
  this.summaryToolbarInternal.appendSeparator();
1280
1280
  appendChunk(
1281
1281
  i18nString(UIStrings.sSResources, {
1282
- PH1: Platform.NumberUtilities.bytesToString(selectedResourceSize),
1283
- PH2: Platform.NumberUtilities.bytesToString(resourceSize),
1282
+ PH1: i18n.ByteUtilities.bytesToString(selectedResourceSize),
1283
+ PH2: i18n.ByteUtilities.bytesToString(resourceSize),
1284
1284
  }),
1285
1285
  i18nString(UIStrings.sBSBResourcesLoadedByThePage, {PH1: selectedResourceSize, PH2: resourceSize}));
1286
1286
  } else {
1287
1287
  appendChunk(i18nString(UIStrings.sRequests, {PH1: nodeCount}));
1288
1288
  this.summaryToolbarInternal.appendSeparator();
1289
1289
  appendChunk(
1290
- i18nString(UIStrings.sTransferred, {PH1: Platform.NumberUtilities.bytesToString(transferSize)}),
1290
+ i18nString(UIStrings.sTransferred, {PH1: i18n.ByteUtilities.bytesToString(transferSize)}),
1291
1291
  i18nString(UIStrings.sBTransferredOverNetwork, {PH1: transferSize}));
1292
1292
  this.summaryToolbarInternal.appendSeparator();
1293
1293
  appendChunk(
1294
- i18nString(UIStrings.sResources, {PH1: Platform.NumberUtilities.bytesToString(resourceSize)}),
1294
+ i18nString(UIStrings.sResources, {PH1: i18n.ByteUtilities.bytesToString(resourceSize)}),
1295
1295
  i18nString(UIStrings.sBResourcesLoadedByThePage, {PH1: resourceSize}));
1296
1296
  }
1297
1297
 
@@ -1595,7 +1595,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1595
1595
 
1596
1596
  this.dataGrid.rootNode().removeChildren();
1597
1597
  this.updateSummaryBar();
1598
- this.dataGrid.setStickToBottom(true);
1599
1598
  this.scheduleRefresh();
1600
1599
  }
1601
1600
 
@@ -5,7 +5,10 @@
5
5
  import type * as Platform from '../../core/platform/platform.js';
6
6
  import * as SDK from '../../core/sdk/sdk.js';
7
7
  import * as Protocol from '../../generated/protocol.js';
8
+ import {getCleanTextContentFromElements, renderElementIntoDOM} from '../../testing/DOMHelpers.js';
9
+ import {describeWithLocale} from '../../testing/EnvironmentHelpers.js';
8
10
 
11
+ import * as Network from './NetworkTimeCalculator.js';
9
12
  import * as RequestTimingView from './RequestTimingView.js';
10
13
 
11
14
  function createNetworkRequest(
@@ -53,7 +56,7 @@ function createNetworkRequest(
53
56
  return request;
54
57
  }
55
58
 
56
- describe('ResourceTimingView', () => {
59
+ describeWithLocale('ResourceTimingView', () => {
57
60
  it('RequestTimeRanges has router evaluation field with SW router source as network', async () => {
58
61
  const request = createNetworkRequest(
59
62
  Protocol.Network.ServiceWorkerRouterSource.Network, Protocol.Network.ServiceWorkerRouterSource.Network);
@@ -133,4 +136,35 @@ describe('ResourceTimingView', () => {
133
136
  assert.strictEqual(cacheLookup?.start, timingInfo.requestTime + cacheLookupStart / 1000);
134
137
  assert.strictEqual(cacheLookup?.end, timingInfo.requestTime + timingInfo.sendStart / 1000);
135
138
  });
139
+
140
+ it('Timing table has router evaluation field with detail tabs', async () => {
141
+ const request = createNetworkRequest(
142
+ Protocol.Network.ServiceWorkerRouterSource.Network, Protocol.Network.ServiceWorkerRouterSource.Network);
143
+
144
+ const component = new RequestTimingView.RequestTimingView(request, new Network.NetworkTimeCalculator(true));
145
+ const div = document.createElement('div');
146
+ renderElementIntoDOM(div);
147
+ component.markAsRoot();
148
+ component.show(div);
149
+
150
+ // Test if we correctly set details element
151
+ const routerEvaluationDetailsElement = document.querySelector('.router-evaluation-timing-bar-details');
152
+ assert.isNotNull(routerEvaluationDetailsElement, 'router evaluation details does not exist');
153
+ assert.strictEqual(
154
+ routerEvaluationDetailsElement.childElementCount, 1,
155
+ 'router evaluation details child element count does not match');
156
+ assert.isNotNull(routerEvaluationDetailsElement.firstElementChild, 'router evaluation first element is non null');
157
+
158
+ // Test if we correctly set the tree item inside shadow root
159
+ const shadowElement = routerEvaluationDetailsElement.firstElementChild.shadowRoot;
160
+ assert.isNotNull(shadowElement, 'shadow element does not exist');
161
+ const content = getCleanTextContentFromElements(shadowElement, '.network-fetch-details-treeitem');
162
+ assert.strictEqual(content.length, 2, 'does not match the tree item');
163
+
164
+ // Check the content of the view. Since the value is set from matched to actual,
165
+ // the order should be the same.
166
+ const networkString = String(Protocol.Network.ServiceWorkerRouterSource.Network);
167
+ assert.strictEqual(content[0], `Matched source: ${networkString}`, 'matched source does not match');
168
+ assert.strictEqual(content[1], `Actual source: ${networkString}`, 'actual source does not match');
169
+ });
136
170
  });
@@ -106,6 +106,14 @@ const UIStrings = {
106
106
  *@description Text in Signed Exchange Info View of the Network panel
107
107
  */
108
108
  label: 'Label',
109
+ /**
110
+ *@description Text in Request Timing View of the Network panel
111
+ */
112
+ routerEvaluation: 'Router Evaluation',
113
+ /**
114
+ *@description Text in Request Timing View of the Network panel
115
+ */
116
+ routerCacheLookup: 'Cache Lookup',
109
117
  /**
110
118
  *@description Inner element text content in Network Log View Columns of the Network panel
111
119
  */
@@ -217,6 +225,16 @@ const UIStrings = {
217
225
  *@description Text used to show that data was retrieved using ServiceWorker fallback code
218
226
  */
219
227
  fallbackCode: 'Fallback code',
228
+ /**
229
+ *@description Name of the specified source for SW static routing API.
230
+ *@example {network} PH1
231
+ */
232
+ routerMatchedSource: 'Matched source: {PH1}',
233
+ /**
234
+ *@description Name of the actually used source for SW static routing API.
235
+ *@example {network} PH1
236
+ */
237
+ routerActualSource: 'Actual source: {PH1}',
220
238
  };
221
239
  const str_ = i18n.i18n.registerUIStrings('panels/network/RequestTimingView.ts', UIStrings);
222
240
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -258,6 +276,10 @@ export class RequestTimingView extends UI.Widget.VBox {
258
276
  return i18nString(UIStrings.requestToServiceworker);
259
277
  case RequestTimeRangeNames.SERVICE_WORKER_PREPARATION:
260
278
  return i18nString(UIStrings.startup);
279
+ case RequestTimeRangeNames.SERVICE_WORKER_ROUTER_EVALUATION:
280
+ return i18nString(UIStrings.routerEvaluation);
281
+ case RequestTimeRangeNames.SERVICE_WORKER_CACHE_LOOKUP:
282
+ return i18nString(UIStrings.routerCacheLookup);
261
283
  case RequestTimeRangeNames.SERVICE_WORKER_RESPOND_WITH:
262
284
  return i18nString(UIStrings.respondwith);
263
285
  case RequestTimeRangeNames.SSL:
@@ -490,6 +512,15 @@ export class RequestTimingView extends UI.Widget.VBox {
490
512
  timingBarTitleElement.setAttribute('role', 'switch');
491
513
  UI.ARIAUtils.setChecked(timingBarTitleElement, false);
492
514
  }
515
+
516
+ if (range.name === 'serviceworker-routerevaluation') {
517
+ timingBarTitleElement.classList.add('network-fetch-timing-bar-clickable');
518
+ tableElement.createChild('tr', 'router-evaluation-timing-bar-details');
519
+
520
+ timingBarTitleElement.setAttribute('tabindex', '0');
521
+ timingBarTitleElement.setAttribute('role', 'switch');
522
+ UI.ARIAUtils.setChecked(timingBarTitleElement, false);
523
+ }
493
524
  }
494
525
 
495
526
  if (!request.finished && !request.preserved) {
@@ -683,6 +714,67 @@ export class RequestTimingView extends UI.Widget.VBox {
683
714
  }
684
715
  }
685
716
 
717
+ private constructRouterEvaluationView(): void {
718
+ if (!this.tableElement) {
719
+ return;
720
+ }
721
+
722
+ const routerEvaluationDetailsElement = this.tableElement.querySelector('.router-evaluation-timing-bar-details');
723
+ if (!routerEvaluationDetailsElement) {
724
+ return;
725
+ }
726
+
727
+ routerEvaluationDetailsElement.classList.add('network-fetch-timing-bar-details-collapsed');
728
+
729
+ self.onInvokeElement(
730
+ this.tableElement, this.onToggleRouterEvaluationDetails.bind(this, routerEvaluationDetailsElement));
731
+
732
+ const detailsView = new UI.TreeOutline.TreeOutlineInShadow();
733
+ routerEvaluationDetailsElement.appendChild(detailsView.element);
734
+
735
+ const {serviceWorkerRouterInfo} = this.request;
736
+ if (!serviceWorkerRouterInfo) {
737
+ return;
738
+ }
739
+
740
+ const document = this.tableElement.ownerDocument;
741
+
742
+ // Add matched source type element
743
+ const matchedSourceTypeElement = document.createElement('div');
744
+ matchedSourceTypeElement.classList.add('network-fetch-details-treeitem');
745
+ const matchedSourceType = serviceWorkerRouterInfo.matchedSourceType;
746
+ const matchedSourceTypeString = String(matchedSourceType) || i18nString(UIStrings.unknown);
747
+ matchedSourceTypeElement.textContent = i18nString(UIStrings.routerMatchedSource, {PH1: matchedSourceTypeString});
748
+
749
+ const matchedSourceTypeTreeElement = new UI.TreeOutline.TreeElement(matchedSourceTypeElement);
750
+ detailsView.appendChild(matchedSourceTypeTreeElement);
751
+
752
+ // Add actual source type element
753
+ const actualSourceTypeElement = document.createElement('div');
754
+ actualSourceTypeElement.classList.add('network-fetch-details-treeitem');
755
+ const actualSourceType = serviceWorkerRouterInfo.actualSourceType;
756
+ const actualSourceTypeString = String(actualSourceType) || i18nString(UIStrings.unknown);
757
+ actualSourceTypeElement.textContent = i18nString(UIStrings.routerActualSource, {PH1: actualSourceTypeString});
758
+
759
+ const actualSourceTypeTreeElement = new UI.TreeOutline.TreeElement(actualSourceTypeElement);
760
+ detailsView.appendChild(actualSourceTypeTreeElement);
761
+ }
762
+
763
+ private onToggleRouterEvaluationDetails(routerEvaluationDetailsElement: Element, event: Event): void {
764
+ if (!event.target) {
765
+ return;
766
+ }
767
+
768
+ const target = (event.target as Element);
769
+ if (target.classList.contains('network-fetch-timing-bar-clickable')) {
770
+ const expanded = target.getAttribute('aria-checked') === 'true';
771
+ target.setAttribute('aria-checked', String(!expanded));
772
+
773
+ routerEvaluationDetailsElement.classList.toggle('network-fetch-timing-bar-details-collapsed');
774
+ routerEvaluationDetailsElement.classList.toggle('network-fetch-timing-bar-details-expanded');
775
+ }
776
+ }
777
+
686
778
  override wasShown(): void {
687
779
  this.request.addEventListener(SDK.NetworkRequest.Events.TIMING_CHANGED, this.refresh, this);
688
780
  this.request.addEventListener(SDK.NetworkRequest.Events.FINISHED_LOADING, this.refresh, this);
@@ -709,6 +801,10 @@ export class RequestTimingView extends UI.Widget.VBox {
709
801
  if (this.request.fetchedViaServiceWorker) {
710
802
  this.constructFetchDetailsView();
711
803
  }
804
+
805
+ if (this.request.serviceWorkerRouterInfo) {
806
+ this.constructRouterEvaluationView();
807
+ }
712
808
  }
713
809
 
714
810
  private boundaryChanged(): void {
@@ -190,7 +190,7 @@ export class ResourceWebSocketFrameView extends UI.Widget.VBox {
190
190
  refreshCallback: undefined,
191
191
  });
192
192
  this.dataGrid.setRowContextMenuCallback(onRowContextMenu.bind(this));
193
- this.dataGrid.setStickToBottom(true);
193
+ this.dataGrid.setEnableAutoScrollToBottom(true);
194
194
  this.dataGrid.setCellClass('websocket-frame-view-td');
195
195
  this.timeComparator =
196
196
  (resourceWebSocketFrameNodeTimeComparator as
@@ -422,7 +422,7 @@ export class ResourceWebSocketFrameNode extends DataGrid.SortableDataGrid.Sortab
422
422
  description = dataText;
423
423
 
424
424
  } else if (frame.opCode === OpCodes.BINARY_FRAME) {
425
- length = Platform.NumberUtilities.bytesToString(Platform.StringUtilities.base64ToSize(frame.text));
425
+ length = i18n.ByteUtilities.bytesToString(Platform.StringUtilities.base64ToSize(frame.text));
426
426
  description = opCodeDescriptions[frame.opCode]();
427
427
 
428
428
  } else {
@@ -161,7 +161,8 @@ table.network-timing-table > tr:not(.network-timing-table-header):not(.network-t
161
161
  display: block;
162
162
  }
163
163
 
164
- .network-fetch-timing-bar-details {
164
+ .network-fetch-timing-bar-details,
165
+ .router-evaluation-timing-bar-details {
165
166
  padding-left: 11px;
166
167
  width: fit-content;
167
168
  }
@@ -658,7 +658,7 @@ export class MetricIndicator {
658
658
  case Format.PERCENT:
659
659
  return percentFormatter.format(value);
660
660
  case Format.BYTES:
661
- return Platform.NumberUtilities.bytesToString(value);
661
+ return i18n.ByteUtilities.bytesToString(value);
662
662
  default:
663
663
  return numberFormatter.format(value);
664
664
  }
@@ -164,7 +164,7 @@ export class HeapProfileView extends ProfileView implements UI.SearchableView.Se
164
164
  onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent<IdsRangeChangedEvent>): void {
165
165
  const {minId, maxId} = event.data;
166
166
  this.selectedSizeText.setText(
167
- i18nString(UIStrings.selectedSizeS, {PH1: Platform.NumberUtilities.bytesToString(event.data.size)}));
167
+ i18nString(UIStrings.selectedSizeS, {PH1: i18n.ByteUtilities.bytesToString(event.data.size)}));
168
168
  this.setSelectionRange(minId, maxId);
169
169
  }
170
170
 
@@ -688,8 +688,8 @@ export class HeapFlameChartDataProvider extends ProfileFlameChartDataProvider {
688
688
  entryInfo.push({title, value});
689
689
  }
690
690
  pushEntryInfoRow(i18nString(UIStrings.name), UI.UIUtils.beautifyFunctionName(node.functionName));
691
- pushEntryInfoRow(i18nString(UIStrings.selfSize), Platform.NumberUtilities.bytesToString(node.self));
692
- pushEntryInfoRow(i18nString(UIStrings.totalSize), Platform.NumberUtilities.bytesToString(node.total));
691
+ pushEntryInfoRow(i18nString(UIStrings.selfSize), i18n.ByteUtilities.bytesToString(node.self));
692
+ pushEntryInfoRow(i18nString(UIStrings.totalSize), i18n.ByteUtilities.bytesToString(node.total));
693
693
  const linkifier = new Components.Linkifier.Linkifier();
694
694
  const link = linkifier.maybeLinkifyConsoleCallFrame(
695
695
  this.heapProfilerModel ? this.heapProfilerModel.target() : null, node.callFrame);
@@ -599,7 +599,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
599
599
  onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent<IdsRangeChangedEvent>): void {
600
600
  const {minId, maxId} = event.data;
601
601
  this.selectedSizeText.setText(
602
- i18nString(UIStrings.selectedSizeS, {PH1: Platform.NumberUtilities.bytesToString(event.data.size)}));
602
+ i18nString(UIStrings.selectedSizeS, {PH1: i18n.ByteUtilities.bytesToString(event.data.size)}));
603
603
  if (this.constructorsDataGrid.snapshot) {
604
604
  this.constructorsDataGrid.setSelectionRange(minId, maxId);
605
605
  }
@@ -1746,7 +1746,7 @@ export class HeapProfileHeader extends ProfileHeader {
1746
1746
  if (!this.snapshotProxy) {
1747
1747
  return;
1748
1748
  }
1749
- this.updateStatus(Platform.NumberUtilities.bytesToString(this.snapshotProxy.totalSize), false);
1749
+ this.updateStatus(i18n.ByteUtilities.bytesToString(this.snapshotProxy.totalSize), false);
1750
1750
  }
1751
1751
 
1752
1752
  transferChunk(chunk: string): void {