chrome-devtools-frontend 1.0.1522585 → 1.0.1525561

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 (357) hide show
  1. package/AUTHORS +1 -0
  2. package/docs/README.md +1 -0
  3. package/docs/policy/README.md +1 -0
  4. package/docs/policy/console-policy.md +144 -0
  5. package/docs/policy/images/console-policy1.png +0 -0
  6. package/docs/policy/images/console-policy2.png +0 -0
  7. package/docs/policy/images/console-policy3.png +0 -0
  8. package/docs/policy/slow-close.md +22 -19
  9. package/docs/ui_engineering.md +22 -0
  10. package/front_end/Tests.js +1 -1
  11. package/front_end/core/common/Color.ts +13 -9
  12. package/front_end/core/common/ColorConverter.ts +9 -7
  13. package/front_end/core/common/Gzip.ts +1 -1
  14. package/front_end/core/common/MapWithDefault.ts +5 -3
  15. package/front_end/core/common/ResourceType.ts +0 -12
  16. package/front_end/core/common/ReturnToPanel.ts +6 -4
  17. package/front_end/core/common/Trie.ts +4 -2
  18. package/front_end/core/host/AidaClient.ts +3 -3
  19. package/front_end/core/host/GdpClient.ts +7 -5
  20. package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -5
  21. package/front_end/core/host/Platform.ts +5 -3
  22. package/front_end/core/host/UserMetrics.ts +6 -4
  23. package/front_end/core/platform/ArrayUtilities.ts +1 -1
  24. package/front_end/core/platform/StringUtilities.ts +34 -31
  25. package/front_end/core/root/Runtime.ts +1 -1
  26. package/front_end/core/sdk/CSSMetadata.ts +6 -4
  27. package/front_end/core/sdk/CSSPropertyParser.ts +17 -13
  28. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +19 -13
  29. package/front_end/core/sdk/ChildTargetManager.ts +35 -0
  30. package/front_end/core/sdk/DOMModel.ts +1 -1
  31. package/front_end/core/sdk/EventBreakpointsModel.ts +4 -2
  32. package/front_end/core/sdk/HttpReasonPhraseStrings.ts +4 -2
  33. package/front_end/core/sdk/NetworkManager.ts +8 -48
  34. package/front_end/core/sdk/NetworkRequest.ts +0 -28
  35. package/front_end/core/sdk/PageResourceLoader.ts +1 -1
  36. package/front_end/core/sdk/PreloadingModel.ts +22 -18
  37. package/front_end/core/sdk/RehydratingConnection.ts +1 -1
  38. package/front_end/core/sdk/RehydratingObject.ts +1 -1
  39. package/front_end/core/sdk/RemoteObject.ts +1 -1
  40. package/front_end/core/sdk/ResourceTreeModel.ts +2 -0
  41. package/front_end/{models/source_map_scopes → core/sdk}/ScopeTreeCache.ts +8 -7
  42. package/front_end/core/sdk/ScreenCaptureModel.ts +24 -20
  43. package/front_end/core/sdk/Target.ts +7 -1
  44. package/front_end/core/sdk/TraceObject.ts +2 -2
  45. package/front_end/core/sdk/sdk.ts +2 -0
  46. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +7 -0
  47. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +15 -12
  48. package/front_end/entrypoints/formatter_worker/Substitute.ts +6 -4
  49. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -16
  50. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -1
  51. package/front_end/entrypoints/main/MainImpl.ts +6 -4
  52. package/front_end/generated/InspectorBackendCommands.js +2 -2
  53. package/front_end/generated/protocol-mapping.d.ts +3 -2
  54. package/front_end/generated/protocol-proxy-api.d.ts +3 -1
  55. package/front_end/generated/protocol.ts +7 -1
  56. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +55 -14
  57. package/front_end/models/ai_assistance/agents/StylingAgent.ts +83 -222
  58. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +23 -0
  59. package/front_end/models/ai_assistance/performance/AIContext.ts +19 -4
  60. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +4 -2
  61. package/front_end/models/autofill_manager/AutofillManager.ts +4 -2
  62. package/front_end/models/cpu_profile/CPUProfileDataModel.ts +1 -1
  63. package/front_end/models/crux-manager/CrUXManager.ts +1 -1
  64. package/front_end/models/extensions/HostUrlPattern.ts +13 -5
  65. package/front_end/models/formatter/FormatterWorkerPool.ts +1 -1
  66. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
  67. package/front_end/models/issues_manager/CookieIssue.ts +2 -2
  68. package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
  69. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +20 -0
  70. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  71. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  72. package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
  73. package/front_end/models/network_time_calculator/Calculator.ts +4 -2
  74. package/front_end/models/network_time_calculator/RequestTimeRanges.ts +6 -4
  75. package/front_end/models/source_map_scopes/NamesResolver.ts +8 -8
  76. package/front_end/models/source_map_scopes/source_map_scopes.ts +0 -2
  77. package/front_end/models/text_utils/ContentProvider.ts +6 -4
  78. package/front_end/models/trace/extras/TraceTree.ts +1 -1
  79. package/front_end/models/trace/handlers/FramesHandler.ts +7 -5
  80. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +13 -7
  81. package/front_end/models/trace/handlers/MetaHandler.ts +16 -14
  82. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +20 -8
  83. package/front_end/models/trace/handlers/helpers.ts +1 -1
  84. package/front_end/models/trace/handlers/types.ts +23 -19
  85. package/front_end/models/trace/helpers/Timing.ts +4 -2
  86. package/front_end/models/trace/helpers/Trace.ts +8 -4
  87. package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
  88. package/front_end/models/trace/insights/INPBreakdown.ts +13 -2
  89. package/front_end/models/trace/insights/LCPBreakdown.ts +14 -2
  90. package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -2
  91. package/front_end/models/trace/types/File.ts +12 -8
  92. package/front_end/models/trace/types/Timing.ts +1 -1
  93. package/front_end/models/trace/types/TraceEvents.ts +37 -23
  94. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
  95. package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +12 -10
  96. package/front_end/panels/application/KeyValueStorageItemsView.ts +31 -33
  97. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +6 -11
  98. package/front_end/panels/application/components/OriginTrialTreeView.ts +7 -5
  99. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -0
  100. package/front_end/panels/application/components/ReportsGrid.ts +4 -10
  101. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -13
  102. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
  103. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +3 -7
  104. package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
  105. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +3 -10
  106. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -2
  107. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +7 -5
  108. package/front_end/panels/changes/ChangesSidebar.ts +105 -96
  109. package/front_end/panels/changes/ChangesView.ts +69 -69
  110. package/front_end/panels/changes/CombinedDiffView.ts +1 -1
  111. package/front_end/panels/changes/changesSidebar.css +3 -0
  112. package/front_end/panels/changes/changesView.css +4 -0
  113. package/front_end/panels/console/ConsoleView.ts +2 -2
  114. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +22 -35
  115. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
  116. package/front_end/panels/elements/ElementStatePaneWidget.ts +12 -0
  117. package/front_end/panels/elements/ElementsTreeElement.ts +9 -5
  118. package/front_end/panels/elements/ElementsTreeOutline.ts +11 -8
  119. package/front_end/panels/elements/PropertyRenderer.ts +19 -15
  120. package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -4
  121. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  122. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -2
  123. package/front_end/panels/elements/components/AdornerManager.ts +5 -3
  124. package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
  125. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +43 -46
  126. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +260 -157
  127. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +28 -21
  128. package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
  129. package/front_end/panels/network/NetworkDataGridNode.ts +2 -44
  130. package/front_end/panels/network/NetworkLogView.ts +6 -4
  131. package/front_end/panels/network/RequestPreviewView.ts +0 -7
  132. package/front_end/panels/network/components/RequestHeadersView.ts +0 -6
  133. package/front_end/panels/network/components/components.ts +0 -2
  134. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +1 -1
  135. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
  136. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +12 -19
  137. package/front_end/panels/search/SearchResultsPane.ts +2 -3
  138. package/front_end/panels/security/IPProtectionView.ts +1 -1
  139. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +4 -0
  140. package/front_end/panels/settings/emulation/utils/StructuredHeaders.ts +45 -37
  141. package/front_end/panels/sources/BreakpointsViewUtils.ts +11 -9
  142. package/front_end/panels/sources/DebuggerPlugin.ts +8 -4
  143. package/front_end/panels/sources/SourcesPanel.ts +1 -1
  144. package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
  145. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -2
  146. package/front_end/panels/timeline/CountersGraph.ts +12 -5
  147. package/front_end/panels/timeline/EasterEgg.d.ts +5 -3
  148. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +8 -6
  149. package/front_end/panels/timeline/ModificationsManager.ts +5 -3
  150. package/front_end/panels/timeline/ThreadAppender.ts +7 -5
  151. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -8
  152. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
  153. package/front_end/panels/timeline/TimelinePanel.ts +10 -8
  154. package/front_end/panels/timeline/TimelineSelection.ts +4 -2
  155. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -3
  156. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
  157. package/front_end/panels/timeline/components/Utils.ts +1 -1
  158. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -3
  159. package/front_end/panels/timeline/utils/Helpers.ts +1 -1
  160. package/front_end/panels/utils/utils.ts +1 -7
  161. package/front_end/services/trace_bounds/TraceBounds.ts +4 -2
  162. package/front_end/services/tracing/PerformanceTracing.ts +1 -1
  163. package/front_end/third_party/chromium/README.chromium +1 -1
  164. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  165. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  166. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  167. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  168. package/front_end/third_party/codemirror.next/package.json +3 -2
  169. package/front_end/third_party/puppeteer/README.chromium +2 -2
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts +8 -10
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js +8 -10
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +28 -30
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +27 -29
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +34 -38
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +34 -38
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +8 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js +12 -14
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js.map +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +92 -108
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +33 -39
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +5 -3
  192. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  194. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  196. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +4 -2
  197. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +14 -5
  199. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
  201. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +12 -6
  203. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +24 -2
  206. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
  208. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  209. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +3 -0
  211. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
  213. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
  215. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +6 -8
  217. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js +6 -8
  219. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +6 -3
  226. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts +5 -7
  228. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +5 -7
  230. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  232. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  233. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  235. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +188 -224
  236. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +140 -166
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts +8 -10
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js +8 -10
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +28 -30
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +27 -29
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +34 -38
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +34 -38
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts +8 -1
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js +12 -14
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +92 -108
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +33 -39
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +5 -3
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  260. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  261. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
  262. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  263. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +4 -2
  264. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +15 -6
  266. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
  268. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +12 -6
  270. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  272. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +24 -2
  273. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
  274. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  275. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  276. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +3 -0
  277. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
  278. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
  279. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
  280. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
  281. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
  282. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +6 -8
  283. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -1
  284. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js +6 -8
  285. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +1 -1
  286. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  287. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  288. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +1 -1
  289. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  290. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +6 -3
  291. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  292. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts +5 -7
  293. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  294. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +5 -7
  295. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
  296. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  297. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  298. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  299. package/front_end/third_party/puppeteer/package/lib/types.d.ts +188 -224
  300. package/front_end/third_party/puppeteer/package/package.json +3 -3
  301. package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +8 -10
  302. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +27 -29
  303. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +34 -38
  304. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +17 -14
  305. package/front_end/third_party/puppeteer/package/src/api/Page.ts +92 -108
  306. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +5 -3
  307. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +5 -1
  308. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +28 -3
  309. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +16 -7
  310. package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +28 -2
  311. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
  312. package/front_end/third_party/puppeteer/package/src/cdp/PredefinedNetworkConditions.ts +13 -22
  313. package/front_end/third_party/puppeteer/package/src/common/Device.ts +6 -8
  314. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  315. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +6 -3
  316. package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +5 -7
  317. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  318. package/front_end/ui/components/chrome_link/ChromeLink.ts +4 -2
  319. package/front_end/ui/components/dialogs/Dialog.ts +13 -9
  320. package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +21 -9
  321. package/front_end/ui/components/highlighting/HighlightElement.ts +77 -0
  322. package/front_end/ui/components/highlighting/HighlightManager.ts +58 -1
  323. package/front_end/ui/components/highlighting/highlighting.ts +2 -0
  324. package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +5 -3
  325. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -3
  326. package/front_end/ui/components/menus/SelectMenu.ts +6 -4
  327. package/front_end/ui/components/survey_link/SurveyLink.ts +4 -2
  328. package/front_end/ui/components/text_editor/config.ts +10 -6
  329. package/front_end/ui/components/text_editor/javascript.ts +8 -4
  330. package/front_end/ui/components/tooltips/Tooltip.ts +22 -5
  331. package/front_end/ui/legacy/ForwardedInputEventHandler.ts +4 -2
  332. package/front_end/ui/legacy/GlassPane.ts +1 -1
  333. package/front_end/ui/legacy/SettingsUI.ts +1 -5
  334. package/front_end/ui/legacy/Treeoutline.ts +12 -33
  335. package/front_end/ui/legacy/UIUtils.ts +19 -1
  336. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +12 -10
  337. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +30 -32
  338. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  339. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +25 -25
  340. package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
  341. package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +4 -2
  342. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -2
  343. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -6
  344. package/front_end/ui/legacy/components/perf_ui/PieChart.ts +6 -4
  345. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
  346. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +18 -20
  347. package/front_end/ui/legacy/components/source_frame/XMLView.ts +22 -16
  348. package/front_end/ui/legacy/components/source_frame/xmlView.css +0 -2
  349. package/front_end/ui/legacy/components/utils/Linkifier.ts +6 -4
  350. package/front_end/ui/visual_logging/Debugging.ts +10 -6
  351. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -3
  352. package/inspector_overlay/common.ts +5 -3
  353. package/inspector_overlay/highlight_grid_common.ts +1 -1
  354. package/package.json +1 -1
  355. package/front_end/Images/src/bundle.svg +0 -3
  356. package/front_end/panels/network/components/WebBundleInfoView.css +0 -27
  357. package/front_end/panels/network/components/WebBundleInfoView.ts +0 -95
@@ -16,11 +16,26 @@ interface AgentFocusData {
16
16
  insight: Trace.Insights.Types.InsightModel|null;
17
17
  }
18
18
 
19
+ /**
20
+ * Gets the first, most relevant InsightSet to use, following the logic of:
21
+ * 1. If there is only one InsightSet, use that.
22
+ * 2. If there are more, prefer the first we find that has a navigation associated with it.
23
+ * 3. If none with a navigation are found, fallback to the first one.
24
+ * 4. Otherwise, return null.
25
+ *
26
+ * TODO(cjamcl): we should just give the agent the entire insight set, and give
27
+ * summary detail about all of them + the ability to query each.
28
+ */
19
29
  function getFirstInsightSet(insights: Trace.Insights.Types.TraceInsightSets): Trace.Insights.Types.InsightSet|null {
20
- // Currently only support a single insight set. Pick the first one with a navigation.
21
- // TODO(cjamcl): we should just give the agent the entire insight set, and give
22
- // summary detail about all of them + the ability to query each.
23
- return [...insights.values()].filter(insightSet => insightSet.navigation).at(0) ?? null;
30
+ const insightSets = Array.from(insights.values());
31
+ if (insightSets.length === 0) {
32
+ return null;
33
+ }
34
+ if (insightSets.length === 1) {
35
+ return insightSets[0];
36
+ }
37
+
38
+ return insightSets.filter(set => set.navigation).at(0) ?? insightSets.at(0) ?? null;
24
39
  }
25
40
 
26
41
  export class AgentFocus {
@@ -12,8 +12,10 @@ import {debugLog} from './debug.js';
12
12
  export const DELAY_BEFORE_SHOWING_RESPONSE_MS = 500;
13
13
  export const AIDA_REQUEST_DEBOUNCE_TIMEOUT_MS = 200;
14
14
 
15
- // TODO(b/404796739): Remove these definitions of AgentOptions and RequestOptions and
16
- // use the existing ones which are used for AI assistance panel agents.
15
+ /**
16
+ * TODO(b/404796739): Remove these definitions of AgentOptions and RequestOptions and
17
+ * use the existing ones which are used for AI assistance panel agents.
18
+ **/
17
19
  interface AgentOptions {
18
20
  aidaClient: Host.AidaClient.AidaClient;
19
21
  serverSideLoggingEnabled?: boolean;
@@ -102,8 +102,10 @@ export class AutofillManager extends Common.ObjectWrapper.ObjectWrapper<EventTyp
102
102
  }
103
103
  }
104
104
 
105
- // A Match describes how the value of a filled field corresponds to a substring
106
- // of address from startIndex to endIndex.
105
+ /**
106
+ * A Match describes how the value of a filled field corresponds to a substring
107
+ * of address from startIndex to endIndex.
108
+ **/
107
109
  export interface Match {
108
110
  startIndex: number;
109
111
  endIndex: number;
@@ -552,7 +552,7 @@ export class CPUProfileDataModel extends ProfileTreeModel {
552
552
  }
553
553
  }
554
554
 
555
- // Format used by profiles coming from traces.
555
+ /** Format used by profiles coming from traces. **/
556
556
  export type ExtendedProfileNode = Protocol.Profiler.ProfileNode&{parent?: number};
557
557
  export type ExtendedProfile = Protocol.Profiler.Profile&{
558
558
  nodes: Protocol.Profiler.ProfileNode[] | ExtendedProfileNode[],
@@ -103,7 +103,7 @@ export interface ConfigSetting {
103
103
 
104
104
  let cruxManagerInstance: CrUXManager;
105
105
 
106
- // TODO: Potentially support `TABLET`. Tablet field data will always be `null` until then.
106
+ /** TODO: Potentially support `TABLET`. Tablet field data will always be `null` until then. **/
107
107
  export const DEVICE_SCOPE_LIST: DeviceScope[] = ['ALL', 'DESKTOP', 'PHONE'];
108
108
 
109
109
  const pageScopeList: PageScope[] = ['origin', 'url'];
@@ -82,7 +82,7 @@ function parseHostAndPort(pattern: string, scheme: string): {host: string, port:
82
82
  return undefined;
83
83
  }
84
84
 
85
- // The URL constructor strips off the default port for the scheme, even if it was given explicitely
85
+ // The URL constructor strips off the default port for the scheme, even if it was given explicitly
86
86
  const httpPort = defaultPort('http');
87
87
  if (!httpPort) {
88
88
  return undefined;
@@ -100,8 +100,15 @@ function parseHostAndPort(pattern: string, scheme: string): {host: string, port:
100
100
  };
101
101
  }
102
102
 
103
- // HostUrlPatterns define permissions in for extensions in the form of `*://*.example.com:*/`. Since these aren't valid
104
- // URLs Common.ParsedURL can't handle them and we need a separate implementation.
103
+ /**
104
+ * HostUrlPatterns define permissions in for extensions in the form of "<protocol>://<sub-domain>.example.com:<port>/".
105
+ * Where the respected parts can be patters like "*".
106
+ * Since these aren't valid {@link Common.ParsedURL.ParsedURL}
107
+ * can't handle them and we need a separate implementation.
108
+ *
109
+ * More information in the Chromium code base -
110
+ * {@link https://crsrc.org/c/chrome/browser/extensions/extension_management_internal.h;l=137 | here}.
111
+ */
105
112
  export class HostUrlPattern {
106
113
  static parse(pattern: string): HostUrlPattern|undefined {
107
114
  if (pattern === '<all_urls>') {
@@ -122,8 +129,9 @@ export class HostUrlPattern {
122
129
  return new HostUrlPattern({scheme, host, port, matchesAll: false});
123
130
  }
124
131
 
125
- private constructor(readonly pattern: {matchesAll: true}|
126
- {readonly scheme: string, readonly host: string, readonly port: string, matchesAll: false}) {
132
+ private constructor(readonly pattern: {
133
+ matchesAll: true,
134
+ }|{readonly scheme: string, readonly host: string, readonly port: string, matchesAll: false}) {
127
135
  }
128
136
 
129
137
  get scheme(): string {
@@ -5,7 +5,7 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as FormatterActions from '../../entrypoints/formatter_worker/FormatterActions.js'; // eslint-disable-line rulesdir/es-modules-import
7
7
 
8
- export {DefinitionKind, type ScopeTreeNode} from '../../entrypoints/formatter_worker/FormatterActions.js';
8
+ export {DefinitionKind, ScopeKind, type ScopeTreeNode} from '../../entrypoints/formatter_worker/FormatterActions.js';
9
9
 
10
10
  let formatterWorkerPoolInstance: FormatterWorkerPool;
11
11
 
@@ -18,7 +18,7 @@ const UIStrings = {
18
18
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieDeprecationMetadataIssue.ts', UIStrings);
19
19
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
20
20
 
21
- // TODO(b/305738703): Move this issue into a warning on CookieIssue.
21
+ /** TODO(b/305738703): Move this issue into a warning on CookieIssue. **/
22
22
  export class CookieDeprecationMetadataIssue extends Issue {
23
23
  readonly #issueDetails: Protocol.Audits.CookieDeprecationMetadataIssueDetails;
24
24
 
@@ -44,14 +44,14 @@ const UIStrings = {
44
44
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieIssue.ts', UIStrings);
45
45
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
46
46
 
47
- // The enum string values need to match the IssueExpanded enum values in UserMetrics.ts.
47
+ /** The enum string values need to match the IssueExpanded enum values in UserMetrics.ts. **/
48
48
  export const enum CookieIssueSubCategory {
49
49
  GENERIC_COOKIE = 'GenericCookie',
50
50
  SAME_SITE_COOKIE = 'SameSiteCookie',
51
51
  THIRD_PARTY_PHASEOUT_COOKIE = 'ThirdPartyPhaseoutCookie',
52
52
  }
53
53
 
54
- // Enum to show cookie status from the security panel's third-party cookie report tool
54
+ /** Enum to show cookie status from the security panel's third-party cookie report tool **/
55
55
  export const enum CookieStatus {
56
56
  BLOCKED = 0,
57
57
  ALLOWED = 1,
@@ -129,7 +129,7 @@ export function substitutePlaceholders(markdown: string, substitutions?: Map<str
129
129
  return result;
130
130
  }
131
131
 
132
- // Ensure that all provided placeholders match the naming pattern.
132
+ /** Ensure that all provided placeholders match the naming pattern. **/
133
133
  function validatePlaceholders(placeholders: Set<string>): void {
134
134
  const invalidPlaceholders = [...placeholders].filter(placeholder => !validPlaceholderNamePattern.test(placeholder));
135
135
  if (invalidPlaceholders.length > 0) {
@@ -34,8 +34,10 @@ export const enum IssueCode {
34
34
  WRITE_ERROR_INSUFFICIENT_RESOURCES = 'SharedDictionaryIssue::WriteErrorInsufficientResources',
35
35
  WRITE_ERROR_INVALID_MATCH_FIELD = 'SharedDictionaryIssue::WriteErrorInvalidMatchField',
36
36
  WRITE_ERROR_INVALID_STRUCTURED_HEADER = 'SharedDictionaryIssue::WriteErrorInvalidStructuredHeader',
37
+ WRITE_ERROR_INVALID_TTL_FIELD = 'SharedDictionaryIssue::WriteErrorInvalidTTLField',
37
38
  WRITE_ERROR_NAVIGATION_REQUEST = 'SharedDictionaryIssue::WriteErrorNavigationRequest',
38
39
  WRITE_ERROR_NO_MATCH_FIELD = 'SharedDictionaryIssue::WriteErrorNoMatchField',
40
+ WRITE_ERROR_NON_INTEGER_TTL_FIELD = 'SharedDictionaryIssue::WriteErrorNonIntegerTTLField',
39
41
  WRITE_ERROR_NON_LIST_MATCH_DEST_FIELD = 'SharedDictionaryIssue::WriteErrorNonListMatchDestField',
40
42
  WRITE_ERROR_NON_SECURE_CONTEXT = 'SharedDictionaryIssue::WriteErrorNonSecureContext',
41
43
  WRITE_ERROR_NON_STRING_ID_FIELD = 'SharedDictionaryIssue::WriteErrorNonStringIdField',
@@ -73,10 +75,14 @@ function getIssueCode(details: Protocol.Audits.SharedDictionaryIssueDetails): Is
73
75
  return IssueCode.WRITE_ERROR_INVALID_MATCH_FIELD;
74
76
  case Protocol.Audits.SharedDictionaryError.WriteErrorInvalidStructuredHeader:
75
77
  return IssueCode.WRITE_ERROR_INVALID_STRUCTURED_HEADER;
78
+ case Protocol.Audits.SharedDictionaryError.WriteErrorInvalidTTLField:
79
+ return IssueCode.WRITE_ERROR_INVALID_TTL_FIELD;
76
80
  case Protocol.Audits.SharedDictionaryError.WriteErrorNavigationRequest:
77
81
  return IssueCode.WRITE_ERROR_NAVIGATION_REQUEST;
78
82
  case Protocol.Audits.SharedDictionaryError.WriteErrorNoMatchField:
79
83
  return IssueCode.WRITE_ERROR_NO_MATCH_FIELD;
84
+ case Protocol.Audits.SharedDictionaryError.WriteErrorNonIntegerTTLField:
85
+ return IssueCode.WRITE_ERROR_NON_INTEGER_TTL_FIELD;
80
86
  case Protocol.Audits.SharedDictionaryError.WriteErrorNonListMatchDestField:
81
87
  return IssueCode.WRITE_ERROR_NON_LIST_MATCH_DEST_FIELD;
82
88
  case Protocol.Audits.SharedDictionaryError.WriteErrorNonSecureContext:
@@ -243,6 +249,13 @@ const issueDescriptions = new Map<Protocol.Audits.SharedDictionaryError, LazyMar
243
249
  links: specLinks,
244
250
  },
245
251
  ],
252
+ [
253
+ Protocol.Audits.SharedDictionaryError.WriteErrorInvalidTTLField,
254
+ {
255
+ file: 'sharedDictionaryWriteErrorInvalidTTLField.md',
256
+ links: specLinks,
257
+ },
258
+ ],
246
259
  [
247
260
  Protocol.Audits.SharedDictionaryError.WriteErrorNavigationRequest,
248
261
  {
@@ -257,6 +270,13 @@ const issueDescriptions = new Map<Protocol.Audits.SharedDictionaryError, LazyMar
257
270
  links: specLinks,
258
271
  },
259
272
  ],
273
+ [
274
+ Protocol.Audits.SharedDictionaryError.WriteErrorNonIntegerTTLField,
275
+ {
276
+ file: 'sharedDictionaryWriteErrorNonIntegerTTLField.md',
277
+ links: specLinks,
278
+ },
279
+ ],
260
280
  [
261
281
  Protocol.Audits.SharedDictionaryError.WriteErrorNonListMatchDestField,
262
282
  {
@@ -0,0 +1 @@
1
+ # The `ttl` field of the `Use-As-Dictionary` HTTP response header must be a positive integer
@@ -0,0 +1 @@
1
+ # The `ttl` field of the `Use-As-Dictionary` HTTP response header must be an integer
@@ -7085,6 +7085,10 @@ export const NativeFunctions = [
7085
7085
  name: "sendMessageToEmbedder",
7086
7086
  signatures: [["message"]]
7087
7087
  },
7088
+ {
7089
+ name: "IntersectionObserver",
7090
+ signatures: [["callback","?options"]]
7091
+ },
7088
7092
  {
7089
7093
  name: "layoutNextFragment",
7090
7094
  signatures: [["?options"]]
@@ -8830,6 +8834,10 @@ export const NativeFunctions = [
8830
8834
  name: "VideoEncoder",
8831
8835
  signatures: [["init"]]
8832
8836
  },
8837
+ {
8838
+ name: "VideoFrame",
8839
+ signatures: [["source","?init"],["data","init"]]
8840
+ },
8833
8841
  {
8834
8842
  name: "clipControlEXT",
8835
8843
  signatures: [["origin","depth"]]
@@ -2,8 +2,10 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- // The TimelineGrid is used in the Performance panel and Memory panel -> Allocating sampling, so the value can be either
6
- // milliseconds or bytes
5
+ /**
6
+ * The TimelineGrid is used in the Performance panel and Memory panel -> Allocating sampling, so the value can be either
7
+ * milliseconds or bytes
8
+ **/
7
9
  export interface Calculator {
8
10
  computePosition(value: number): number;
9
11
  formatValue(value: number, precision?: number): string;
@@ -72,10 +72,12 @@ export function calculateRequestTimeRanges(
72
72
  }
73
73
  }
74
74
 
75
- // In some situations, argument `start` may come before `startTime` (`timing.requestStart`). This is especially true
76
- // in cases such as SW static routing API where fields like `workerRouterEvaluationStart` or `workerCacheLookupStart`
77
- // is set before setting `timing.requestStart`. If the `start` and `end` is known to be a valid value (i.e. not default
78
- // invalid value -1 or undefined), we allow adding the range.
75
+ /**
76
+ * In some situations, argument `start` may come before `startTime` (`timing.requestStart`). This is especially true
77
+ * in cases such as SW static routing API where fields like `workerRouterEvaluationStart` or `workerCacheLookupStart`
78
+ * is set before setting `timing.requestStart`. If the `start` and `end` is known to be a valid value (i.e. not default
79
+ * invalid value -1 or undefined), we allow adding the range.
80
+ **/
79
81
  function addMaybeNegativeOffsetRange(name: RequestTimeRangeNames, start: number, end: number): void {
80
82
  addRange(name, startTime + (start / 1000), startTime + (end / 1000));
81
83
  }
@@ -9,8 +9,6 @@ import * as Bindings from '../bindings/bindings.js';
9
9
  import * as Formatter from '../formatter/formatter.js';
10
10
  import * as TextUtils from '../text_utils/text_utils.js';
11
11
 
12
- import {scopeTreeForScript} from './ScopeTreeCache.js';
13
-
14
12
  interface CachedScopeMap {
15
13
  sourceMap: SDK.SourceMap.SourceMap|undefined;
16
14
  mappingPromise: Promise<{variableMapping: Map<string, string>, thisMapping: string|null}>;
@@ -55,7 +53,7 @@ scopeTree:
55
53
  return null;
56
54
  }
57
55
 
58
- const scopeTree = await scopeTreeForScript(script);
56
+ const scopeTree = await SDK.ScopeTreeCache.scopeTreeForScript(script);
59
57
  if (!scopeTree) {
60
58
  return null;
61
59
  }
@@ -240,7 +238,7 @@ const resolveScope = async(script: SDK.Script.Script, scopeChain: Formatter.Form
240
238
  return;
241
239
  }
242
240
  }
243
- // If there is no entry with the name field, try to infer the name from the source positions.
241
+ /** If there is no entry with the name field, try to infer the name from the source positions. **/
244
242
  async function resolvePosition(): Promise<void> {
245
243
  if (!sourceMap) {
246
244
  return;
@@ -684,10 +682,12 @@ export class RemoteObject extends SDK.RemoteObject.RemoteObject {
684
682
  }
685
683
  }
686
684
 
687
- // Resolve the frame's function name using the name associated with the opening
688
- // paren that starts the scope. If there is no name associated with the scope
689
- // start or if the function scope does not start with a left paren (e.g., arrow
690
- // function with one parameter), the resolution returns null.
685
+ /**
686
+ * Resolve the frame's function name using the name associated with the opening
687
+ * paren that starts the scope. If there is no name associated with the scope
688
+ * start or if the function scope does not start with a left paren (e.g., arrow
689
+ * function with one parameter), the resolution returns null.
690
+ **/
691
691
  async function getFunctionNameFromScopeStart(
692
692
  script: SDK.Script.Script, lineNumber: number, columnNumber: number): Promise<string|null> {
693
693
  // To reduce the overhead of resolving function names,
@@ -4,10 +4,8 @@
4
4
 
5
5
  import * as NamesResolver from './NamesResolver.js';
6
6
  import * as ScopeChainModel from './ScopeChainModel.js';
7
- import * as ScopeTreeCache from './ScopeTreeCache.js';
8
7
 
9
8
  export {
10
9
  NamesResolver,
11
10
  ScopeChainModel,
12
- ScopeTreeCache,
13
11
  };
@@ -53,10 +53,12 @@ export type DeferredContent = {
53
53
  isEncoded: boolean,
54
54
  };
55
55
 
56
- // Some ContentProvider like NetworkRequests might never actually be able to return
57
- // a fully completed "requestContentData" as the request keeps on going indefinitely.
58
- // Such proivders can implement the "StreamingContentProvider" addition, which allows
59
- // for partial/streaming content.
56
+ /**
57
+ * Some ContentProvider like NetworkRequests might never actually be able to return
58
+ * a fully completed "requestContentData" as the request keeps on going indefinitely.
59
+ * Such proivders can implement the "StreamingContentProvider" addition, which allows
60
+ * for partial/streaming content.
61
+ **/
60
62
  export interface StreamingContentProvider extends ContentProvider {
61
63
  requestStreamingContent(): Promise<StreamingContentDataOrError>;
62
64
  }
@@ -668,7 +668,7 @@ export function eventStackFrame(event: Types.Events.Event): Protocol.Runtime.Cal
668
668
  return {...topFrame, scriptId: String(topFrame.scriptId) as Protocol.Runtime.ScriptId};
669
669
  }
670
670
 
671
- // TODO(paulirish): rename to generateNodeId
671
+ /** TODO(paulirish): rename to generateNodeId **/
672
672
  export function generateEventID(event: Types.Events.Event): string {
673
673
  if (Types.Events.isProfileCall(event)) {
674
674
  const name = SamplesIntegrator.isNativeRuntimeFrame(event.callFrame) ?
@@ -483,7 +483,7 @@ export class PendingFrame {
483
483
  }
484
484
  }
485
485
 
486
- // The parameters of an impl-side BeginFrame.
486
+ /** The parameters of an impl-side BeginFrame. **/
487
487
  class BeginFrameInfo {
488
488
  seqId: number;
489
489
  startTime: Types.Timing.Micro;
@@ -497,10 +497,12 @@ class BeginFrameInfo {
497
497
  }
498
498
  }
499
499
 
500
- // A queue of BeginFrames pending visualization.
501
- // BeginFrames are added into this queue as they occur; later when their
502
- // corresponding DrawFrames occur (or lack thereof), the BeginFrames are removed
503
- // from the queue and their timestamps are used for visualization.
500
+ /**
501
+ * A queue of BeginFrames pending visualization.
502
+ * BeginFrames are added into this queue as they occur; later when their
503
+ * corresponding DrawFrames occur (or lack thereof), the BeginFrames are removed
504
+ * from the queue and their timestamps are used for visualization.
505
+ **/
504
506
  export class TimelineFrameBeginFrameQueue {
505
507
  private queueFrames: number[] = [];
506
508
 
@@ -64,12 +64,16 @@ interface RemoteFont {
64
64
  beginRemoteFontLoadEvent: Types.Events.BeginRemoteFontLoad;
65
65
  }
66
66
 
67
- // This represents the maximum #time we will allow a cluster to go before we
68
- // reset it.
67
+ /**
68
+ * This represents the maximum #time we will allow a cluster to go before we
69
+ * reset it.
70
+ **/
69
71
  export const MAX_CLUSTER_DURATION = Helpers.Timing.milliToMicro(Types.Timing.Milli(5000));
70
72
 
71
- // This represents the maximum #time we will allow between layout shift events
72
- // before considering it to be the start of a new cluster.
73
+ /**
74
+ * This represents the maximum #time we will allow between layout shift events
75
+ * before considering it to be the start of a new cluster.
76
+ **/
73
77
  export const MAX_SHIFT_TIME_DELTA = Helpers.Timing.milliToMicro(Types.Timing.Milli(1000));
74
78
 
75
79
  // Layout shifts are reported globally to the developer, irrespective of which
@@ -108,8 +112,10 @@ let clsWindowID = -1;
108
112
  let clusters: Types.Events.SyntheticLayoutShiftCluster[] = [];
109
113
  let clustersByNavigationId = new Map<Types.Events.NavigationId, Types.Events.SyntheticLayoutShiftCluster[]>();
110
114
 
111
- // Represents a point in time in which a LS score change
112
- // was recorded.
115
+ /**
116
+ * Represents a point in time in which a LS score change
117
+ * was recorded.
118
+ **/
113
119
  interface ScoreRecord {
114
120
  ts: number;
115
121
  score: number;
@@ -559,7 +565,7 @@ export function scoreClassificationForLayoutShift(score: number): ScoreClassific
559
565
  return state;
560
566
  }
561
567
 
562
- // Based on https://web.dev/cls/
568
+ /** Based on https://web.dev/cls/ **/
563
569
  export const enum LayoutShiftsThreshold {
564
570
  GOOD = 0,
565
571
  NEEDS_IMPROVEMENT = 0.1,
@@ -472,20 +472,22 @@ export interface MetaHandlerData {
472
472
  devicePixelRatio?: number;
473
473
  }
474
474
 
475
- // Each frame has a single render process at a given time but it can have
476
- // multiple render processes during a trace, for example if a navigation
477
- // occurred in the frame. This map tracks the process that was active for
478
- // each frame at each point in time. Also, because a process can be
479
- // assigned to multiple URLs, there is a window for each URL a process
480
- // was assigned.
481
- //
482
- // Note that different sites always end up in different render
483
- // processes, however two different URLs can point to the same site.
484
- // For example: https://google.com and https://maps.google.com point to
485
- // the same site.
486
- // Read more about this in
487
- // https://developer.chrome.com/articles/renderingng-architecture/#threads
488
- // and https://web.dev/same-site-same-origin/
475
+ /**
476
+ * Each frame has a single render process at a given time but it can have
477
+ * multiple render processes during a trace, for example if a navigation
478
+ * occurred in the frame. This map tracks the process that was active for
479
+ * each frame at each point in time. Also, because a process can be
480
+ * assigned to multiple URLs, there is a window for each URL a process
481
+ * was assigned.
482
+ *
483
+ * Note that different sites always end up in different render
484
+ * processes, however two different URLs can point to the same site.
485
+ * For example: https://google.com and https://maps.google.com point to
486
+ * the same site.
487
+ * Read more about this in
488
+ * https://developer.chrome.com/articles/renderingng-architecture/#threads
489
+ * and https://web.dev/same-site-same-origin/
490
+ **/
489
491
  export type FrameProcessData =
490
492
  Map<string,
491
493
  Map<Types.Events.ProcessID, Array<{frame: Types.Events.TraceFrame, window: Types.Timing.TraceWindowMicro}>>>;
@@ -14,14 +14,16 @@ import type {HandlerName} from './types.js';
14
14
  const MILLISECONDS_TO_MICROSECONDS = 1000;
15
15
  const SECONDS_TO_MICROSECONDS = 1000000;
16
16
 
17
- // Network requests from traces are actually formed of 5 trace records.
18
- // This handler tracks all trace records based on the request ID, and
19
- // then creates a new synthetic trace event for those network requests.
20
- //
21
- // This interface, then, defines the shape of the object we intend to
22
- // keep for each request in the trace. In the finalize we will convert
23
- // these 5 types of trace records to a synthetic complete event that
24
- // represents a composite of these trace records.
17
+ /**
18
+ * Network requests from traces are actually formed of 5 trace records.
19
+ * This handler tracks all trace records based on the request ID, and
20
+ * then creates a new synthetic trace event for those network requests.
21
+ *
22
+ * This interface, then, defines the shape of the object we intend to
23
+ * keep for each request in the trace. In the finalize we will convert
24
+ * these 5 types of trace records to a synthetic complete event that
25
+ * represents a composite of these trace records.
26
+ **/
25
27
  export interface TraceEventsForNetworkRequest {
26
28
  changePriority?: Types.Events.ResourceChangePriority;
27
29
  willSendRequests?: Types.Events.ResourceWillSendRequest[];
@@ -446,6 +448,15 @@ export async function finalize(): Promise<void> {
446
448
  Types.Timing.Micro((timing.receiveHeadersEnd - timing.sendEnd) * MILLISECONDS_TO_MICROSECONDS) :
447
449
  Types.Timing.Micro(0);
448
450
 
451
+ // Server Response Time
452
+ // =======================
453
+ // Time from when the send finished going to when the first byte of headers were received.
454
+ const serverResponseTime = timing ?
455
+ Types.Timing.Micro(
456
+ ((timing.receiveHeadersStart ?? timing.receiveHeadersEnd) - timing.sendEnd) *
457
+ MILLISECONDS_TO_MICROSECONDS) :
458
+ Types.Timing.Micro(0);
459
+
449
460
  // Download
450
461
  // =======================
451
462
  // Time from receipt of headers to the finish time.
@@ -511,6 +522,7 @@ export async function finalize(): Promise<void> {
511
522
  stalled,
512
523
  totalTime,
513
524
  waiting,
525
+ serverResponseTime,
514
526
  },
515
527
  // All fields below are from TraceEventsForNetworkRequest.
516
528
  decodedBodyLength,
@@ -184,7 +184,7 @@ export function addEventToEntityMapping(event: Types.Events.Event, entityMapping
184
184
  entityMappings.entityByEvent.set(event, entity);
185
185
  }
186
186
 
187
- // A slight upgrade of addEventToEntityMapping to handle the sub-events of a network request.
187
+ /** A slight upgrade of addEventToEntityMapping to handle the sub-events of a network request. **/
188
188
  export function addNetworkRequestToEntityMapping(
189
189
  networkRequest: Types.Events.SyntheticNetworkRequest, entityMappings: EntityMappings,
190
190
  requestTraceEvents: TraceEventsForNetworkRequest): void {
@@ -20,22 +20,24 @@ export interface Handler {
20
20
 
21
21
  export type HandlerName = keyof typeof ModelHandlers;
22
22
 
23
- // This type maps Handler names to the return type of their data
24
- // function. So, for example, if we are given an object with a key of 'foo'
25
- // and a value which is a TraceHandler containing a data() function that
26
- // returns a string, this type will be { foo: string }.
27
- //
28
- // This allows us to model the behavior of the TraceProcessor in the model,
29
- // which takes an object with Handlers as part of its config, and
30
- // which ultimately returns an object keyed off the names of the
31
- // Handlers, and with values that are derived from each
32
- // Handler's data function.
33
- //
34
- // So, concretely, we provide a Handler for calculating the #time
35
- // bounds of a trace called TraceBounds, whose data() function returns a
36
- // TraceWindow. The HandlerData, therefore, would determine that the
37
- // TraceProcessor would contain a key called 'TraceBounds' whose value is
38
- // a TraceWindow.
23
+ /**
24
+ * This type maps Handler names to the return type of their data
25
+ * function. So, for example, if we are given an object with a key of 'foo'
26
+ * and a value which is a TraceHandler containing a data() function that
27
+ * returns a string, this type will be { foo: string }.
28
+ *
29
+ * This allows us to model the behavior of the TraceProcessor in the model,
30
+ * which takes an object with Handlers as part of its config, and
31
+ * which ultimately returns an object keyed off the names of the
32
+ * Handlers, and with values that are derived from each
33
+ * Handler's data function.
34
+ *
35
+ * So, concretely, we provide a Handler for calculating the #time
36
+ * bounds of a trace called TraceBounds, whose data() function returns a
37
+ * TraceWindow. The HandlerData, therefore, would determine that the
38
+ * TraceProcessor would contain a key called 'TraceBounds' whose value is
39
+ * a TraceWindow.
40
+ **/
39
41
  export type EnabledHandlerDataWithMeta<T extends Record<string, Handler>> = {
40
42
  // We allow the user to configure which handlers are created by passing them
41
43
  // in when constructing a model instance. However, we then ensure that the
@@ -58,9 +60,11 @@ export type HandlersWithMeta<T extends Record<string, Handler>> = {
58
60
  [K in keyof T]: T[K];
59
61
  };
60
62
 
61
- // Represents the final data from all of the handlers. If you instantiate a
62
- // TraceProcessor with a subset of handlers, you should instead use
63
- // `EnabledHandlerDataWithMeta<>`.
63
+ /**
64
+ * Represents the final data from all of the handlers. If you instantiate a
65
+ * TraceProcessor with a subset of handlers, you should instead use
66
+ * `EnabledHandlerDataWithMeta<>`.
67
+ **/
64
68
  export type HandlerData = Readonly<EnabledHandlerDataWithMeta<typeof ModelHandlers>>;
65
69
 
66
70
  type DeepWriteable<T> = {
@@ -39,8 +39,10 @@ export function timeStampForEventAdjustedByClosestNavigation(
39
39
  return Types.Timing.Micro(eventTimeStamp);
40
40
  }
41
41
 
42
- // Expands the trace window by a provided percentage or, if it the expanded window is smaller than 1 millisecond, expands it to 1 millisecond.
43
- // If the expanded window is outside of the max trace window, cut the overflowing bound to the max trace window bound.
42
+ /**
43
+ * Expands the trace window by a provided percentage or, if it the expanded window is smaller than 1 millisecond, expands it to 1 millisecond.
44
+ * If the expanded window is outside of the max trace window, cut the overflowing bound to the max trace window bound.
45
+ **/
44
46
  export function expandWindowByPercentOrToOneMillisecond(
45
47
  annotationWindow: Types.Timing.TraceWindowMicro, maxTraceWindow: Types.Timing.TraceWindowMicro,
46
48
  percentage: number): Types.Timing.TraceWindowMicro {