chrome-devtools-frontend 1.0.1512349 → 1.0.1513662

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 (324) hide show
  1. package/docs/cookbook/release_management.md +15 -13
  2. package/docs/get_the_code.md +114 -35
  3. package/front_end/core/common/Color.ts +40 -44
  4. package/front_end/core/common/Console.ts +4 -4
  5. package/front_end/core/common/ParsedURL.ts +14 -14
  6. package/front_end/core/common/ResourceType.ts +20 -20
  7. package/front_end/core/common/SegmentedRange.ts +13 -14
  8. package/front_end/core/common/Settings.ts +4 -4
  9. package/front_end/core/common/StringOutputStream.ts +4 -4
  10. package/front_end/core/host/GdpClient.ts +38 -0
  11. package/front_end/core/host/InspectorFrontendHost.ts +4 -1
  12. package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
  13. package/front_end/core/host/ResourceLoader.ts +2 -2
  14. package/front_end/core/host/UserMetrics.ts +0 -2
  15. package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
  16. package/front_end/core/root/Runtime.ts +5 -2
  17. package/front_end/core/sdk/AccessibilityModel.ts +48 -48
  18. package/front_end/core/sdk/AnimationModel.ts +78 -79
  19. package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
  20. package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
  21. package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
  22. package/front_end/core/sdk/CSSMedia.ts +22 -22
  23. package/front_end/core/sdk/CSSModel.ts +4 -4
  24. package/front_end/core/sdk/CSSProperty.ts +9 -9
  25. package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
  26. package/front_end/core/sdk/CSSRule.ts +3 -3
  27. package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
  28. package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
  29. package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
  30. package/front_end/core/sdk/ChildTargetManager.ts +6 -6
  31. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
  32. package/front_end/core/sdk/ConsoleModel.ts +24 -24
  33. package/front_end/core/sdk/Cookie.ts +16 -16
  34. package/front_end/core/sdk/CookieParser.ts +6 -6
  35. package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
  36. package/front_end/core/sdk/DOMModel.ts +113 -113
  37. package/front_end/core/sdk/DebuggerModel.ts +102 -103
  38. package/front_end/core/sdk/EmulationModel.ts +6 -6
  39. package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
  40. package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
  41. package/front_end/core/sdk/IsolateManager.ts +26 -26
  42. package/front_end/core/sdk/LayerTreeBase.ts +29 -30
  43. package/front_end/core/sdk/OverlayModel.ts +6 -6
  44. package/front_end/core/sdk/Resource.ts +43 -43
  45. package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
  46. package/front_end/core/sdk/RuntimeModel.ts +12 -13
  47. package/front_end/core/sdk/SDKModel.ts +3 -3
  48. package/front_end/core/sdk/Script.ts +17 -17
  49. package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
  50. package/front_end/core/sdk/ServerTiming.ts +2 -2
  51. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
  52. package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
  53. package/front_end/core/sdk/SourceMap.ts +10 -10
  54. package/front_end/core/sdk/StorageKeyManager.ts +12 -12
  55. package/front_end/core/sdk/Target.ts +33 -34
  56. package/front_end/core/sdk/TargetManager.ts +20 -20
  57. package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
  58. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
  59. package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
  60. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
  61. package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
  62. package/front_end/entrypoints/main/MainImpl.ts +16 -14
  63. package/front_end/entrypoints/main/main-meta.ts +1 -2
  64. package/front_end/generated/InspectorBackendCommands.js +3 -2
  65. package/front_end/generated/SupportedCSSProperties.js +20 -0
  66. package/front_end/generated/protocol-mapping.d.ts +4 -0
  67. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  68. package/front_end/generated/protocol.ts +20 -0
  69. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -16
  70. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +127 -0
  71. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +149 -26
  72. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -0
  73. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -10
  74. package/front_end/models/badges/AiExplorerBadge.ts +21 -0
  75. package/front_end/models/badges/Badge.ts +3 -5
  76. package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
  77. package/front_end/models/badges/DOMDetectiveBadge.ts +4 -3
  78. package/front_end/models/badges/SpeedsterBadge.ts +6 -4
  79. package/front_end/models/badges/StarterBadge.ts +4 -3
  80. package/front_end/models/badges/UserBadges.ts +29 -3
  81. package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
  82. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
  83. package/front_end/models/bindings/FileUtils.ts +15 -15
  84. package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
  85. package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
  86. package/front_end/models/emulation/DeviceModeModel.ts +123 -131
  87. package/front_end/models/emulation/EmulatedDevices.ts +22 -22
  88. package/front_end/models/extensions/ExtensionPanel.ts +24 -24
  89. package/front_end/models/extensions/ExtensionServer.ts +4 -4
  90. package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
  91. package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
  92. package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
  93. package/front_end/models/trace/EventsSerializer.ts +5 -5
  94. package/front_end/models/trace/LanternComputationData.ts +10 -10
  95. package/front_end/models/trace/ModelImpl.ts +32 -41
  96. package/front_end/models/trace/Processor.ts +28 -30
  97. package/front_end/models/trace/extras/FilmStrip.ts +6 -6
  98. package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
  99. package/front_end/models/trace/extras/ThirdParties.ts +16 -17
  100. package/front_end/models/trace/extras/TraceFilter.ts +1 -1
  101. package/front_end/models/trace/handlers/Threads.ts +10 -10
  102. package/front_end/models/trace/handlers/helpers.ts +9 -9
  103. package/front_end/models/trace/handlers/types.ts +3 -3
  104. package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
  105. package/front_end/models/trace/insights/Cache.ts +8 -4
  106. package/front_end/models/trace/insights/DOMSize.ts +8 -5
  107. package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
  108. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
  109. package/front_end/models/trace/insights/FontDisplay.ts +3 -4
  110. package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
  111. package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
  112. package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
  113. package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
  114. package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
  115. package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
  116. package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
  117. package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
  118. package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
  119. package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
  120. package/front_end/models/trace/insights/ThirdParties.ts +4 -5
  121. package/front_end/models/trace/insights/Viewport.ts +8 -5
  122. package/front_end/models/trace/insights/types.ts +1 -0
  123. package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
  124. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
  125. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
  126. package/front_end/panels/animation/AnimationTimeline.ts +5 -5
  127. package/front_end/panels/animation/AnimationUI.ts +22 -23
  128. package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
  129. package/front_end/panels/application/DOMStorageModel.ts +23 -23
  130. package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
  131. package/front_end/panels/application/IndexedDBModel.ts +1 -0
  132. package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
  133. package/front_end/panels/application/ServiceWorkersView.ts +0 -53
  134. package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
  135. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
  136. package/front_end/panels/common/BadgeNotification.ts +24 -4
  137. package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
  138. package/front_end/panels/common/badgeNotification.css +26 -9
  139. package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
  140. package/front_end/panels/console/ConsolePrompt.ts +8 -5
  141. package/front_end/panels/console/ConsoleView.ts +13 -13
  142. package/front_end/panels/console/ConsoleViewport.ts +29 -29
  143. package/front_end/panels/coverage/CoverageModel.ts +22 -22
  144. package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
  145. package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
  146. package/front_end/panels/elements/DOMPath.ts +2 -2
  147. package/front_end/panels/elements/ElementsPanel.ts +13 -13
  148. package/front_end/panels/elements/ElementsTreeElement.ts +18 -18
  149. package/front_end/panels/elements/ElementsTreeOutline.ts +41 -48
  150. package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
  151. package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
  152. package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -50
  153. package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
  154. package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
  155. package/front_end/panels/emulation/DeviceModeView.ts +6 -6
  156. package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
  157. package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
  158. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
  159. package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
  160. package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
  161. package/front_end/panels/layer_viewer/TransformController.ts +34 -36
  162. package/front_end/panels/layers/LayerTreeModel.ts +41 -40
  163. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
  164. package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
  165. package/front_end/panels/media/PlayerMessagesView.ts +5 -5
  166. package/front_end/panels/media/TickingFlameChart.ts +24 -24
  167. package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
  168. package/front_end/panels/network/NetworkItemView.ts +4 -4
  169. package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
  170. package/front_end/panels/network/NetworkPanel.ts +8 -5
  171. package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
  172. package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
  173. package/front_end/panels/profiler/HeapProfileView.ts +1 -1
  174. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
  175. package/front_end/panels/profiler/ProfileHeader.ts +25 -25
  176. package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
  177. package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
  178. package/front_end/panels/security/OriginTreeElement.ts +8 -8
  179. package/front_end/panels/security/SecurityPanel.ts +5 -5
  180. package/front_end/panels/settings/SettingsScreen.ts +18 -12
  181. package/front_end/panels/settings/components/SyncSection.ts +20 -6
  182. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
  183. package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
  184. package/front_end/panels/sources/NavigatorView.ts +43 -46
  185. package/front_end/panels/sources/SourcesPanel.ts +35 -35
  186. package/front_end/panels/sources/SourcesView.ts +13 -13
  187. package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
  188. package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
  189. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
  190. package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
  191. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
  192. package/front_end/panels/timeline/CountersGraph.ts +16 -16
  193. package/front_end/panels/timeline/EntriesFilter.ts +4 -3
  194. package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
  195. package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
  196. package/front_end/panels/timeline/Initiators.ts +10 -10
  197. package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
  198. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
  199. package/front_end/panels/timeline/ModificationsManager.ts +8 -15
  200. package/front_end/panels/timeline/TargetForEvent.ts +2 -2
  201. package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
  202. package/front_end/panels/timeline/ThreadAppender.ts +13 -13
  203. package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
  204. package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
  205. package/front_end/panels/timeline/TimelineFilters.ts +5 -5
  206. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
  207. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
  208. package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
  209. package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
  210. package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
  211. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
  212. package/front_end/panels/timeline/TimelinePanel.ts +52 -59
  213. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
  214. package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
  215. package/front_end/panels/timeline/TimelineUIUtils.ts +43 -43
  216. package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
  217. package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
  218. package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
  219. package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
  220. package/front_end/panels/timeline/components/DetailsView.ts +4 -4
  221. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
  222. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
  223. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
  224. package/front_end/panels/timeline/components/Sidebar.ts +4 -14
  225. package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
  226. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
  227. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
  228. package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
  229. package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
  230. package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
  231. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
  232. package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
  233. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
  234. package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
  235. package/front_end/panels/timeline/utils/AIContext.ts +17 -19
  236. package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
  237. package/front_end/panels/timeline/utils/EntryName.ts +2 -2
  238. package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
  239. package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
  240. package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
  241. package/front_end/panels/timeline/utils/Helpers.ts +0 -18
  242. package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
  243. package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
  244. package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
  245. package/front_end/third_party/chromium/README.chromium +1 -1
  246. package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
  247. package/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -1
  248. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  249. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  250. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
  251. package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
  252. package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
  253. package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
  254. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  255. package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
  256. package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
  257. package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
  258. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  259. package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
  260. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  261. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  262. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  263. package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
  264. package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
  265. package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
  266. package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
  267. package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
  268. package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
  269. package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
  270. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  271. package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
  272. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
  273. package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
  274. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  275. package/front_end/third_party/codemirror.next/package.json +1 -1
  276. package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
  277. package/front_end/third_party/json5/rebuild.sh +1 -1
  278. package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
  279. package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
  280. package/front_end/third_party/lit/lib/decorators.js +5 -5
  281. package/front_end/third_party/lit/lib/decorators.js.map +1 -1
  282. package/front_end/third_party/lit/lib/directive.js.map +1 -1
  283. package/front_end/third_party/lit/lib/directives.js +8 -13
  284. package/front_end/third_party/lit/lib/directives.js.map +1 -1
  285. package/front_end/third_party/lit/lib/lit.d.ts +26 -9
  286. package/front_end/third_party/lit/lib/lit.js +5 -5
  287. package/front_end/third_party/lit/lib/lit.js.map +1 -1
  288. package/front_end/third_party/lit/lib/static-html.js +2 -2
  289. package/front_end/third_party/lit/lib/static-html.js.map +1 -1
  290. package/front_end/third_party/lit/rebuild.sh +1 -1
  291. package/front_end/third_party/third-party-web/rebuild.sh +1 -1
  292. package/front_end/ui/components/dialogs/Dialog.ts +6 -7
  293. package/front_end/ui/legacy/ActionRegistration.ts +9 -9
  294. package/front_end/ui/legacy/DockController.ts +18 -18
  295. package/front_end/ui/legacy/FilterBar.ts +7 -7
  296. package/front_end/ui/legacy/Fragment.ts +4 -4
  297. package/front_end/ui/legacy/GlassPane.ts +12 -12
  298. package/front_end/ui/legacy/InspectorView.ts +5 -15
  299. package/front_end/ui/legacy/ListControl.ts +27 -27
  300. package/front_end/ui/legacy/ListWidget.ts +4 -4
  301. package/front_end/ui/legacy/PopoverHelper.ts +4 -4
  302. package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
  303. package/front_end/ui/legacy/TabbedPane.ts +74 -75
  304. package/front_end/ui/legacy/TextPrompt.ts +31 -31
  305. package/front_end/ui/legacy/Toolbar.ts +13 -14
  306. package/front_end/ui/legacy/ViewManager.ts +30 -31
  307. package/front_end/ui/legacy/Widget.ts +6 -6
  308. package/front_end/ui/legacy/XLink.ts +9 -9
  309. package/front_end/ui/legacy/ZoomManager.ts +9 -9
  310. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
  311. package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
  312. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
  313. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
  314. package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
  315. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
  316. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
  317. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
  318. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
  319. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
  320. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
  321. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
  322. package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
  323. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
  324. package/package.json +1 -1
@@ -113,12 +113,12 @@ function estimateSavingsWithGraphs(deferredIds: Set<string>, lanternContext: Lan
113
113
  return Math.round(Math.max(estimateBeforeInline - estimateAfterInline, 0)) as Types.Timing.Milli;
114
114
  }
115
115
 
116
- function hasImageLCP(parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContextWithNavigation): boolean {
117
- return parsedTrace.LargestImagePaint.lcpRequestByNavigationId.has(context.navigationId);
116
+ function hasImageLCP(data: Handlers.Types.HandlerData, context: InsightSetContextWithNavigation): boolean {
117
+ return data.LargestImagePaint.lcpRequestByNavigationId.has(context.navigationId);
118
118
  }
119
119
 
120
120
  function computeSavings(
121
- parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContextWithNavigation,
121
+ data: Handlers.Types.HandlerData, context: InsightSetContextWithNavigation,
122
122
  renderBlockingRequests: Types.Events.SyntheticNetworkRequest[]):
123
123
  Pick<RenderBlockingInsightModel, 'metricSavings'|'requestIdToWastedMs'>|undefined {
124
124
  if (!context.lantern) {
@@ -155,7 +155,7 @@ function computeSavings(
155
155
  metricSavings.FCP = estimateSavingsWithGraphs(deferredNodeIds, context.lantern);
156
156
 
157
157
  // In most cases, render blocking resources only affect LCP if LCP isn't an image.
158
- if (!hasImageLCP(parsedTrace, context)) {
158
+ if (!hasImageLCP(data, context)) {
159
159
  metricSavings.LCP = metricSavings.FCP;
160
160
  }
161
161
  }
@@ -176,14 +176,14 @@ function finalize(partialModel: PartialInsightModel<RenderBlockingInsightModel>)
176
176
  }
177
177
 
178
178
  export function generateInsight(
179
- parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContext): RenderBlockingInsightModel {
179
+ data: Handlers.Types.HandlerData, context: InsightSetContext): RenderBlockingInsightModel {
180
180
  if (!context.navigation) {
181
181
  return finalize({
182
182
  renderBlockingRequests: [],
183
183
  });
184
184
  }
185
185
 
186
- const firstPaintTs = parsedTrace.PageLoadMetrics.metricScoresByFrameId.get(context.frameId)
186
+ const firstPaintTs = data.PageLoadMetrics.metricScoresByFrameId.get(context.frameId)
187
187
  ?.get(context.navigationId)
188
188
  ?.get(Handlers.ModelHandlers.PageLoadMetrics.MetricName.FP)
189
189
  ?.event?.ts;
@@ -195,7 +195,7 @@ export function generateInsight(
195
195
  }
196
196
 
197
197
  let renderBlockingRequests: Types.Events.SyntheticNetworkRequest[] = [];
198
- for (const req of parsedTrace.NetworkRequests.byTime) {
198
+ for (const req of data.NetworkRequests.byTime) {
199
199
  if (req.args.data.frame !== context.frameId) {
200
200
  continue;
201
201
  }
@@ -223,14 +223,13 @@ export function generateInsight(
223
223
  }
224
224
  }
225
225
 
226
- const navigation =
227
- Helpers.Trace.getNavigationForTraceEvent(req, context.frameId, parsedTrace.Meta.navigationsByFrameId);
226
+ const navigation = Helpers.Trace.getNavigationForTraceEvent(req, context.frameId, data.Meta.navigationsByFrameId);
228
227
  if (navigation === context.navigation) {
229
228
  renderBlockingRequests.push(req);
230
229
  }
231
230
  }
232
231
 
233
- const savings = computeSavings(parsedTrace, context, renderBlockingRequests);
232
+ const savings = computeSavings(data, context, renderBlockingRequests);
234
233
 
235
234
  // Sort by request duration for insights.
236
235
  renderBlockingRequests = renderBlockingRequests.sort((a, b) => {
@@ -119,8 +119,8 @@ export function isSlowCSSSelectorInsight(model: InsightModel): model is SlowCSSS
119
119
  }
120
120
 
121
121
  export function generateInsight(
122
- parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContext): SlowCSSSelectorInsightModel {
123
- const selectorStatsData = parsedTrace.SelectorStats;
122
+ data: Handlers.Types.HandlerData, context: InsightSetContext): SlowCSSSelectorInsightModel {
123
+ const selectorStatsData = data.SelectorStats;
124
124
 
125
125
  if (!selectorStatsData) {
126
126
  throw new Error('no selector stats data');
@@ -78,13 +78,12 @@ export function isThirdPartyInsight(model: InsightModel): model is ThirdPartiesI
78
78
  }
79
79
 
80
80
  export function generateInsight(
81
- parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContext): ThirdPartiesInsightModel {
82
- const entitySummaries =
83
- Extras.ThirdParties.summarizeByThirdParty(parsedTrace as Handlers.Types.ParsedTrace, context.bounds);
81
+ data: Handlers.Types.HandlerData, context: InsightSetContext): ThirdPartiesInsightModel {
82
+ const entitySummaries = Extras.ThirdParties.summarizeByThirdParty(data as Handlers.Types.HandlerData, context.bounds);
84
83
 
85
- const firstPartyUrl = context.navigation?.args.data?.documentLoaderURL ?? parsedTrace.Meta.mainFrameURL;
84
+ const firstPartyUrl = context.navigation?.args.data?.documentLoaderURL ?? data.Meta.mainFrameURL;
86
85
  const firstPartyEntity = ThirdPartyWeb.ThirdPartyWeb.getEntity(firstPartyUrl) ||
87
- Handlers.Helpers.makeUpEntity(parsedTrace.Renderer.entityMappings.createdEntityCache, firstPartyUrl);
86
+ Handlers.Helpers.makeUpEntity(data.Renderer.entityMappings.createdEntityCache, firstPartyUrl);
88
87
 
89
88
  return finalize({
90
89
  relatedEvents: getRelatedEvents(entitySummaries, firstPartyEntity),
@@ -52,9 +52,12 @@ function finalize(partialModel: PartialInsightModel<ViewportInsightModel>): View
52
52
  };
53
53
  }
54
54
 
55
- export function generateInsight(
56
- parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContext): ViewportInsightModel {
57
- const viewportEvent = parsedTrace.UserInteractions.parseMetaViewportEvents.find(event => {
55
+ export function isViewportInsight(model: InsightModel): model is ViewportInsightModel {
56
+ return model.insightKey === InsightKeys.VIEWPORT;
57
+ }
58
+
59
+ export function generateInsight(data: Handlers.Types.HandlerData, context: InsightSetContext): ViewportInsightModel {
60
+ const viewportEvent = data.UserInteractions.parseMetaViewportEvents.find(event => {
58
61
  if (event.args.data.frame !== context.frameId) {
59
62
  return false;
60
63
  }
@@ -62,7 +65,7 @@ export function generateInsight(
62
65
  return Helpers.Timing.eventIsInBounds(event, context.bounds);
63
66
  });
64
67
 
65
- const compositorEvents = parsedTrace.UserInteractions.beginCommitCompositorFrameEvents.filter(event => {
68
+ const compositorEvents = data.UserInteractions.beginCommitCompositorFrameEvents.filter(event => {
66
69
  if (event.args.frame !== context.frameId) {
67
70
  return false;
68
71
  }
@@ -88,7 +91,7 @@ export function generateInsight(
88
91
  for (const event of compositorEvents) {
89
92
  if (!event.args.is_mobile_optimized) {
90
93
  // Grab all the pointer events with at least 50ms of input delay.
91
- const longPointerInteractions = [...parsedTrace.UserInteractions.interactionsOverThreshold.values()].filter(
94
+ const longPointerInteractions = [...data.UserInteractions.interactionsOverThreshold.values()].filter(
92
95
  interaction => Handlers.ModelHandlers.UserInteractions.categoryOfInteraction(interaction) === 'POINTER' &&
93
96
  interaction.inputDelay >= 50_000);
94
97
 
@@ -150,4 +150,5 @@ export const enum InsightKeys {
150
150
  SLOW_CSS_SELECTOR = 'SlowCSSSelector',
151
151
  VIEWPORT = 'Viewport',
152
152
  MODERN_HTTP = 'ModernHTTP',
153
+ CACHE = 'Cache',
153
154
  }
@@ -15,15 +15,15 @@ function toLanternTrace(traceEvents: readonly Trace.Types.Events.Event[]): Lante
15
15
  };
16
16
  }
17
17
 
18
- async function runTrace(context: Mocha.Suite|Mocha.Context, trace: Lantern.Types.Trace) {
18
+ async function runTraceProcessor(context: Mocha.Suite|Mocha.Context, trace: Lantern.Types.Trace) {
19
19
  TraceLoader.TraceLoader.setTestTimeout(context);
20
20
 
21
21
  const processor = Trace.Processor.TraceProcessor.createWithAllHandlers();
22
22
  await processor.parse(trace.traceEvents as Trace.Types.Events.Event[], {isCPUProfile: false, isFreshRecording: true});
23
- if (!processor.parsedTrace) {
23
+ if (!processor.data) {
24
24
  throw new Error('No data');
25
25
  }
26
- return processor.parsedTrace;
26
+ return processor.data;
27
27
  }
28
28
 
29
29
  async function getComputationDataFromFixture(context: Mocha.Suite|Mocha.Context, {trace, settings, url}: {
@@ -35,28 +35,28 @@ async function getComputationDataFromFixture(context: Mocha.Suite|Mocha.Context,
35
35
  if (!settings.throttlingMethod) {
36
36
  settings.throttlingMethod = 'simulate';
37
37
  }
38
- const parsedTrace = await runTrace(context, trace);
39
- const requests = Trace.LanternComputationData.createNetworkRequests(trace, parsedTrace);
38
+ const data = await runTraceProcessor(context, trace);
39
+ const requests = Trace.LanternComputationData.createNetworkRequests(trace, data);
40
40
  const networkAnalysis = Lantern.Core.NetworkAnalyzer.analyze(requests);
41
41
  if (!networkAnalysis) {
42
42
  throw new Error('no networkAnalysis');
43
43
  }
44
44
 
45
- const frameId = parsedTrace.Meta.mainFrameId;
46
- const navigationId = parsedTrace.Meta.mainFrameNavigations[0].args.data?.navigationId;
45
+ const frameId = data.Meta.mainFrameId;
46
+ const navigationId = data.Meta.mainFrameNavigations[0].args.data?.navigationId;
47
47
  if (!navigationId) {
48
48
  throw new Error('no navigation id found');
49
49
  }
50
50
 
51
51
  return {
52
52
  simulator: Lantern.Simulation.Simulator.createSimulator({...settings, networkAnalysis}),
53
- graph: Trace.LanternComputationData.createGraph(requests, trace, parsedTrace, url),
54
- processedNavigation: Trace.LanternComputationData.createProcessedNavigation(parsedTrace, frameId, navigationId),
53
+ graph: Trace.LanternComputationData.createGraph(requests, trace, data, url),
54
+ processedNavigation: Trace.LanternComputationData.createProcessedNavigation(data, frameId, navigationId),
55
55
  };
56
56
  }
57
57
 
58
58
  export {
59
59
  getComputationDataFromFixture,
60
- runTrace,
60
+ runTraceProcessor as runTrace,
61
61
  toLanternTrace,
62
62
  };
@@ -434,96 +434,96 @@ export class AXBreadcrumbsPane extends AccessibilitySubPane {
434
434
  const elementsToAXBreadcrumb = new WeakMap<Element, AXBreadcrumb>();
435
435
 
436
436
  export class AXBreadcrumb {
437
- private readonly axNodeInternal: SDK.AccessibilityModel.AccessibilityNode;
438
- private readonly elementInternal: HTMLDivElement;
439
- private nodeElementInternal: HTMLDivElement;
437
+ readonly #axNode: SDK.AccessibilityModel.AccessibilityNode;
438
+ readonly #element: HTMLDivElement;
439
+ #nodeElement: HTMLDivElement;
440
440
  private readonly nodeWrapper: HTMLDivElement;
441
441
  private readonly selectionElement: HTMLDivElement;
442
442
  private readonly childrenGroupElement: HTMLDivElement;
443
443
  private readonly children: AXBreadcrumb[];
444
444
  private hovered: boolean;
445
- private preselectedInternal: boolean;
445
+ #preselected: boolean;
446
446
  private parent: AXBreadcrumb|null;
447
- private inspectedInternal: boolean;
447
+ #inspected: boolean;
448
448
  expandLoggable = {};
449
449
  constructor(axNode: SDK.AccessibilityModel.AccessibilityNode, depth: number, inspected: boolean) {
450
- this.axNodeInternal = axNode;
450
+ this.#axNode = axNode;
451
451
 
452
- this.elementInternal = document.createElement('div');
453
- this.elementInternal.classList.add('ax-breadcrumb');
454
- this.elementInternal.setAttribute(
452
+ this.#element = document.createElement('div');
453
+ this.#element.classList.add('ax-breadcrumb');
454
+ this.#element.setAttribute(
455
455
  'jslog',
456
456
  `${VisualLogging.treeItem().track({click: true, keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter'})}`);
457
- elementsToAXBreadcrumb.set(this.elementInternal, this);
457
+ elementsToAXBreadcrumb.set(this.#element, this);
458
458
 
459
- this.nodeElementInternal = document.createElement('div');
460
- this.nodeElementInternal.classList.add('ax-node');
461
- UI.ARIAUtils.markAsTreeitem(this.nodeElementInternal);
462
- this.nodeElementInternal.tabIndex = -1;
463
- this.elementInternal.appendChild(this.nodeElementInternal);
459
+ this.#nodeElement = document.createElement('div');
460
+ this.#nodeElement.classList.add('ax-node');
461
+ UI.ARIAUtils.markAsTreeitem(this.#nodeElement);
462
+ this.#nodeElement.tabIndex = -1;
463
+ this.#element.appendChild(this.#nodeElement);
464
464
  this.nodeWrapper = document.createElement('div');
465
465
  this.nodeWrapper.classList.add('wrapper');
466
- this.nodeElementInternal.appendChild(this.nodeWrapper);
466
+ this.#nodeElement.appendChild(this.nodeWrapper);
467
467
 
468
468
  this.selectionElement = document.createElement('div');
469
469
  this.selectionElement.classList.add('selection');
470
470
  this.selectionElement.classList.add('fill');
471
- this.nodeElementInternal.appendChild(this.selectionElement);
471
+ this.#nodeElement.appendChild(this.selectionElement);
472
472
 
473
473
  this.childrenGroupElement = document.createElement('div');
474
474
  this.childrenGroupElement.classList.add('children');
475
475
  UI.ARIAUtils.markAsGroup(this.childrenGroupElement);
476
- this.elementInternal.appendChild(this.childrenGroupElement);
476
+ this.#element.appendChild(this.childrenGroupElement);
477
477
 
478
478
  this.children = [];
479
479
  this.hovered = false;
480
- this.preselectedInternal = false;
480
+ this.#preselected = false;
481
481
  this.parent = null;
482
482
 
483
- this.inspectedInternal = inspected;
484
- this.nodeElementInternal.classList.toggle('inspected', inspected);
483
+ this.#inspected = inspected;
484
+ this.#nodeElement.classList.toggle('inspected', inspected);
485
485
 
486
- this.nodeElementInternal.style.paddingLeft = (16 * depth + 4) + 'px';
486
+ this.#nodeElement.style.paddingLeft = (16 * depth + 4) + 'px';
487
487
 
488
- if (this.axNodeInternal.ignored()) {
488
+ if (this.#axNode.ignored()) {
489
489
  this.appendIgnoredNodeElement();
490
490
  } else {
491
- this.appendRoleElement(this.axNodeInternal.role());
492
- const axNodeName = this.axNodeInternal.name();
491
+ this.appendRoleElement(this.#axNode.role());
492
+ const axNodeName = this.#axNode.name();
493
493
  if (axNodeName?.value) {
494
494
  this.nodeWrapper.createChild('span', 'separator').textContent = '\xA0';
495
495
  this.appendNameElement(axNodeName.value as string);
496
496
  }
497
497
  }
498
498
 
499
- if (!this.axNodeInternal.ignored() && this.axNodeInternal.hasOnlyUnloadedChildren()) {
500
- this.nodeElementInternal.classList.add('children-unloaded');
501
- UI.ARIAUtils.setExpanded(this.nodeElementInternal, false);
499
+ if (!this.#axNode.ignored() && this.#axNode.hasOnlyUnloadedChildren()) {
500
+ this.#nodeElement.classList.add('children-unloaded');
501
+ UI.ARIAUtils.setExpanded(this.#nodeElement, false);
502
502
  VisualLogging.registerLoggable(
503
- this.expandLoggable, `${VisualLogging.expand()}`, this.elementInternal, new DOMRect(0, 0, 16, 16));
503
+ this.expandLoggable, `${VisualLogging.expand()}`, this.#element, new DOMRect(0, 0, 16, 16));
504
504
  }
505
505
 
506
- if (!this.axNodeInternal.isDOMNode()) {
507
- this.nodeElementInternal.classList.add('no-dom-node');
506
+ if (!this.#axNode.isDOMNode()) {
507
+ this.#nodeElement.classList.add('no-dom-node');
508
508
  }
509
509
  }
510
510
 
511
511
  element(): HTMLElement {
512
- return this.elementInternal;
512
+ return this.#element;
513
513
  }
514
514
 
515
515
  nodeElement(): HTMLElement {
516
- return this.nodeElementInternal;
516
+ return this.#nodeElement;
517
517
  }
518
518
 
519
519
  appendChild(breadcrumb: AXBreadcrumb): void {
520
520
  this.children.push(breadcrumb);
521
521
  breadcrumb.setParent(this);
522
- this.nodeElementInternal.classList.add('parent');
523
- UI.ARIAUtils.setExpanded(this.nodeElementInternal, true);
522
+ this.#nodeElement.classList.add('parent');
523
+ UI.ARIAUtils.setExpanded(this.#nodeElement, true);
524
524
  this.childrenGroupElement.appendChild(breadcrumb.element());
525
525
  VisualLogging.registerLoggable(
526
- this.expandLoggable, `${VisualLogging.expand()}`, this.elementInternal, new DOMRect(0, 0, 16, 16));
526
+ this.expandLoggable, `${VisualLogging.expand()}`, this.#element, new DOMRect(0, 0, 16, 16));
527
527
  }
528
528
 
529
529
  hasExpandedChildren(): number {
@@ -535,26 +535,26 @@ export class AXBreadcrumb {
535
535
  }
536
536
 
537
537
  preselected(): boolean {
538
- return this.preselectedInternal;
538
+ return this.#preselected;
539
539
  }
540
540
 
541
541
  setPreselected(preselected: boolean, selectedByUser: boolean): void {
542
- if (this.preselectedInternal === preselected) {
542
+ if (this.#preselected === preselected) {
543
543
  return;
544
544
  }
545
- this.preselectedInternal = preselected;
546
- this.nodeElementInternal.classList.toggle('preselected', preselected);
545
+ this.#preselected = preselected;
546
+ this.#nodeElement.classList.toggle('preselected', preselected);
547
547
  if (preselected) {
548
- this.nodeElementInternal.tabIndex = 0;
548
+ this.#nodeElement.tabIndex = 0;
549
549
  } else {
550
- this.nodeElementInternal.tabIndex = -1;
550
+ this.#nodeElement.tabIndex = -1;
551
551
  }
552
- if (this.preselectedInternal) {
552
+ if (this.#preselected) {
553
553
  if (selectedByUser) {
554
- this.nodeElementInternal.focus();
554
+ this.#nodeElement.focus();
555
555
  }
556
- if (!this.inspectedInternal) {
557
- this.axNodeInternal.highlightDOMNode();
556
+ if (!this.#inspected) {
557
+ this.#axNode.highlightDOMNode();
558
558
  } else {
559
559
  SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();
560
560
  }
@@ -566,23 +566,23 @@ export class AXBreadcrumb {
566
566
  return;
567
567
  }
568
568
  this.hovered = hovered;
569
- this.nodeElementInternal.classList.toggle('hovered', hovered);
569
+ this.#nodeElement.classList.toggle('hovered', hovered);
570
570
  if (this.hovered) {
571
- this.nodeElementInternal.classList.toggle('hovered', true);
572
- this.axNodeInternal.highlightDOMNode();
571
+ this.#nodeElement.classList.toggle('hovered', true);
572
+ this.#axNode.highlightDOMNode();
573
573
  }
574
574
  }
575
575
 
576
576
  axNode(): SDK.AccessibilityModel.AccessibilityNode {
577
- return this.axNodeInternal;
577
+ return this.#axNode;
578
578
  }
579
579
 
580
580
  inspected(): boolean {
581
- return this.inspectedInternal;
581
+ return this.#inspected;
582
582
  }
583
583
 
584
584
  isDOMNode(): boolean {
585
- return this.axNodeInternal.isDOMNode();
585
+ return this.#axNode.isDOMNode();
586
586
  }
587
587
 
588
588
  nextBreadcrumb(): AXBreadcrumb|null {
@@ -16,8 +16,8 @@ import {SourceOrderPane} from './SourceOrderView.js';
16
16
  let accessibilitySidebarViewInstance: AccessibilitySidebarView;
17
17
 
18
18
  export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget {
19
- private nodeInternal: SDK.DOMModel.DOMNode|null;
20
- private axNodeInternal: SDK.AccessibilityModel.AccessibilityNode|null;
19
+ #node: SDK.DOMModel.DOMNode|null;
20
+ #axNode: SDK.AccessibilityModel.AccessibilityNode|null;
21
21
  private skipNextPullNode: boolean;
22
22
  private readonly sidebarPaneStack: UI.View.ViewLocation;
23
23
  private readonly breadcrumbsSubPane: AXBreadcrumbsPane;
@@ -27,8 +27,8 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
27
27
  private constructor(throttlingTimeout?: number) {
28
28
  super(false /* useShadowDom */, throttlingTimeout);
29
29
  this.element.classList.add('accessibility-sidebar-view');
30
- this.nodeInternal = null;
31
- this.axNodeInternal = null;
30
+ this.#node = null;
31
+ this.#axNode = null;
32
32
  this.skipNextPullNode = false;
33
33
  this.sidebarPaneStack = UI.ViewManager.ViewManager.instance().createStackLocation();
34
34
  this.breadcrumbsSubPane = new AXBreadcrumbsPane(this);
@@ -55,16 +55,16 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
55
55
  }
56
56
 
57
57
  node(): SDK.DOMModel.DOMNode|null {
58
- return this.nodeInternal;
58
+ return this.#node;
59
59
  }
60
60
 
61
61
  axNode(): SDK.AccessibilityModel.AccessibilityNode|null {
62
- return this.axNodeInternal;
62
+ return this.#axNode;
63
63
  }
64
64
 
65
65
  setNode(node: SDK.DOMModel.DOMNode|null, fromAXTree?: boolean): void {
66
66
  this.skipNextPullNode = Boolean(fromAXTree);
67
- this.nodeInternal = node;
67
+ this.#node = node;
68
68
  this.update();
69
69
  }
70
70
 
@@ -73,7 +73,7 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
73
73
  return;
74
74
  }
75
75
 
76
- this.axNodeInternal = axNode;
76
+ this.#axNode = axNode;
77
77
 
78
78
  if (axNode.isDOMNode()) {
79
79
  void this.sidebarPaneStack.showView(this.ariaSubPane, this.axNodeSubPane);
@@ -234,7 +234,7 @@ export class AnimationTimeline extends UI.Widget.VBox implements
234
234
  #selectedGroup!: SDK.AnimationModel.AnimationGroup|null;
235
235
  #renderQueue!: AnimationUI[];
236
236
  #defaultDuration: number;
237
- #durationInternal: number;
237
+ #duration: number;
238
238
  #timelineControlsWidth: number;
239
239
  readonly #nodesMap: Map<number, NodeUI>;
240
240
  #uiAnimations: AnimationUI[];
@@ -298,7 +298,7 @@ export class AnimationTimeline extends UI.Widget.VBox implements
298
298
  noEffectSelectedPlaceholder.show(timelineHint);
299
299
 
300
300
  /** @constant */ this.#defaultDuration = 100;
301
- this.#durationInternal = this.#defaultDuration;
301
+ this.#duration = this.#defaultDuration;
302
302
  this.#nodesMap = new Map();
303
303
  this.#uiAnimations = [];
304
304
  this.#groupBuffer = [];
@@ -593,11 +593,11 @@ export class AnimationTimeline extends UI.Widget.VBox implements
593
593
  }
594
594
 
595
595
  duration(): number {
596
- return this.#durationInternal;
596
+ return this.#duration;
597
597
  }
598
598
 
599
599
  setDuration(duration: number): void {
600
- this.#durationInternal = duration;
600
+ this.#duration = duration;
601
601
  this.scheduleRedraw();
602
602
  }
603
603
 
@@ -613,7 +613,7 @@ export class AnimationTimeline extends UI.Widget.VBox implements
613
613
  this.#nodesMap.clear();
614
614
  this.#animationsMap.clear();
615
615
  this.#animationsContainer.removeChildren();
616
- this.#durationInternal = this.#defaultDuration;
616
+ this.#duration = this.#defaultDuration;
617
617
  this.#timelineScrubber.classList.add('hidden');
618
618
  this.#gridHeader.classList.remove('scrubber-enabled');
619
619
  this.#selectedGroup = null;
@@ -39,7 +39,7 @@ interface CachedElement {
39
39
  }
40
40
 
41
41
  export class AnimationUI {
42
- #animationInternal: SDK.AnimationModel.AnimationImpl;
42
+ #animation: SDK.AnimationModel.AnimationImpl;
43
43
  #timeline: AnimationTimeline;
44
44
  #keyframes?: SDK.AnimationModel.KeyframeStyle[];
45
45
  #nameElement: HTMLElement;
@@ -58,10 +58,10 @@ export class AnimationUI {
58
58
  #downMouseX?: number;
59
59
 
60
60
  constructor(animation: SDK.AnimationModel.AnimationImpl, timeline: AnimationTimeline, parentElement: Element) {
61
- this.#animationInternal = animation;
61
+ this.#animation = animation;
62
62
  this.#timeline = timeline;
63
63
 
64
- const keyframesRule = this.#animationInternal.source().keyframesRule();
64
+ const keyframesRule = this.#animation.source().keyframesRule();
65
65
  if (keyframesRule) {
66
66
  this.#keyframes = keyframesRule.keyframes();
67
67
  if (animation.viewOrScrollTimeline() && animation.playbackRate() < 0) {
@@ -69,7 +69,7 @@ export class AnimationUI {
69
69
  }
70
70
  }
71
71
  this.#nameElement = parentElement.createChild('div', 'animation-name');
72
- this.#nameElement.textContent = this.#animationInternal.name();
72
+ this.#nameElement.textContent = this.#animation.name();
73
73
 
74
74
  this.#svg = UI.UIUtils.createSVGChild(parentElement, 'svg', 'animation-ui');
75
75
  this.#svg.setAttribute('height', Options.AnimationSVGHeight.toString());
@@ -78,7 +78,7 @@ export class AnimationUI {
78
78
  this.#activeIntervalGroup = UI.UIUtils.createSVGChild(this.#svg, 'g');
79
79
  this.#activeIntervalGroup.setAttribute('jslog', `${VisualLogging.animationClip().track({drag: true})}`);
80
80
 
81
- if (!this.#animationInternal.viewOrScrollTimeline()) {
81
+ if (!this.#animation.viewOrScrollTimeline()) {
82
82
  UI.UIUtils.installDragHandle(
83
83
  this.#activeIntervalGroup, this.mouseDown.bind(this, Events.ANIMATION_DRAG, null), this.mouseMove.bind(this),
84
84
  this.mouseUp.bind(this), '-webkit-grabbing', '-webkit-grab');
@@ -90,7 +90,7 @@ export class AnimationUI {
90
90
 
91
91
  this.#movementInMs = 0;
92
92
  this.#keyboardMovementRateMs = 50;
93
- this.#color = AnimationUI.colorForAnimation(this.#animationInternal);
93
+ this.#color = AnimationUI.colorForAnimation(this.#animation);
94
94
  }
95
95
 
96
96
  static colorForAnimation(animation: SDK.AnimationModel.AnimationImpl): string {
@@ -110,7 +110,7 @@ export class AnimationUI {
110
110
  }
111
111
 
112
112
  animation(): SDK.AnimationModel.AnimationImpl {
113
- return this.#animationInternal;
113
+ return this.#animation;
114
114
  }
115
115
 
116
116
  get nameElement(): HTMLElement {
@@ -152,7 +152,7 @@ export class AnimationUI {
152
152
  this.#delayLine = this.createLine(parentElement, 'animation-delay-line');
153
153
  this.#endDelayLine = this.createLine(parentElement, 'animation-delay-line');
154
154
  }
155
- const fill = this.#animationInternal.source().fill();
155
+ const fill = this.#animation.source().fill();
156
156
  this.#delayLine.classList.toggle('animation-fill', fill === 'backwards' || fill === 'both');
157
157
  const margin = Options.AnimationMargin;
158
158
  this.#delayLine.setAttribute('x1', margin.toString());
@@ -162,15 +162,14 @@ export class AnimationUI {
162
162
  this.#endDelayLine.classList.toggle('animation-fill', forwardsFill);
163
163
  const leftMargin = Math.min(
164
164
  this.#timeline.width(),
165
- (this.delayOrStartTime() + this.duration() * this.#animationInternal.source().iterations()) *
165
+ (this.delayOrStartTime() + this.duration() * this.#animation.source().iterations()) *
166
166
  this.#timeline.pixelTimeRatio());
167
167
  (this.#endDelayLine as HTMLElement).style.transform = 'translateX(' + leftMargin.toFixed(2) + 'px)';
168
168
  this.#endDelayLine.setAttribute('x1', margin.toString());
169
169
  this.#endDelayLine.setAttribute(
170
170
  'x2',
171
- forwardsFill ?
172
- (this.#timeline.width() - leftMargin + margin).toFixed(2) :
173
- (this.#animationInternal.source().endDelay() * this.#timeline.pixelTimeRatio() + margin).toFixed(2));
171
+ forwardsFill ? (this.#timeline.width() - leftMargin + margin).toFixed(2) :
172
+ (this.#animation.source().endDelay() * this.#timeline.pixelTimeRatio() + margin).toFixed(2));
174
173
  }
175
174
 
176
175
  private drawPoint(iteration: number, parentElement: Element, x: number, keyframeIndex: number, attachEvents: boolean):
@@ -242,7 +241,7 @@ export class AnimationUI {
242
241
  }
243
242
  const group = cache[keyframeIndex];
244
243
  group.tabIndex = 0;
245
- UI.ARIAUtils.setLabel(group, i18nString(UIStrings.sSlider, {PH1: this.#animationInternal.name()}));
244
+ UI.ARIAUtils.setLabel(group, i18nString(UIStrings.sSlider, {PH1: this.#animation.name()}));
246
245
  group.style.transform = 'translateX(' + leftDistance.toFixed(2) + 'px)';
247
246
 
248
247
  if (easing === 'linear') {
@@ -279,7 +278,7 @@ export class AnimationUI {
279
278
  this.#nameElement.style.width = (this.duration() * this.#timeline.pixelTimeRatio()).toFixed(2) + 'px';
280
279
  this.drawDelayLine((this.#svg as HTMLElement));
281
280
 
282
- if (this.#animationInternal.type() === 'CSSTransition') {
281
+ if (this.#animation.type() === 'CSSTransition') {
283
282
  this.renderTransition();
284
283
  return;
285
284
  }
@@ -293,9 +292,9 @@ export class AnimationUI {
293
292
  // Some iterations are getting rendered in an invisible area if the delay is negative.
294
293
  const invisibleAreaWidth =
295
294
  this.delayOrStartTime() < 0 ? -this.delayOrStartTime() * this.#timeline.pixelTimeRatio() : 0;
296
- for (iteration = 1; iteration < this.#animationInternal.source().iterations() &&
295
+ for (iteration = 1; iteration < this.#animation.source().iterations() &&
297
296
  iterationWidth * (iteration - 1) < invisibleAreaWidth + this.#timeline.width() &&
298
- (iterationWidth > 0 || this.#animationInternal.source().iterations() !== Infinity);
297
+ (iterationWidth > 0 || this.#animation.source().iterations() !== Infinity);
299
298
  iteration++) {
300
299
  this.renderIteration(this.#tailGroup, iteration);
301
300
  }
@@ -315,7 +314,7 @@ export class AnimationUI {
315
314
  this.drawAnimationLine(0, activeIntervalGroup);
316
315
  this.renderKeyframe(
317
316
  0, 0, activeIntervalGroup, Options.AnimationMargin, this.duration() * this.#timeline.pixelTimeRatio(),
318
- this.#animationInternal.source().easing());
317
+ this.#animation.source().easing());
319
318
  this.drawPoint(0, activeIntervalGroup, Options.AnimationMargin, 0, true);
320
319
  this.drawPoint(
321
320
  0, activeIntervalGroup, this.duration() * this.#timeline.pixelTimeRatio() + Options.AnimationMargin, -1, true);
@@ -355,7 +354,7 @@ export class AnimationUI {
355
354
  }
356
355
 
357
356
  private delayOrStartTime(): number {
358
- let delay = this.#animationInternal.delayOrStartTime();
357
+ let delay = this.#animation.delayOrStartTime();
359
358
  if (this.#mouseEventType === Events.ANIMATION_DRAG || this.#mouseEventType === Events.START_ENDPOINT_MOVE) {
360
359
  delay += this.#movementInMs;
361
360
  }
@@ -363,7 +362,7 @@ export class AnimationUI {
363
362
  }
364
363
 
365
364
  private duration(): number {
366
- let duration = this.#animationInternal.iterationDuration();
365
+ let duration = this.#animation.iterationDuration();
367
366
  if (this.#mouseEventType === Events.FINISH_ENDPOINT_MOVE) {
368
367
  duration += this.#movementInMs;
369
368
  } else if (this.#mouseEventType === Events.START_ENDPOINT_MOVE) {
@@ -380,7 +379,7 @@ export class AnimationUI {
380
379
  let offset = this.#keyframes[i].offsetAsNumber();
381
380
  if (this.#mouseEventType === Events.KEYFRAME_MOVE && i === this.#keyframeMoved) {
382
381
  console.assert(i > 0 && i < this.#keyframes.length - 1, 'First and last keyframe cannot be moved');
383
- offset += this.#movementInMs / this.#animationInternal.iterationDuration();
382
+ offset += this.#movementInMs / this.#animation.iterationDuration();
384
383
  offset = Math.max(offset, this.#keyframes[i - 1].offsetAsNumber());
385
384
  offset = Math.min(offset, this.#keyframes[i + 1].offsetAsNumber());
386
385
  }
@@ -436,7 +435,7 @@ export class AnimationUI {
436
435
  this.#keyframes[this.#keyframeMoved].setOffset(this.offset(this.#keyframeMoved));
437
436
  }
438
437
  } else {
439
- this.#animationInternal.setTiming(this.duration(), this.delayOrStartTime());
438
+ this.#animation.setTiming(this.duration(), this.delayOrStartTime());
440
439
  }
441
440
 
442
441
  this.#movementInMs = 0;
@@ -468,7 +467,7 @@ export class AnimationUI {
468
467
  this.#keyframes[this.#keyframeMoved].setOffset(this.offset(this.#keyframeMoved));
469
468
  }
470
469
  } else {
471
- this.#animationInternal.setTiming(this.duration(), this.delayOrStartTime());
470
+ this.#animation.setTiming(this.duration(), this.delayOrStartTime());
472
471
  }
473
472
  this.setMovementAndRedraw(0);
474
473
 
@@ -488,7 +487,7 @@ export class AnimationUI {
488
487
  void contextMenu.show();
489
488
  }
490
489
 
491
- void this.#animationInternal.remoteObjectPromise().then(showContextMenu);
490
+ void this.#animation.remoteObjectPromise().then(showContextMenu);
492
491
  event.consume(true);
493
492
  }
494
493
  }