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
@@ -2,19 +2,34 @@
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 i18n from '../../../core/i18n/i18n.js';
5
6
  import * as ThirdPartyWeb from '../../../third_party/third-party-web/third-party-web.js';
6
7
  import * as Extras from '../extras/extras.js';
7
8
  import type * as Handlers from '../handlers/handlers.js';
8
9
  import * as Helpers from '../helpers/helpers.js';
9
10
  import type * as Types from '../types/types.js';
10
11
 
11
- import type {InsightResult, InsightSetContext, RequiredData} from './types.js';
12
+ import type {InsightModel, InsightSetContext, RequiredData} from './types.js';
13
+
14
+ const UIStrings = {
15
+ /** Title of an insight that provides details about the code on a web page that the user doesn't control (referred to as "third-party code"). */
16
+ title: 'Third parties',
17
+ /**
18
+ * @description Description of a DevTools insight that identifies the code on the page that the user doesn't control.
19
+ * This is displayed after a user expands the section to see more. No character length limits.
20
+ */
21
+ description: 'Third party code can significantly impact load performance. ' +
22
+ '[Reduce and defer loading of third party code](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/loading-third-party-javascript/) to prioritize your page\'s content.',
23
+ };
24
+
25
+ const str_ = i18n.i18n.registerUIStrings('models/trace/insights/ThirdParties.ts', UIStrings);
26
+ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
12
27
 
13
28
  export function deps(): ['Meta', 'NetworkRequests', 'Renderer', 'ImagePainting'] {
14
29
  return ['Meta', 'NetworkRequests', 'Renderer', 'ImagePainting'];
15
30
  }
16
31
 
17
- export type ThirdPartyWebInsightResult = InsightResult<{
32
+ export type ThirdPartiesInsightModel = InsightModel<{
18
33
  entityByRequest: Map<Types.Events.SyntheticNetworkRequest, Extras.ThirdParties.Entity>,
19
34
  requestsByEntity: Map<Extras.ThirdParties.Entity, Types.Events.SyntheticNetworkRequest[]>,
20
35
  summaryByRequest: Map<Types.Events.SyntheticNetworkRequest, Extras.ThirdParties.Summary>,
@@ -37,8 +52,12 @@ function getRelatedEvents(
37
52
  return events;
38
53
  }
39
54
 
55
+ function finalize(partialModel: Omit<ThirdPartiesInsightModel, 'title'|'description'>): ThirdPartiesInsightModel {
56
+ return {title: i18nString(UIStrings.title), description: i18nString(UIStrings.description), ...partialModel};
57
+ }
58
+
40
59
  export function generateInsight(
41
- parsedTrace: RequiredData<typeof deps>, context: InsightSetContext): ThirdPartyWebInsightResult {
60
+ parsedTrace: RequiredData<typeof deps>, context: InsightSetContext): ThirdPartiesInsightModel {
42
61
  const networkRequests = parsedTrace.NetworkRequests.byTime.filter(event => {
43
62
  if (!context.navigation) {
44
63
  return false;
@@ -58,12 +77,12 @@ export function generateInsight(
58
77
  const firstPartyEntity = ThirdPartyWeb.ThirdPartyWeb.getEntity(firstPartyUrl) ||
59
78
  Extras.ThirdParties.makeUpEntity(madeUpEntityCache, firstPartyUrl);
60
79
 
61
- return {
80
+ return finalize({
62
81
  relatedEvents: getRelatedEvents(summaries, firstPartyEntity),
63
82
  entityByRequest,
64
83
  requestsByEntity: summaries.requestsByEntity,
65
84
  summaryByRequest: summaries.byRequest,
66
85
  summaryByEntity: summaries.byEntity,
67
86
  firstPartyEntity,
68
- };
87
+ });
69
88
  }
@@ -36,7 +36,7 @@ describeWithEnvironment('Viewport', function() {
36
36
  event.args.is_mobile_optimized = false;
37
37
  }
38
38
 
39
- const insight = Trace.Insights.InsightRunners.Viewport.generateInsight(data, context);
39
+ const insight = Trace.Insights.Models.Viewport.generateInsight(data, context);
40
40
  assert.strictEqual(insight.mobileOptimized, false);
41
41
  });
42
42
  });
@@ -2,22 +2,40 @@
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 i18n from '../../../core/i18n/i18n.js';
5
6
  import * as Helpers from '../helpers/helpers.js';
6
7
  import type * as Types from '../types/types.js';
7
8
 
8
- import {type InsightResult, type InsightSetContext, InsightWarning, type RequiredData} from './types.js';
9
+ import {type InsightModel, type InsightSetContext, InsightWarning, type RequiredData} from './types.js';
10
+
11
+ const UIStrings = {
12
+ /** Title of an insight that provides details about if the page's viewport is optimized for mobile viewing. */
13
+ title: 'Viewport not optimized for mobile',
14
+ /**
15
+ * @description Text to tell the user how a viewport meta element can improve performance. \xa0 is a non-breaking space
16
+ */
17
+ description:
18
+ 'The page\'s viewport is not mobile-optimized, so tap interactions may be [delayed by up to 300\xA0ms](https://developer.chrome.com/blog/300ms-tap-delay-gone-away/).',
19
+ };
20
+
21
+ const str_ = i18n.i18n.registerUIStrings('models/trace/insights/Viewport.ts', UIStrings);
22
+ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
9
23
 
10
24
  export function deps(): ['Meta', 'UserInteractions'] {
11
25
  return ['Meta', 'UserInteractions'];
12
26
  }
13
27
 
14
- export type ViewportInsightResult = InsightResult<{
28
+ export type ViewportInsightModel = InsightModel<{
15
29
  mobileOptimized: boolean | null,
16
30
  viewportEvent?: Types.Events.ParseMetaViewport,
17
31
  }>;
18
32
 
33
+ function finalize(partialModel: Omit<ViewportInsightModel, 'title'|'description'>): ViewportInsightModel {
34
+ return {title: i18nString(UIStrings.title), description: i18nString(UIStrings.description), ...partialModel};
35
+ }
36
+
19
37
  export function generateInsight(
20
- parsedTrace: RequiredData<typeof deps>, context: InsightSetContext): ViewportInsightResult {
38
+ parsedTrace: RequiredData<typeof deps>, context: InsightSetContext): ViewportInsightModel {
21
39
  const compositorEvents = parsedTrace.UserInteractions.beginCommitCompositorFrameEvents.filter(event => {
22
40
  if (event.args.frame !== context.frameId) {
23
41
  return false;
@@ -28,10 +46,10 @@ export function generateInsight(
28
46
 
29
47
  if (!compositorEvents.length) {
30
48
  // Trace doesn't have the data we need.
31
- return {
49
+ return finalize({
32
50
  mobileOptimized: null,
33
51
  warnings: [InsightWarning.NO_LAYOUT],
34
- };
52
+ });
35
53
  }
36
54
 
37
55
  const viewportEvent = parsedTrace.UserInteractions.parseMetaViewportEvents.find(event => {
@@ -45,16 +63,16 @@ export function generateInsight(
45
63
  // Returns true only if all events are mobile optimized.
46
64
  for (const event of compositorEvents) {
47
65
  if (!event.args.is_mobile_optimized) {
48
- return {
66
+ return finalize({
49
67
  mobileOptimized: false,
50
68
  viewportEvent,
51
69
  metricSavings: {INP: 300 as Types.Timing.MilliSeconds},
52
- };
70
+ });
53
71
  }
54
72
  }
55
73
 
56
- return {
74
+ return finalize({
57
75
  mobileOptimized: true,
58
76
  viewportEvent,
59
- };
77
+ });
60
78
  }
@@ -3,5 +3,5 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  export * as Common from './Common.js';
6
- export * as InsightRunners from './InsightRunners.js';
6
+ export * as Models from './Models.js';
7
7
  export * as Types from './types.js';
@@ -6,7 +6,7 @@ import type * as Handlers from '../handlers/handlers.js';
6
6
  import type * as Lantern from '../lantern/lantern.js';
7
7
  import type * as Types from '../types/types.js';
8
8
 
9
- import type * as InsightsRunners from './InsightRunners.js';
9
+ import type * as Models from './Models.js';
10
10
 
11
11
  /**
12
12
  * Context for the portion of the trace an insight should look at.
@@ -33,7 +33,7 @@ export interface LanternContext {
33
33
  metrics: Record<string, Lantern.Metrics.MetricResult>;
34
34
  }
35
35
 
36
- export type InsightRunnersType = typeof InsightsRunners;
36
+ export type InsightModelsType = typeof Models;
37
37
 
38
38
  export enum InsightWarning {
39
39
  NO_FP = 'NO_FP',
@@ -53,7 +53,9 @@ export interface MetricSavings {
53
53
  /* eslint-enable @typescript-eslint/naming-convention */
54
54
  }
55
55
 
56
- export type InsightResult<R extends Record<string, unknown>> = R&{
56
+ export type InsightModel<R extends Record<string, unknown>> = R&{
57
+ title: string,
58
+ description: string,
57
59
  relatedEvents?: Types.Events.Event[],
58
60
  warnings?: InsightWarning[],
59
61
  metricSavings?: MetricSavings,
@@ -64,22 +66,22 @@ export type InsightResult<R extends Record<string, unknown>> = R&{
64
66
  * this could instead represent the duration from the beginning of the trace up to the first recorded
65
67
  * navigation (or the end of the trace).
66
68
  */
67
- export type InsightSets = {
69
+ export type InsightSet = {
68
70
  /** If for a navigation, this is the navigationId. Else it is Trace.Types.Events.NO_NAVIGATION. */
69
71
  id: Types.Events.NavigationId,
70
72
  /** The URL to show in the accordion list. */
71
73
  url: URL,
72
74
  frameId: string,
73
75
  bounds: Types.Timing.TraceWindowMicroSeconds,
74
- data: InsightResults,
76
+ model: InsightModels,
75
77
  navigation?: Types.Events.NavigationStart,
76
78
  };
77
79
 
78
80
  /**
79
- * Contains insights for a specific navigation.
81
+ * Contains insights for a specific insight set.
80
82
  */
81
- export type InsightResults = {
82
- [I in keyof InsightRunnersType]: ReturnType<InsightRunnersType[I]['generateInsight']>;
83
+ export type InsightModels = {
84
+ [I in keyof InsightModelsType]: ReturnType<InsightModelsType[I]['generateInsight']>;
83
85
  };
84
86
 
85
87
  /**
@@ -88,7 +90,7 @@ export type InsightResults = {
88
90
  * If the analyzed trace started after the navigation, and has meaningful work with that span, there is no
89
91
  * navigation to map it to. In this case `Types.Events.NO_NAVIGATION` is used for the key.
90
92
  */
91
- export type TraceInsightSets = Map<Types.Events.NavigationId, InsightSets>;
93
+ export type TraceInsightSets = Map<Types.Events.NavigationId, InsightSet>;
92
94
 
93
95
  /**
94
96
  * Represents the narrow set of dependencies defined by an insight's `deps()` function. `Meta` is always included regardless of `deps()`.
@@ -52,6 +52,8 @@ export const enum Phase {
52
52
  CLOCK_SYNC = 'c',
53
53
  }
54
54
 
55
+ export type NonEmptyString = string&{_tag: 'NonEmptyString'};
56
+
55
57
  export function isNestableAsyncPhase(phase: Phase): boolean {
56
58
  return phase === Phase.ASYNC_NESTABLE_START || phase === Phase.ASYNC_NESTABLE_END ||
57
59
  phase === Phase.ASYNC_NESTABLE_INSTANT;
@@ -266,28 +268,38 @@ export interface End extends Event {
266
268
  */
267
269
  export type SyntheticComplete = Complete;
268
270
 
269
- export interface EventTiming extends Event {
270
- ph: Phase.ASYNC_NESTABLE_START|Phase.ASYNC_NESTABLE_END;
271
+ // TODO(paulirish): Migrate to the new (Sept 2024) EventTiming trace events.
272
+ // See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/timing/window_performance.cc;l=900-901;drc=b503c262e425eae59ced4a80d59d176ed07152c7
273
+ export type EventTimingBeginOrEnd = EventTimingBegin|EventTimingEnd;
274
+
275
+ export interface EventTimingBegin extends Event {
276
+ ph: Phase.ASYNC_NESTABLE_START;
271
277
  name: Name.EVENT_TIMING;
272
278
  id: string;
273
279
  args: Args&{
274
- frame: string,
275
- data?: ArgsData&{
280
+ // https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/timing/performance_event_timing.cc;l=297;drc=4f00803ca25c0d0480ed14844d6406933c21e80e
281
+ data: ArgsData & {
276
282
  cancelable: boolean,
277
283
  duration: MilliSeconds,
278
- processingEnd: MilliSeconds,
279
- processingStart: MilliSeconds,
280
- timeStamp: MilliSeconds,
281
- interactionId?: number, type: string,
284
+ type: string,
285
+ interactionId: number,
286
+ interactionOffset: number,
287
+ nodeId: Protocol.DOM.BackendNodeId,
288
+ frame?: string, // From May 2022 onwards, this is where frame is located. https://chromium-review.googlesource.com/c/chromium/src/+/3632661
289
+ processingEnd?: MilliSeconds,
290
+ processingStart?: MilliSeconds,
291
+ timeStamp?: MilliSeconds,
292
+ enqueuedToMainThreadTime?: MilliSeconds,
293
+ commitFinishTime?: MilliSeconds,
282
294
  },
295
+ frame?: string, // Prior to May 2022, `frame` was here in args.
283
296
  };
284
297
  }
285
-
286
- export interface EventTimingBegin extends EventTiming {
287
- ph: Phase.ASYNC_NESTABLE_START;
288
- }
289
- export interface EventTimingEnd extends EventTiming {
298
+ export interface EventTimingEnd extends Event {
290
299
  ph: Phase.ASYNC_NESTABLE_END;
300
+ name: Name.EVENT_TIMING;
301
+ id: string;
302
+ args: Args;
291
303
  }
292
304
 
293
305
  export interface GPUTask extends Complete {
@@ -584,11 +596,13 @@ export interface Mark extends Event {
584
596
  ph: Phase.MARK;
585
597
  }
586
598
 
587
- export interface NavigationStart extends Mark {
599
+ // An unreliable and non-legit navigationStart. See NavigationStartWithUrl
600
+ export interface NavigationStartUnreliable extends Mark {
588
601
  name: 'navigationStart';
589
602
  args: Args&{
590
603
  data?: ArgsData & {
591
- documentLoaderURL: string,
604
+ /** An empty documentLoaderURL means this navigationStart is unreliable noise and can be ignored. */
605
+ documentLoaderURL: never,
592
606
  isLoadingMainFrame: boolean,
593
607
  // isOutermostMainFrame was introduced in crrev.com/c/3625434 and exists
594
608
  // because of Fenced Frames
@@ -613,6 +627,16 @@ export interface NavigationStart extends Mark {
613
627
  };
614
628
  }
615
629
 
630
+ // NavigationStart but definitely has a populated documentLoaderURL
631
+ export interface NavigationStart extends NavigationStartUnreliable {
632
+ args: NavigationStartUnreliable['args']&{
633
+ data: NavigationStartUnreliable['args']['data'] & {
634
+ /** This navigationStart is valid, as the documentLoaderURL isn't empty. */
635
+ documentLoaderURL: NonEmptyString,
636
+ },
637
+ };
638
+ }
639
+
616
640
  export interface FirstContentfulPaint extends Mark {
617
641
  name: Name.MARK_FCP;
618
642
  args: Args&{
@@ -974,8 +998,9 @@ export interface ResourceChangePriority extends Instant {
974
998
  };
975
999
  }
976
1000
 
1001
+ /** Only sent for navigations. https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_instrumentation.cc;l=1612-1647;drc=ec7daf93d0479b758610c75f4e146fd4d2d6ed2b */
977
1002
  export interface ResourceWillSendRequest extends Instant {
978
- name: 'ResourceWillSendRequest';
1003
+ name: Name.RESOURCE_WILL_SEND_REQUEST;
979
1004
  args: Args&{
980
1005
  data: ArgsData & {
981
1006
  requestId: string,
@@ -1007,6 +1032,7 @@ export interface ResourceReceivedData extends Instant {
1007
1032
  };
1008
1033
  }
1009
1034
 
1035
+ /** See https://mdn.github.io/shared-assets/images/diagrams/api/performance/timestamp-diagram.svg */
1010
1036
  interface ResourceReceiveResponseTimingData {
1011
1037
  connectEnd: MilliSeconds;
1012
1038
  connectStart: MilliSeconds;
@@ -1018,6 +1044,7 @@ interface ResourceReceiveResponseTimingData {
1018
1044
  pushStart: MilliSeconds;
1019
1045
  receiveHeadersEnd: MilliSeconds;
1020
1046
  receiveHeadersStart: MilliSeconds;
1047
+ /** When the network service is about to handle a request, ie. just before going to the HTTP cache or going to the network for DNS/connection setup. */
1021
1048
  requestTime: Seconds;
1022
1049
  sendEnd: MilliSeconds;
1023
1050
  sendStart: MilliSeconds;
@@ -1449,7 +1476,7 @@ export type SyntheticConsoleTimingPair = SyntheticEventPair<ConsoleTime>;
1449
1476
 
1450
1477
  export type SyntheticAnimationPair = SyntheticEventPair<Animation>;
1451
1478
 
1452
- export interface SyntheticInteractionPair extends SyntheticEventPair<EventTiming> {
1479
+ export interface SyntheticInteractionPair extends SyntheticEventPair<EventTimingBeginOrEnd> {
1453
1480
  // InteractionID and type are available within the beginEvent's data, but we
1454
1481
  // put them on the top level for ease of access.
1455
1482
  interactionId: number;
@@ -1923,9 +1950,10 @@ export function isCommitLoad(
1923
1950
  return event.name === 'CommitLoad';
1924
1951
  }
1925
1952
 
1926
- export function isNavigationStart(
1953
+ /** @deprecated You probably want `isNavigationStart` instead. */
1954
+ export function isNavigationStartUnreliable(
1927
1955
  event: Event,
1928
- ): event is NavigationStart {
1956
+ ): event is NavigationStartUnreliable {
1929
1957
  return event.name === 'navigationStart';
1930
1958
  }
1931
1959
 
@@ -1989,7 +2017,7 @@ export function isInteractiveTime(event: Event): event is InteractiveTime {
1989
2017
  return event.name === 'InteractiveTime';
1990
2018
  }
1991
2019
 
1992
- export function isEventTiming(event: Event): event is EventTiming {
2020
+ export function isEventTiming(event: Event): event is EventTimingBeginOrEnd {
1993
2021
  return event.name === Name.EVENT_TIMING;
1994
2022
  }
1995
2023
 
@@ -2080,8 +2108,9 @@ export function isPrePaint(
2080
2108
  return event.name === 'PrePaint';
2081
2109
  }
2082
2110
 
2083
- export function isNavigationStartWithURL(event: Event): event is NavigationStart {
2084
- return Boolean(isNavigationStart(event) && event.args.data && event.args.data.documentLoaderURL !== '');
2111
+ /** A VALID navigation start (as it has a populated documentLoaderURL) */
2112
+ export function isNavigationStart(event: Event): event is NavigationStart {
2113
+ return Boolean(isNavigationStartUnreliable(event) && event.args.data && event.args.data.documentLoaderURL !== '');
2085
2114
  }
2086
2115
 
2087
2116
  export function isMainFrameViewport(
@@ -1035,14 +1035,14 @@ describeWithMockConnection('SharedStorageItemsView', function() {
1035
1035
  const cellElement = getCellElementFromNodeAndColumnId(view.dataGrid, selectedNode, 'key');
1036
1036
  assert.exists(cellElement);
1037
1037
 
1038
- // Editing a key will cause `deleteEntry()`, `setEntry()`, `getMetadata()`, and `getEntries()` to be called.
1038
+ // Editing a key will cause `setEntry()`, `getMetadata()`, and `getEntries()` to be called.
1039
1039
  const editedPromise = itemsListener.waitForItemsEditedTotal(1);
1040
1040
  cellElement.textContent = 'key4';
1041
1041
  dispatchKeyDownEvent(cellElement, {key: 'Enter'});
1042
1042
  await raf();
1043
1043
  await editedPromise;
1044
1044
 
1045
- assert.isTrue(deleteEntrySpy.calledOnceWithExactly({ownerOrigin: TEST_ORIGIN, key: ''}));
1045
+ assert.isTrue(deleteEntrySpy.notCalled);
1046
1046
  assert.isTrue(
1047
1047
  setEntrySpy.calledOnceWithExactly({ownerOrigin: TEST_ORIGIN, key: 'key4', value: '', ignoreIfPresent: false}));
1048
1048
  assert.isTrue(getMetadataSpy.calledThrice);
@@ -1052,7 +1052,7 @@ describeWithMockConnection('SharedStorageItemsView', function() {
1052
1052
 
1053
1053
  assert.deepEqual(view.getEntriesForTesting(), ENTRIES_NEW_KEY);
1054
1054
  assert.deepEqual(itemsListener.editedEvents, [
1055
- {columnIdentifier: 'key', oldText: '', newText: 'key4'} as View.SharedStorageItemsDispatcher.ItemEditedEvent,
1055
+ {columnIdentifier: 'key', oldText: null, newText: 'key4'},
1056
1056
  ]);
1057
1057
 
1058
1058
  // Verify that the preview loads.
@@ -87,7 +87,7 @@ export namespace SharedStorageItemsDispatcher {
87
87
 
88
88
  export interface ItemEditedEvent {
89
89
  columnIdentifier: string;
90
- oldText: string;
90
+ oldText: string|null;
91
91
  newText: string;
92
92
  }
93
93
 
@@ -241,7 +241,7 @@ export class SharedStorageItemsView extends StorageItemsView {
241
241
 
242
242
  async #editingCallback(
243
243
  editingNode: DataGrid.DataGrid.DataGridNode<Protocol.Storage.SharedStorageEntry>, columnIdentifier: string,
244
- oldText: string, newText: string): Promise<void> {
244
+ oldText: string|null, newText: string): Promise<void> {
245
245
  if (columnIdentifier === 'key' && newText === '') {
246
246
  // The Shared Storage backend does not currently allow '' as a key, so we only set a new entry with a new key if its new key is nonempty.
247
247
  await this.refreshItems();
@@ -249,7 +249,9 @@ export class SharedStorageItemsView extends StorageItemsView {
249
249
  return;
250
250
  }
251
251
  if (columnIdentifier === 'key') {
252
- await this.#sharedStorage.deleteEntry(oldText);
252
+ if (oldText !== null) {
253
+ await this.#sharedStorage.deleteEntry(oldText);
254
+ }
253
255
  await this.#sharedStorage.setEntry(newText, editingNode.data.value || '', false);
254
256
  } else {
255
257
  // The Shared Storage backend does not currently allow '' as a key, so we use ' ' as the default key instead.
@@ -507,8 +507,8 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
507
507
  return;
508
508
  }
509
509
  const quotaOverridden = response.overrideActive;
510
- const quotaAsString = Platform.NumberUtilities.bytesToString(response.quota);
511
- const usageAsString = Platform.NumberUtilities.bytesToString(response.usage);
510
+ const quotaAsString = i18n.ByteUtilities.bytesToString(response.quota);
511
+ const usageAsString = i18n.ByteUtilities.bytesToString(response.usage);
512
512
  const formattedQuotaAsString = i18nString(UIStrings.storageWithCustomMarker, {PH1: quotaAsString});
513
513
  const quota =
514
514
  quotaOverridden ? UI.Fragment.Fragment.build`<b>${formattedQuotaAsString}</b>`.element() : quotaAsString;
@@ -550,7 +550,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
550
550
  this.pieChart.data = {
551
551
  chartName: i18nString(UIStrings.storageUsage),
552
552
  size: 110,
553
- formatter: Platform.NumberUtilities.bytesToString,
553
+ formatter: i18n.ByteUtilities.bytesToString,
554
554
  showLegend: true,
555
555
  total,
556
556
  slices,
@@ -5,7 +5,6 @@
5
5
  import '../../../ui/components/report_view/report_view.js';
6
6
 
7
7
  import * as i18n from '../../../core/i18n/i18n.js';
8
- import * as Platform from '../../../core/platform/platform.js';
9
8
  import * as SDK from '../../../core/sdk/sdk.js';
10
9
  import type * as Protocol from '../../../generated/protocol.js';
11
10
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
@@ -216,7 +215,7 @@ export class StorageMetadataView extends LegacyWrapper.LegacyWrapper.WrappableCo
216
215
  ${this.key(i18nString(UIStrings.durability))}
217
216
  ${this.value(durability)}
218
217
  ${this.key(i18nString(UIStrings.quota))}
219
- ${this.value(Platform.NumberUtilities.bytesToString(quota))}
218
+ ${this.value(i18n.ByteUtilities.bytesToString(quota))}
220
219
  ${this.key(i18nString(UIStrings.expiration))}
221
220
  ${this.value(this.#getExpirationString())}`;
222
221
  }
@@ -137,19 +137,20 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
137
137
  UI.ARIAUtils.setLabel(inputElement, i18nString(UIStrings.urlBreakpoint));
138
138
  this.addListElement(inputElementContainer, this.#list.element.firstChild as Element | null);
139
139
 
140
- function finishEditing(this: XHRBreakpointsSidebarPane, accept: boolean, e: Element, text: string): void {
140
+ const commit = (_element: Element, newText: string): void => {
141
141
  this.removeListElement(inputElementContainer);
142
- if (accept) {
143
- SDK.DOMDebuggerModel.DOMDebuggerManager.instance().addXHRBreakpoint(text, true);
144
- this.setBreakpoint(text);
145
- }
142
+ SDK.DOMDebuggerModel.DOMDebuggerManager.instance().addXHRBreakpoint(newText, true);
143
+ this.setBreakpoint(newText);
146
144
  this.update();
147
- }
145
+ };
146
+
147
+ const cancel = (): void => {
148
+ this.removeListElement(inputElementContainer);
149
+ this.update();
150
+ };
148
151
 
149
- const config = new UI.InplaceEditor.Config(finishEditing.bind(this, true), finishEditing.bind(this, false));
150
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
151
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
152
- UI.InplaceEditor.InplaceEditor.startEditing(inputElement, config as UI.InplaceEditor.Config<any>);
152
+ const config = new UI.InplaceEditor.Config(commit, cancel, undefined);
153
+ UI.InplaceEditor.InplaceEditor.startEditing(inputElement, config);
153
154
  }
154
155
 
155
156
  heightForItem(_item: string): number {
@@ -336,33 +337,35 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
336
337
  element.classList.add('hidden');
337
338
  }
338
339
 
339
- function finishEditing(this: XHRBreakpointsSidebarPane, accept: boolean, e: Element, text: string): void {
340
+ const commit = (inputElement: Element, newText: string, _oldText: string|null, element?: Element): void => {
340
341
  this.removeListElement(inputElement);
341
- if (accept) {
342
- SDK.DOMDebuggerModel.DOMDebuggerManager.instance().removeXHRBreakpoint(breakKeyword);
343
- this.removeBreakpoint(breakKeyword);
344
- let enabled = true;
345
- if (element) {
346
- const breakpointEntryElement = containerToBreakpointEntry.get(element);
347
- const checkboxElement =
348
- breakpointEntryElement ? breakpointEntryToCheckbox.get(breakpointEntryElement) : undefined;
349
- if (checkboxElement) {
350
- enabled = checkboxElement.checked;
351
- }
342
+ SDK.DOMDebuggerModel.DOMDebuggerManager.instance().removeXHRBreakpoint(breakKeyword);
343
+ this.removeBreakpoint(breakKeyword);
344
+ let enabled = true;
345
+ if (element) {
346
+ const breakpointEntryElement = containerToBreakpointEntry.get(element);
347
+ const checkboxElement =
348
+ breakpointEntryElement ? breakpointEntryToCheckbox.get(breakpointEntryElement) : undefined;
349
+ if (checkboxElement) {
350
+ enabled = checkboxElement.checked;
352
351
  }
353
- SDK.DOMDebuggerModel.DOMDebuggerManager.instance().addXHRBreakpoint(text, enabled);
354
- this.setBreakpoint(text);
355
- this.#list.selectItem(text);
356
- } else if (element) {
352
+ }
353
+ SDK.DOMDebuggerModel.DOMDebuggerManager.instance().addXHRBreakpoint(newText, enabled);
354
+ this.setBreakpoint(newText);
355
+ this.#list.selectItem(newText);
356
+ this.focus();
357
+ };
358
+
359
+ const cancel = (inputElement: Element, element?: Element): void => {
360
+ this.removeListElement(inputElement);
361
+ if (element) {
357
362
  element.classList.remove('hidden');
358
363
  }
359
364
  this.focus();
360
- }
365
+ };
361
366
 
362
- const config = new UI.InplaceEditor.Config(finishEditing.bind(this, true), finishEditing.bind(this, false));
363
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
364
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
365
- UI.InplaceEditor.InplaceEditor.startEditing(inputElement, config as UI.InplaceEditor.Config<any>);
367
+ const config = new UI.InplaceEditor.Config(commit, cancel, element);
368
+ UI.InplaceEditor.InplaceEditor.startEditing(inputElement, config);
366
369
  }
367
370
 
368
371
  flavorChanged(_object: Object|null): void {
@@ -542,10 +542,10 @@ export class CoverageView extends UI.Widget.VBox {
542
542
  const used = total - unused;
543
543
  const percentUsed = total ? Math.round(100 * used / total) : 0;
544
544
  return i18nString(UIStrings.sOfSSUsedSoFarSUnused, {
545
- PH1: Platform.NumberUtilities.bytesToString(used),
546
- PH2: Platform.NumberUtilities.bytesToString(total),
545
+ PH1: i18n.ByteUtilities.bytesToString(used),
546
+ PH2: i18n.ByteUtilities.bytesToString(total),
547
547
  PH3: percentUsed,
548
- PH4: Platform.NumberUtilities.bytesToString(unused),
548
+ PH4: i18n.ByteUtilities.bytesToString(unused),
549
549
  });
550
550
  }
551
551
  }
@@ -51,6 +51,7 @@ export class ComputedStyleModel extends Common.ObjectWrapper.ObjectWrapper<Event
51
51
  cssModel.addEventListener(SDK.CSSModel.Events.MediaQueryResultChanged, this.onComputedStyleChanged, this),
52
52
  cssModel.addEventListener(SDK.CSSModel.Events.PseudoStateForced, this.onComputedStyleChanged, this),
53
53
  cssModel.addEventListener(SDK.CSSModel.Events.ModelWasEnabled, this.onComputedStyleChanged, this),
54
+ cssModel.addEventListener(SDK.CSSModel.Events.ComputedStyleUpdated, this.onComputedStyleChanged, this),
54
55
  domModel.addEventListener(SDK.DOMModel.Events.DOMMutated, this.onDOMModelChanged, this),
55
56
  resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameResized, this.onFrameResized, this),
56
57
  ];
@@ -59,6 +60,12 @@ export class ComputedStyleModel extends Common.ObjectWrapper.ObjectWrapper<Event
59
60
 
60
61
  private onComputedStyleChanged(event: Common.EventTarget.EventTargetEvent<ComputedStyleChangedEvent>|null): void {
61
62
  delete this.computedStylePromise;
63
+ // If the event contains `nodeId` and that's not the same as this node's id
64
+ // we don't emit the COMPUTED_STYLE_CHANGED event.
65
+ if (event?.data && 'nodeId' in event.data && event.data.nodeId !== this.nodeInternal?.id) {
66
+ return;
67
+ }
68
+
62
69
  this.dispatchEventToListeners(Events.COMPUTED_STYLE_CHANGED, event?.data ?? null);
63
70
  }
64
71
 
@@ -125,8 +132,8 @@ export const enum Events {
125
132
  }
126
133
 
127
134
  export type ComputedStyleChangedEvent = SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|
128
- SDK.CSSModel.StyleSheetChangedEvent|void|SDK.CSSModel.PseudoStateForcedEvent|
129
- null;
135
+ SDK.CSSModel.StyleSheetChangedEvent|SDK.CSSModel.PseudoStateForcedEvent|
136
+ SDK.CSSModel.ComputedStyleUpdatedEvent|null|void;
130
137
 
131
138
  export type EventTypes = {
132
139
  [Events.COMPUTED_STYLE_CHANGED]: ComputedStyleChangedEvent,