devtools-tracing 1.1.1 → 1.2.1

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 (527) hide show
  1. package/dist/index.d.ts +4 -0
  2. package/dist/index.js +28854 -0
  3. package/package.json +11 -8
  4. package/generate.ts +0 -649
  5. package/index.ts +0 -17
  6. package/lib/extension-api/ExtensionAPI.d.ts +0 -357
  7. package/lib/front_end/core/common/App.ts +0 -7
  8. package/lib/front_end/core/common/AppProvider.ts +0 -32
  9. package/lib/front_end/core/common/Base64.ts +0 -47
  10. package/lib/front_end/core/common/CharacterIdMap.ts +0 -30
  11. package/lib/front_end/core/common/Color.ts +0 -2506
  12. package/lib/front_end/core/common/ColorConverter.ts +0 -402
  13. package/lib/front_end/core/common/ColorUtils.ts +0 -252
  14. package/lib/front_end/core/common/Console.ts +0 -114
  15. package/lib/front_end/core/common/Debouncer.ts +0 -15
  16. package/lib/front_end/core/common/EventTarget.ts +0 -52
  17. package/lib/front_end/core/common/Gzip.ts +0 -74
  18. package/lib/front_end/core/common/JavaScriptMetaData.ts +0 -29
  19. package/lib/front_end/core/common/Lazy.ts +0 -31
  20. package/lib/front_end/core/common/Linkifier.ts +0 -55
  21. package/lib/front_end/core/common/MapWithDefault.ts +0 -26
  22. package/lib/front_end/core/common/Mutex.ts +0 -55
  23. package/lib/front_end/core/common/Object.ts +0 -145
  24. package/lib/front_end/core/common/ParsedURL.ts +0 -554
  25. package/lib/front_end/core/common/Progress.ts +0 -180
  26. package/lib/front_end/core/common/QueryParamHandler.ts +0 -7
  27. package/lib/front_end/core/common/ResolverBase.ts +0 -85
  28. package/lib/front_end/core/common/ResourceType.ts +0 -588
  29. package/lib/front_end/core/common/ReturnToPanel.ts +0 -17
  30. package/lib/front_end/core/common/Revealer.ts +0 -192
  31. package/lib/front_end/core/common/Runnable.ts +0 -41
  32. package/lib/front_end/core/common/SegmentedRange.ts +0 -87
  33. package/lib/front_end/core/common/SettingRegistration.ts +0 -339
  34. package/lib/front_end/core/common/Settings.ts +0 -1497
  35. package/lib/front_end/core/common/SimpleHistoryManager.ts +0 -124
  36. package/lib/front_end/core/common/StringOutputStream.ts +0 -26
  37. package/lib/front_end/core/common/TextDictionary.ts +0 -48
  38. package/lib/front_end/core/common/Throttler.ts +0 -99
  39. package/lib/front_end/core/common/Trie.ts +0 -152
  40. package/lib/front_end/core/common/Worker.ts +0 -60
  41. package/lib/front_end/core/common/common.ts +0 -81
  42. package/lib/front_end/core/host/AidaClient.ts +0 -733
  43. package/lib/front_end/core/host/GdpClient.ts +0 -316
  44. package/lib/front_end/core/host/InspectorFrontendHost.ts +0 -648
  45. package/lib/front_end/core/host/InspectorFrontendHostAPI.ts +0 -551
  46. package/lib/front_end/core/host/Platform.ts +0 -76
  47. package/lib/front_end/core/host/ResourceLoader.ts +0 -282
  48. package/lib/front_end/core/host/UserMetrics.ts +0 -1230
  49. package/lib/front_end/core/host/host.ts +0 -23
  50. package/lib/front_end/core/i18n/ByteUtilities.ts +0 -82
  51. package/lib/front_end/core/i18n/DevToolsLocale.ts +0 -87
  52. package/lib/front_end/core/i18n/NumberFormatter.ts +0 -82
  53. package/lib/front_end/core/i18n/i18n.ts +0 -17
  54. package/lib/front_end/core/i18n/i18nImpl.ts +0 -204
  55. package/lib/front_end/core/i18n/i18nTypes.ts +0 -10
  56. package/lib/front_end/core/i18n/locales.js +0 -14
  57. package/lib/front_end/core/i18n/time-utilities.ts +0 -174
  58. package/lib/front_end/core/platform/ArrayUtilities.ts +0 -271
  59. package/lib/front_end/core/platform/Brand.ts +0 -23
  60. package/lib/front_end/core/platform/Constructor.ts +0 -10
  61. package/lib/front_end/core/platform/DOMUtilities.ts +0 -138
  62. package/lib/front_end/core/platform/DateUtilities.ts +0 -15
  63. package/lib/front_end/core/platform/DevToolsPath.ts +0 -53
  64. package/lib/front_end/core/platform/KeyboardUtilities.ts +0 -38
  65. package/lib/front_end/core/platform/MapUtilities.ts +0 -95
  66. package/lib/front_end/core/platform/MimeType.ts +0 -175
  67. package/lib/front_end/core/platform/NumberUtilities.ts +0 -80
  68. package/lib/front_end/core/platform/StringUtilities.ts +0 -588
  69. package/lib/front_end/core/platform/Timing.ts +0 -17
  70. package/lib/front_end/core/platform/TypedArrayUtilities.ts +0 -189
  71. package/lib/front_end/core/platform/TypescriptUtilities.ts +0 -86
  72. package/lib/front_end/core/platform/UIString.ts +0 -39
  73. package/lib/front_end/core/platform/UserVisibleError.ts +0 -28
  74. package/lib/front_end/core/platform/platform.ts +0 -45
  75. package/lib/front_end/core/protocol_client/ConnectionTransport.ts +0 -26
  76. package/lib/front_end/core/protocol_client/InspectorBackend.ts +0 -1050
  77. package/lib/front_end/core/protocol_client/NodeURL.ts +0 -42
  78. package/lib/front_end/core/protocol_client/protocol_client.ts +0 -13
  79. package/lib/front_end/core/root/Runtime.ts +0 -609
  80. package/lib/front_end/core/root/root.ts +0 -6
  81. package/lib/front_end/core/sdk/AccessibilityModel.ts +0 -353
  82. package/lib/front_end/core/sdk/AnimationModel.ts +0 -1041
  83. package/lib/front_end/core/sdk/AutofillModel.ts +0 -184
  84. package/lib/front_end/core/sdk/CPUProfilerModel.ts +0 -148
  85. package/lib/front_end/core/sdk/CPUThrottlingManager.ts +0 -282
  86. package/lib/front_end/core/sdk/CSSContainerQuery.ts +0 -139
  87. package/lib/front_end/core/sdk/CSSFontFace.ts +0 -40
  88. package/lib/front_end/core/sdk/CSSLayer.ts +0 -30
  89. package/lib/front_end/core/sdk/CSSMatchedStyles.ts +0 -1646
  90. package/lib/front_end/core/sdk/CSSMedia.ts +0 -121
  91. package/lib/front_end/core/sdk/CSSMetadata.ts +0 -1647
  92. package/lib/front_end/core/sdk/CSSModel.ts +0 -1128
  93. package/lib/front_end/core/sdk/CSSProperty.ts +0 -384
  94. package/lib/front_end/core/sdk/CSSPropertyParser.ts +0 -681
  95. package/lib/front_end/core/sdk/CSSPropertyParserMatchers.ts +0 -1395
  96. package/lib/front_end/core/sdk/CSSQuery.ts +0 -72
  97. package/lib/front_end/core/sdk/CSSRule.ts +0 -465
  98. package/lib/front_end/core/sdk/CSSScope.ts +0 -30
  99. package/lib/front_end/core/sdk/CSSStartingStyle.ts +0 -29
  100. package/lib/front_end/core/sdk/CSSStyleDeclaration.ts +0 -313
  101. package/lib/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -196
  102. package/lib/front_end/core/sdk/CSSSupports.ts +0 -33
  103. package/lib/front_end/core/sdk/CategorizedBreakpoint.ts +0 -64
  104. package/lib/front_end/core/sdk/ChildTargetManager.ts +0 -314
  105. package/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -62
  106. package/lib/front_end/core/sdk/Connections.ts +0 -293
  107. package/lib/front_end/core/sdk/ConsoleModel.ts +0 -808
  108. package/lib/front_end/core/sdk/ConsoleModelTypes.ts +0 -15
  109. package/lib/front_end/core/sdk/Cookie.ts +0 -319
  110. package/lib/front_end/core/sdk/CookieModel.ts +0 -239
  111. package/lib/front_end/core/sdk/CookieParser.ts +0 -185
  112. package/lib/front_end/core/sdk/DOMDebuggerModel.ts +0 -787
  113. package/lib/front_end/core/sdk/DOMModel.ts +0 -1961
  114. package/lib/front_end/core/sdk/DebuggerModel.ts +0 -1605
  115. package/lib/front_end/core/sdk/EmulationModel.ts +0 -648
  116. package/lib/front_end/core/sdk/EnhancedTracesParser.ts +0 -515
  117. package/lib/front_end/core/sdk/EventBreakpointsModel.ts +0 -183
  118. package/lib/front_end/core/sdk/FrameAssociated.ts +0 -11
  119. package/lib/front_end/core/sdk/FrameManager.ts +0 -259
  120. package/lib/front_end/core/sdk/HeapProfilerModel.ts +0 -225
  121. package/lib/front_end/core/sdk/HttpReasonPhraseStrings.ts +0 -77
  122. package/lib/front_end/core/sdk/IOModel.ts +0 -91
  123. package/lib/front_end/core/sdk/IsolateManager.ts +0 -257
  124. package/lib/front_end/core/sdk/IssuesModel.ts +0 -70
  125. package/lib/front_end/core/sdk/LayerTreeBase.ts +0 -169
  126. package/lib/front_end/core/sdk/LogModel.ts +0 -56
  127. package/lib/front_end/core/sdk/NetworkManager.ts +0 -2823
  128. package/lib/front_end/core/sdk/NetworkRequest.ts +0 -2253
  129. package/lib/front_end/core/sdk/OverlayColorGenerator.ts +0 -52
  130. package/lib/front_end/core/sdk/OverlayModel.ts +0 -1011
  131. package/lib/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -522
  132. package/lib/front_end/core/sdk/PageLoad.ts +0 -35
  133. package/lib/front_end/core/sdk/PageResourceLoader.ts +0 -435
  134. package/lib/front_end/core/sdk/PaintProfiler.ts +0 -110
  135. package/lib/front_end/core/sdk/PerformanceMetricsModel.ts +0 -84
  136. package/lib/front_end/core/sdk/PreloadingModel.ts +0 -863
  137. package/lib/front_end/core/sdk/RehydratingConnection.ts +0 -386
  138. package/lib/front_end/core/sdk/RehydratingObject.ts +0 -66
  139. package/lib/front_end/core/sdk/RemoteObject.ts +0 -1160
  140. package/lib/front_end/core/sdk/Resource.ts +0 -232
  141. package/lib/front_end/core/sdk/ResourceTreeModel.ts +0 -1160
  142. package/lib/front_end/core/sdk/RuntimeModel.ts +0 -732
  143. package/lib/front_end/core/sdk/SDKModel.ts +0 -65
  144. package/lib/front_end/core/sdk/ScopeTreeCache.ts +0 -45
  145. package/lib/front_end/core/sdk/ScreenCaptureModel.ts +0 -255
  146. package/lib/front_end/core/sdk/Script.ts +0 -534
  147. package/lib/front_end/core/sdk/SecurityOriginManager.ts +0 -76
  148. package/lib/front_end/core/sdk/ServerSentEvents.ts +0 -80
  149. package/lib/front_end/core/sdk/ServerSentEventsProtocol.ts +0 -122
  150. package/lib/front_end/core/sdk/ServerTiming.ts +0 -260
  151. package/lib/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -377
  152. package/lib/front_end/core/sdk/ServiceWorkerManager.ts +0 -605
  153. package/lib/front_end/core/sdk/SourceMap.ts +0 -867
  154. package/lib/front_end/core/sdk/SourceMapCache.ts +0 -54
  155. package/lib/front_end/core/sdk/SourceMapFunctionRanges.ts +0 -156
  156. package/lib/front_end/core/sdk/SourceMapManager.ts +0 -239
  157. package/lib/front_end/core/sdk/SourceMapScopeChainEntry.ts +0 -189
  158. package/lib/front_end/core/sdk/SourceMapScopesInfo.ts +0 -508
  159. package/lib/front_end/core/sdk/StorageBucketsModel.ts +0 -204
  160. package/lib/front_end/core/sdk/StorageKeyManager.ts +0 -98
  161. package/lib/front_end/core/sdk/Target.ts +0 -332
  162. package/lib/front_end/core/sdk/TargetManager.ts +0 -453
  163. package/lib/front_end/core/sdk/TraceObject.ts +0 -61
  164. package/lib/front_end/core/sdk/WebAuthnModel.ts +0 -104
  165. package/lib/front_end/core/sdk/sdk.ts +0 -174
  166. package/lib/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -59
  167. package/lib/front_end/generated/InspectorBackendCommands.js +0 -1617
  168. package/lib/front_end/generated/SupportedCSSProperties.js +0 -7512
  169. package/lib/front_end/generated/protocol-proxy-api.d.ts +0 -5022
  170. package/lib/front_end/generated/protocol.ts +0 -22014
  171. package/lib/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -318
  172. package/lib/front_end/models/bindings/CompilerScriptMapping.ts +0 -536
  173. package/lib/front_end/models/bindings/ContentProviderBasedProject.ts +0 -187
  174. package/lib/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1197
  175. package/lib/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -733
  176. package/lib/front_end/models/bindings/DefaultScriptMapping.ts +0 -141
  177. package/lib/front_end/models/bindings/FileUtils.ts +0 -228
  178. package/lib/front_end/models/bindings/LiveLocation.ts +0 -81
  179. package/lib/front_end/models/bindings/NetworkProject.ts +0 -157
  180. package/lib/front_end/models/bindings/PresentationConsoleMessageHelper.ts +0 -312
  181. package/lib/front_end/models/bindings/ResourceMapping.ts +0 -539
  182. package/lib/front_end/models/bindings/ResourceScriptMapping.ts +0 -491
  183. package/lib/front_end/models/bindings/ResourceUtils.ts +0 -103
  184. package/lib/front_end/models/bindings/SASSSourceMapping.ts +0 -222
  185. package/lib/front_end/models/bindings/StylesSourceMapping.ts +0 -316
  186. package/lib/front_end/models/bindings/TempFile.ts +0 -67
  187. package/lib/front_end/models/bindings/bindings.ts +0 -39
  188. package/lib/front_end/models/cpu_profile/CPUProfileDataModel.ts +0 -571
  189. package/lib/front_end/models/cpu_profile/ProfileTreeModel.ts +0 -103
  190. package/lib/front_end/models/cpu_profile/cpu_profile.ts +0 -11
  191. package/lib/front_end/models/formatter/FormatterWorkerPool.ts +0 -219
  192. package/lib/front_end/models/formatter/ScriptFormatter.ts +0 -112
  193. package/lib/front_end/models/formatter/formatter.ts +0 -8
  194. package/lib/front_end/models/source_map_scopes/NamesResolver.ts +0 -765
  195. package/lib/front_end/models/source_map_scopes/ScopeChainModel.ts +0 -84
  196. package/lib/front_end/models/source_map_scopes/source_map_scopes.ts +0 -11
  197. package/lib/front_end/models/stack_trace/StackTrace.ts +0 -53
  198. package/lib/front_end/models/stack_trace/StackTraceImpl.ts +0 -85
  199. package/lib/front_end/models/stack_trace/StackTraceModel.ts +0 -128
  200. package/lib/front_end/models/stack_trace/Trie.ts +0 -163
  201. package/lib/front_end/models/stack_trace/stack_trace.ts +0 -9
  202. package/lib/front_end/models/stack_trace/stack_trace_impl.ts +0 -13
  203. package/lib/front_end/models/text_utils/CodeMirrorUtils.ts +0 -37
  204. package/lib/front_end/models/text_utils/ContentData.ts +0 -199
  205. package/lib/front_end/models/text_utils/ContentProvider.ts +0 -68
  206. package/lib/front_end/models/text_utils/StaticContentProvider.ts +0 -49
  207. package/lib/front_end/models/text_utils/StreamingContentData.ts +0 -108
  208. package/lib/front_end/models/text_utils/Text.ts +0 -90
  209. package/lib/front_end/models/text_utils/TextCursor.ts +0 -44
  210. package/lib/front_end/models/text_utils/TextRange.ts +0 -266
  211. package/lib/front_end/models/text_utils/TextUtils.ts +0 -401
  212. package/lib/front_end/models/text_utils/WasmDisassembly.ts +0 -87
  213. package/lib/front_end/models/text_utils/text_utils.ts +0 -27
  214. package/lib/front_end/models/trace/EntityMapper.ts +0 -141
  215. package/lib/front_end/models/trace/EventsSerializer.ts +0 -101
  216. package/lib/front_end/models/trace/LanternComputationData.ts +0 -438
  217. package/lib/front_end/models/trace/ModelImpl.ts +0 -236
  218. package/lib/front_end/models/trace/Name.ts +0 -136
  219. package/lib/front_end/models/trace/Processor.ts +0 -652
  220. package/lib/front_end/models/trace/Styles.ts +0 -1138
  221. package/lib/front_end/models/trace/extras/FilmStrip.ts +0 -78
  222. package/lib/front_end/models/trace/extras/MainThreadActivity.ts +0 -86
  223. package/lib/front_end/models/trace/extras/ScriptDuplication.ts +0 -236
  224. package/lib/front_end/models/trace/extras/StackTraceForEvent.ts +0 -203
  225. package/lib/front_end/models/trace/extras/ThirdParties.ts +0 -164
  226. package/lib/front_end/models/trace/extras/TraceFilter.ts +0 -62
  227. package/lib/front_end/models/trace/extras/TraceTree.ts +0 -701
  228. package/lib/front_end/models/trace/extras/extras.ts +0 -11
  229. package/lib/front_end/models/trace/handlers/AnimationFramesHandler.ts +0 -128
  230. package/lib/front_end/models/trace/handlers/AnimationHandler.ts +0 -36
  231. package/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +0 -239
  232. package/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
  233. package/lib/front_end/models/trace/handlers/DOMStatsHandler.ts +0 -31
  234. package/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -306
  235. package/lib/front_end/models/trace/handlers/FlowsHandler.ts +0 -175
  236. package/lib/front_end/models/trace/handlers/FramesHandler.ts +0 -571
  237. package/lib/front_end/models/trace/handlers/GPUHandler.ts +0 -50
  238. package/lib/front_end/models/trace/handlers/ImagePaintingHandler.ts +0 -183
  239. package/lib/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -193
  240. package/lib/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -168
  241. package/lib/front_end/models/trace/handlers/LargestImagePaintHandler.ts +0 -109
  242. package/lib/front_end/models/trace/handlers/LargestTextPaintHandler.ts +0 -35
  243. package/lib/front_end/models/trace/handlers/LayerTreeHandler.ts +0 -123
  244. package/lib/front_end/models/trace/handlers/LayoutShiftsHandler.ts +0 -573
  245. package/lib/front_end/models/trace/handlers/MemoryHandler.ts +0 -31
  246. package/lib/front_end/models/trace/handlers/MetaHandler.ts +0 -525
  247. package/lib/front_end/models/trace/handlers/ModelHandlers.ts +0 -34
  248. package/lib/front_end/models/trace/handlers/NetworkRequestsHandler.ts +0 -672
  249. package/lib/front_end/models/trace/handlers/PageFramesHandler.ts +0 -52
  250. package/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +0 -460
  251. package/lib/front_end/models/trace/handlers/RendererHandler.ts +0 -428
  252. package/lib/front_end/models/trace/handlers/SamplesHandler.ts +0 -271
  253. package/lib/front_end/models/trace/handlers/ScreenshotsHandler.ts +0 -122
  254. package/lib/front_end/models/trace/handlers/ScriptsHandler.ts +0 -336
  255. package/lib/front_end/models/trace/handlers/SelectorStatsHandler.ts +0 -110
  256. package/lib/front_end/models/trace/handlers/Threads.ts +0 -139
  257. package/lib/front_end/models/trace/handlers/UserInteractionsHandler.ts +0 -400
  258. package/lib/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -233
  259. package/lib/front_end/models/trace/handlers/WarningsHandler.ts +0 -162
  260. package/lib/front_end/models/trace/handlers/WorkersHandler.ts +0 -45
  261. package/lib/front_end/models/trace/handlers/handlers.ts +0 -8
  262. package/lib/front_end/models/trace/handlers/helpers.ts +0 -196
  263. package/lib/front_end/models/trace/handlers/types.ts +0 -75
  264. package/lib/front_end/models/trace/helpers/Extensions.ts +0 -54
  265. package/lib/front_end/models/trace/helpers/Network.ts +0 -129
  266. package/lib/front_end/models/trace/helpers/SamplesIntegrator.ts +0 -544
  267. package/lib/front_end/models/trace/helpers/SyntheticEvents.ts +0 -87
  268. package/lib/front_end/models/trace/helpers/Timing.ts +0 -248
  269. package/lib/front_end/models/trace/helpers/Trace.ts +0 -928
  270. package/lib/front_end/models/trace/helpers/TreeHelpers.ts +0 -320
  271. package/lib/front_end/models/trace/helpers/helpers.ts +0 -11
  272. package/lib/front_end/models/trace/insights/CLSCulprits.ts +0 -668
  273. package/lib/front_end/models/trace/insights/Cache.ts +0 -269
  274. package/lib/front_end/models/trace/insights/Common.ts +0 -453
  275. package/lib/front_end/models/trace/insights/DOMSize.ts +0 -223
  276. package/lib/front_end/models/trace/insights/DocumentLatency.ts +0 -319
  277. package/lib/front_end/models/trace/insights/DuplicatedJavaScript.ts +0 -126
  278. package/lib/front_end/models/trace/insights/FontDisplay.ts +0 -119
  279. package/lib/front_end/models/trace/insights/ForcedReflow.ts +0 -220
  280. package/lib/front_end/models/trace/insights/INPBreakdown.ts +0 -171
  281. package/lib/front_end/models/trace/insights/ImageDelivery.ts +0 -348
  282. package/lib/front_end/models/trace/insights/LCPBreakdown.ts +0 -268
  283. package/lib/front_end/models/trace/insights/LCPDiscovery.ts +0 -237
  284. package/lib/front_end/models/trace/insights/LegacyJavaScript.ts +0 -138
  285. package/lib/front_end/models/trace/insights/Models.ts +0 -22
  286. package/lib/front_end/models/trace/insights/ModernHTTP.ts +0 -257
  287. package/lib/front_end/models/trace/insights/NetworkDependencyTree.ts +0 -726
  288. package/lib/front_end/models/trace/insights/RenderBlocking.ts +0 -257
  289. package/lib/front_end/models/trace/insights/SlowCSSSelector.ts +0 -175
  290. package/lib/front_end/models/trace/insights/Statistics.ts +0 -101
  291. package/lib/front_end/models/trace/insights/ThirdParties.ts +0 -130
  292. package/lib/front_end/models/trace/insights/Viewport.ts +0 -138
  293. package/lib/front_end/models/trace/insights/insights.ts +0 -10
  294. package/lib/front_end/models/trace/insights/types.ts +0 -157
  295. package/lib/front_end/models/trace/lantern/core/LanternError.ts +0 -7
  296. package/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +0 -619
  297. package/lib/front_end/models/trace/lantern/core/core.ts +0 -6
  298. package/lib/front_end/models/trace/lantern/graph/BaseNode.ts +0 -345
  299. package/lib/front_end/models/trace/lantern/graph/CPUNode.ts +0 -80
  300. package/lib/front_end/models/trace/lantern/graph/NetworkNode.ts +0 -101
  301. package/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +0 -636
  302. package/lib/front_end/models/trace/lantern/graph/graph.ts +0 -8
  303. package/lib/front_end/models/trace/lantern/lantern.ts +0 -17
  304. package/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts +0 -187
  305. package/lib/front_end/models/trace/lantern/metrics/Interactive.ts +0 -88
  306. package/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +0 -92
  307. package/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.ts +0 -72
  308. package/lib/front_end/models/trace/lantern/metrics/Metric.ts +0 -126
  309. package/lib/front_end/models/trace/lantern/metrics/SpeedIndex.ts +0 -126
  310. package/lib/front_end/models/trace/lantern/metrics/TBTUtils.ts +0 -82
  311. package/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +0 -112
  312. package/lib/front_end/models/trace/lantern/metrics/metrics.ts +0 -12
  313. package/lib/front_end/models/trace/lantern/simulation/ConnectionPool.ts +0 -150
  314. package/lib/front_end/models/trace/lantern/simulation/Constants.ts +0 -46
  315. package/lib/front_end/models/trace/lantern/simulation/DNSCache.ts +0 -61
  316. package/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +0 -196
  317. package/lib/front_end/models/trace/lantern/simulation/Simulator.ts +0 -556
  318. package/lib/front_end/models/trace/lantern/simulation/TCPConnection.ts +0 -192
  319. package/lib/front_end/models/trace/lantern/simulation/simulation.ts +0 -10
  320. package/lib/front_end/models/trace/lantern/types/Lantern.ts +0 -220
  321. package/lib/front_end/models/trace/lantern/types/types.ts +0 -5
  322. package/lib/front_end/models/trace/trace.ts +0 -33
  323. package/lib/front_end/models/trace/types/Configuration.ts +0 -110
  324. package/lib/front_end/models/trace/types/Extensions.ts +0 -136
  325. package/lib/front_end/models/trace/types/File.ts +0 -281
  326. package/lib/front_end/models/trace/types/Overlays.ts +0 -138
  327. package/lib/front_end/models/trace/types/Timing.ts +0 -30
  328. package/lib/front_end/models/trace/types/TraceEvents.ts +0 -3277
  329. package/lib/front_end/models/trace/types/types.ts +0 -10
  330. package/lib/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +0 -240
  331. package/lib/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +0 -5
  332. package/lib/front_end/models/workspace/FileManager.ts +0 -97
  333. package/lib/front_end/models/workspace/IgnoreListManager.ts +0 -628
  334. package/lib/front_end/models/workspace/SearchConfig.ts +0 -149
  335. package/lib/front_end/models/workspace/UISourceCode.ts +0 -698
  336. package/lib/front_end/models/workspace/WorkspaceImpl.ts +0 -339
  337. package/lib/front_end/models/workspace/workspace.ts +0 -17
  338. package/lib/front_end/panels/timeline/TimelineUIUtils.ts +0 -1029
  339. package/lib/front_end/panels/timeline/extensions/ExtensionUI.ts +0 -49
  340. package/lib/front_end/panels/timeline/extensions/extensions.ts +0 -9
  341. package/lib/front_end/third_party/codemirror.next/LICENSE +0 -21
  342. package/lib/front_end/third_party/codemirror.next/README.chromium +0 -30
  343. package/lib/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
  344. package/lib/front_end/third_party/codemirror.next/bundle.ts +0 -135
  345. package/lib/front_end/third_party/codemirror.next/chunk/angular.js +0 -2
  346. package/lib/front_end/third_party/codemirror.next/chunk/angular.js.map +0 -1
  347. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js +0 -2
  348. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js.map +0 -1
  349. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js +0 -2
  350. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js.map +0 -1
  351. package/lib/front_end/third_party/codemirror.next/chunk/css.js +0 -2
  352. package/lib/front_end/third_party/codemirror.next/chunk/html.js +0 -4
  353. package/lib/front_end/third_party/codemirror.next/chunk/java.js +0 -2
  354. package/lib/front_end/third_party/codemirror.next/chunk/java.js.map +0 -1
  355. package/lib/front_end/third_party/codemirror.next/chunk/javascript.js +0 -2
  356. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js +0 -2
  357. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js.map +0 -1
  358. package/lib/front_end/third_party/codemirror.next/chunk/less.js +0 -2
  359. package/lib/front_end/third_party/codemirror.next/chunk/less.js.map +0 -1
  360. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js +0 -2
  361. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js.map +0 -1
  362. package/lib/front_end/third_party/codemirror.next/chunk/php.js +0 -2
  363. package/lib/front_end/third_party/codemirror.next/chunk/php.js.map +0 -1
  364. package/lib/front_end/third_party/codemirror.next/chunk/python.js +0 -2
  365. package/lib/front_end/third_party/codemirror.next/chunk/python.js.map +0 -1
  366. package/lib/front_end/third_party/codemirror.next/chunk/sass.js +0 -2
  367. package/lib/front_end/third_party/codemirror.next/chunk/sass.js.map +0 -1
  368. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js +0 -2
  369. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js.map +0 -1
  370. package/lib/front_end/third_party/codemirror.next/chunk/vue.js +0 -2
  371. package/lib/front_end/third_party/codemirror.next/chunk/vue.js.map +0 -1
  372. package/lib/front_end/third_party/codemirror.next/chunk/wast.js +0 -2
  373. package/lib/front_end/third_party/codemirror.next/chunk/wast.js.map +0 -1
  374. package/lib/front_end/third_party/codemirror.next/chunk/xml.js +0 -2
  375. package/lib/front_end/third_party/codemirror.next/chunk/xml.js.map +0 -1
  376. package/lib/front_end/third_party/codemirror.next/codemirror.next.d.ts +0 -8057
  377. package/lib/front_end/third_party/codemirror.next/codemirror.next.js +0 -2
  378. package/lib/front_end/third_party/codemirror.next/codemirror.next.js.map +0 -1
  379. package/lib/front_end/third_party/codemirror.next/package.json +0 -43
  380. package/lib/front_end/third_party/codemirror.next/rebuild.sh +0 -6
  381. package/lib/front_end/third_party/codemirror.next/rollup.config.mjs +0 -49
  382. package/lib/front_end/third_party/i18n/LICENSE +0 -202
  383. package/lib/front_end/third_party/i18n/README.chromium +0 -15
  384. package/lib/front_end/third_party/i18n/i18n-impl.ts +0 -61
  385. package/lib/front_end/third_party/i18n/i18n.ts +0 -11
  386. package/lib/front_end/third_party/i18n/localized-string-set.ts +0 -129
  387. package/lib/front_end/third_party/intl-messageformat/LICENSE +0 -33
  388. package/lib/front_end/third_party/intl-messageformat/README.chromium +0 -24
  389. package/lib/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
  390. package/lib/front_end/third_party/intl-messageformat/intl-messageformat.ts +0 -6
  391. package/lib/front_end/third_party/intl-messageformat/package/LICENSE.md +0 -33
  392. package/lib/front_end/third_party/intl-messageformat/package/README.md +0 -3
  393. package/lib/front_end/third_party/intl-messageformat/package/index.d.ts +0 -6
  394. package/lib/front_end/third_party/intl-messageformat/package/index.d.ts.map +0 -1
  395. package/lib/front_end/third_party/intl-messageformat/package/index.js +0 -13
  396. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.d.ts +0 -5
  397. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js +0 -1710
  398. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.iife.js +0 -1815
  399. package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts +0 -6
  400. package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts.map +0 -1
  401. package/lib/front_end/third_party/intl-messageformat/package/lib/index.js +0 -10
  402. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts +0 -34
  403. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts.map +0 -1
  404. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.js +0 -229
  405. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts +0 -28
  406. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts.map +0 -1
  407. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.js +0 -48
  408. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts +0 -34
  409. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts.map +0 -1
  410. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.js +0 -179
  411. package/lib/front_end/third_party/intl-messageformat/package/package.json +0 -42
  412. package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts +0 -34
  413. package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts.map +0 -1
  414. package/lib/front_end/third_party/intl-messageformat/package/src/core.js +0 -230
  415. package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts +0 -28
  416. package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts.map +0 -1
  417. package/lib/front_end/third_party/intl-messageformat/package/src/error.js +0 -51
  418. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts +0 -34
  419. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts.map +0 -1
  420. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.js +0 -182
  421. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/error.d.ts +0 -79
  422. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/index.d.ts +0 -15
  423. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/parser.d.ts +0 -153
  424. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/types.d.ts +0 -139
  425. package/lib/front_end/third_party/legacy-javascript/LICENSE +0 -202
  426. package/lib/front_end/third_party/legacy-javascript/README.chromium +0 -13
  427. package/lib/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
  428. package/lib/front_end/third_party/legacy-javascript/legacy-javascript.ts +0 -3
  429. package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.d.ts +0 -18
  430. package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -943
  431. package/lib/front_end/third_party/legacy-javascript/package.json +0 -8
  432. package/lib/front_end/third_party/legacy-javascript/rebuild.sh +0 -9
  433. package/lib/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
  434. package/lib/front_end/third_party/source-map-scopes-codec/README.chromium +0 -31
  435. package/lib/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -33
  436. package/lib/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -26
  437. package/lib/front_end/third_party/source-map-scopes-codec/package/README.md +0 -64
  438. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -62
  439. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +0 -1
  440. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -37
  441. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -1
  442. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -29
  443. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -1
  444. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -8
  445. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -1
  446. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -6
  447. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -1
  448. package/lib/front_end/third_party/source-map-scopes-codec/package/deno.json +0 -21
  449. package/lib/front_end/third_party/source-map-scopes-codec/package/package.json +0 -14
  450. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
  451. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +0 -1
  452. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +0 -262
  453. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -235
  454. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -1
  455. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -359
  456. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -39
  457. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -1
  458. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -53
  459. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -438
  460. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -1
  461. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -539
  462. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -23
  463. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -1
  464. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -35
  465. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -257
  466. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -1
  467. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -348
  468. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -8
  469. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -1
  470. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -20
  471. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +0 -8
  472. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -184
  473. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
  474. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -1
  475. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -12
  476. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -82
  477. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -1
  478. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -99
  479. package/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.ts +0 -5
  480. package/lib/front_end/third_party/third-party-web/LICENSE +0 -20
  481. package/lib/front_end/third_party/third-party-web/README.chromium +0 -13
  482. package/lib/front_end/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
  483. package/lib/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -149
  484. package/lib/front_end/third_party/third-party-web/package/LICENSE +0 -20
  485. package/lib/front_end/third_party/third-party-web/package/README.md +0 -929
  486. package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +0 -1
  487. package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +0 -1
  488. package/lib/front_end/third_party/third-party-web/package/dist/entities-nostats.json +0 -1
  489. package/lib/front_end/third_party/third-party-web/package/dist/entities.json +0 -1
  490. package/lib/front_end/third_party/third-party-web/package/facades.md +0 -46
  491. package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.d.ts +0 -1
  492. package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -1
  493. package/lib/front_end/third_party/third-party-web/package/httparchive-subset.d.ts +0 -1
  494. package/lib/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -1
  495. package/lib/front_end/third_party/third-party-web/package/lib/__snapshots__/index.test.js.snap +0 -1006
  496. package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -139
  497. package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -44
  498. package/lib/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -27
  499. package/lib/front_end/third_party/third-party-web/package/lib/index.d.ts +0 -34
  500. package/lib/front_end/third_party/third-party-web/package/lib/index.js +0 -3
  501. package/lib/front_end/third_party/third-party-web/package/lib/index.test.js +0 -246
  502. package/lib/front_end/third_party/third-party-web/package/lib/markdown/faqs.partial.md +0 -36
  503. package/lib/front_end/third_party/third-party-web/package/lib/markdown/goals.partial.md +0 -9
  504. package/lib/front_end/third_party/third-party-web/package/lib/markdown/methodology.partial.md +0 -5
  505. package/lib/front_end/third_party/third-party-web/package/lib/markdown/template.md +0 -151
  506. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-02-01.md +0 -1
  507. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-03-01.md +0 -1
  508. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-06.md +0 -1
  509. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-13.md +0 -14
  510. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2021-01-01.md +0 -1
  511. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2024-07-01.md +0 -3
  512. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts +0 -1
  513. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -3
  514. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.d.ts +0 -1
  515. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -3
  516. package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
  517. package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -3
  518. package/lib/front_end/third_party/third-party-web/package/nostats-subset.d.ts +0 -1
  519. package/lib/front_end/third_party/third-party-web/package/nostats-subset.js +0 -1
  520. package/lib/front_end/third_party/third-party-web/package/package.json +0 -46
  521. package/lib/front_end/third_party/third-party-web/package.json +0 -8
  522. package/lib/front_end/third_party/third-party-web/rebuild.sh +0 -13
  523. package/lib/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
  524. package/lib/front_end/third_party/third-party-web/third-party-web.ts +0 -3
  525. package/lib/front_end/ui/legacy/theme_support/ThemeSupport.ts +0 -222
  526. package/lib/front_end/ui/legacy/theme_support/theme_support.ts +0 -5
  527. package/patches/chrome-devtools-frontend+1.0.1533544.patch +0 -1716
@@ -1,183 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Platform from '../../../core/platform/platform.js';
6
- import * as Types from '../types/types.js';
7
-
8
- import {data as metaHandlerData} from './MetaHandler.js';
9
- import type {FinalizeOptions} from './types.js';
10
-
11
- /**
12
- * This handler is responsible for the relationships between:
13
- * DecodeImage/ResizeImage, PaintImage and DrawLazyPixelRef events.
14
- *
15
- * When we get a DecodeImage event, we want to associate it to a PaintImage
16
- * event, primarily so we can determine the NodeID of the image that was
17
- * decoded.
18
- * We can do this in two ways:
19
- *
20
- * 1. If there is a PaintImage event on the same thread, use that
21
- * (if there are multiple, use the latest one).
22
- *
23
- * 2. If not, we can find the DecodeLazyPixelRef event on the same thread, and
24
- * use the PaintImage event associated with it via the `LazyPixelRef` key.
25
- */
26
-
27
- // Track paintImageEvents across threads.
28
- let paintImageEvents = new Map<Types.Events.ProcessID, Map<Types.Events.ThreadID, Types.Events.PaintImage[]>>();
29
- let decodeLazyPixelRefEvents =
30
- new Map<Types.Events.ProcessID, Map<Types.Events.ThreadID, Types.Events.DecodeLazyPixelRef[]>>();
31
-
32
- // A DrawLazyPixelRef event will contain a numerical reference in
33
- // args.LazyPixelRef. As we parse each DrawLazyPixelRef, we can assign it to a
34
- // paint event. Later we want to look up paint events by this reference, so we
35
- // store them in this map.
36
- let paintImageByLazyPixelRef = new Map<number, Types.Events.PaintImage>();
37
-
38
- // When we find events that we want to tie to a particular PaintImage event, we add them to this map.
39
- // These are currently only DecodeImage and ResizeImage events, but the type is
40
- // deliberately generic as in the future we might want to add more events that
41
- // have a relationship to a individual PaintImage event.
42
- let eventToPaintImage = new Map<Types.Events.Event, Types.Events.PaintImage>();
43
-
44
- let urlToPaintImage = new Map<string, Types.Events.PaintImage[]>();
45
-
46
- let paintEventToCorrectedDisplaySize = new Map<Types.Events.PaintImage, {width: number, height: number}>();
47
-
48
- let didCorrectForHostDpr = false;
49
-
50
- export function reset(): void {
51
- paintImageEvents = new Map();
52
- decodeLazyPixelRefEvents = new Map();
53
- paintImageByLazyPixelRef = new Map();
54
- eventToPaintImage = new Map();
55
- urlToPaintImage = new Map();
56
- paintEventToCorrectedDisplaySize = new Map();
57
- didCorrectForHostDpr = false;
58
- }
59
-
60
- export function handleEvent(event: Types.Events.Event): void {
61
- if (Types.Events.isPaintImage(event)) {
62
- const forProcess = paintImageEvents.get(event.pid) || new Map<Types.Events.ThreadID, Types.Events.PaintImage[]>();
63
- const forThread = forProcess.get(event.tid) || [];
64
- forThread.push(event);
65
- forProcess.set(event.tid, forThread);
66
- paintImageEvents.set(event.pid, forProcess);
67
-
68
- if (event.args.data.url) {
69
- const paintsForUrl = Platform.MapUtilities.getWithDefault(urlToPaintImage, event.args.data.url, () => []);
70
- paintsForUrl.push(event);
71
- }
72
-
73
- return;
74
- }
75
-
76
- if (Types.Events.isDecodeLazyPixelRef(event) && typeof event.args?.LazyPixelRef !== 'undefined') {
77
- // Store these because we use them to tie DecodeImage to a PaintEvent.
78
- const forProcess =
79
- decodeLazyPixelRefEvents.get(event.pid) || new Map<Types.Events.ThreadID, Types.Events.DecodeLazyPixelRef[]>();
80
- const forThread = forProcess.get(event.tid) || [];
81
- forThread.push(event);
82
- forProcess.set(event.tid, forThread);
83
- decodeLazyPixelRefEvents.set(event.pid, forProcess);
84
- }
85
-
86
- // If we see a DrawLazyPixelRef event, we need to find the last PaintImage
87
- // event on the thread and associate it to the LazyPixelRef that is supplied
88
- // in the DrawLazyPixelRef event.
89
- // This means that later on if we see a DecodeLazyPixelRef event with the
90
- // same LazyPixelRef key, we can find its associated PaintImage event by
91
- // looking it up.
92
- if (Types.Events.isDrawLazyPixelRef(event) && typeof event.args?.LazyPixelRef !== 'undefined') {
93
- const lastPaintEvent = paintImageEvents.get(event.pid)?.get(event.tid)?.at(-1);
94
- if (!lastPaintEvent) {
95
- return;
96
- }
97
- paintImageByLazyPixelRef.set(event.args.LazyPixelRef, lastPaintEvent);
98
- return;
99
- }
100
-
101
- if (Types.Events.isDecodeImage(event)) {
102
- // When we see a DecodeImage, we want to associate it to a PaintImage
103
- // event. We try two approaches:
104
- //
105
- // 1. If the thread of the DecodeImage event has a previous PaintImage
106
- // event, that is the associated event.
107
- //
108
- // 2. If that is false, we then look on the thread for a DecodeLazyPixelRef
109
- // event. If we find that, we then look for its associated PaintImage
110
- // event, which we associate via DrawLazyPixelRef events (the code block
111
- // above this one)
112
- //
113
- // 1. Find a PaintImage event on the same thread. If we find it, that's our association done.
114
- const lastPaintImageEventOnThread = paintImageEvents.get(event.pid)?.get(event.tid)?.at(-1);
115
- if (lastPaintImageEventOnThread) {
116
- eventToPaintImage.set(event, lastPaintImageEventOnThread);
117
- return;
118
- }
119
-
120
- // 2. Find the last DecodeLazyPixelRef event and, if we find it, find its associated PaintImage event.
121
- const lastDecodeLazyPixelRef = decodeLazyPixelRefEvents.get(event.pid)?.get(event.tid)?.at(-1);
122
- if (typeof lastDecodeLazyPixelRef?.args?.LazyPixelRef === 'undefined') {
123
- return;
124
- }
125
-
126
- const paintEvent = paintImageByLazyPixelRef.get(lastDecodeLazyPixelRef.args.LazyPixelRef);
127
- if (!paintEvent) {
128
- return;
129
- }
130
- eventToPaintImage.set(event, paintEvent);
131
- }
132
- }
133
-
134
- export async function finalize(options: FinalizeOptions): Promise<void> {
135
- // Painting in Chrome never uses the emulated DPR, but instead used the host's DPR.
136
- // We need to correct for that for our responsive image checks in the ImageDelivery
137
- // insight.
138
- // See: crbug.com/427552461 crbug.com/416580500#comment5
139
-
140
- if (!options.metadata?.hostDPR) {
141
- return;
142
- }
143
-
144
- // Note: this isn't necessarily emulated (for desktop+no DPR emulation, it's equal
145
- // to host DPR).
146
- const {devicePixelRatio: emulatedDpr} = metaHandlerData();
147
- if (!emulatedDpr) {
148
- return;
149
- }
150
-
151
- for (const byThread of paintImageEvents.values()) {
152
- for (const paintEvents of byThread.values()) {
153
- for (const paintEvent of paintEvents) {
154
- const cssPixelsWidth = paintEvent.args.data.width / options.metadata.hostDPR;
155
- const cssPixelsHeight = paintEvent.args.data.height / options.metadata.hostDPR;
156
- const width = cssPixelsWidth * emulatedDpr;
157
- const height = cssPixelsHeight * emulatedDpr;
158
- paintEventToCorrectedDisplaySize.set(paintEvent, {width, height});
159
- }
160
- }
161
- }
162
-
163
- didCorrectForHostDpr = true;
164
- }
165
-
166
- export interface ImagePaintData {
167
- paintImageByDrawLazyPixelRef: Map<number, Types.Events.PaintImage>;
168
- paintImageForEvent: Map<Types.Events.Event, Types.Events.PaintImage>;
169
- paintImageEventForUrl: Map<string, Types.Events.PaintImage[]>;
170
- paintEventToCorrectedDisplaySize: Map<Types.Events.PaintImage, {width: number, height: number}>;
171
- /** Go read the comment in finalize(). */
172
- didCorrectForHostDpr: boolean;
173
- }
174
-
175
- export function data(): ImagePaintData {
176
- return {
177
- paintImageByDrawLazyPixelRef: paintImageByLazyPixelRef,
178
- paintImageForEvent: eventToPaintImage,
179
- paintImageEventForUrl: urlToPaintImage,
180
- paintEventToCorrectedDisplaySize,
181
- didCorrectForHostDpr,
182
- };
183
- }
@@ -1,193 +0,0 @@
1
- // Copyright 2023 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Helpers from '../helpers/helpers.js';
6
- import * as Types from '../types/types.js';
7
-
8
- import {data as AsyncJSCallsHandlerData} from './AsyncJSCallsHandler.js';
9
- import {data as flowsHandlerData} from './FlowsHandler.js';
10
-
11
- let lastScheduleStyleRecalcByFrame = new Map<string, Types.Events.ScheduleStyleRecalculation>();
12
-
13
- // This tracks the last event that is considered to have invalidated the layout
14
- // for a given frame.
15
- // Note that although there is an InvalidateLayout event, there are also other
16
- // events (ScheduleStyleRecalculation) that could be the reason a layout was
17
- // invalidated.
18
- let lastInvalidationEventForFrame = new Map<string, Types.Events.Event>();
19
-
20
- let lastRecalcByFrame = new Map<string, Types.Events.RecalcStyle>();
21
-
22
- // These two maps store the same data but in different directions.
23
- // For a given event, tell me what its initiator was. An event can only have one initiator.
24
- let eventToInitiatorMap = new Map<Types.Events.Event, Types.Events.Event>();
25
- // For a given event, tell me what events it initiated. An event can initiate
26
- // multiple events, hence why the value for this map is an array.
27
- let initiatorToEventsMap = new Map<Types.Events.Event, Types.Events.Event[]>();
28
-
29
- let timerInstallEventsById = new Map<number, Types.Events.TimerInstall>();
30
- let requestIdleCallbackEventsById = new Map<number, Types.Events.RequestIdleCallback>();
31
-
32
- let webSocketCreateEventsById = new Map<number, Types.Events.WebSocketCreate>();
33
- let schedulePostTaskCallbackEventsById = new Map<number, Types.Events.SchedulePostTaskCallback>();
34
-
35
- export function reset(): void {
36
- lastScheduleStyleRecalcByFrame = new Map();
37
- lastInvalidationEventForFrame = new Map();
38
- lastRecalcByFrame = new Map();
39
- timerInstallEventsById = new Map();
40
- eventToInitiatorMap = new Map();
41
- initiatorToEventsMap = new Map();
42
- requestIdleCallbackEventsById = new Map();
43
- webSocketCreateEventsById = new Map();
44
- schedulePostTaskCallbackEventsById = new Map();
45
- }
46
-
47
- function storeInitiator(data: {initiator: Types.Events.Event, event: Types.Events.Event}): void {
48
- eventToInitiatorMap.set(data.event, data.initiator);
49
- const eventsForInitiator = initiatorToEventsMap.get(data.initiator) || [];
50
- eventsForInitiator.push(data.event);
51
- initiatorToEventsMap.set(data.initiator, eventsForInitiator);
52
- }
53
-
54
- /**
55
- * IMPORTANT: Before adding support for new initiator relationships in
56
- * trace events consider using Perfetto's flow API on the events in
57
- * question, so that they get automatically computed.
58
- * @see {@link flowsHandlerData}
59
- *
60
- * The events manually computed here were added before we had support
61
- * for flow events. As such they should be migrated to use the flow
62
- * API so that no manual parsing is needed.
63
- */
64
- export function handleEvent(event: Types.Events.Event): void {
65
- if (Types.Events.isScheduleStyleRecalculation(event)) {
66
- lastScheduleStyleRecalcByFrame.set(event.args.data.frame, event);
67
- } else if (Types.Events.isRecalcStyle(event)) {
68
- if (event.args.beginData) {
69
- // Store the last RecalcStyle event: we use this when we see an
70
- // InvalidateLayout and try to figure out its initiator.
71
- lastRecalcByFrame.set(event.args.beginData.frame, event);
72
-
73
- // If this frame has seen a ScheduleStyleRecalc event, then that event is
74
- // considered to be the initiator of this StylesRecalc.
75
- const scheduledStyleForFrame = lastScheduleStyleRecalcByFrame.get(event.args.beginData.frame);
76
- if (scheduledStyleForFrame) {
77
- storeInitiator({
78
- event,
79
- initiator: scheduledStyleForFrame,
80
- });
81
- }
82
- }
83
- } else if (Types.Events.isInvalidateLayout(event)) {
84
- // By default, the InvalidateLayout event is what triggered the layout invalidation for this frame.
85
- let invalidationInitiator: Types.Events.Event = event;
86
-
87
- // However, if we have not had any prior invalidations for this frame, we
88
- // want to consider StyleRecalculation events as they might be the actual
89
- // cause of this layout invalidation.
90
- if (!lastInvalidationEventForFrame.has(event.args.data.frame)) {
91
- // 1. If we have not had an invalidation event for this frame
92
- // 2. AND we have had an RecalcStyle for this frame
93
- // 3. AND the RecalcStyle event ended AFTER the InvalidateLayout startTime
94
- // 4. AND we have an initiator for the RecalcStyle event
95
- // 5. Then we set the last invalidation event for this frame to be the RecalcStyle's initiator.
96
- const lastRecalcStyleForFrame = lastRecalcByFrame.get(event.args.data.frame);
97
- if (lastRecalcStyleForFrame) {
98
- const {endTime} = Helpers.Timing.eventTimingsMicroSeconds(lastRecalcStyleForFrame);
99
- const initiatorOfRecalcStyle = eventToInitiatorMap.get(lastRecalcStyleForFrame);
100
-
101
- if (initiatorOfRecalcStyle && endTime && endTime > event.ts) {
102
- invalidationInitiator = initiatorOfRecalcStyle;
103
- }
104
- }
105
- }
106
- lastInvalidationEventForFrame.set(event.args.data.frame, invalidationInitiator);
107
- } else if (Types.Events.isLayout(event)) {
108
- // The initiator of a Layout event is the last Invalidation event.
109
- const lastInvalidation = lastInvalidationEventForFrame.get(event.args.beginData.frame);
110
- if (lastInvalidation) {
111
- storeInitiator({
112
- event,
113
- initiator: lastInvalidation,
114
- });
115
- }
116
- // Now clear the last invalidation for the frame: the last invalidation has been linked to a Layout event, so it cannot be the initiator for any future layouts.
117
- lastInvalidationEventForFrame.delete(event.args.beginData.frame);
118
- } else if (Types.Events.isTimerInstall(event)) {
119
- timerInstallEventsById.set(event.args.data.timerId, event);
120
- } else if (Types.Events.isTimerFire(event)) {
121
- const matchingInstall = timerInstallEventsById.get(event.args.data.timerId);
122
- if (matchingInstall) {
123
- storeInitiator({event, initiator: matchingInstall});
124
- }
125
- } else if (Types.Events.isRequestIdleCallback(event)) {
126
- requestIdleCallbackEventsById.set(event.args.data.id, event);
127
- } else if (Types.Events.isFireIdleCallback(event)) {
128
- const matchingRequestEvent = requestIdleCallbackEventsById.get(event.args.data.id);
129
- if (matchingRequestEvent) {
130
- storeInitiator({
131
- event,
132
- initiator: matchingRequestEvent,
133
- });
134
- }
135
- } else if (Types.Events.isWebSocketCreate(event)) {
136
- webSocketCreateEventsById.set(event.args.data.identifier, event);
137
- } else if (Types.Events.isWebSocketInfo(event) || Types.Events.isWebSocketTransfer(event)) {
138
- const matchingCreateEvent = webSocketCreateEventsById.get(event.args.data.identifier);
139
- if (matchingCreateEvent) {
140
- storeInitiator({
141
- event,
142
- initiator: matchingCreateEvent,
143
- });
144
- }
145
- } else if (Types.Events.isSchedulePostTaskCallback(event)) {
146
- schedulePostTaskCallbackEventsById.set(event.args.data.taskId, event);
147
- } else if (Types.Events.isRunPostTaskCallback(event) || Types.Events.isAbortPostTaskCallback(event)) {
148
- const matchingSchedule = schedulePostTaskCallbackEventsById.get(event.args.data.taskId);
149
- if (matchingSchedule) {
150
- storeInitiator({event, initiator: matchingSchedule});
151
- }
152
- }
153
- }
154
-
155
- function createRelationshipsFromFlows(): void {
156
- const flows = flowsHandlerData().flows;
157
- for (let i = 0; i < flows.length; i++) {
158
- const flow = flows[i];
159
- for (let j = 0; j < flow.length - 1; j++) {
160
- storeInitiator({event: flow[j + 1], initiator: flow[j]});
161
- }
162
- }
163
- }
164
-
165
- function createRelationshipsFromAsyncJSCalls(): void {
166
- const asyncCallEntries = AsyncJSCallsHandlerData().schedulerToRunEntryPoints.entries();
167
- for (const [asyncCaller, asyncCallees] of asyncCallEntries) {
168
- for (const asyncCallee of asyncCallees) {
169
- storeInitiator({event: asyncCallee, initiator: asyncCaller});
170
- }
171
- }
172
- }
173
-
174
- export async function finalize(): Promise<void> {
175
- createRelationshipsFromFlows();
176
- createRelationshipsFromAsyncJSCalls();
177
- }
178
-
179
- export interface InitiatorsData {
180
- eventToInitiator: Map<Types.Events.Event, Types.Events.Event>;
181
- initiatorToEvents: Map<Types.Events.Event, Types.Events.Event[]>;
182
- }
183
-
184
- export function data(): InitiatorsData {
185
- return {
186
- eventToInitiator: eventToInitiatorMap,
187
- initiatorToEvents: initiatorToEventsMap,
188
- };
189
- }
190
-
191
- export function deps(): ['Flows', 'AsyncJSCalls'] {
192
- return ['Flows', 'AsyncJSCalls'];
193
- }
@@ -1,168 +0,0 @@
1
- // Copyright 2023 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Types from '../types/types.js';
6
-
7
- /**
8
- * @file Associates invalidation to recalc/layout events; mostly used in "invalidation tracking" experiment.
9
- * "Invalidations" == "mutations" == "damage".
10
- * A DOM change that means we need to recompute style or layout is an invalidation that's tracked here.
11
- * If the experiment `timeline-invalidation-tracking` is enabled, the `disabledByDefault('devtools.timeline.invalidationTracking')` trace category is enabled, which contains most of these events.
12
- */
13
-
14
- interface InvalidationsStatePerFrame {
15
- invalidationsForEvent: Map<Types.Events.Event, Types.Events.InvalidationTrackingEvent[]>;
16
- invalidationCountForEvent: Map<Types.Events.Event, number>;
17
- lastRecalcStyleEvent: Types.Events.RecalcStyle|null;
18
- hasPainted: boolean;
19
- pendingInvalidations: Types.Events.InvalidationTrackingEvent[];
20
- }
21
-
22
- const frameStateByFrame = new Map<string, InvalidationsStatePerFrame>();
23
- let maxInvalidationsPerEvent: number|null = null;
24
-
25
- export function reset(): void {
26
- frameStateByFrame.clear();
27
- maxInvalidationsPerEvent = null;
28
- }
29
-
30
- export function handleUserConfig(userConfig: Types.Configuration.Configuration): void {
31
- maxInvalidationsPerEvent = userConfig.maxInvalidationEventsPerEvent;
32
- }
33
-
34
- function getState(frameId: string): InvalidationsStatePerFrame {
35
- let frameState = frameStateByFrame.get(frameId);
36
- if (!frameState) {
37
- frameState = {
38
- invalidationsForEvent: new Map(),
39
- invalidationCountForEvent: new Map(),
40
- lastRecalcStyleEvent: null,
41
- pendingInvalidations: [],
42
- hasPainted: false,
43
- };
44
- frameStateByFrame.set(frameId, frameState);
45
- }
46
- return frameState;
47
- }
48
-
49
- function getFrameId(event: Types.Events.Event): string|null {
50
- if (Types.Events.isRecalcStyle(event) || Types.Events.isLayout(event)) {
51
- return event.args.beginData?.frame ?? null;
52
- }
53
- return event.args?.data?.frame ?? null;
54
- }
55
-
56
- function addInvalidationToEvent(
57
- frameState: InvalidationsStatePerFrame, event: Types.Events.Event,
58
- invalidation: Types.Events.InvalidationTrackingEvent): void {
59
- const existingInvalidations = frameState.invalidationsForEvent.get(event) || [];
60
- existingInvalidations.push(invalidation);
61
-
62
- if (maxInvalidationsPerEvent !== null && existingInvalidations.length > maxInvalidationsPerEvent) {
63
- existingInvalidations.shift();
64
- }
65
- frameState.invalidationsForEvent.set(event, existingInvalidations);
66
-
67
- const count = frameState.invalidationCountForEvent.get(event) ?? 0;
68
- frameState.invalidationCountForEvent.set(event, count + 1);
69
- }
70
-
71
- export function handleEvent(event: Types.Events.Event): void {
72
- // Special case: if we have been configured to not store any invalidations,
73
- // we take that as a sign that we don't even want to gather any invalidations
74
- // data at all and early exit.
75
- if (maxInvalidationsPerEvent === 0) {
76
- return;
77
- }
78
-
79
- const frameId = getFrameId(event);
80
- if (!frameId) {
81
- return;
82
- }
83
- const thisFrame = getState(frameId);
84
-
85
- if (Types.Events.isRecalcStyle(event)) {
86
- thisFrame.lastRecalcStyleEvent = event;
87
-
88
- // Associate any prior invalidations with this recalc event.
89
- for (const invalidation of thisFrame.pendingInvalidations) {
90
- if (Types.Events.isLayoutInvalidationTracking(invalidation)) {
91
- // LayoutInvalidation events cannot be associated with a LayoutTree
92
- // event.
93
- continue;
94
- }
95
- addInvalidationToEvent(thisFrame, event, invalidation);
96
- }
97
- return;
98
- }
99
-
100
- if (Types.Events.isInvalidationTracking(event)) {
101
- if (thisFrame.hasPainted) {
102
- // If we have painted, then we can clear out the list of all existing
103
- // invalidations, as we cannot associate them across frames.
104
- thisFrame.pendingInvalidations.length = 0;
105
- thisFrame.lastRecalcStyleEvent = null;
106
- thisFrame.hasPainted = false;
107
- }
108
-
109
- // Style invalidation events can occur before and during recalc styles. When we get a recalc style event, we check and associate any prior invalidations with it.
110
- // But any invalidations that occur during a RecalcStyle
111
- // event would be reported in trace events after. So each time we get an
112
- // invalidation that might be due to a style recalc, we check if the
113
- // timings overlap and if so associate them.
114
- if (thisFrame.lastRecalcStyleEvent &&
115
- (Types.Events.isScheduleStyleInvalidationTracking(event) ||
116
- Types.Events.isStyleRecalcInvalidationTracking(event) ||
117
- Types.Events.isStyleInvalidatorInvalidationTracking(event))) {
118
- const recalcLastRecalc = thisFrame.lastRecalcStyleEvent;
119
- const recalcEndTime = recalcLastRecalc.ts + (recalcLastRecalc.dur || 0);
120
- if (event.ts >= recalcLastRecalc.ts && event.ts <= recalcEndTime) {
121
- addInvalidationToEvent(thisFrame, recalcLastRecalc, event);
122
- }
123
- }
124
-
125
- thisFrame.pendingInvalidations.push(event);
126
- return;
127
- }
128
-
129
- if (Types.Events.isPaint(event)) {
130
- thisFrame.hasPainted = true;
131
- return;
132
- }
133
-
134
- if (Types.Events.isLayout(event)) {
135
- for (const invalidation of thisFrame.pendingInvalidations) {
136
- // The only invalidations that cause a Layout are LayoutInvalidations :)
137
- if (!Types.Events.isLayoutInvalidationTracking(invalidation)) {
138
- continue;
139
- }
140
- addInvalidationToEvent(thisFrame, event, invalidation);
141
- }
142
- }
143
- }
144
-
145
- export async function finalize(): Promise<void> {
146
- }
147
-
148
- interface InvalidationsData {
149
- invalidationsForEvent: Map<Types.Events.Event, Types.Events.InvalidationTrackingEvent[]>;
150
- invalidationCountForEvent: Map<Types.Events.Event, number>;
151
- }
152
-
153
- export function data(): InvalidationsData {
154
- const invalidationsForEvent = new Map<Types.Events.Event, Types.Events.InvalidationTrackingEvent[]>();
155
- const invalidationCountForEvent = new Map<Types.Events.Event, number>();
156
- for (const frame of frameStateByFrame.values()) {
157
- for (const [event, invalidations] of frame.invalidationsForEvent.entries()) {
158
- invalidationsForEvent.set(event, invalidations);
159
- }
160
- for (const [event, count] of frame.invalidationCountForEvent.entries()) {
161
- invalidationCountForEvent.set(event, count);
162
- }
163
- }
164
- return {
165
- invalidationsForEvent,
166
- invalidationCountForEvent,
167
- };
168
- }
@@ -1,109 +0,0 @@
1
- // Copyright 2022 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Platform from '../../../core/platform/platform.js';
6
- import type * as Protocol from '../../../generated/protocol.js';
7
- import * as Types from '../types/types.js';
8
-
9
- import {data as metaData} from './MetaHandler.js';
10
- import {data as networkRequestsData} from './NetworkRequestsHandler.js';
11
- import {data as pageLoadMetricsData, MetricName} from './PageLoadMetricsHandler.js';
12
- import type {HandlerName} from './types.js';
13
-
14
- /**
15
- * If the LCP resource was an image, and that image was fetched over the
16
- * network, we want to be able to find the network request in order to construct
17
- * the critical path for an LCP image.
18
- * Within the trace file there are `LargestImagePaint::Candidate` events.
19
- * Within their data object, they contain a `DOMNodeId` property, which maps to
20
- * the DOM Node ID for that image.
21
- *
22
- * This id maps exactly to the `data.nodeId` property that a
23
- * `LargestContentfulPaint::Candidate` will have. So, when we find an image
24
- * paint candidate, we can store it, keying it on the node ID.
25
- * Then, when it comes to finding the network request for an LCP image, we can
26
- * use the nodeId from the LCP candidate to find the image candidate. That image
27
- * candidate also contains a `imageUrl` property, which will have the full URL
28
- * to the image.
29
- *
30
- * `BackendNodeId`s are only unique within a given renderer process, so this is
31
- * also keyed on `ProcessId`.
32
- **/
33
- let imagePaintsByNodeIdAndProcess =
34
- new Map<Types.Events.ProcessID, Map<Protocol.DOM.BackendNodeId, Types.Events.LargestImagePaintCandidate>>();
35
- let lcpRequestByNavigationId = new Map<string, Types.Events.SyntheticNetworkRequest>();
36
-
37
- export function reset(): void {
38
- imagePaintsByNodeIdAndProcess = new Map();
39
- lcpRequestByNavigationId = new Map();
40
- }
41
-
42
- export function handleEvent(event: Types.Events.Event): void {
43
- if (!Types.Events.isLargestImagePaintCandidate(event) || !event.args.data) {
44
- return;
45
- }
46
-
47
- const imagePaintsByNodeId =
48
- Platform.MapUtilities.getWithDefault(imagePaintsByNodeIdAndProcess, event.pid, () => new Map());
49
- imagePaintsByNodeId.set(event.args.data.DOMNodeId, event);
50
- }
51
-
52
- export async function finalize(): Promise<void> {
53
- const requests = networkRequestsData().byTime;
54
- const {traceBounds, navigationsByNavigationId} = metaData();
55
- const metricScoresByFrameId = pageLoadMetricsData().metricScoresByFrameId;
56
-
57
- for (const [navigationId, navigation] of navigationsByNavigationId) {
58
- const lcpMetric = metricScoresByFrameId.get(navigation.args.frame)?.get(navigationId)?.get(MetricName.LCP);
59
- const lcpEvent = lcpMetric?.event;
60
- if (!lcpEvent || !Types.Events.isLargestContentfulPaintCandidate(lcpEvent)) {
61
- continue;
62
- }
63
-
64
- const nodeId = lcpEvent.args.data?.nodeId;
65
- if (!nodeId) {
66
- continue;
67
- }
68
-
69
- const lcpImagePaintEvent = imagePaintsByNodeIdAndProcess.get(lcpEvent.pid)?.get(nodeId);
70
- const lcpUrl = lcpImagePaintEvent?.args.data?.imageUrl;
71
- if (!lcpUrl) {
72
- continue;
73
- }
74
-
75
- const startTime = navigation?.ts ?? traceBounds.min;
76
- const endTime = lcpImagePaintEvent.ts;
77
-
78
- let lcpRequest;
79
- for (const request of requests) {
80
- if (request.ts < startTime) {
81
- continue;
82
- }
83
- if (request.ts >= endTime) {
84
- break;
85
- }
86
-
87
- if (request.args.data.url === lcpUrl || request.args.data.redirects.some(r => r.url === lcpUrl)) {
88
- lcpRequest = request;
89
- break;
90
- }
91
- }
92
-
93
- if (lcpRequest) {
94
- lcpRequestByNavigationId.set(navigationId, lcpRequest);
95
- }
96
- }
97
- }
98
-
99
- export interface LargestImagePaintData {
100
- lcpRequestByNavigationId: Map<string, Types.Events.SyntheticNetworkRequest>;
101
- }
102
-
103
- export function data(): LargestImagePaintData {
104
- return {lcpRequestByNavigationId};
105
- }
106
-
107
- export function deps(): HandlerName[] {
108
- return ['Meta', 'NetworkRequests', 'PageLoadMetrics'];
109
- }
@@ -1,35 +0,0 @@
1
- // Copyright 2022 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import type * as Protocol from '../../../generated/protocol.js';
6
- import * as Types from '../types/types.js';
7
- /**
8
- * A trace file will contain all the text paints that were candidates for the
9
- * LargestTextPaint. If an LCP event is text, it will point to one of these
10
- * candidates, so we store them by their DOM Node ID.
11
- **/
12
- let textPaintByDOMNodeId = new Map<Protocol.DOM.BackendNodeId, Types.Events.LargestTextPaintCandidate>();
13
-
14
- export function reset(): void {
15
- textPaintByDOMNodeId = new Map();
16
- }
17
-
18
- export function handleEvent(event: Types.Events.Event): void {
19
- if (!Types.Events.isLargestTextPaintCandidate(event)) {
20
- return;
21
- }
22
-
23
- if (!event.args.data) {
24
- return;
25
- }
26
-
27
- textPaintByDOMNodeId.set(event.args.data.DOMNodeId, event);
28
- }
29
-
30
- export async function finalize(): Promise<void> {
31
- }
32
-
33
- export function data(): Map<Protocol.DOM.BackendNodeId, Types.Events.LargestTextPaintCandidate> {
34
- return textPaintByDOMNodeId;
35
- }