devtools-tracing 1.1.0 → 1.2.0

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 (528) hide show
  1. package/.claude/settings.local.json +14 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.js +28854 -0
  4. package/package.json +10 -8
  5. package/generate.ts +0 -649
  6. package/index.ts +0 -17
  7. package/lib/extension-api/ExtensionAPI.d.ts +0 -357
  8. package/lib/front_end/core/common/App.ts +0 -7
  9. package/lib/front_end/core/common/AppProvider.ts +0 -32
  10. package/lib/front_end/core/common/Base64.ts +0 -47
  11. package/lib/front_end/core/common/CharacterIdMap.ts +0 -30
  12. package/lib/front_end/core/common/Color.ts +0 -2506
  13. package/lib/front_end/core/common/ColorConverter.ts +0 -402
  14. package/lib/front_end/core/common/ColorUtils.ts +0 -252
  15. package/lib/front_end/core/common/Console.ts +0 -114
  16. package/lib/front_end/core/common/Debouncer.ts +0 -15
  17. package/lib/front_end/core/common/EventTarget.ts +0 -52
  18. package/lib/front_end/core/common/Gzip.ts +0 -74
  19. package/lib/front_end/core/common/JavaScriptMetaData.ts +0 -29
  20. package/lib/front_end/core/common/Lazy.ts +0 -31
  21. package/lib/front_end/core/common/Linkifier.ts +0 -55
  22. package/lib/front_end/core/common/MapWithDefault.ts +0 -26
  23. package/lib/front_end/core/common/Mutex.ts +0 -55
  24. package/lib/front_end/core/common/Object.ts +0 -145
  25. package/lib/front_end/core/common/ParsedURL.ts +0 -554
  26. package/lib/front_end/core/common/Progress.ts +0 -180
  27. package/lib/front_end/core/common/QueryParamHandler.ts +0 -7
  28. package/lib/front_end/core/common/ResolverBase.ts +0 -85
  29. package/lib/front_end/core/common/ResourceType.ts +0 -588
  30. package/lib/front_end/core/common/ReturnToPanel.ts +0 -17
  31. package/lib/front_end/core/common/Revealer.ts +0 -192
  32. package/lib/front_end/core/common/Runnable.ts +0 -41
  33. package/lib/front_end/core/common/SegmentedRange.ts +0 -87
  34. package/lib/front_end/core/common/SettingRegistration.ts +0 -339
  35. package/lib/front_end/core/common/Settings.ts +0 -1497
  36. package/lib/front_end/core/common/SimpleHistoryManager.ts +0 -124
  37. package/lib/front_end/core/common/StringOutputStream.ts +0 -26
  38. package/lib/front_end/core/common/TextDictionary.ts +0 -48
  39. package/lib/front_end/core/common/Throttler.ts +0 -99
  40. package/lib/front_end/core/common/Trie.ts +0 -152
  41. package/lib/front_end/core/common/Worker.ts +0 -60
  42. package/lib/front_end/core/common/common.ts +0 -81
  43. package/lib/front_end/core/host/AidaClient.ts +0 -733
  44. package/lib/front_end/core/host/GdpClient.ts +0 -316
  45. package/lib/front_end/core/host/InspectorFrontendHost.ts +0 -648
  46. package/lib/front_end/core/host/InspectorFrontendHostAPI.ts +0 -551
  47. package/lib/front_end/core/host/Platform.ts +0 -76
  48. package/lib/front_end/core/host/ResourceLoader.ts +0 -282
  49. package/lib/front_end/core/host/UserMetrics.ts +0 -1230
  50. package/lib/front_end/core/host/host.ts +0 -23
  51. package/lib/front_end/core/i18n/ByteUtilities.ts +0 -82
  52. package/lib/front_end/core/i18n/DevToolsLocale.ts +0 -87
  53. package/lib/front_end/core/i18n/NumberFormatter.ts +0 -82
  54. package/lib/front_end/core/i18n/i18n.ts +0 -17
  55. package/lib/front_end/core/i18n/i18nImpl.ts +0 -204
  56. package/lib/front_end/core/i18n/i18nTypes.ts +0 -10
  57. package/lib/front_end/core/i18n/locales.js +0 -14
  58. package/lib/front_end/core/i18n/time-utilities.ts +0 -174
  59. package/lib/front_end/core/platform/ArrayUtilities.ts +0 -271
  60. package/lib/front_end/core/platform/Brand.ts +0 -23
  61. package/lib/front_end/core/platform/Constructor.ts +0 -10
  62. package/lib/front_end/core/platform/DOMUtilities.ts +0 -138
  63. package/lib/front_end/core/platform/DateUtilities.ts +0 -15
  64. package/lib/front_end/core/platform/DevToolsPath.ts +0 -53
  65. package/lib/front_end/core/platform/KeyboardUtilities.ts +0 -38
  66. package/lib/front_end/core/platform/MapUtilities.ts +0 -95
  67. package/lib/front_end/core/platform/MimeType.ts +0 -175
  68. package/lib/front_end/core/platform/NumberUtilities.ts +0 -80
  69. package/lib/front_end/core/platform/StringUtilities.ts +0 -588
  70. package/lib/front_end/core/platform/Timing.ts +0 -17
  71. package/lib/front_end/core/platform/TypedArrayUtilities.ts +0 -189
  72. package/lib/front_end/core/platform/TypescriptUtilities.ts +0 -86
  73. package/lib/front_end/core/platform/UIString.ts +0 -39
  74. package/lib/front_end/core/platform/UserVisibleError.ts +0 -28
  75. package/lib/front_end/core/platform/platform.ts +0 -45
  76. package/lib/front_end/core/protocol_client/ConnectionTransport.ts +0 -26
  77. package/lib/front_end/core/protocol_client/InspectorBackend.ts +0 -1050
  78. package/lib/front_end/core/protocol_client/NodeURL.ts +0 -42
  79. package/lib/front_end/core/protocol_client/protocol_client.ts +0 -13
  80. package/lib/front_end/core/root/Runtime.ts +0 -609
  81. package/lib/front_end/core/root/root.ts +0 -6
  82. package/lib/front_end/core/sdk/AccessibilityModel.ts +0 -353
  83. package/lib/front_end/core/sdk/AnimationModel.ts +0 -1041
  84. package/lib/front_end/core/sdk/AutofillModel.ts +0 -184
  85. package/lib/front_end/core/sdk/CPUProfilerModel.ts +0 -148
  86. package/lib/front_end/core/sdk/CPUThrottlingManager.ts +0 -282
  87. package/lib/front_end/core/sdk/CSSContainerQuery.ts +0 -139
  88. package/lib/front_end/core/sdk/CSSFontFace.ts +0 -40
  89. package/lib/front_end/core/sdk/CSSLayer.ts +0 -30
  90. package/lib/front_end/core/sdk/CSSMatchedStyles.ts +0 -1646
  91. package/lib/front_end/core/sdk/CSSMedia.ts +0 -121
  92. package/lib/front_end/core/sdk/CSSMetadata.ts +0 -1647
  93. package/lib/front_end/core/sdk/CSSModel.ts +0 -1128
  94. package/lib/front_end/core/sdk/CSSProperty.ts +0 -384
  95. package/lib/front_end/core/sdk/CSSPropertyParser.ts +0 -681
  96. package/lib/front_end/core/sdk/CSSPropertyParserMatchers.ts +0 -1395
  97. package/lib/front_end/core/sdk/CSSQuery.ts +0 -72
  98. package/lib/front_end/core/sdk/CSSRule.ts +0 -465
  99. package/lib/front_end/core/sdk/CSSScope.ts +0 -30
  100. package/lib/front_end/core/sdk/CSSStartingStyle.ts +0 -29
  101. package/lib/front_end/core/sdk/CSSStyleDeclaration.ts +0 -313
  102. package/lib/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -196
  103. package/lib/front_end/core/sdk/CSSSupports.ts +0 -33
  104. package/lib/front_end/core/sdk/CategorizedBreakpoint.ts +0 -64
  105. package/lib/front_end/core/sdk/ChildTargetManager.ts +0 -314
  106. package/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -62
  107. package/lib/front_end/core/sdk/Connections.ts +0 -293
  108. package/lib/front_end/core/sdk/ConsoleModel.ts +0 -808
  109. package/lib/front_end/core/sdk/ConsoleModelTypes.ts +0 -15
  110. package/lib/front_end/core/sdk/Cookie.ts +0 -319
  111. package/lib/front_end/core/sdk/CookieModel.ts +0 -239
  112. package/lib/front_end/core/sdk/CookieParser.ts +0 -185
  113. package/lib/front_end/core/sdk/DOMDebuggerModel.ts +0 -787
  114. package/lib/front_end/core/sdk/DOMModel.ts +0 -1961
  115. package/lib/front_end/core/sdk/DebuggerModel.ts +0 -1605
  116. package/lib/front_end/core/sdk/EmulationModel.ts +0 -648
  117. package/lib/front_end/core/sdk/EnhancedTracesParser.ts +0 -515
  118. package/lib/front_end/core/sdk/EventBreakpointsModel.ts +0 -183
  119. package/lib/front_end/core/sdk/FrameAssociated.ts +0 -11
  120. package/lib/front_end/core/sdk/FrameManager.ts +0 -259
  121. package/lib/front_end/core/sdk/HeapProfilerModel.ts +0 -225
  122. package/lib/front_end/core/sdk/HttpReasonPhraseStrings.ts +0 -77
  123. package/lib/front_end/core/sdk/IOModel.ts +0 -91
  124. package/lib/front_end/core/sdk/IsolateManager.ts +0 -257
  125. package/lib/front_end/core/sdk/IssuesModel.ts +0 -70
  126. package/lib/front_end/core/sdk/LayerTreeBase.ts +0 -169
  127. package/lib/front_end/core/sdk/LogModel.ts +0 -56
  128. package/lib/front_end/core/sdk/NetworkManager.ts +0 -2823
  129. package/lib/front_end/core/sdk/NetworkRequest.ts +0 -2253
  130. package/lib/front_end/core/sdk/OverlayColorGenerator.ts +0 -52
  131. package/lib/front_end/core/sdk/OverlayModel.ts +0 -1011
  132. package/lib/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -522
  133. package/lib/front_end/core/sdk/PageLoad.ts +0 -35
  134. package/lib/front_end/core/sdk/PageResourceLoader.ts +0 -435
  135. package/lib/front_end/core/sdk/PaintProfiler.ts +0 -110
  136. package/lib/front_end/core/sdk/PerformanceMetricsModel.ts +0 -84
  137. package/lib/front_end/core/sdk/PreloadingModel.ts +0 -863
  138. package/lib/front_end/core/sdk/RehydratingConnection.ts +0 -386
  139. package/lib/front_end/core/sdk/RehydratingObject.ts +0 -66
  140. package/lib/front_end/core/sdk/RemoteObject.ts +0 -1160
  141. package/lib/front_end/core/sdk/Resource.ts +0 -232
  142. package/lib/front_end/core/sdk/ResourceTreeModel.ts +0 -1160
  143. package/lib/front_end/core/sdk/RuntimeModel.ts +0 -732
  144. package/lib/front_end/core/sdk/SDKModel.ts +0 -65
  145. package/lib/front_end/core/sdk/ScopeTreeCache.ts +0 -45
  146. package/lib/front_end/core/sdk/ScreenCaptureModel.ts +0 -255
  147. package/lib/front_end/core/sdk/Script.ts +0 -534
  148. package/lib/front_end/core/sdk/SecurityOriginManager.ts +0 -76
  149. package/lib/front_end/core/sdk/ServerSentEvents.ts +0 -80
  150. package/lib/front_end/core/sdk/ServerSentEventsProtocol.ts +0 -122
  151. package/lib/front_end/core/sdk/ServerTiming.ts +0 -260
  152. package/lib/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -377
  153. package/lib/front_end/core/sdk/ServiceWorkerManager.ts +0 -605
  154. package/lib/front_end/core/sdk/SourceMap.ts +0 -867
  155. package/lib/front_end/core/sdk/SourceMapCache.ts +0 -54
  156. package/lib/front_end/core/sdk/SourceMapFunctionRanges.ts +0 -156
  157. package/lib/front_end/core/sdk/SourceMapManager.ts +0 -239
  158. package/lib/front_end/core/sdk/SourceMapScopeChainEntry.ts +0 -189
  159. package/lib/front_end/core/sdk/SourceMapScopesInfo.ts +0 -508
  160. package/lib/front_end/core/sdk/StorageBucketsModel.ts +0 -204
  161. package/lib/front_end/core/sdk/StorageKeyManager.ts +0 -98
  162. package/lib/front_end/core/sdk/Target.ts +0 -332
  163. package/lib/front_end/core/sdk/TargetManager.ts +0 -453
  164. package/lib/front_end/core/sdk/TraceObject.ts +0 -61
  165. package/lib/front_end/core/sdk/WebAuthnModel.ts +0 -104
  166. package/lib/front_end/core/sdk/sdk.ts +0 -174
  167. package/lib/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -59
  168. package/lib/front_end/generated/InspectorBackendCommands.js +0 -1617
  169. package/lib/front_end/generated/SupportedCSSProperties.js +0 -7512
  170. package/lib/front_end/generated/protocol-proxy-api.d.ts +0 -5022
  171. package/lib/front_end/generated/protocol.ts +0 -22014
  172. package/lib/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -318
  173. package/lib/front_end/models/bindings/CompilerScriptMapping.ts +0 -536
  174. package/lib/front_end/models/bindings/ContentProviderBasedProject.ts +0 -187
  175. package/lib/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1197
  176. package/lib/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -733
  177. package/lib/front_end/models/bindings/DefaultScriptMapping.ts +0 -141
  178. package/lib/front_end/models/bindings/FileUtils.ts +0 -228
  179. package/lib/front_end/models/bindings/LiveLocation.ts +0 -81
  180. package/lib/front_end/models/bindings/NetworkProject.ts +0 -157
  181. package/lib/front_end/models/bindings/PresentationConsoleMessageHelper.ts +0 -312
  182. package/lib/front_end/models/bindings/ResourceMapping.ts +0 -539
  183. package/lib/front_end/models/bindings/ResourceScriptMapping.ts +0 -491
  184. package/lib/front_end/models/bindings/ResourceUtils.ts +0 -103
  185. package/lib/front_end/models/bindings/SASSSourceMapping.ts +0 -222
  186. package/lib/front_end/models/bindings/StylesSourceMapping.ts +0 -316
  187. package/lib/front_end/models/bindings/TempFile.ts +0 -67
  188. package/lib/front_end/models/bindings/bindings.ts +0 -39
  189. package/lib/front_end/models/cpu_profile/CPUProfileDataModel.ts +0 -571
  190. package/lib/front_end/models/cpu_profile/ProfileTreeModel.ts +0 -103
  191. package/lib/front_end/models/cpu_profile/cpu_profile.ts +0 -11
  192. package/lib/front_end/models/formatter/FormatterWorkerPool.ts +0 -219
  193. package/lib/front_end/models/formatter/ScriptFormatter.ts +0 -112
  194. package/lib/front_end/models/formatter/formatter.ts +0 -8
  195. package/lib/front_end/models/source_map_scopes/NamesResolver.ts +0 -765
  196. package/lib/front_end/models/source_map_scopes/ScopeChainModel.ts +0 -84
  197. package/lib/front_end/models/source_map_scopes/source_map_scopes.ts +0 -11
  198. package/lib/front_end/models/stack_trace/StackTrace.ts +0 -53
  199. package/lib/front_end/models/stack_trace/StackTraceImpl.ts +0 -85
  200. package/lib/front_end/models/stack_trace/StackTraceModel.ts +0 -128
  201. package/lib/front_end/models/stack_trace/Trie.ts +0 -163
  202. package/lib/front_end/models/stack_trace/stack_trace.ts +0 -9
  203. package/lib/front_end/models/stack_trace/stack_trace_impl.ts +0 -13
  204. package/lib/front_end/models/text_utils/CodeMirrorUtils.ts +0 -37
  205. package/lib/front_end/models/text_utils/ContentData.ts +0 -199
  206. package/lib/front_end/models/text_utils/ContentProvider.ts +0 -68
  207. package/lib/front_end/models/text_utils/StaticContentProvider.ts +0 -49
  208. package/lib/front_end/models/text_utils/StreamingContentData.ts +0 -108
  209. package/lib/front_end/models/text_utils/Text.ts +0 -90
  210. package/lib/front_end/models/text_utils/TextCursor.ts +0 -44
  211. package/lib/front_end/models/text_utils/TextRange.ts +0 -266
  212. package/lib/front_end/models/text_utils/TextUtils.ts +0 -401
  213. package/lib/front_end/models/text_utils/WasmDisassembly.ts +0 -87
  214. package/lib/front_end/models/text_utils/text_utils.ts +0 -27
  215. package/lib/front_end/models/trace/EntityMapper.ts +0 -141
  216. package/lib/front_end/models/trace/EventsSerializer.ts +0 -101
  217. package/lib/front_end/models/trace/LanternComputationData.ts +0 -438
  218. package/lib/front_end/models/trace/ModelImpl.ts +0 -236
  219. package/lib/front_end/models/trace/Name.ts +0 -136
  220. package/lib/front_end/models/trace/Processor.ts +0 -652
  221. package/lib/front_end/models/trace/Styles.ts +0 -1138
  222. package/lib/front_end/models/trace/extras/FilmStrip.ts +0 -78
  223. package/lib/front_end/models/trace/extras/MainThreadActivity.ts +0 -86
  224. package/lib/front_end/models/trace/extras/ScriptDuplication.ts +0 -236
  225. package/lib/front_end/models/trace/extras/StackTraceForEvent.ts +0 -203
  226. package/lib/front_end/models/trace/extras/ThirdParties.ts +0 -164
  227. package/lib/front_end/models/trace/extras/TraceFilter.ts +0 -62
  228. package/lib/front_end/models/trace/extras/TraceTree.ts +0 -701
  229. package/lib/front_end/models/trace/extras/extras.ts +0 -11
  230. package/lib/front_end/models/trace/handlers/AnimationFramesHandler.ts +0 -128
  231. package/lib/front_end/models/trace/handlers/AnimationHandler.ts +0 -36
  232. package/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +0 -239
  233. package/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
  234. package/lib/front_end/models/trace/handlers/DOMStatsHandler.ts +0 -31
  235. package/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -306
  236. package/lib/front_end/models/trace/handlers/FlowsHandler.ts +0 -175
  237. package/lib/front_end/models/trace/handlers/FramesHandler.ts +0 -571
  238. package/lib/front_end/models/trace/handlers/GPUHandler.ts +0 -50
  239. package/lib/front_end/models/trace/handlers/ImagePaintingHandler.ts +0 -183
  240. package/lib/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -193
  241. package/lib/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -168
  242. package/lib/front_end/models/trace/handlers/LargestImagePaintHandler.ts +0 -109
  243. package/lib/front_end/models/trace/handlers/LargestTextPaintHandler.ts +0 -35
  244. package/lib/front_end/models/trace/handlers/LayerTreeHandler.ts +0 -123
  245. package/lib/front_end/models/trace/handlers/LayoutShiftsHandler.ts +0 -573
  246. package/lib/front_end/models/trace/handlers/MemoryHandler.ts +0 -31
  247. package/lib/front_end/models/trace/handlers/MetaHandler.ts +0 -525
  248. package/lib/front_end/models/trace/handlers/ModelHandlers.ts +0 -34
  249. package/lib/front_end/models/trace/handlers/NetworkRequestsHandler.ts +0 -672
  250. package/lib/front_end/models/trace/handlers/PageFramesHandler.ts +0 -52
  251. package/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +0 -460
  252. package/lib/front_end/models/trace/handlers/RendererHandler.ts +0 -428
  253. package/lib/front_end/models/trace/handlers/SamplesHandler.ts +0 -271
  254. package/lib/front_end/models/trace/handlers/ScreenshotsHandler.ts +0 -122
  255. package/lib/front_end/models/trace/handlers/ScriptsHandler.ts +0 -336
  256. package/lib/front_end/models/trace/handlers/SelectorStatsHandler.ts +0 -110
  257. package/lib/front_end/models/trace/handlers/Threads.ts +0 -139
  258. package/lib/front_end/models/trace/handlers/UserInteractionsHandler.ts +0 -400
  259. package/lib/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -233
  260. package/lib/front_end/models/trace/handlers/WarningsHandler.ts +0 -162
  261. package/lib/front_end/models/trace/handlers/WorkersHandler.ts +0 -45
  262. package/lib/front_end/models/trace/handlers/handlers.ts +0 -8
  263. package/lib/front_end/models/trace/handlers/helpers.ts +0 -196
  264. package/lib/front_end/models/trace/handlers/types.ts +0 -75
  265. package/lib/front_end/models/trace/helpers/Extensions.ts +0 -54
  266. package/lib/front_end/models/trace/helpers/Network.ts +0 -129
  267. package/lib/front_end/models/trace/helpers/SamplesIntegrator.ts +0 -544
  268. package/lib/front_end/models/trace/helpers/SyntheticEvents.ts +0 -87
  269. package/lib/front_end/models/trace/helpers/Timing.ts +0 -248
  270. package/lib/front_end/models/trace/helpers/Trace.ts +0 -928
  271. package/lib/front_end/models/trace/helpers/TreeHelpers.ts +0 -320
  272. package/lib/front_end/models/trace/helpers/helpers.ts +0 -11
  273. package/lib/front_end/models/trace/insights/CLSCulprits.ts +0 -668
  274. package/lib/front_end/models/trace/insights/Cache.ts +0 -269
  275. package/lib/front_end/models/trace/insights/Common.ts +0 -453
  276. package/lib/front_end/models/trace/insights/DOMSize.ts +0 -223
  277. package/lib/front_end/models/trace/insights/DocumentLatency.ts +0 -319
  278. package/lib/front_end/models/trace/insights/DuplicatedJavaScript.ts +0 -126
  279. package/lib/front_end/models/trace/insights/FontDisplay.ts +0 -119
  280. package/lib/front_end/models/trace/insights/ForcedReflow.ts +0 -220
  281. package/lib/front_end/models/trace/insights/INPBreakdown.ts +0 -171
  282. package/lib/front_end/models/trace/insights/ImageDelivery.ts +0 -348
  283. package/lib/front_end/models/trace/insights/LCPBreakdown.ts +0 -268
  284. package/lib/front_end/models/trace/insights/LCPDiscovery.ts +0 -237
  285. package/lib/front_end/models/trace/insights/LegacyJavaScript.ts +0 -138
  286. package/lib/front_end/models/trace/insights/Models.ts +0 -22
  287. package/lib/front_end/models/trace/insights/ModernHTTP.ts +0 -257
  288. package/lib/front_end/models/trace/insights/NetworkDependencyTree.ts +0 -726
  289. package/lib/front_end/models/trace/insights/RenderBlocking.ts +0 -257
  290. package/lib/front_end/models/trace/insights/SlowCSSSelector.ts +0 -175
  291. package/lib/front_end/models/trace/insights/Statistics.ts +0 -101
  292. package/lib/front_end/models/trace/insights/ThirdParties.ts +0 -130
  293. package/lib/front_end/models/trace/insights/Viewport.ts +0 -138
  294. package/lib/front_end/models/trace/insights/insights.ts +0 -10
  295. package/lib/front_end/models/trace/insights/types.ts +0 -157
  296. package/lib/front_end/models/trace/lantern/core/LanternError.ts +0 -7
  297. package/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +0 -619
  298. package/lib/front_end/models/trace/lantern/core/core.ts +0 -6
  299. package/lib/front_end/models/trace/lantern/graph/BaseNode.ts +0 -345
  300. package/lib/front_end/models/trace/lantern/graph/CPUNode.ts +0 -80
  301. package/lib/front_end/models/trace/lantern/graph/NetworkNode.ts +0 -101
  302. package/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +0 -636
  303. package/lib/front_end/models/trace/lantern/graph/graph.ts +0 -8
  304. package/lib/front_end/models/trace/lantern/lantern.ts +0 -17
  305. package/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts +0 -187
  306. package/lib/front_end/models/trace/lantern/metrics/Interactive.ts +0 -88
  307. package/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +0 -92
  308. package/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.ts +0 -72
  309. package/lib/front_end/models/trace/lantern/metrics/Metric.ts +0 -126
  310. package/lib/front_end/models/trace/lantern/metrics/SpeedIndex.ts +0 -126
  311. package/lib/front_end/models/trace/lantern/metrics/TBTUtils.ts +0 -82
  312. package/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +0 -112
  313. package/lib/front_end/models/trace/lantern/metrics/metrics.ts +0 -12
  314. package/lib/front_end/models/trace/lantern/simulation/ConnectionPool.ts +0 -150
  315. package/lib/front_end/models/trace/lantern/simulation/Constants.ts +0 -46
  316. package/lib/front_end/models/trace/lantern/simulation/DNSCache.ts +0 -61
  317. package/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +0 -196
  318. package/lib/front_end/models/trace/lantern/simulation/Simulator.ts +0 -556
  319. package/lib/front_end/models/trace/lantern/simulation/TCPConnection.ts +0 -192
  320. package/lib/front_end/models/trace/lantern/simulation/simulation.ts +0 -10
  321. package/lib/front_end/models/trace/lantern/types/Lantern.ts +0 -220
  322. package/lib/front_end/models/trace/lantern/types/types.ts +0 -5
  323. package/lib/front_end/models/trace/trace.ts +0 -33
  324. package/lib/front_end/models/trace/types/Configuration.ts +0 -110
  325. package/lib/front_end/models/trace/types/Extensions.ts +0 -136
  326. package/lib/front_end/models/trace/types/File.ts +0 -281
  327. package/lib/front_end/models/trace/types/Overlays.ts +0 -138
  328. package/lib/front_end/models/trace/types/Timing.ts +0 -30
  329. package/lib/front_end/models/trace/types/TraceEvents.ts +0 -3277
  330. package/lib/front_end/models/trace/types/types.ts +0 -10
  331. package/lib/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +0 -240
  332. package/lib/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +0 -5
  333. package/lib/front_end/models/workspace/FileManager.ts +0 -97
  334. package/lib/front_end/models/workspace/IgnoreListManager.ts +0 -628
  335. package/lib/front_end/models/workspace/SearchConfig.ts +0 -149
  336. package/lib/front_end/models/workspace/UISourceCode.ts +0 -698
  337. package/lib/front_end/models/workspace/WorkspaceImpl.ts +0 -339
  338. package/lib/front_end/models/workspace/workspace.ts +0 -17
  339. package/lib/front_end/panels/timeline/TimelineUIUtils.ts +0 -1029
  340. package/lib/front_end/panels/timeline/extensions/ExtensionUI.ts +0 -49
  341. package/lib/front_end/panels/timeline/extensions/extensions.ts +0 -9
  342. package/lib/front_end/third_party/codemirror.next/LICENSE +0 -21
  343. package/lib/front_end/third_party/codemirror.next/README.chromium +0 -30
  344. package/lib/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
  345. package/lib/front_end/third_party/codemirror.next/bundle.ts +0 -135
  346. package/lib/front_end/third_party/codemirror.next/chunk/angular.js +0 -2
  347. package/lib/front_end/third_party/codemirror.next/chunk/angular.js.map +0 -1
  348. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js +0 -2
  349. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js.map +0 -1
  350. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js +0 -2
  351. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js.map +0 -1
  352. package/lib/front_end/third_party/codemirror.next/chunk/css.js +0 -2
  353. package/lib/front_end/third_party/codemirror.next/chunk/html.js +0 -4
  354. package/lib/front_end/third_party/codemirror.next/chunk/java.js +0 -2
  355. package/lib/front_end/third_party/codemirror.next/chunk/java.js.map +0 -1
  356. package/lib/front_end/third_party/codemirror.next/chunk/javascript.js +0 -2
  357. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js +0 -2
  358. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js.map +0 -1
  359. package/lib/front_end/third_party/codemirror.next/chunk/less.js +0 -2
  360. package/lib/front_end/third_party/codemirror.next/chunk/less.js.map +0 -1
  361. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js +0 -2
  362. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js.map +0 -1
  363. package/lib/front_end/third_party/codemirror.next/chunk/php.js +0 -2
  364. package/lib/front_end/third_party/codemirror.next/chunk/php.js.map +0 -1
  365. package/lib/front_end/third_party/codemirror.next/chunk/python.js +0 -2
  366. package/lib/front_end/third_party/codemirror.next/chunk/python.js.map +0 -1
  367. package/lib/front_end/third_party/codemirror.next/chunk/sass.js +0 -2
  368. package/lib/front_end/third_party/codemirror.next/chunk/sass.js.map +0 -1
  369. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js +0 -2
  370. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js.map +0 -1
  371. package/lib/front_end/third_party/codemirror.next/chunk/vue.js +0 -2
  372. package/lib/front_end/third_party/codemirror.next/chunk/vue.js.map +0 -1
  373. package/lib/front_end/third_party/codemirror.next/chunk/wast.js +0 -2
  374. package/lib/front_end/third_party/codemirror.next/chunk/wast.js.map +0 -1
  375. package/lib/front_end/third_party/codemirror.next/chunk/xml.js +0 -2
  376. package/lib/front_end/third_party/codemirror.next/chunk/xml.js.map +0 -1
  377. package/lib/front_end/third_party/codemirror.next/codemirror.next.d.ts +0 -8057
  378. package/lib/front_end/third_party/codemirror.next/codemirror.next.js +0 -2
  379. package/lib/front_end/third_party/codemirror.next/codemirror.next.js.map +0 -1
  380. package/lib/front_end/third_party/codemirror.next/package.json +0 -43
  381. package/lib/front_end/third_party/codemirror.next/rebuild.sh +0 -6
  382. package/lib/front_end/third_party/codemirror.next/rollup.config.mjs +0 -49
  383. package/lib/front_end/third_party/i18n/LICENSE +0 -202
  384. package/lib/front_end/third_party/i18n/README.chromium +0 -15
  385. package/lib/front_end/third_party/i18n/i18n-impl.ts +0 -61
  386. package/lib/front_end/third_party/i18n/i18n.ts +0 -11
  387. package/lib/front_end/third_party/i18n/localized-string-set.ts +0 -129
  388. package/lib/front_end/third_party/intl-messageformat/LICENSE +0 -33
  389. package/lib/front_end/third_party/intl-messageformat/README.chromium +0 -24
  390. package/lib/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
  391. package/lib/front_end/third_party/intl-messageformat/intl-messageformat.ts +0 -6
  392. package/lib/front_end/third_party/intl-messageformat/package/LICENSE.md +0 -33
  393. package/lib/front_end/third_party/intl-messageformat/package/README.md +0 -3
  394. package/lib/front_end/third_party/intl-messageformat/package/index.d.ts +0 -6
  395. package/lib/front_end/third_party/intl-messageformat/package/index.d.ts.map +0 -1
  396. package/lib/front_end/third_party/intl-messageformat/package/index.js +0 -13
  397. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.d.ts +0 -5
  398. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js +0 -1710
  399. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.iife.js +0 -1815
  400. package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts +0 -6
  401. package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts.map +0 -1
  402. package/lib/front_end/third_party/intl-messageformat/package/lib/index.js +0 -10
  403. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts +0 -34
  404. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts.map +0 -1
  405. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.js +0 -229
  406. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts +0 -28
  407. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts.map +0 -1
  408. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.js +0 -48
  409. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts +0 -34
  410. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts.map +0 -1
  411. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.js +0 -179
  412. package/lib/front_end/third_party/intl-messageformat/package/package.json +0 -42
  413. package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts +0 -34
  414. package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts.map +0 -1
  415. package/lib/front_end/third_party/intl-messageformat/package/src/core.js +0 -230
  416. package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts +0 -28
  417. package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts.map +0 -1
  418. package/lib/front_end/third_party/intl-messageformat/package/src/error.js +0 -51
  419. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts +0 -34
  420. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts.map +0 -1
  421. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.js +0 -182
  422. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/error.d.ts +0 -79
  423. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/index.d.ts +0 -15
  424. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/parser.d.ts +0 -153
  425. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/types.d.ts +0 -139
  426. package/lib/front_end/third_party/legacy-javascript/LICENSE +0 -202
  427. package/lib/front_end/third_party/legacy-javascript/README.chromium +0 -13
  428. package/lib/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
  429. package/lib/front_end/third_party/legacy-javascript/legacy-javascript.ts +0 -3
  430. package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.d.ts +0 -18
  431. package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -943
  432. package/lib/front_end/third_party/legacy-javascript/package.json +0 -8
  433. package/lib/front_end/third_party/legacy-javascript/rebuild.sh +0 -9
  434. package/lib/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
  435. package/lib/front_end/third_party/source-map-scopes-codec/README.chromium +0 -31
  436. package/lib/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -33
  437. package/lib/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -26
  438. package/lib/front_end/third_party/source-map-scopes-codec/package/README.md +0 -64
  439. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -62
  440. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +0 -1
  441. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -37
  442. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -1
  443. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -29
  444. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -1
  445. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -8
  446. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -1
  447. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -6
  448. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -1
  449. package/lib/front_end/third_party/source-map-scopes-codec/package/deno.json +0 -21
  450. package/lib/front_end/third_party/source-map-scopes-codec/package/package.json +0 -14
  451. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
  452. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +0 -1
  453. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +0 -262
  454. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -235
  455. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -1
  456. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -359
  457. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -39
  458. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -1
  459. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -53
  460. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -438
  461. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -1
  462. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -539
  463. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -23
  464. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -1
  465. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -35
  466. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -257
  467. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -1
  468. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -348
  469. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -8
  470. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -1
  471. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -20
  472. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +0 -8
  473. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -184
  474. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
  475. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -1
  476. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -12
  477. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -82
  478. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -1
  479. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -99
  480. package/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.ts +0 -5
  481. package/lib/front_end/third_party/third-party-web/LICENSE +0 -20
  482. package/lib/front_end/third_party/third-party-web/README.chromium +0 -13
  483. package/lib/front_end/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
  484. package/lib/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -149
  485. package/lib/front_end/third_party/third-party-web/package/LICENSE +0 -20
  486. package/lib/front_end/third_party/third-party-web/package/README.md +0 -929
  487. package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +0 -1
  488. package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +0 -1
  489. package/lib/front_end/third_party/third-party-web/package/dist/entities-nostats.json +0 -1
  490. package/lib/front_end/third_party/third-party-web/package/dist/entities.json +0 -1
  491. package/lib/front_end/third_party/third-party-web/package/facades.md +0 -46
  492. package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.d.ts +0 -1
  493. package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -1
  494. package/lib/front_end/third_party/third-party-web/package/httparchive-subset.d.ts +0 -1
  495. package/lib/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -1
  496. package/lib/front_end/third_party/third-party-web/package/lib/__snapshots__/index.test.js.snap +0 -1006
  497. package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -139
  498. package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -44
  499. package/lib/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -27
  500. package/lib/front_end/third_party/third-party-web/package/lib/index.d.ts +0 -34
  501. package/lib/front_end/third_party/third-party-web/package/lib/index.js +0 -3
  502. package/lib/front_end/third_party/third-party-web/package/lib/index.test.js +0 -246
  503. package/lib/front_end/third_party/third-party-web/package/lib/markdown/faqs.partial.md +0 -36
  504. package/lib/front_end/third_party/third-party-web/package/lib/markdown/goals.partial.md +0 -9
  505. package/lib/front_end/third_party/third-party-web/package/lib/markdown/methodology.partial.md +0 -5
  506. package/lib/front_end/third_party/third-party-web/package/lib/markdown/template.md +0 -151
  507. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-02-01.md +0 -1
  508. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-03-01.md +0 -1
  509. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-06.md +0 -1
  510. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-13.md +0 -14
  511. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2021-01-01.md +0 -1
  512. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2024-07-01.md +0 -3
  513. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts +0 -1
  514. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -3
  515. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.d.ts +0 -1
  516. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -3
  517. package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
  518. package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -3
  519. package/lib/front_end/third_party/third-party-web/package/nostats-subset.d.ts +0 -1
  520. package/lib/front_end/third_party/third-party-web/package/nostats-subset.js +0 -1
  521. package/lib/front_end/third_party/third-party-web/package/package.json +0 -46
  522. package/lib/front_end/third_party/third-party-web/package.json +0 -8
  523. package/lib/front_end/third_party/third-party-web/rebuild.sh +0 -13
  524. package/lib/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
  525. package/lib/front_end/third_party/third-party-web/third-party-web.ts +0 -3
  526. package/lib/front_end/ui/legacy/theme_support/ThemeSupport.ts +0 -222
  527. package/lib/front_end/ui/legacy/theme_support/theme_support.ts +0 -5
  528. package/patches/chrome-devtools-frontend+1.0.1533544.patch +0 -1716
@@ -1,1029 +0,0 @@
1
- // Copyright 2021 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
- /* eslint-disable @devtools/no-imperative-dom-api */
5
-
6
- /*
7
- * Copyright (C) 2013 Google Inc. All rights reserved.
8
- * Copyright (C) 2012 Intel Inc. All rights reserved.
9
- *
10
- * Redistribution and use in source and binary forms, with or without
11
- * modification, are permitted provided that the following conditions are
12
- * met:
13
- *
14
- * * Redistributions of source code must retain the above copyright
15
- * notice, this list of conditions and the following disclaimer.
16
- * * Redistributions in binary form must reproduce the above
17
- * copyright notice, this list of conditions and the following disclaimer
18
- * in the documentation and/or other materials provided with the
19
- * distribution.
20
- * * Neither the name of Google Inc. nor the names of its
21
- * contributors may be used to endorse or promote products derived from
22
- * this software without specific prior written permission.
23
- *
24
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
- */
36
-
37
- import * as Common from '../../core/common/common.js';
38
- import * as i18n from '../../core/i18n/i18n.js';
39
- import * as Platform from '../../core/platform/platform.js';
40
- import * as Root from '../../core/root/root.js';
41
- import type * as Protocol from '../../generated/protocol.js';
42
- import * as Trace from '../../models/trace/trace.js';
43
- import * as SourceMapsResolver from '../../models/trace_source_maps_resolver/trace_source_maps_resolver.js';
44
- import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
45
-
46
- import * as Extensions from './extensions/extensions.js';
47
-
48
- const UIStrings = {
49
- /**
50
- * @description Text that only contain a placeholder
51
- * @example {100ms (at 200ms)} PH1
52
- */
53
- emptyPlaceholder: '{PH1}', // eslint-disable-line @devtools/l10n-no-locked-or-placeholder-only-phrase
54
- /**
55
- * @description Text for timestamps of items
56
- */
57
- timestamp: 'Timestamp',
58
- /**
59
- * @description Text shown next to the interaction event's ID in the detail view.
60
- */
61
- interactionID: 'ID',
62
- /**
63
- * @description Text shown next to the interaction event's input delay time in the detail view.
64
- */
65
- inputDelay: 'Input delay',
66
- /**
67
- * @description Text shown next to the interaction event's thread processing duration in the detail view.
68
- */
69
- processingDuration: 'Processing duration',
70
- /**
71
- * @description Text shown next to the interaction event's presentation delay time in the detail view.
72
- */
73
- presentationDelay: 'Presentation delay',
74
- /**
75
- * @description Text shown when the user has selected an event that represents script compiliation.
76
- */
77
- compile: 'Compile',
78
- /**
79
- * @description Text shown when the user selects an event that represents script parsing.
80
- */
81
- parse: 'Parse',
82
- /**
83
- * @description Text with two placeholders separated by a colon
84
- * @example {Node removed} PH1
85
- * @example {div#id1} PH2
86
- */
87
- sS: '{PH1}: {PH2}',
88
- /**
89
- * @description Text that is usually a hyperlink to more documentation
90
- */
91
- learnMore: 'Learn more',
92
- /**
93
- * @description Text referring to the status of the browser's compilation cache.
94
- */
95
- compilationCacheStatus: 'Compilation cache status',
96
- /**
97
- * @description Text referring to the size of the browser's compiliation cache.
98
- */
99
- compilationCacheSize: 'Compilation cache size',
100
- /**
101
- * @description Text in Timeline UIUtils of the Performance panel. "Compilation
102
- * cache" refers to the code cache described at
103
- * https://v8.dev/blog/code-caching-for-devs . This label is followed by the
104
- * type of code cache data used, either "normal" or "full" as described in the
105
- * linked article.
106
- */
107
- compilationCacheKind: 'Compilation cache kind',
108
- /**
109
- * @description Text used to inform the user that the script they are looking
110
- * at was loaded from the browser's cache.
111
- */
112
- scriptLoadedFromCache: 'script loaded from cache',
113
- /**
114
- * @description Text to inform the user that the script they are looking at
115
- * was unable to be loaded from the browser's cache.
116
- */
117
- failedToLoadScriptFromCache: 'failed to load script from cache',
118
- /**
119
- * @description Text to inform the user that the script they are looking at was not eligible to be loaded from the browser's cache.
120
- */
121
- scriptNotEligibleToBeLoadedFromCache: 'script not eligible',
122
- /**
123
- * @description Label in the summary view in the Performance panel for a number which indicates how much managed memory has been reclaimed by performing Garbage Collection
124
- */
125
- collected: 'Collected',
126
- /**
127
- * @description Text for a programming function
128
- */
129
- function: 'Function',
130
- /**
131
- * @description Text for referring to the ID of a timer.
132
- */
133
- timerId: 'Timer ID',
134
- /**
135
- * @description Text for referring to a timer that has timed-out and therefore is being removed.
136
- */
137
- timeout: 'Timeout',
138
- /**
139
- * @description Text used to refer to a positive timeout value that schedules the idle callback once elapsed, even if no idle time is available.
140
- */
141
- requestIdleCallbackTimeout: 'Timeout',
142
- /**
143
- * @description Text used to indicate that a timer is repeating (e.g. every X seconds) rather than a one off.
144
- */
145
- repeats: 'Repeats',
146
- /**
147
- * @description Text for referring to the ID of a callback function installed by an event.
148
- */
149
- callbackId: 'Callback ID',
150
- /**
151
- * @description Text for a module, the programming concept
152
- */
153
- module: 'Module',
154
- /**
155
- * @description Label for a group of JavaScript files
156
- */
157
- script: 'Script',
158
- /**
159
- * @description Text used to tell a user that a compilation trace event was streamed.
160
- */
161
- streamed: 'Streamed',
162
- /**
163
- * @description Text to indicate if a compilation event was eager.
164
- */
165
- eagerCompile: 'Compiling all functions eagerly',
166
- /**
167
- * @description Text to refer to the URL associated with a given event.
168
- */
169
- url: 'Url',
170
- /**
171
- * @description Text to indicate to the user the size of the cache (as a filesize - e.g. 5mb).
172
- */
173
- producedCacheSize: 'Produced cache size',
174
- /**
175
- * @description Text to indicate to the user the amount of the cache (as a filesize - e.g. 5mb) that has been used.
176
- */
177
- consumedCacheSize: 'Consumed cache size',
178
- /**
179
- * @description Related node label in Timeline UIUtils of the Performance panel
180
- */
181
- layerRoot: 'Layer root',
182
- /**
183
- * @description Related node label in Timeline UIUtils of the Performance panel
184
- */
185
- ownerElement: 'Owner element',
186
- /**
187
- * @description Text used to show the user the URL of the image they are viewing.
188
- */
189
- imageUrl: 'Image URL',
190
- /**
191
- * @description Text used to show the user that the URL they are viewing is loading a CSS stylesheet.
192
- */
193
- stylesheetUrl: 'Stylesheet URL',
194
- /**
195
- * @description Text used next to a number to show the user how many elements were affected.
196
- */
197
- elementsAffected: 'Elements affected',
198
- /**
199
- * @description Text used next to a number to show the user how many nodes required the browser to update and re-layout the page.
200
- */
201
- nodesThatNeedLayout: 'Nodes that need layout',
202
- /**
203
- * @description Text used to show the amount in a subset - e.g. "2 of 10".
204
- * @example {2} PH1
205
- * @example {10} PH2
206
- */
207
- sOfS: '{PH1} of {PH2}',
208
- /**
209
- * @description Related node label in Timeline UIUtils of the Performance panel
210
- */
211
- layoutRoot: 'Layout root',
212
- /**
213
- * @description Text used when viewing an event that can have a custom message attached.
214
- */
215
- message: 'Message',
216
- /**
217
- * @description Text used to tell the user they are viewing an event that has a function embedded in it, which is referred to as the "callback function".
218
- */
219
- callbackFunction: 'Callback function',
220
- /**
221
- * @description Text used to show the relevant range of a file - e.g. "lines 2-10".
222
- */
223
- range: 'Range',
224
- /**
225
- * @description Text used to refer to the amount of time some event or code was given to complete within.
226
- */
227
- allottedTime: 'Allotted time',
228
- /**
229
- * @description Text used to tell a user that a particular event or function was automatically run by a timeout.
230
- */
231
- invokedByTimeout: 'Invoked by timeout',
232
- /**
233
- * @description Text that refers to some types
234
- */
235
- type: 'Type',
236
- /**
237
- * @description Text for the size of something
238
- */
239
- size: 'Size',
240
- /**
241
- * @description Text for the details of something
242
- */
243
- details: 'Details',
244
- /**
245
- * @description Text to indicate an item is a warning
246
- */
247
- warning: 'Warning',
248
- /**
249
- * @description Text that indicates a particular HTML element or node is related to what the user is viewing.
250
- */
251
- relatedNode: 'Related node',
252
- /**
253
- * @description Text for previewing items
254
- */
255
- preview: 'Preview',
256
- /**
257
- * @description Text used to refer to the total time summed up across multiple events.
258
- */
259
- aggregatedTime: 'Aggregated time',
260
- /**
261
- * @description Text for the duration of something
262
- */
263
- duration: 'Duration',
264
- /**
265
- * @description Text for the stack trace of the initiator of something. The Initiator is the event or factor that directly triggered or precipitated a subsequent action.
266
- */
267
- initiatorStackTrace: 'Initiator stack trace',
268
- /**
269
- * @description Text for the event initiated by another one
270
- */
271
- initiatedBy: 'Initiated by',
272
- /**
273
- * @description Text for the event that is an initiator for another one
274
- */
275
- initiatorFor: 'Initiator for',
276
- /**
277
- * @description Text for the underlying data behing a specific flamechart selection. Trace events are the browser instrumentation that are emitted as JSON objects.
278
- */
279
- traceEvent: 'Trace event',
280
- /**
281
- * @description Call site stack label in Timeline UIUtils of the Performance panel
282
- */
283
- timerInstalled: 'Timer installed',
284
- /**
285
- * @description Call site stack label in Timeline UIUtils of the Performance panel
286
- */
287
- animationFrameRequested: 'Animation frame requested',
288
- /**
289
- * @description Call site stack label in Timeline UIUtils of the Performance panel
290
- */
291
- idleCallbackRequested: 'Idle callback requested',
292
- /**
293
- * @description Stack label in Timeline UIUtils of the Performance panel
294
- */
295
- recalculationForced: 'Recalculation forced',
296
- /**
297
- * @description Call site stack label in Timeline UIUtils of the Performance panel
298
- */
299
- firstLayoutInvalidation: 'First layout invalidation',
300
- /**
301
- * @description Stack label in Timeline UIUtils of the Performance panel
302
- */
303
- layoutForced: 'Layout forced',
304
- /**
305
- * @description Label in front of CSS property (eg `opacity`) being animated or a CSS animation name (eg `layer-4-fade-in-out`)
306
- */
307
- animating: 'Animating',
308
- /**
309
- * @description Label in front of reasons why a CSS animation wasn't composited (aka hardware accelerated)
310
- */
311
- compositingFailed: 'Compositing failed',
312
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to accelerated animations being disabled. Shown in a table with a list of other potential failure reasons. */
313
- compositingFailedAcceleratedAnimationsDisabled: 'Accelerated animations disabled',
314
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to DevTools suppressing the effect. Shown in a table with a list of other potential failure reasons. */
315
- compositingFailedEffectSuppressedByDevtools: 'Effect suppressed by DevTools ',
316
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the animation or effect being invalid. Shown in a table with a list of other potential failure reasons. */
317
- compositingFailedInvalidAnimationOrEffect: 'Invalid animation or effect',
318
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to an effect having unsupported timing parameters. Shown in a table with a list of other potential failure reasons. */
319
- compositingFailedEffectHasUnsupportedTimingParams: 'Effect has unsupported timing parameters',
320
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to an effect having a composite mode which is not `replace`. Shown in a table with a list of other potential failure reasons. */
321
- compositingFailedEffectHasNonReplaceCompositeMode: 'Effect has composite mode other than "replace"',
322
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the target being in an invalid compositing state. Shown in a table with a list of other potential failure reasons. */
323
- compositingFailedTargetHasInvalidCompositingState: 'Target has invalid compositing state',
324
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to another animation on the same target being incompatible. Shown in a table with a list of other potential failure reasons. */
325
- compositingFailedTargetHasIncompatibleAnimations: 'Target has another animation which is incompatible',
326
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the target having a CSS offset. Shown in a table with a list of other potential failure reasons. */
327
- compositingFailedTargetHasCSSOffset: 'Target has CSS offset',
328
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the animation affecting non-CSS properties. Shown in a table with a list of other potential failure reasons. */
329
- compositingFailedAnimationAffectsNonCSSProperties: 'Animation affects non-CSS properties',
330
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the transform-related property not being able to be animated on the target. Shown in a table with a list of other potential failure reasons. */
331
- compositingFailedTransformRelatedPropertyCannotBeAcceleratedOnTarget:
332
- 'Transform-related property cannot be accelerated on target',
333
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to a `transform` property being dependent on the size of the element itself. Shown in a table with a list of other potential failure reasons. */
334
- compositingFailedTransformDependsBoxSize: 'Transform-related property depends on box size',
335
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to a `filter` property possibly moving pixels. Shown in a table with a list of other potential failure reasons. */
336
- compositingFailedFilterRelatedPropertyMayMovePixels: 'Filter-related property may move pixels',
337
- /**
338
- * @description [ICU Syntax] Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the animated CSS property not being supported on the compositor. Shown in a table with a list of other potential failure reasons.
339
- * @example {height, width} properties
340
- */
341
- compositingFailedUnsupportedCSSProperty: `{propertyCount, plural,
342
- =1 {Unsupported CSS property: {properties}}
343
- other {Unsupported CSS properties: {properties}}
344
- }`,
345
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to mixing keyframe value types. Shown in a table with a list of other potential failure reasons. */
346
- compositingFailedMixedKeyframeValueTypes: 'Mixed keyframe value types',
347
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the timeline source being in an invalid compositing state. Shown in a table with a list of other potential failure reasons. */
348
- compositingFailedTimelineSourceHasInvalidCompositingState: 'Timeline source has invalid compositing state',
349
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the animation having no visible change. Shown in a table with a list of other potential failure reasons. */
350
- compositingFailedAnimationHasNoVisibleChange: 'Animation has no visible change',
351
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to an effect affecting an important property. Shown in a table with a list of other potential failure reasons. */
352
- compositingFailedAffectsImportantProperty: 'Effect affects a property with !important',
353
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to the SVG target having an independent transfrom property. Shown in a table with a list of other potential failure reasons. */
354
- compositingFailedSVGTargetHasIndependentTransformProperty: 'SVG target has independent transform property',
355
- /** Descriptive reason for why a user-provided animation failed to be optimized by the browser due to an unknown reason. Shown in a table with a list of other potential failure reasons. */
356
- compositingFailedUnknownReason: 'Unknown Reason',
357
-
358
- /**
359
- * @description Text for the execution "stack trace". It is not technically a stack trace, because it points to the beginning of each function
360
- * and not to each call site, so we call it a function stack instead to avoid confusion.
361
- */
362
- functionStack: 'Function stack',
363
- /**
364
- * @description Text used to show any invalidations for a particular event that caused the browser to have to do more work to update the page.
365
- * @example {2} PH1
366
- */
367
- invalidations: 'Invalidations ({PH1} total)',
368
- /**
369
- * @description Text in Timeline UIUtils of the Performance panel. Phrase is followed by a number of milliseconds.
370
- * Some events or tasks might have been only started, but have not ended yet. Such events or tasks are considered
371
- * "pending".
372
- */
373
- pendingFor: 'Pending for',
374
- /**
375
- * @description Noun label for a stack trace which indicates the first time some condition was invalidated.
376
- */
377
- firstInvalidated: 'First invalidated',
378
- /**
379
- * @description Title of the paint profiler, old name of the performance pane
380
- */
381
- paintProfiler: 'Paint profiler',
382
- /**
383
- * @description Text in Timeline Flame Chart View of the Performance panel
384
- * @example {Frame} PH1
385
- * @example {10ms} PH2
386
- */
387
- sAtS: '{PH1} at {PH2}',
388
- /**
389
- * @description Text used next to a time to indicate that the particular event took that much time itself. In context this might look like "3ms blink.console (self)"
390
- * @example {blink.console} PH1
391
- */
392
- sSelf: '{PH1} (self)',
393
- /**
394
- * @description Text used next to a time to indicate that the event's children took that much time. In context this might look like "3ms blink.console (children)"
395
- * @example {blink.console} PH1
396
- */
397
- sChildren: '{PH1} (children)',
398
- /**
399
- * @description Text used to show the user how much time the browser spent on rendering (drawing the page onto the screen).
400
- */
401
- timeSpentInRendering: 'Time spent in rendering',
402
- /**
403
- * @description Text for a rendering frame
404
- */
405
- frame: 'Frame',
406
- /**
407
- * @description Text used to refer to the duration of an event at a given offset - e.g. "2ms at 10ms" which can be read as "2ms starting after 10ms".
408
- * @example {10ms} PH1
409
- * @example {10ms} PH2
410
- */
411
- sAtSParentheses: '{PH1} (at {PH2})',
412
- /**
413
- * @description Text of a DOM element in Timeline UIUtils of the Performance panel
414
- */
415
- UnknownNode: '[ unknown node ]',
416
- /**
417
- * @description Text used to refer to a particular element and the file it was referred to in.
418
- * @example {node} PH1
419
- * @example {app.js} PH2
420
- */
421
- invalidationWithCallFrame: '{PH1} at {PH2}',
422
- /**
423
- * @description Text indicating that something is outside of the Performace Panel Timeline Minimap range
424
- */
425
- outsideBreadcrumbRange: '(outside of the breadcrumb range)',
426
- /**
427
- * @description Text indicating that something is hidden from the Performace Panel Timeline
428
- */
429
- entryIsHidden: '(entry is hidden)',
430
- /**
431
- * @description Title of a row in the details view for a `Recalculate Styles` event that contains more info about selector stats tracing.
432
- */
433
- selectorStatsTitle: 'Selector stats',
434
- /**
435
- * @description Info text that explains to the user how to enable selector stats tracing.
436
- * @example {Setting Name} PH1
437
- */
438
- sSelectorStatsInfo: 'Select "{PH1}" to collect detailed CSS selector matching statistics.',
439
- /**
440
- * @description Label for a numeric value that was how long to wait before a function was run.
441
- */
442
- delay: 'Delay',
443
- /**
444
- * @description Label for a string that describes the priority at which a task was scheduled, like 'background' for low-priority tasks, and 'user-blocking' for high priority.
445
- */
446
- priority: 'Priority',
447
- /**
448
- * @description Label for third party table.
449
- */
450
- thirdPartyTable: '1st / 3rd party table',
451
- /**
452
- * @description Label for the a source URL.
453
- */
454
- source: 'Source',
455
- /**
456
- * @description Label for a URL origin.
457
- */
458
- origin: 'Origin',
459
- } as const;
460
- const str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineUIUtils.ts', UIStrings);
461
- const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
462
-
463
- /** Look for scheme:// plus text and exclude any punctuation at the end. **/
464
- export const URL_REGEX = /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/)[^\s"]{2,}[^\s"'\)\}\],:;.!?]/u;
465
-
466
- let eventDispatchDesciptors: EventDispatchTypeDescriptor[];
467
-
468
- let colorGenerator: Common.Color.Generator;
469
-
470
- type TimeRangeCategoryStats = Record<string, number>;
471
-
472
- const {SamplesIntegrator} = Trace.Helpers.SamplesIntegrator;
473
-
474
- export class TimelineUIUtils {
475
- /**
476
- * use getGetDebugModeEnabled() to query this variable.
477
- */
478
- static debugModeEnabled: boolean|undefined = undefined;
479
- static getGetDebugModeEnabled(): boolean {
480
- if (TimelineUIUtils.debugModeEnabled === undefined) {
481
- TimelineUIUtils.debugModeEnabled =
482
- Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_DEBUG_MODE);
483
- }
484
- return TimelineUIUtils.debugModeEnabled;
485
- }
486
- static frameDisplayName(frame: Protocol.Runtime.CallFrame): string {
487
- const maybeResolvedData = SourceMapsResolver.SourceMapsResolver.resolvedCodeLocationForCallFrame(frame);
488
- const functionName = maybeResolvedData?.name || frame.functionName;
489
- const nativeGroup = SamplesIntegrator.nativeGroup(functionName);
490
- switch (nativeGroup) {
491
- case SamplesIntegrator.NativeGroups.COMPILE:
492
- return i18nString(UIStrings.compile);
493
- case SamplesIntegrator.NativeGroups.PARSE:
494
- return i18nString(UIStrings.parse);
495
- }
496
- return functionName;
497
- }
498
-
499
- static testContentMatching(
500
- traceEvent: Trace.Types.Events.Event, regExp: RegExp, handlerData?: Trace.Handlers.Types.HandlerData): boolean {
501
- const title = TimelineUIUtils.eventStyle(traceEvent).title;
502
- const tokens = [title];
503
-
504
- if (Trace.Types.Events.isProfileCall(traceEvent)) {
505
- // In the future this case will not be possible - wherever we call this
506
- // function we will be able to pass in the data from the new engine. But
507
- // currently this is called in a variety of places including from the
508
- // legacy model which does not have a reference to the new engine's data.
509
- // So if we are missing the data, we just fallback to the name from the
510
- // callFrame.
511
- if (!handlerData?.Samples) {
512
- tokens.push(traceEvent.callFrame.functionName);
513
- } else {
514
- tokens.push(Trace.Handlers.ModelHandlers.Samples.getProfileCallFunctionName(handlerData.Samples, traceEvent));
515
- }
516
- }
517
- if (handlerData) {
518
- const url = Trace.Handlers.Helpers.getNonResolvedURL(traceEvent, handlerData);
519
- if (url) {
520
- tokens.push(url);
521
- }
522
- }
523
- if (TimelineUIUtils.getGetDebugModeEnabled()) {
524
- // When in debug mode append top level properties (like timestamp)
525
- // and deeply nested properties.
526
- appendObjectProperties(traceEvent as unknown as ContentObject, 4);
527
- } else {
528
- appendObjectProperties(traceEvent.args as ContentObject, 2);
529
- }
530
- const result = tokens.join('|').match(regExp);
531
- return result ? result.length > 0 : false;
532
-
533
- interface ContentObject {
534
- [x: string]: number|string|ContentObject;
535
- }
536
- function appendObjectProperties(object: ContentObject, depth: number): void {
537
- if (!depth) {
538
- return;
539
- }
540
- for (const key in object) {
541
- const value = object[key];
542
- if (typeof value === 'string') {
543
- tokens.push(value);
544
- } else if (typeof value === 'number') {
545
- tokens.push(String(value));
546
- } else if (typeof value === 'object' && value !== null) {
547
- appendObjectProperties(value, depth - 1);
548
- }
549
- }
550
- }
551
- }
552
-
553
- static eventStyle(event: Trace.Types.Events.Event): Trace.Styles.TimelineRecordStyle {
554
- if (Trace.Types.Events.isProfileCall(event) && event.callFrame.functionName === '(idle)') {
555
- return new Trace.Styles.TimelineRecordStyle(event.name, Trace.Styles.getCategoryStyles().idle);
556
- }
557
-
558
- if (event.cat === Trace.Types.Events.Categories.Console || event.cat === Trace.Types.Events.Categories.UserTiming) {
559
- return new Trace.Styles.TimelineRecordStyle(event.name, Trace.Styles.getCategoryStyles()['scripting']);
560
- }
561
-
562
- return Trace.Styles.getEventStyle(event.name as Trace.Types.Events.Name) ??
563
- new Trace.Styles.TimelineRecordStyle(event.name, Trace.Styles.getCategoryStyles().other);
564
- }
565
-
566
- static eventColor(event: Trace.Types.Events.Event): string {
567
- if (Trace.Types.Events.isProfileCall(event)) {
568
- const frame = event.callFrame;
569
- if (TimelineUIUtils.isUserFrame(frame)) {
570
- // TODO(andoli): This should use the resolved (sourcemapped) URL
571
- return TimelineUIUtils.colorForId(frame.url);
572
- }
573
- }
574
- if (Trace.Types.Extensions.isSyntheticExtensionEntry(event)) {
575
- return Extensions.ExtensionUI.extensionEntryColor(event);
576
- }
577
- const themeSupport = ThemeSupport.ThemeSupport.instance();
578
- let parsedColor = themeSupport.getComputedValue(TimelineUIUtils.eventStyle(event).category.cssVariable);
579
- // This event is considered idle time but still rendered as a scripting event here
580
- // to connect the StreamingCompileScriptParsing events it belongs to.
581
- if (event.name === Trace.Types.Events.Name.STREAMING_COMPILE_SCRIPT_WAITING) {
582
- parsedColor = themeSupport.getComputedValue(Trace.Styles.getCategoryStyles().scripting.cssVariable);
583
- if (!parsedColor) {
584
- throw new Error('Unable to parse color from getCategoryStyles().scripting.color');
585
- }
586
- }
587
- return parsedColor;
588
- }
589
-
590
- static eventTitle(event: Trace.Types.Events.Event): string {
591
- // Profile call events do not have a args.data property, thus, we
592
- // need to check for profile calls in the beginning of this
593
- // function.
594
- if (Trace.Types.Events.isProfileCall(event)) {
595
- const maybeResolvedData = SourceMapsResolver.SourceMapsResolver.resolvedCodeLocationForEntry(event);
596
- const displayName = maybeResolvedData?.name || TimelineUIUtils.frameDisplayName(event.callFrame);
597
- return displayName;
598
- }
599
- if (event.name === 'EventTiming' && Trace.Types.Events.isSyntheticInteraction(event)) {
600
- // TODO(crbug.com/365047728): replace this entire method with this call.
601
- return Trace.Name.forEntry(event);
602
- }
603
- const title = TimelineUIUtils.eventStyle(event).title;
604
- if (Trace.Helpers.Trace.eventHasCategory(event, Trace.Types.Events.Categories.Console)) {
605
- return title;
606
- }
607
- if (Trace.Types.Events.isConsoleTimeStamp(event) && event.args.data) {
608
- return i18nString(UIStrings.sS, {PH1: title, PH2: event.args.data.name ?? event.args.data.message});
609
- }
610
- if (Trace.Types.Events.isAnimation(event) && event.args.data.name) {
611
- return i18nString(UIStrings.sS, {PH1: title, PH2: event.args.data.name});
612
- }
613
- if (Trace.Types.Events.isDispatch(event)) {
614
- return i18nString(UIStrings.sS, {PH1: title, PH2: event.args.data.type});
615
- }
616
- return title;
617
- }
618
-
619
- static isUserFrame(frame: Protocol.Runtime.CallFrame): boolean {
620
- return frame.scriptId !== '0' && !(frame.url?.startsWith('native '));
621
- }
622
-
623
- static statsForTimeRange(
624
- events: Trace.Types.Events.Event[], startTime: Trace.Types.Timing.Milli,
625
- endTime: Trace.Types.Timing.Milli): TimeRangeCategoryStats {
626
- if (!events.length) {
627
- return {idle: endTime - startTime};
628
- }
629
-
630
- buildRangeStatsCacheIfNeeded(events);
631
- const aggregatedStats = subtractStats(aggregatedStatsAtTime(endTime), aggregatedStatsAtTime(startTime));
632
- const aggregatedTotal = Object.values(aggregatedStats).reduce((a, b) => a + b, 0);
633
- aggregatedStats['idle'] = Math.max(0, endTime - startTime - aggregatedTotal);
634
- return aggregatedStats;
635
-
636
- function aggregatedStatsAtTime(time: number): TimeRangeCategoryStats {
637
- const stats: TimeRangeCategoryStats = {};
638
- // @ts-expect-error TODO(crbug.com/1011811): Remove symbol usage.
639
- const cache = events[categoryBreakdownCacheSymbol];
640
- for (const category in cache) {
641
- const categoryCache = cache[category];
642
- const index =
643
- Platform.ArrayUtilities.upperBound(categoryCache.time, time, Platform.ArrayUtilities.DEFAULT_COMPARATOR);
644
- let value;
645
- if (index === 0) {
646
- value = 0;
647
- } else if (index === categoryCache.time.length) {
648
- value = categoryCache.value[categoryCache.value.length - 1];
649
- } else {
650
- const t0 = categoryCache.time[index - 1];
651
- const t1 = categoryCache.time[index];
652
- const v0 = categoryCache.value[index - 1];
653
- const v1 = categoryCache.value[index];
654
- value = v0 + (v1 - v0) * (time - t0) / (t1 - t0);
655
- }
656
- stats[category] = value;
657
- }
658
- return stats;
659
- }
660
-
661
- function subtractStats(a: TimeRangeCategoryStats, b: TimeRangeCategoryStats): TimeRangeCategoryStats {
662
- const result = Object.assign({}, a);
663
- for (const key in b) {
664
- result[key] -= b[key];
665
- }
666
- return result;
667
- }
668
-
669
- function buildRangeStatsCacheIfNeeded(events: Trace.Types.Events.Event[]): void {
670
- // @ts-expect-error TODO(crbug.com/1011811): Remove symbol usage.
671
- if (events[categoryBreakdownCacheSymbol]) {
672
- return;
673
- }
674
-
675
- // aggregatedStats is a map by categories. For each category there's an array
676
- // containing sorted time points which records accumulated value of the category.
677
- const aggregatedStats: Record<string, {
678
- time: number[],
679
- value: number[],
680
- }> = {};
681
- const categoryStack: string[] = [];
682
- let lastTime = 0;
683
- Trace.Helpers.Trace.forEachEvent(events, {
684
- onStartEvent,
685
- onEndEvent,
686
- });
687
-
688
- function updateCategory(category: string, time: number): void {
689
- let statsArrays: {
690
- time: number[],
691
- value: number[],
692
- } = aggregatedStats[category];
693
- if (!statsArrays) {
694
- statsArrays = {time: [], value: []};
695
- aggregatedStats[category] = statsArrays;
696
- }
697
- if (statsArrays.time.length && statsArrays.time[statsArrays.time.length - 1] === time || lastTime > time) {
698
- return;
699
- }
700
- const lastValue = statsArrays.value.length > 0 ? statsArrays.value[statsArrays.value.length - 1] : 0;
701
- statsArrays.value.push(lastValue + time - lastTime);
702
- statsArrays.time.push(time);
703
- }
704
-
705
- function categoryChange(from: string|null, to: string|null, time: number): void {
706
- if (from) {
707
- updateCategory(from, time);
708
- }
709
- lastTime = time;
710
- if (to) {
711
- updateCategory(to, time);
712
- }
713
- }
714
-
715
- function onStartEvent(e: Trace.Types.Events.Event): void {
716
- const {startTime} = Trace.Helpers.Timing.eventTimingsMilliSeconds(e);
717
- const category = Trace.Styles.getEventStyle(e.name as Trace.Types.Events.Name)?.category.name ||
718
- Trace.Styles.getCategoryStyles().other.name;
719
- const parentCategory = categoryStack.length ? categoryStack[categoryStack.length - 1] : null;
720
- if (category !== parentCategory) {
721
- categoryChange(parentCategory || null, category, startTime);
722
- }
723
- categoryStack.push(category);
724
- }
725
-
726
- function onEndEvent(e: Trace.Types.Events.Event): void {
727
- const {endTime} = Trace.Helpers.Timing.eventTimingsMilliSeconds(e);
728
- const category = categoryStack.pop();
729
- const parentCategory = categoryStack.length ? categoryStack[categoryStack.length - 1] : null;
730
- if (category !== parentCategory) {
731
- categoryChange(category || null, parentCategory || null, endTime || 0);
732
- }
733
- }
734
-
735
- const obj = (events as Object);
736
- // @ts-expect-error TODO(crbug.com/1011811): Remove symbol usage.
737
- obj[categoryBreakdownCacheSymbol] = aggregatedStats;
738
- }
739
- }
740
-
741
- /** Populates the passed object then returns true/false if it makes sense to show the pie chart */
742
- private static aggregatedStatsForTraceEvent(
743
- total: TimeRangeCategoryStats, parsedTrace: Trace.TraceModel.ParsedTrace,
744
- event: Trace.Types.Events.Event): boolean {
745
- const node = parsedTrace.data.Renderer.entryToNode.get(event);
746
- if (!node) {
747
- return false;
748
- }
749
-
750
- // If the event has no children, we cannot calculate a pie chart.
751
- if (node.children.length === 0) {
752
- return false;
753
- }
754
-
755
- const childNodesToVisit: Trace.Helpers.TreeHelpers.TraceEntryNode[] = [...node.children];
756
-
757
- while (childNodesToVisit.length) {
758
- // Traversal order doesn't matter, pop() is more efficient than shift().
759
- const childNode = childNodesToVisit.pop();
760
- if (!childNode) {
761
- continue;
762
- }
763
- const childSelfTime = childNode.selfTime ?? 0;
764
- if (childSelfTime > 0) {
765
- const categoryName = TimelineUIUtils.eventStyle(childNode.entry).category.name;
766
- total[categoryName] = (total[categoryName] || 0) + childSelfTime;
767
- }
768
-
769
- childNodesToVisit.push(...childNode.children);
770
- }
771
-
772
- if (Trace.Types.Events.isPhaseAsync(event.ph)) {
773
- let aggregatedTotal = 0;
774
- for (const categoryName in total) {
775
- aggregatedTotal += total[categoryName];
776
- }
777
-
778
- const {startTime, endTime} = Trace.Helpers.Timing.eventTimingsMicroSeconds(event);
779
- const deltaInMicro = (endTime - startTime) as Trace.Types.Timing.Micro;
780
- total['idle'] = Math.max(0, deltaInMicro - aggregatedTotal);
781
- return false;
782
- }
783
-
784
- for (const categoryName in total) {
785
- const value = total[categoryName] as Trace.Types.Timing.Micro;
786
- // Up until now we've kept the math all in micro integers. Finally switch these sums to milli.
787
- total[categoryName] = Trace.Helpers.Timing.microToMilli(value);
788
- }
789
-
790
- return true;
791
- }
792
-
793
- static createEventDivider(event: Trace.Types.Events.Event, zeroTime: number): HTMLDivElement {
794
- const eventDivider = document.createElement('div');
795
- eventDivider.classList.add('resources-event-divider');
796
- const {startTime: eventStartTime} = Trace.Helpers.Timing.eventTimingsMilliSeconds(event);
797
-
798
- const startTime = i18n.TimeUtilities.millisToString(eventStartTime - zeroTime);
799
- const style = TimelineUIUtils.markerStyleForEvent(event);
800
- if (style.tall) {
801
- eventDivider.style.backgroundColor = style.color;
802
- }
803
- return eventDivider;
804
- }
805
-
806
- static visibleEventsFilter(): Trace.Extras.TraceFilter.TraceFilter {
807
- return new Trace.Extras.TraceFilter.VisibleEventsFilter(Trace.Styles.visibleTypes());
808
- }
809
-
810
- // Included only for layout tests.
811
- // TODO(crbug.com/1386091): Fix/port layout tests and remove.
812
- static categories(): Trace.Styles.CategoryPalette {
813
- return Trace.Styles.getCategoryStyles();
814
- }
815
-
816
- static frameDuration(frame: Trace.Types.Events.LegacyTimelineFrame): Element {
817
- const offsetMilli = Trace.Helpers.Timing.microToMilli(frame.startTimeOffset);
818
- const durationMilli = Trace.Helpers.Timing.microToMilli(Trace.Types.Timing.Micro(frame.endTime - frame.startTime));
819
-
820
- const durationText = i18nString(UIStrings.sAtSParentheses, {
821
- PH1: i18n.TimeUtilities.millisToString(durationMilli, true),
822
- PH2: i18n.TimeUtilities.millisToString(offsetMilli, true),
823
- });
824
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.emptyPlaceholder, {PH1: durationText});
825
- }
826
-
827
- static quadWidth(quad: number[]): number {
828
- return Math.round(Math.sqrt(Math.pow(quad[0] - quad[2], 2) + Math.pow(quad[1] - quad[3], 2)));
829
- }
830
-
831
- static quadHeight(quad: number[]): number {
832
- return Math.round(Math.sqrt(Math.pow(quad[0] - quad[6], 2) + Math.pow(quad[1] - quad[7], 2)));
833
- }
834
-
835
- static eventDispatchDesciptors(): EventDispatchTypeDescriptor[] {
836
- if (eventDispatchDesciptors) {
837
- return eventDispatchDesciptors;
838
- }
839
- const lightOrange = 'hsl(40,100%,80%)';
840
- const orange = 'hsl(40,100%,50%)';
841
- const green = 'hsl(90,100%,40%)';
842
- const purple = 'hsl(256,100%,75%)';
843
- eventDispatchDesciptors = [
844
- new EventDispatchTypeDescriptor(
845
- 1, lightOrange, ['mousemove', 'mouseenter', 'mouseleave', 'mouseout', 'mouseover']),
846
- new EventDispatchTypeDescriptor(
847
- 1, lightOrange, ['pointerover', 'pointerout', 'pointerenter', 'pointerleave', 'pointermove']),
848
- new EventDispatchTypeDescriptor(2, green, ['wheel']),
849
- new EventDispatchTypeDescriptor(3, orange, ['click', 'mousedown', 'mouseup']),
850
- new EventDispatchTypeDescriptor(3, orange, ['touchstart', 'touchend', 'touchmove', 'touchcancel']),
851
- new EventDispatchTypeDescriptor(
852
- 3, orange, ['pointerdown', 'pointerup', 'pointercancel', 'gotpointercapture', 'lostpointercapture']),
853
- new EventDispatchTypeDescriptor(3, purple, ['keydown', 'keyup', 'keypress']),
854
- ];
855
- return eventDispatchDesciptors;
856
- }
857
-
858
- static markerStyleForEvent(event: Trace.Types.Events.Event): TimelineMarkerStyle {
859
- // Note: keep the colors matching that of `markerDetailsForEvent`.
860
-
861
- const tallMarkerDashStyle = [6, 4];
862
- const title = TimelineUIUtils.eventTitle(event);
863
-
864
- if (event.name !== Trace.Types.Events.Name.NAVIGATION_START &&
865
- (Trace.Helpers.Trace.eventHasCategory(event, Trace.Types.Events.Categories.Console) ||
866
- Trace.Helpers.Trace.eventHasCategory(event, Trace.Types.Events.Categories.UserTiming))) {
867
- return {
868
- title,
869
- dashStyle: tallMarkerDashStyle,
870
- lineWidth: 0.5,
871
- color: Trace.Helpers.Trace.eventHasCategory(event, Trace.Types.Events.Categories.Console) ? 'purple' : 'orange',
872
- tall: false,
873
- lowPriority: false,
874
- };
875
- }
876
- let tall = false;
877
- let color = 'grey';
878
- switch (event.name) {
879
- case Trace.Types.Events.Name.NAVIGATION_START:
880
- color = 'var(--color-text-primary)';
881
- tall = true;
882
- break;
883
- case Trace.Types.Events.Name.FRAME_STARTED_LOADING:
884
- color = 'green';
885
- tall = true;
886
- break;
887
- case Trace.Types.Events.Name.MARK_DOM_CONTENT:
888
- color = 'var(--color-text-disabled)';
889
- tall = true;
890
- break;
891
- case Trace.Types.Events.Name.MARK_LOAD:
892
- color = 'var(--color-text-disabled)';
893
- tall = true;
894
- break;
895
- case Trace.Types.Events.Name.MARK_FIRST_PAINT:
896
- color = '#228847';
897
- tall = true;
898
- break;
899
- case Trace.Types.Events.Name.MARK_FCP:
900
- color = 'var(--sys-color-green-bright)';
901
- tall = true;
902
- break;
903
- case Trace.Types.Events.Name.MARK_LCP_CANDIDATE:
904
- color = 'var(--sys-color-green)';
905
- tall = true;
906
- break;
907
- case Trace.Types.Events.Name.TIME_STAMP:
908
- color = 'orange';
909
- break;
910
- }
911
- return {
912
- title,
913
- dashStyle: tallMarkerDashStyle,
914
- lineWidth: 0.5,
915
- color,
916
- tall,
917
- lowPriority: false,
918
- };
919
- }
920
-
921
- static colorForId(id: string): string {
922
- if (!colorGenerator) {
923
- colorGenerator =
924
- new Common.Color.Generator({min: 30, max: 330, count: undefined}, {min: 50, max: 80, count: 3}, 85);
925
- colorGenerator.setColorForID('', '#f2ecdc');
926
- }
927
- return colorGenerator.colorForID(id);
928
- }
929
-
930
- static displayNameForFrame(frame: Trace.Types.Events.TraceFrame, trimAt = 80): string {
931
- const url = frame.url as Platform.DevToolsPath.UrlString;
932
- return Common.ParsedURL.schemeIs(url, 'about:') ? `"${Platform.StringUtilities.trimMiddle(frame.name, trimAt)}"` :
933
- frame.url.slice(0, trimAt);
934
- }
935
- }
936
-
937
- export const aggregatedStatsKey = Symbol('aggregatedStats');
938
-
939
- export const previewElementSymbol = Symbol('previewElement');
940
-
941
- export class EventDispatchTypeDescriptor {
942
- priority: number;
943
- color: string;
944
- eventTypes: string[];
945
-
946
- constructor(priority: number, color: string, eventTypes: string[]) {
947
- this.priority = priority;
948
- this.color = color;
949
- this.eventTypes = eventTypes;
950
- }
951
- }
952
-
953
- export const categoryBreakdownCacheSymbol = Symbol('categoryBreakdownCache');
954
- export interface TimelineMarkerStyle {
955
- title: string;
956
- color: string;
957
- lineWidth: number;
958
- dashStyle: number[];
959
- tall: boolean;
960
- lowPriority: boolean;
961
- }
962
-
963
- /**
964
- * Given a particular event, this method can adjust its timestamp by
965
- * substracting the timestamp of the previous navigation. This helps in cases
966
- * where the user has navigated multiple times in the trace, so that we can show
967
- * the LCP (for example) relative to the last navigation.
968
- **/
969
- export function timeStampForEventAdjustedForClosestNavigationIfPossible(
970
- event: Trace.Types.Events.Event, parsedTrace: Trace.TraceModel.ParsedTrace|null): Trace.Types.Timing.Milli {
971
- if (!parsedTrace) {
972
- const {startTime} = Trace.Helpers.Timing.eventTimingsMilliSeconds(event);
973
- return startTime;
974
- }
975
-
976
- const time = Trace.Helpers.Timing.timeStampForEventAdjustedByClosestNavigation(
977
- event,
978
- parsedTrace.data.Meta.traceBounds,
979
- parsedTrace.data.Meta.navigationsByNavigationId,
980
- parsedTrace.data.Meta.navigationsByFrameId,
981
- );
982
- return Trace.Helpers.Timing.microToMilli(time);
983
- }
984
-
985
- /**
986
- * Determines if an event is potentially a marker event. A marker event here
987
- * is a single moment in time that we want to highlight on the timeline, such as
988
- * the LCP time. This method does not filter out events: for example, it treats
989
- * every LCP Candidate event as a potential marker event.
990
- **/
991
- export function isMarkerEvent(parsedTrace: Trace.TraceModel.ParsedTrace, event: Trace.Types.Events.Event): boolean {
992
- const {Name} = Trace.Types.Events;
993
-
994
- if (event.name === Name.TIME_STAMP || event.name === Name.NAVIGATION_START) {
995
- return true;
996
- }
997
-
998
- if (Trace.Types.Events.isFirstContentfulPaint(event) || Trace.Types.Events.isFirstPaint(event)) {
999
- return event.args.frame === parsedTrace.data.Meta.mainFrameId;
1000
- }
1001
-
1002
- if (Trace.Types.Events.isMarkDOMContent(event) || Trace.Types.Events.isMarkLoad(event) ||
1003
- Trace.Types.Events.isLargestContentfulPaintCandidate(event)) {
1004
- // isOutermostMainFrame was added in 2022, so we fallback to isMainFrame
1005
- // for older traces.
1006
- if (!event.args.data) {
1007
- return false;
1008
- }
1009
- const {isOutermostMainFrame, isMainFrame} = event.args.data;
1010
- if (typeof isOutermostMainFrame !== 'undefined') {
1011
- // If isOutermostMainFrame is defined we want to use that and not
1012
- // fallback to isMainFrame, even if isOutermostMainFrame is false. Hence
1013
- // this check.
1014
- return isOutermostMainFrame;
1015
- }
1016
- return Boolean(isMainFrame);
1017
- }
1018
-
1019
- return false;
1020
- }
1021
-
1022
- function getEventSelfTime(
1023
- event: Trace.Types.Events.Event, parsedTrace: Trace.TraceModel.ParsedTrace): Trace.Types.Timing.Micro {
1024
- const mapToUse = Trace.Types.Extensions.isSyntheticExtensionEntry(event) ?
1025
- parsedTrace.data.ExtensionTraceData.entryToNode :
1026
- parsedTrace.data.Renderer.entryToNode;
1027
- const selfTime = mapToUse.get(event)?.selfTime;
1028
- return selfTime ? selfTime : Trace.Types.Timing.Micro(0);
1029
- }