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
@@ -15,8 +15,10 @@ export const enum ScreenshotMode {
15
15
  FULLPAGE = 'fullpage',
16
16
  }
17
17
 
18
- // This structure holds a specific `startScreencast` request's parameters
19
- // and its callbacks so that they can be re-started if needed.
18
+ /**
19
+ * This structure holds a specific `startScreencast` request's parameters
20
+ * and its callbacks so that they can be re-started if needed.
21
+ **/
20
22
  interface ScreencastOperation {
21
23
  id: number;
22
24
  request: {
@@ -35,24 +37,26 @@ interface ScreencastOperation {
35
37
  type ScreencastFrameCallback = ((arg0: Protocol.binary, arg1: Protocol.Page.ScreencastFrameMetadata) => void);
36
38
  type ScreencastVisibilityChangedCallback = ((arg0: boolean) => void);
37
39
 
38
- // Manages concurrent screencast requests by queuing and prioritizing.
39
- //
40
- // When startScreencast is invoked:
41
- // - If a screencast is currently active, the existing screencast's parameters and callbacks are
42
- // saved in the #screencastOperations array.
43
- // - The active screencast is then stopped.
44
- // - A new screencast is initiated using the parameters and callbacks from the current startScreencast call.
45
- //
46
- // When stopScreencast is invoked:
47
- // - The currently active screencast is stopped.
48
- // - The #screencastOperations is checked for interrupted screencast operations.
49
- // - If any operations are found, the latest one is started
50
- // using its saved parameters and callbacks.
51
- //
52
- // This ensures that:
53
- // - Only one screencast is active at a time.
54
- // - Interrupted screencasts are resumed after the current screencast is stopped.
55
- // This ensures animation previews, which use screencasting, don't disrupt ongoing remote debugging sessions. Without this mechanism, stopping a preview screencast would terminate the debugging screencast, freezing the ScreencastView.
40
+ /**
41
+ * Manages concurrent screencast requests by queuing and prioritizing.
42
+ *
43
+ * When startScreencast is invoked:
44
+ * - If a screencast is currently active, the existing screencast's parameters and callbacks are
45
+ * saved in the #screencastOperations array.
46
+ * - The active screencast is then stopped.
47
+ * - A new screencast is initiated using the parameters and callbacks from the current startScreencast call.
48
+ *
49
+ * When stopScreencast is invoked:
50
+ * - The currently active screencast is stopped.
51
+ * - The #screencastOperations is checked for interrupted screencast operations.
52
+ * - If any operations are found, the latest one is started
53
+ * using its saved parameters and callbacks.
54
+ *
55
+ * This ensures that:
56
+ * - Only one screencast is active at a time.
57
+ * - Interrupted screencasts are resumed after the current screencast is stopped.
58
+ * This ensures animation previews, which use screencasting, don't disrupt ongoing remote debugging sessions. Without this mechanism, stopping a preview screencast would terminate the debugging screencast, freezing the ScreencastView.
59
+ **/
56
60
  export class ScreenCaptureModel extends SDKModel<void> implements ProtocolProxyApi.PageDispatcher {
57
61
  readonly #agent: ProtocolProxyApi.PageApi;
58
62
  #nextScreencastOperationId = 1;
@@ -67,12 +67,15 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
67
67
  this.#capabilitiesMask = Capability.JS | Capability.LOG | Capability.NETWORK | Capability.TARGET |
68
68
  Capability.INSPECTOR | Capability.IO | Capability.EVENT_BREAKPOINTS;
69
69
  if (parentTarget?.type() !== Type.FRAME) {
70
- this.#capabilitiesMask |= Capability.BROWSER;
70
+ this.#capabilitiesMask |= Capability.BROWSER | Capability.STORAGE;
71
71
  }
72
72
  break;
73
73
  case Type.SHARED_WORKER:
74
74
  this.#capabilitiesMask = Capability.JS | Capability.LOG | Capability.NETWORK | Capability.TARGET |
75
75
  Capability.IO | Capability.MEDIA | Capability.INSPECTOR | Capability.EVENT_BREAKPOINTS;
76
+ if (parentTarget?.type() !== Type.FRAME) {
77
+ this.#capabilitiesMask |= Capability.STORAGE;
78
+ }
76
79
  break;
77
80
  case Type.SHARED_STORAGE_WORKLET:
78
81
  this.#capabilitiesMask = Capability.JS | Capability.LOG | Capability.INSPECTOR | Capability.EVENT_BREAKPOINTS;
@@ -80,6 +83,9 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
80
83
  case Type.Worker:
81
84
  this.#capabilitiesMask = Capability.JS | Capability.LOG | Capability.NETWORK | Capability.TARGET |
82
85
  Capability.IO | Capability.MEDIA | Capability.EMULATION | Capability.EVENT_BREAKPOINTS;
86
+ if (parentTarget?.type() !== Type.FRAME) {
87
+ this.#capabilitiesMask |= Capability.STORAGE;
88
+ }
83
89
  break;
84
90
  case Type.WORKLET:
85
91
  this.#capabilitiesMask = Capability.JS | Capability.LOG | Capability.EVENT_BREAKPOINTS | Capability.NETWORK;
@@ -10,7 +10,7 @@ import type {NetworkRequest} from './NetworkRequest.js';
10
10
  import {ResourceTreeModel} from './ResourceTreeModel.js';
11
11
  import type {SourceMapV3} from './SourceMap.js';
12
12
 
13
- // A thin wrapper class, mostly to enable instanceof-based revealing of traces to open in Timeline.
13
+ /** A thin wrapper class, mostly to enable instanceof-based revealing of traces to open in Timeline. **/
14
14
  export class TraceObject {
15
15
  readonly traceEvents: Protocol.Tracing.DataCollectedEvent['value'];
16
16
  readonly metadata: {sourceMaps?: Array<{sourceMapUrl: string, sourceMap: SourceMapV3, url: string}>};
@@ -24,7 +24,7 @@ export class TraceObject {
24
24
  }
25
25
  }
26
26
 
27
- // Another thin wrapper class to enable revealing individual trace events (aka entries) in Timeline panel.
27
+ /** Another thin wrapper class to enable revealing individual trace events (aka entries) in Timeline panel. **/
28
28
  export class RevealableEvent {
29
29
  // Only Trace.Types.Events.Event are passed in, but we can't depend on that type from SDK
30
30
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
@@ -68,6 +68,7 @@ import * as RemoteObject from './RemoteObject.js';
68
68
  import * as Resource from './Resource.js';
69
69
  import * as ResourceTreeModel from './ResourceTreeModel.js';
70
70
  import * as RuntimeModel from './RuntimeModel.js';
71
+ import * as ScopeTreeCache from './ScopeTreeCache.js';
71
72
  import * as ScreenCaptureModel from './ScreenCaptureModel.js';
72
73
  import * as Script from './Script.js';
73
74
  import * as SDKModel from './SDKModel.js';
@@ -149,6 +150,7 @@ export {
149
150
  Resource,
150
151
  ResourceTreeModel,
151
152
  RuntimeModel,
153
+ ScopeTreeCache,
152
154
  ScreenCaptureModel,
153
155
  Script,
154
156
  SDKModel,
@@ -44,9 +44,16 @@ export const enum DefinitionKind {
44
44
  FIXED = 3,
45
45
  }
46
46
 
47
+ export const enum ScopeKind {
48
+ BLOCK = 1,
49
+ FUNCTION = 2,
50
+ GLOBAL = 3,
51
+ }
52
+
47
53
  export interface ScopeTreeNode {
48
54
  variables: Array<{name: string, kind: DefinitionKind, offsets: number[]}>;
49
55
  start: number;
50
56
  end: number;
57
+ kind: ScopeKind;
51
58
  children: ScopeTreeNode[];
52
59
  }
@@ -5,7 +5,7 @@
5
5
  import * as Acorn from '../../third_party/acorn/acorn.js';
6
6
 
7
7
  import {ECMA_VERSION} from './AcornTokenizer.js';
8
- import {DefinitionKind, type ScopeTreeNode} from './FormatterActions.js';
8
+ import {DefinitionKind, ScopeKind, type ScopeTreeNode} from './FormatterActions.js';
9
9
 
10
10
  export function parseScopes(expression: string, sourceType: 'module'|'script' = 'script'): Scope|null {
11
11
  // Parse the expression and find variables and scopes.
@@ -36,12 +36,14 @@ export class Scope {
36
36
  readonly parent: Scope|null;
37
37
  readonly start: number;
38
38
  readonly end: number;
39
+ readonly kind: ScopeKind;
39
40
  readonly children: Scope[] = [];
40
41
 
41
- constructor(start: number, end: number, parent: Scope|null) {
42
+ constructor(start: number, end: number, parent: Scope|null, kind: ScopeKind) {
42
43
  this.start = start;
43
44
  this.end = end;
44
45
  this.parent = parent;
46
+ this.kind = kind;
45
47
  if (parent) {
46
48
  parent.children.push(this);
47
49
  }
@@ -61,6 +63,7 @@ export class Scope {
61
63
  start: this.start,
62
64
  end: this.end,
63
65
  variables,
66
+ kind: this.kind,
64
67
  children,
65
68
  };
66
69
  }
@@ -137,7 +140,7 @@ export class ScopeVariableAnalysis {
137
140
 
138
141
  constructor(node: Acorn.ESTree.Node) {
139
142
  this.#rootNode = node;
140
- this.#rootScope = new Scope(node.start, node.end, null);
143
+ this.#rootScope = new Scope(node.start, node.end, null, ScopeKind.GLOBAL);
141
144
  this.#currentScope = this.#rootScope;
142
145
  }
143
146
 
@@ -169,7 +172,7 @@ export class ScopeVariableAnalysis {
169
172
  node.elements.forEach(item => this.#processNode(item));
170
173
  break;
171
174
  case 'ArrowFunctionExpression': {
172
- this.#pushScope(node.start, node.end);
175
+ this.#pushScope(node.start, node.end, ScopeKind.FUNCTION);
173
176
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.VAR, false));
174
177
  if (node.body.type === 'BlockStatement') {
175
178
  // Include the body of the arrow function in the same scope as the arguments.
@@ -188,7 +191,7 @@ export class ScopeVariableAnalysis {
188
191
  this.#processNode(node.right);
189
192
  break;
190
193
  case 'BlockStatement':
191
- this.#pushScope(node.start, node.end);
194
+ this.#pushScope(node.start, node.end, ScopeKind.BLOCK);
192
195
  node.body.forEach(this.#processNode.bind(this));
193
196
  this.#popScope(false);
194
197
  break;
@@ -202,7 +205,7 @@ export class ScopeVariableAnalysis {
202
205
  break;
203
206
  }
204
207
  case 'CatchClause':
205
- this.#pushScope(node.start, node.end);
208
+ this.#pushScope(node.start, node.end, ScopeKind.BLOCK);
206
209
  this.#processNodeAsDefinition(DefinitionKind.LET, false, node.param);
207
210
  this.#processNode(node.body);
208
211
  this.#popScope(false);
@@ -234,14 +237,14 @@ export class ScopeVariableAnalysis {
234
237
  break;
235
238
  case 'ForInStatement':
236
239
  case 'ForOfStatement':
237
- this.#pushScope(node.start, node.end);
240
+ this.#pushScope(node.start, node.end, ScopeKind.BLOCK);
238
241
  this.#processNode(node.left);
239
242
  this.#processNode(node.right);
240
243
  this.#processNode(node.body);
241
244
  this.#popScope(false);
242
245
  break;
243
246
  case 'ForStatement':
244
- this.#pushScope(node.start, node.end);
247
+ this.#pushScope(node.start, node.end, ScopeKind.BLOCK);
245
248
  this.#processNode(node.init ?? null);
246
249
  this.#processNode(node.test ?? null);
247
250
  this.#processNode(node.update ?? null);
@@ -250,7 +253,7 @@ export class ScopeVariableAnalysis {
250
253
  break;
251
254
  case 'FunctionDeclaration':
252
255
  this.#processNodeAsDefinition(DefinitionKind.VAR, false, node.id);
253
- this.#pushScope(node.id?.end ?? node.start, node.end);
256
+ this.#pushScope(node.id?.end ?? node.start, node.end, ScopeKind.FUNCTION);
254
257
  this.#addVariable('this', node.start, DefinitionKind.FIXED);
255
258
  this.#addVariable('arguments', node.start, DefinitionKind.FIXED);
256
259
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.LET, false));
@@ -259,7 +262,7 @@ export class ScopeVariableAnalysis {
259
262
  this.#popScope(true);
260
263
  break;
261
264
  case 'FunctionExpression':
262
- this.#pushScope(node.id?.end ?? node.start, node.end);
265
+ this.#pushScope(node.id?.end ?? node.start, node.end, ScopeKind.FUNCTION);
263
266
  this.#addVariable('this', node.start, DefinitionKind.FIXED);
264
267
  this.#addVariable('arguments', node.start, DefinitionKind.FIXED);
265
268
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.LET, false));
@@ -421,8 +424,8 @@ export class ScopeVariableAnalysis {
421
424
  return this.#allNames;
422
425
  }
423
426
 
424
- #pushScope(start: number, end: number): void {
425
- this.#currentScope = new Scope(start, end, this.#currentScope);
427
+ #pushScope(start: number, end: number, kind: ScopeKind): void {
428
+ this.#currentScope = new Scope(start, end, this.#currentScope, kind);
426
429
  }
427
430
 
428
431
  #popScope(isFunctionContext: boolean): void {
@@ -20,10 +20,12 @@ interface Replacement {
20
20
  isShorthandAssignmentProperty: boolean;
21
21
  }
22
22
 
23
- // Given an |expression| and a mapping from names to new names, the |computeSubstitution|
24
- // function returns a list of replacements sorted by the offset. The function throws if
25
- // it cannot parse the expression or the substitution is impossible to perform (for example
26
- // if the substitution target is 'this' within a function, it would become bound there).
23
+ /**
24
+ * Given an |expression| and a mapping from names to new names, the |computeSubstitution|
25
+ * function returns a list of replacements sorted by the offset. The function throws if
26
+ * it cannot parse the expression or the substitution is impossible to perform (for example
27
+ * if the substitution target is 'this' within a function, it would become bound there).
28
+ **/
27
29
  function computeSubstitution(expression: string, nameMap: Map<string, string|null>): Replacement[] {
28
30
  // Parse the expression and find variables and scopes.
29
31
  const root = Acorn.parse(expression, {
@@ -633,9 +633,11 @@ export class HeapSnapshotProgress {
633
633
  }
634
634
  }
635
635
 
636
- // An "interface" to be used when classifying plain JS objects in the snapshot.
637
- // An object matches the interface if it contains every listed property (even
638
- // if it also contains extra properties).
636
+ /**
637
+ * An "interface" to be used when classifying plain JS objects in the snapshot.
638
+ * An object matches the interface if it contains every listed property (even
639
+ * if it also contains extra properties).
640
+ **/
639
641
  interface InterfaceDefinition {
640
642
  name: string;
641
643
  properties: string[];
@@ -680,7 +682,7 @@ export interface Profile {
680
682
 
681
683
  export type LiveObjects = Record<number, {count: number, size: number, ids: number[]}>;
682
684
 
683
- // The first batch of data sent from the primary worker to the secondary.
685
+ /** The first batch of data sent from the primary worker to the secondary. **/
684
686
  interface SecondaryInitArgumentsStep1 {
685
687
  // For each edge ordinal, this array contains the ordinal of the pointed-to node.
686
688
  edgeToNodeOrdinals: Uint32Array;
@@ -692,7 +694,7 @@ interface SecondaryInitArgumentsStep1 {
692
694
  nodeFieldCount: number;
693
695
  }
694
696
 
695
- // The second batch of data sent from the primary worker to the secondary.
697
+ /** The second batch of data sent from the primary worker to the secondary. **/
696
698
  interface SecondaryInitArgumentsStep2 {
697
699
  rootNodeOrdinal: number;
698
700
  // An array with one bit per edge, where each bit indicates whether the edge
@@ -700,7 +702,7 @@ interface SecondaryInitArgumentsStep2 {
700
702
  essentialEdgesBuffer: ArrayBuffer;
701
703
  }
702
704
 
703
- // The third batch of data sent from the primary worker to the secondary.
705
+ /** The third batch of data sent from the primary worker to the secondary. **/
704
706
  interface SecondaryInitArgumentsStep3 {
705
707
  // For each node ordinal, this array contains the node's shallow size.
706
708
  nodeSelfSizes: Uint32Array;
@@ -749,11 +751,13 @@ interface DominatedNodes {
749
751
  dominatedNodes: Uint32Array;
750
752
  }
751
753
 
752
- // The data transferred from the secondary worker to the primary.
754
+ /** The data transferred from the secondary worker to the primary. **/
753
755
  interface ResultsFromSecondWorker extends Retainers, DominatorsAndRetainedSizes, DominatedNodes {}
754
756
 
755
- // Initialization work is split into two threads. This class is the entry point
756
- // for work done by the second thread.
757
+ /**
758
+ * Initialization work is split into two threads. This class is the entry point
759
+ * for work done by the second thread.
760
+ **/
757
761
  export class SecondaryInitManager {
758
762
  argsStep1: Promise<SecondaryInitArgumentsStep1>;
759
763
  argsStep2: Promise<SecondaryInitArgumentsStep2>;
@@ -2153,8 +2157,10 @@ export abstract class HeapSnapshot {
2153
2157
  private inferInterfaceDefinitions(): InterfaceDefinition[] {
2154
2158
  const {edgePropertyType} = this;
2155
2159
 
2156
- // First, produce a set of candidate definitions by iterating the properties
2157
- // on every plain JS Object in the snapshot.
2160
+ /**
2161
+ * First, produce a set of candidate definitions by iterating the properties
2162
+ * on every plain JS Object in the snapshot.
2163
+ **/
2158
2164
  interface InterfaceDefinitionCandidate extends InterfaceDefinition {
2159
2165
  // How many objects start with these properties in this order.
2160
2166
  count: number;
@@ -2229,7 +2235,7 @@ export abstract class HeapSnapshot {
2229
2235
  this.#aggregates = {};
2230
2236
  this.#aggregatesSortedFlags = {};
2231
2237
 
2232
- // Information about a named interface.
2238
+ /** Information about a named interface. **/
2233
2239
  interface MatchInfo {
2234
2240
  name: string;
2235
2241
  // The number of properties listed in the interface definition.
@@ -2248,9 +2254,11 @@ export abstract class HeapSnapshot {
2248
2254
  return a.index <= b.index ? a : b;
2249
2255
  }
2250
2256
 
2251
- // A node in the tree which allows us to search for interfaces matching an object.
2252
- // Each edge in this tree represents adding a property, starting from an empty
2253
- // object. Properties must be iterated in sorted order.
2257
+ /**
2258
+ * A node in the tree which allows us to search for interfaces matching an object.
2259
+ * Each edge in this tree represents adding a property, starting from an empty
2260
+ * object. Properties must be iterated in sorted order.
2261
+ **/
2254
2262
  interface PropertyTreeNode {
2255
2263
  // All possible successors from this node. Keys are property names.
2256
2264
  next: Map<string, PropertyTreeNode>;
@@ -3627,7 +3635,7 @@ export class JSHeapSnapshot extends HeapSnapshot {
3627
3635
  }
3628
3636
  }
3629
3637
 
3630
- // Creates and initializes a JSHeapSnapshot using only one thread.
3638
+ /** Creates and initializes a JSHeapSnapshot using only one thread. **/
3631
3639
  export async function createJSHeapSnapshotForTesting(profile: Profile): Promise<JSHeapSnapshot> {
3632
3640
  const result = new JSHeapSnapshot(profile, new HeapSnapshotProgress());
3633
3641
  const channel = new MessageChannel();
@@ -91,7 +91,8 @@ export class OutermostTargetSelector implements SDK.TargetManager.Observer, UI.S
91
91
  this.listItems.insertWithComparator(target, this.#targetComparator());
92
92
  this.#toolbarItem.setVisible(this.listItems.length > 1);
93
93
 
94
- if (target === UI.Context.Context.instance().flavor(SDK.Target.Target)) {
94
+ const primaryTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
95
+ if (target === primaryTarget || target === UI.Context.Context.instance().flavor(SDK.Target.Target)) {
95
96
  this.#dropDown.selectItem(target);
96
97
  }
97
98
  }
@@ -1022,7 +1022,7 @@ export class PauseListener {
1022
1022
  }
1023
1023
  }
1024
1024
 
1025
- // Unused but mentioned at https://chromedevtools.github.io/devtools-protocol/#:~:text=use%20Main.MainImpl.-,sendOverProtocol,-()%20in%20the
1025
+ /** Unused but mentioned at https://chromedevtools.github.io/devtools-protocol/#:~:text=use%20Main.MainImpl.-,sendOverProtocol,-()%20in%20the **/
1026
1026
  export function sendOverProtocol(
1027
1027
  method: ProtocolClient.InspectorBackend.QualifiedName, params: Object|null): Promise<unknown[]|null> {
1028
1028
  return new Promise((resolve, reject) => {
@@ -1064,9 +1064,11 @@ type ExternalRequestInput = {
1064
1064
  args: {requestUrl: string, prompt: string},
1065
1065
  };
1066
1066
 
1067
- // For backwards-compatibility we iterate over the generator and drop the
1068
- // intermediate results. The final response is transformed to its legacy type.
1069
- // Instead of sending responses of type error, errors are throws.
1067
+ /**
1068
+ * For backwards-compatibility we iterate over the generator and drop the
1069
+ * intermediate results. The final response is transformed to its legacy type.
1070
+ * Instead of sending responses of type error, errors are throws.
1071
+ **/
1070
1072
  export async function handleExternalRequest(input: ExternalRequestInput):
1071
1073
  Promise<{response: string, devToolsLogs: object[]}> {
1072
1074
  const generator = await handleExternalRequestGenerator(input);
@@ -215,7 +215,7 @@ inspectorBackend.registerEvent("Browser.downloadWillBegin", ["frameId", "guid",
215
215
  inspectorBackend.registerEnum("Browser.DownloadProgressEventState", {InProgress: "inProgress", Completed: "completed", Canceled: "canceled"});
216
216
  inspectorBackend.registerEvent("Browser.downloadProgress", ["guid", "totalBytes", "receivedBytes", "state", "filePath"]);
217
217
  inspectorBackend.registerCommand("Browser.setPermission", [{"name": "permission", "type": "object", "optional": false, "description": "Descriptor of permission to override.", "typeRef": "Browser.PermissionDescriptor"}, {"name": "setting", "type": "string", "optional": false, "description": "Setting of the permission.", "typeRef": "Browser.PermissionSetting"}, {"name": "origin", "type": "string", "optional": true, "description": "Requesting origin the permission applies to, all origins if not specified.", "typeRef": null}, {"name": "embeddingOrigin", "type": "string", "optional": true, "description": "Embedding origin the permission applies to. It is ignored unless the requesting origin is present and valid. If the requesting origin is provided but the embedding origin isn't, the requesting origin is used as the embedding origin.", "typeRef": null}, {"name": "browserContextId", "type": "string", "optional": true, "description": "Context to override. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID"}], [], "Set permission settings for given requesting and embedding origins.");
218
- inspectorBackend.registerCommand("Browser.grantPermissions", [{"name": "permissions", "type": "array", "optional": false, "description": "", "typeRef": "Browser.PermissionType"}, {"name": "origin", "type": "string", "optional": true, "description": "Origin the permission applies to, all origins if not specified.", "typeRef": null}, {"name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to override permissions. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID"}], [], "Grant specific permissions to the given origin and reject all others.");
218
+ inspectorBackend.registerCommand("Browser.grantPermissions", [{"name": "permissions", "type": "array", "optional": false, "description": "", "typeRef": "Browser.PermissionType"}, {"name": "origin", "type": "string", "optional": true, "description": "Origin the permission applies to, all origins if not specified.", "typeRef": null}, {"name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to override permissions. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID"}], [], "Grant specific permissions to the given origin and reject all others. Deprecated. Use setPermission instead.");
219
219
  inspectorBackend.registerCommand("Browser.resetPermissions", [{"name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to reset permissions. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID"}], [], "Reset all permission management for all origins.");
220
220
  inspectorBackend.registerEnum("Browser.SetDownloadBehaviorRequestBehavior", {Deny: "deny", Allow: "allow", AllowAndName: "allowAndName", Default: "default"});
221
221
  inspectorBackend.registerCommand("Browser.setDownloadBehavior", [{"name": "behavior", "type": "string", "optional": false, "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.", "typeRef": "Browser.SetDownloadBehaviorRequestBehavior"}, {"name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to set download behavior. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID"}, {"name": "downloadPath", "type": "string", "optional": true, "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.", "typeRef": null}, {"name": "eventsEnabled", "type": "boolean", "optional": true, "description": "Whether to emit download events (defaults to false).", "typeRef": null}], [], "Set the behavior when downloading a file.");
@@ -870,7 +870,7 @@ inspectorBackend.registerCommand("Network.getResponseBodyForInterception", [{"na
870
870
  inspectorBackend.registerCommand("Network.takeResponseBodyForInterceptionAsStream", [{"name": "interceptionId", "type": "string", "optional": false, "description": "", "typeRef": "Network.InterceptionId"}], ["stream"], "Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified.");
871
871
  inspectorBackend.registerCommand("Network.replayXHR", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of XHR to replay.", "typeRef": "Network.RequestId"}], [], "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.");
872
872
  inspectorBackend.registerCommand("Network.searchInResponseBody", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network response to search.", "typeRef": "Network.RequestId"}, {"name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null}, {"name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null}, {"name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null}], ["result"], "Searches for given string in response content.");
873
- inspectorBackend.registerCommand("Network.setBlockedURLs", [{"name": "urls", "type": "array", "optional": false, "description": "URL patterns to block. Wildcards ('*') are allowed.", "typeRef": "string"}], [], "Blocks URLs from loading.");
873
+ inspectorBackend.registerCommand("Network.setBlockedURLs", [{"name": "urlPatterns", "type": "array", "optional": true, "description": "URL patterns to block. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/). Example: `*://*:*/*.css`.", "typeRef": "string"}, {"name": "urls", "type": "array", "optional": true, "description": "URL patterns to block. Wildcards ('*') are allowed.", "typeRef": "string"}], [], "Blocks URLs from loading.");
874
874
  inspectorBackend.registerCommand("Network.setBypassServiceWorker", [{"name": "bypass", "type": "boolean", "optional": false, "description": "Bypass service worker and load from network.", "typeRef": null}], [], "Toggles ignoring of service worker for each request.");
875
875
  inspectorBackend.registerCommand("Network.setCacheDisabled", [{"name": "cacheDisabled", "type": "boolean", "optional": false, "description": "Cache disabled state.", "typeRef": null}], [], "Toggles ignoring cache for each request. If `true`, cache will not be used.");
876
876
  inspectorBackend.registerCommand("Network.setCookie", [{"name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null}, {"name": "url", "type": "string", "optional": true, "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.", "typeRef": null}, {"name": "domain", "type": "string", "optional": true, "description": "Cookie domain.", "typeRef": null}, {"name": "path", "type": "string", "optional": true, "description": "Cookie path.", "typeRef": null}, {"name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure.", "typeRef": null}, {"name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only.", "typeRef": null}, {"name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite"}, {"name": "expires", "type": "number", "optional": true, "description": "Cookie expiration date, session cookie if not set", "typeRef": "Network.TimeSinceEpoch"}, {"name": "priority", "type": "string", "optional": true, "description": "Cookie Priority type.", "typeRef": "Network.CookiePriority"}, {"name": "sameParty", "type": "boolean", "optional": true, "description": "True if cookie is SameParty.", "typeRef": null}, {"name": "sourceScheme", "type": "string", "optional": true, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme"}, {"name": "sourcePort", "type": "number", "optional": true, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null}, {"name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key. If not set, the cookie will be set as not partitioned.", "typeRef": "Network.CookiePartitionKey"}], ["success"], "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.");
@@ -1238,7 +1238,8 @@ export namespace ProtocolMapping {
1238
1238
  returnType: void;
1239
1239
  };
1240
1240
  /**
1241
- * Grant specific permissions to the given origin and reject all others.
1241
+ * Grant specific permissions to the given origin and reject all others. Deprecated. Use
1242
+ * setPermission instead.
1242
1243
  */
1243
1244
  'Browser.grantPermissions': {
1244
1245
  paramsType: [Protocol.Browser.GrantPermissionsRequest];
@@ -3443,7 +3444,7 @@ export namespace ProtocolMapping {
3443
3444
  * Blocks URLs from loading.
3444
3445
  */
3445
3446
  'Network.setBlockedURLs': {
3446
- paramsType: [Protocol.Network.SetBlockedURLsRequest];
3447
+ paramsType: [Protocol.Network.SetBlockedURLsRequest?];
3447
3448
  returnType: void;
3448
3449
  };
3449
3450
  /**
@@ -596,7 +596,9 @@ declare namespace ProtocolProxyApi {
596
596
  invoke_setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<Protocol.ProtocolResponseWithError>;
597
597
 
598
598
  /**
599
- * Grant specific permissions to the given origin and reject all others.
599
+ * Grant specific permissions to the given origin and reject all others. Deprecated. Use
600
+ * setPermission instead.
601
+ * @deprecated
600
602
  */
601
603
  invoke_grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<Protocol.ProtocolResponseWithError>;
602
604
 
@@ -11606,10 +11606,16 @@ export namespace Network {
11606
11606
  }
11607
11607
 
11608
11608
  export interface SetBlockedURLsRequest {
11609
+ /**
11610
+ * URL patterns to block. Patterns use the URLPattern constructor string syntax
11611
+ * (https://urlpattern.spec.whatwg.org/). Example: `*://*:*\/*.css`.
11612
+ */
11613
+ urlPatterns?: string[];
11609
11614
  /**
11610
11615
  * URL patterns to block. Wildcards ('*') are allowed.
11616
+ * @deprecated
11611
11617
  */
11612
- urls: string[];
11618
+ urls?: string[];
11613
11619
  }
11614
11620
 
11615
11621
  export interface SetBypassServiceWorkerRequest {