chrome-devtools-frontend 1.0.1522145 → 1.0.1524741

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 (348) 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/ui_engineering.md +98 -0
  9. package/front_end/Tests.js +1 -1
  10. package/front_end/core/common/Color.ts +13 -9
  11. package/front_end/core/common/ColorConverter.ts +9 -7
  12. package/front_end/core/common/Gzip.ts +1 -1
  13. package/front_end/core/common/MapWithDefault.ts +5 -3
  14. package/front_end/core/common/ResourceType.ts +0 -12
  15. package/front_end/core/common/ReturnToPanel.ts +6 -4
  16. package/front_end/core/common/Trie.ts +4 -2
  17. package/front_end/core/host/AidaClient.ts +3 -3
  18. package/front_end/core/host/GdpClient.ts +7 -5
  19. package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -5
  20. package/front_end/core/host/Platform.ts +5 -3
  21. package/front_end/core/host/UserMetrics.ts +6 -4
  22. package/front_end/core/platform/ArrayUtilities.ts +1 -1
  23. package/front_end/core/platform/StringUtilities.ts +34 -31
  24. package/front_end/core/root/Runtime.ts +1 -1
  25. package/front_end/core/sdk/CSSMetadata.ts +6 -4
  26. package/front_end/core/sdk/CSSPropertyParser.ts +17 -13
  27. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +19 -13
  28. package/front_end/core/sdk/ChildTargetManager.ts +35 -0
  29. package/front_end/core/sdk/DOMModel.ts +1 -1
  30. package/front_end/core/sdk/EnhancedTracesParser.ts +13 -6
  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/core/sdk/ScreenCaptureModel.ts +24 -20
  42. package/front_end/core/sdk/Target.ts +7 -1
  43. package/front_end/core/sdk/TraceObject.ts +2 -2
  44. package/front_end/entrypoints/formatter_worker/Substitute.ts +6 -4
  45. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -16
  46. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -1
  47. package/front_end/entrypoints/main/MainImpl.ts +6 -4
  48. package/front_end/generated/Deprecation.ts +4 -4
  49. package/front_end/generated/InspectorBackendCommands.js +2 -2
  50. package/front_end/generated/protocol-mapping.d.ts +3 -2
  51. package/front_end/generated/protocol-proxy-api.d.ts +3 -1
  52. package/front_end/generated/protocol.ts +7 -1
  53. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +600 -0
  54. package/front_end/models/ai_assistance/agents/StylingAgent.ts +83 -222
  55. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +23 -0
  56. package/front_end/models/ai_assistance/performance/AIContext.ts +19 -4
  57. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +4 -2
  58. package/front_end/models/autofill_manager/AutofillManager.ts +4 -2
  59. package/front_end/models/cpu_profile/CPUProfileDataModel.ts +1 -1
  60. package/front_end/models/crux-manager/CrUXManager.ts +1 -1
  61. package/front_end/models/extensions/HostUrlPattern.ts +13 -5
  62. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
  63. package/front_end/models/issues_manager/CookieIssue.ts +2 -2
  64. package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
  65. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +20 -0
  66. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  67. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  68. package/front_end/models/javascript_metadata/NativeFunctions.js +9 -1
  69. package/front_end/models/network_time_calculator/Calculator.ts +4 -2
  70. package/front_end/models/network_time_calculator/RequestTimeRanges.ts +6 -4
  71. package/front_end/models/source_map_scopes/NamesResolver.ts +7 -5
  72. package/front_end/models/text_utils/ContentProvider.ts +6 -4
  73. package/front_end/models/trace/LanternComputationData.ts +1 -0
  74. package/front_end/models/trace/extras/TraceTree.ts +1 -1
  75. package/front_end/models/trace/handlers/FramesHandler.ts +7 -5
  76. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +13 -7
  77. package/front_end/models/trace/handlers/MetaHandler.ts +16 -14
  78. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +30 -8
  79. package/front_end/models/trace/handlers/helpers.ts +1 -1
  80. package/front_end/models/trace/handlers/types.ts +23 -19
  81. package/front_end/models/trace/helpers/Timing.ts +4 -2
  82. package/front_end/models/trace/helpers/Trace.ts +8 -4
  83. package/front_end/models/trace/insights/DocumentLatency.ts +10 -11
  84. package/front_end/models/trace/insights/INPBreakdown.ts +13 -2
  85. package/front_end/models/trace/insights/LCPBreakdown.ts +14 -2
  86. package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -2
  87. package/front_end/models/trace/types/File.ts +12 -8
  88. package/front_end/models/trace/types/Timing.ts +1 -1
  89. package/front_end/models/trace/types/TraceEvents.ts +43 -28
  90. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
  91. package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +12 -10
  92. package/front_end/panels/application/KeyValueStorageItemsView.ts +31 -33
  93. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +6 -11
  94. package/front_end/panels/application/components/OriginTrialTreeView.ts +7 -5
  95. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -0
  96. package/front_end/panels/application/components/ReportsGrid.ts +4 -10
  97. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -13
  98. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
  99. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +3 -7
  100. package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
  101. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +3 -10
  102. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -2
  103. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +7 -5
  104. package/front_end/panels/changes/ChangesSidebar.ts +97 -95
  105. package/front_end/panels/changes/changesSidebar.css +3 -0
  106. package/front_end/panels/console/ConsoleView.ts +2 -2
  107. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +22 -35
  108. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
  109. package/front_end/panels/elements/ElementStatePaneWidget.ts +12 -0
  110. package/front_end/panels/elements/ElementsTreeElement.ts +9 -5
  111. package/front_end/panels/elements/ElementsTreeOutline.ts +11 -8
  112. package/front_end/panels/elements/PropertyRenderer.ts +19 -15
  113. package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -4
  114. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  115. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -2
  116. package/front_end/panels/elements/components/AdornerManager.ts +5 -3
  117. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -4
  118. package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
  119. package/front_end/panels/network/NetworkDataGridNode.ts +2 -44
  120. package/front_end/panels/network/NetworkLogView.ts +6 -4
  121. package/front_end/panels/network/RequestPreviewView.ts +0 -7
  122. package/front_end/panels/network/components/RequestHeadersView.ts +0 -6
  123. package/front_end/panels/network/components/components.ts +0 -2
  124. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +1 -1
  125. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
  126. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +40 -48
  127. package/front_end/panels/search/SearchResultsPane.ts +2 -3
  128. package/front_end/panels/security/IPProtectionView.ts +1 -1
  129. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +4 -0
  130. package/front_end/panels/settings/emulation/utils/StructuredHeaders.ts +45 -37
  131. package/front_end/panels/sources/BreakpointsViewUtils.ts +11 -9
  132. package/front_end/panels/sources/DebuggerPlugin.ts +8 -4
  133. package/front_end/panels/sources/SourcesPanel.ts +1 -1
  134. package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
  135. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -2
  136. package/front_end/panels/timeline/CountersGraph.ts +12 -5
  137. package/front_end/panels/timeline/EasterEgg.d.ts +5 -3
  138. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +8 -6
  139. package/front_end/panels/timeline/ModificationsManager.ts +5 -3
  140. package/front_end/panels/timeline/ThreadAppender.ts +7 -5
  141. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -8
  142. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
  143. package/front_end/panels/timeline/TimelineFlameChartView.ts +17 -0
  144. package/front_end/panels/timeline/TimelinePanel.ts +15 -8
  145. package/front_end/panels/timeline/TimelineSelection.ts +4 -2
  146. package/front_end/panels/timeline/TimelineUIUtils.ts +17 -6
  147. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
  148. package/front_end/panels/timeline/components/ExportTraceOptions.ts +21 -9
  149. package/front_end/panels/timeline/components/Utils.ts +1 -1
  150. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -3
  151. package/front_end/panels/timeline/timelineDetailsView.css +5 -0
  152. package/front_end/panels/timeline/utils/Helpers.ts +1 -1
  153. package/front_end/panels/utils/utils.ts +1 -7
  154. package/front_end/services/trace_bounds/TraceBounds.ts +4 -2
  155. package/front_end/services/tracing/PerformanceTracing.ts +1 -1
  156. package/front_end/third_party/chromium/README.chromium +1 -1
  157. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  158. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  159. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  160. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  161. package/front_end/third_party/codemirror.next/package.json +3 -2
  162. package/front_end/third_party/puppeteer/README.chromium +2 -2
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts +8 -10
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js +8 -10
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +28 -30
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +27 -29
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +34 -38
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +34 -38
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +8 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js +12 -14
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +92 -108
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +33 -39
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +5 -3
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +4 -2
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +14 -5
  192. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
  194. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +12 -6
  196. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +24 -2
  199. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
  201. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  202. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +3 -0
  204. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
  206. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
  208. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +6 -8
  210. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js +6 -8
  212. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +6 -3
  219. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts +5 -7
  221. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +5 -7
  223. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  225. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  226. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  228. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +188 -224
  229. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +140 -166
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts +8 -10
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts.map +1 -1
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js +8 -10
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +28 -30
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +27 -29
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +34 -38
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +34 -38
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts +8 -1
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js +12 -14
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js.map +1 -1
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +92 -108
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +33 -39
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +5 -3
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +4 -2
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +15 -6
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  260. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
  261. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  262. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +12 -6
  263. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  264. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +24 -2
  266. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  268. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +3 -0
  270. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
  272. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
  273. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
  274. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
  275. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +6 -8
  276. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -1
  277. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js +6 -8
  278. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +1 -1
  279. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  280. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  281. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +1 -1
  282. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  283. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +6 -3
  284. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  285. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts +5 -7
  286. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  287. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +5 -7
  288. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
  289. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  290. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  291. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  292. package/front_end/third_party/puppeteer/package/lib/types.d.ts +188 -224
  293. package/front_end/third_party/puppeteer/package/package.json +3 -3
  294. package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +8 -10
  295. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +27 -29
  296. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +34 -38
  297. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +17 -14
  298. package/front_end/third_party/puppeteer/package/src/api/Page.ts +92 -108
  299. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +5 -3
  300. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +5 -1
  301. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +28 -3
  302. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +16 -7
  303. package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +28 -2
  304. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
  305. package/front_end/third_party/puppeteer/package/src/cdp/PredefinedNetworkConditions.ts +13 -22
  306. package/front_end/third_party/puppeteer/package/src/common/Device.ts +6 -8
  307. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  308. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +6 -3
  309. package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +5 -7
  310. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  311. package/front_end/ui/components/chrome_link/ChromeLink.ts +4 -2
  312. package/front_end/ui/components/dialogs/Dialog.ts +13 -9
  313. package/front_end/ui/components/highlighting/HighlightElement.ts +77 -0
  314. package/front_end/ui/components/highlighting/HighlightManager.ts +37 -0
  315. package/front_end/ui/components/highlighting/highlighting.ts +2 -0
  316. package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +5 -3
  317. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -3
  318. package/front_end/ui/components/menus/SelectMenu.ts +6 -4
  319. package/front_end/ui/components/survey_link/SurveyLink.ts +4 -2
  320. package/front_end/ui/components/text_editor/config.ts +10 -6
  321. package/front_end/ui/components/text_editor/javascript.ts +8 -4
  322. package/front_end/ui/components/tooltips/Tooltip.ts +13 -4
  323. package/front_end/ui/legacy/ForwardedInputEventHandler.ts +4 -2
  324. package/front_end/ui/legacy/GlassPane.ts +1 -1
  325. package/front_end/ui/legacy/SettingsUI.ts +1 -5
  326. package/front_end/ui/legacy/Treeoutline.ts +12 -33
  327. package/front_end/ui/legacy/UIUtils.ts +19 -1
  328. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +12 -10
  329. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +30 -32
  330. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  331. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +25 -25
  332. package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
  333. package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +4 -2
  334. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -2
  335. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -6
  336. package/front_end/ui/legacy/components/perf_ui/PieChart.ts +6 -4
  337. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
  338. package/front_end/ui/legacy/components/source_frame/XMLView.ts +22 -16
  339. package/front_end/ui/legacy/components/source_frame/xmlView.css +0 -2
  340. package/front_end/ui/legacy/components/utils/Linkifier.ts +6 -4
  341. package/front_end/ui/visual_logging/Debugging.ts +10 -6
  342. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -3
  343. package/inspector_overlay/common.ts +5 -3
  344. package/inspector_overlay/highlight_grid_common.ts +1 -1
  345. package/package.json +1 -1
  346. package/front_end/Images/src/bundle.svg +0 -3
  347. package/front_end/panels/network/components/WebBundleInfoView.css +0 -27
  348. package/front_end/panels/network/components/WebBundleInfoView.ts +0 -95
@@ -251,7 +251,7 @@ export const stripLineBreaks = (inputStr: string): string => {
251
251
  const EXTENDED_KEBAB_CASE_REGEXP = /^([a-z0-9]+(?:-[a-z0-9]+)*\.)*[a-z0-9]+(?:-[a-z0-9]+)*$/;
252
252
 
253
253
  /**
254
- * Tests if the `inputStr` is following the extended Kebab Case naming convetion,
254
+ * Tests if the `inputStr` is following the extended Kebab Case naming convention,
255
255
  * where words are separated with either a dash (`-`) or a dot (`.`), and all
256
256
  * characters must be lower-case alphanumeric.
257
257
  *
@@ -386,7 +386,7 @@ export const escapeForRegExp = (str: string): string => {
386
386
 
387
387
  export const naturalOrderComparator = (a: string, b: string): number => {
388
388
  const chunk = /^\d+|^\D+/;
389
- let chunka, chunkb, anum, bnum;
389
+ let chunkA, chunkB, numA, numB;
390
390
  while (true) {
391
391
  if (a) {
392
392
  if (!b) {
@@ -398,32 +398,32 @@ export const naturalOrderComparator = (a: string, b: string): number => {
398
398
  }
399
399
  return 0;
400
400
  }
401
- chunka = (a.match(chunk) as string[])[0];
402
- chunkb = (b.match(chunk) as string[])[0];
403
- anum = !Number.isNaN(Number(chunka));
404
- bnum = !Number.isNaN(Number(chunkb));
405
- if (anum && !bnum) {
401
+ chunkA = (a.match(chunk) as string[])[0];
402
+ chunkB = (b.match(chunk) as string[])[0];
403
+ numA = !Number.isNaN(Number(chunkA));
404
+ numB = !Number.isNaN(Number(chunkB));
405
+ if (numA && !numB) {
406
406
  return -1;
407
407
  }
408
- if (bnum && !anum) {
408
+ if (numB && !numA) {
409
409
  return 1;
410
410
  }
411
- if (anum && bnum) {
412
- const diff = Number(chunka) - Number(chunkb);
411
+ if (numA && numB) {
412
+ const diff = Number(chunkA) - Number(chunkB);
413
413
  if (diff) {
414
414
  return diff;
415
415
  }
416
- if (chunka.length !== chunkb.length) {
417
- if (!Number(chunka) && !Number(chunkb)) { // chunks are strings of all 0s (special case)
418
- return chunka.length - chunkb.length;
416
+ if (chunkA.length !== chunkB.length) {
417
+ if (!Number(chunkA) && !Number(chunkB)) { // chunks are strings of all 0s (special case)
418
+ return chunkA.length - chunkB.length;
419
419
  }
420
- return chunkb.length - chunka.length;
420
+ return chunkB.length - chunkA.length;
421
421
  }
422
- } else if (chunka !== chunkb) {
423
- return (chunka < chunkb) ? -1 : 1;
422
+ } else if (chunkA !== chunkB) {
423
+ return (chunkA < chunkB) ? -1 : 1;
424
424
  }
425
- a = a.substring(chunka.length);
426
- b = b.substring(chunkb.length);
425
+ a = a.substring(chunkA.length);
426
+ b = b.substring(chunkB.length);
427
427
  }
428
428
  };
429
429
 
@@ -499,19 +499,22 @@ export const toLowerCaseString = function(input: string): LowerCaseString {
499
499
  return input.toLowerCase() as LowerCaseString;
500
500
  };
501
501
 
502
+ /**
503
+ * 1: two or more consecutive uppercase letters. This is useful for identifying acronyms
504
+ * 2: lookahead assertion that matches a word boundary
505
+ * 3: numeronym: single letter followed by number and another letter
506
+ * 4: word starting with an optional uppercase letter
507
+ * 5: single digit followed by word to handle '3D' or '2px' (this might be controverial)
508
+ * 6: single uppercase letter or number
509
+ * 7: a dot character. We extract it into a separate word and remove dashes around it later.
510
+ * This is makes more sense conceptually and allows accounting for all possible word variants.
511
+ * Making dot a part of a word prevent us from handling acronyms or numeronyms after the word
512
+ * correctly without making the RegExp prohibitively complicated.
513
+ * https://regex101.com/r/FhMVKc/1
514
+ * <---1---><------------2-----------> <---------3--------> <-----4----> <------5-----> <-----6----> <7>
515
+ */
502
516
  const WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b|_)|[A-Za-z][0-9]+[a-z]?|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g;
503
- // <---1---><------------2-----------> <---------3--------> <-----4----> <------5-----> <-----6----> <7>
504
- // 1: two or more consecutive uppercase letters. This is useful for identifying acronyms
505
- // 2: lookahead assertion that matches a word boundary
506
- // 3: numeronym: single letter followed by number and another letter
507
- // 4: word starting with an optional uppercase letter
508
- // 5: single digit followed by word to handle '3D' or '2px' (this might be controverial)
509
- // 6: single uppercase letter or number
510
- // 7: a dot character. We extract it into a separate word and remove dashes around it later.
511
- // This is makes more sense conceptually and allows accounting for all possible word variants.
512
- // Making dot a part of a word prevent us from handling acronyms or numeronyms after the word
513
- // correctly without making the RegExp prohibitively complicated.
514
- // https://regex101.com/r/FhMVKc/1
517
+
515
518
  export const toKebabCase = function(input: string): Lowercase<string> {
516
519
  return (input.match?.(WORD)?.map(w => w.toLowerCase()).join('-').replaceAll('-.-', '.') || input) as
517
520
  Lowercase<string>;
@@ -553,7 +556,7 @@ export function toSnakeCase(text: string): string {
553
556
  return result;
554
557
  }
555
558
 
556
- // Replaces the last ocurrence of parameter `search` with parameter `replacement` in `input`
559
+ /** Replaces the last occurrence of parameter `search` with parameter `replacement` in `input` **/
557
560
  export const replaceLast = function(input: string, search: string, replacement: string): string {
558
561
  const replacementStartIndex = input.lastIndexOf(search);
559
562
  if (replacementStartIndex === -1) {
@@ -303,7 +303,7 @@ export class Experiment {
303
303
  }
304
304
  }
305
305
 
306
- // This must be constructed after the query parameters have been parsed.
306
+ /** This must be constructed after the query parameters have been parsed. **/
307
307
  export const experiments = new ExperimentsSupport();
308
308
 
309
309
  /**
@@ -362,7 +362,7 @@ export const CubicBezierKeywordValues = new Map([
362
362
  ['ease-out', 'cubic-bezier(0, 0, 0.58, 1)'],
363
363
  ]);
364
364
 
365
- // CSS-wide keywords.
365
+ /** CSS-wide keywords. **/
366
366
  export const enum CSSWideKeyword {
367
367
  INHERIT = 'inherit',
368
368
  INITIAL = 'initial',
@@ -370,8 +370,10 @@ export const enum CSSWideKeyword {
370
370
  REVERT_LAYER = 'revert-layer',
371
371
  UNSET = 'unset',
372
372
  }
373
- // Spec: https://drafts.csswg.org/css-cascade/#defaulting-keywords
374
- // https://drafts.csswg.org/css-cascade-5/#revert-layer
373
+ /**
374
+ * Spec: https://drafts.csswg.org/css-cascade/#defaulting-keywords
375
+ * https://drafts.csswg.org/css-cascade-5/#revert-layer
376
+ **/
375
377
  export const CSSWideKeywords: CSSWideKeyword[] = [
376
378
  CSSWideKeyword.INHERIT,
377
379
  CSSWideKeyword.INITIAL,
@@ -380,7 +382,7 @@ export const CSSWideKeywords: CSSWideKeyword[] = [
380
382
  CSSWideKeyword.UNSET,
381
383
  ];
382
384
 
383
- // https://www.w3.org/TR/css-anchor-position-1/#typedef-try-size
385
+ /** https://www.w3.org/TR/css-anchor-position-1/#typedef-try-size **/
384
386
  export const enum PositionTryOrderKeyword {
385
387
  NORMAL = 'normal',
386
388
  MOST_HEIGHT = 'most-height',
@@ -309,11 +309,11 @@ class ComputedTextChunk {
309
309
  return this.#cachedComputedText;
310
310
  }
311
311
 
312
- // If the match is top-level, i.e. is an outermost subexpression in the property value, count the number of outermost
313
- // subexpressions after applying any potential substitutions.
312
+ // If the match is top-level, i.e. is an outermost sub-expression in the property value, count the number of outermost
313
+ // sub-expressions after applying any potential substitutions.
314
314
  get topLevelValueCount(): number {
315
315
  if (this.match.node.parent?.name !== 'Declaration') {
316
- // Not a top-level matchh.
316
+ // Not a top-level match.
317
317
  return 0;
318
318
  }
319
319
  const computedText = this.computedText;
@@ -332,12 +332,14 @@ class ComputedTextChunk {
332
332
  }
333
333
  }
334
334
 
335
- // This class constructs the "computed" text from the input property text, i.e., it will strip comments and substitute
336
- // var() functions if possible. It's intended for use during the bottom-up tree matching process. The original text is
337
- // not modified. Instead, computed text slices are produced on the fly. During bottom-up matching, the sequence of
338
- // top-level comments and var() matches will be recorded. This produces an ordered sequence of text pieces that need to
339
- // be substituted into the original text. When a computed text slice is requested, it is generated by piecing together
340
- // original and computed slices as required.
335
+ /**
336
+ * This class constructs the "computed" text from the input property text, i.e., it will strip comments and substitute
337
+ * var() functions if possible. It's intended for use during the bottom-up tree matching process. The original text is
338
+ * not modified. Instead, computed text slices are produced on the fly. During bottom-up matching, the sequence of
339
+ * top-level comments and var() matches will be recorded. This produces an ordered sequence of text pieces that need to
340
+ * be substituted into the original text. When a computed text slice is requested, it is generated by piecing together
341
+ * original and computed slices as required.
342
+ **/
341
343
  export class ComputedText {
342
344
  readonly #chunks: ComputedTextChunk[] = [];
343
345
  readonly text: string;
@@ -486,10 +488,12 @@ export class ComputedText {
486
488
  }
487
489
  }
488
490
 
489
- // This function determines whether concatenating two pieces of text requires any spacing inbetween. For example, there
490
- // shouldn't be any space between 'var' and '(', but there should be a space between '1px' and 'solid'. The node
491
- // sequences that make up the pieces of text may contain non-text nodes/trees. Any such element inbetween the texts is
492
- // ignored for the spacing requirement.
491
+ /**
492
+ * This function determines whether concatenating two pieces of text requires any spacing in between. For example, there
493
+ * shouldn't be any space between 'var' and '(', but there should be a space between '1px' and 'solid'. The node
494
+ * sequences that make up the pieces of text may contain non-text nodes/trees. Any such element in between the texts is
495
+ * ignored for the spacing requirement.
496
+ **/
493
497
  export function requiresSpace(a: string, b: string): boolean;
494
498
  export function requiresSpace(a: Node[], b: Node[]): boolean;
495
499
  export function requiresSpace(a: Node[]|string|undefined, b: Node[]|string|undefined): boolean {
@@ -178,13 +178,15 @@ function getCssEvaluationElement(): HTMLElement {
178
178
  return cssEvaluationElement;
179
179
  }
180
180
 
181
- // These functions use an element in the frontend to evaluate CSS. The advantage
182
- // of this is that it is synchronous and doesn't require a CDP method. The
183
- // disadvantage is it lacks context that would allow substitutions such as
184
- // `var()` and `calc()` to be resolved correctly, and if the user is doing
185
- // remote debugging there is a possibility that the CSS behavior is different
186
- // between the two browser versions. We use it for type checking after
187
- // substitutions (but not for actual evaluation) and for applying units.
181
+ /**
182
+ * These functions use an element in the frontend to evaluate CSS. The advantage
183
+ * of this is that it is synchronous and doesn't require a CDP method. The
184
+ * disadvantage is it lacks context that would allow substitutions such as
185
+ * `var()` and `calc()` to be resolved correctly, and if the user is doing
186
+ * remote debugging there is a possibility that the CSS behavior is different
187
+ * between the two browser versions. We use it for type checking after
188
+ * substitutions (but not for actual evaluation) and for applying units.
189
+ **/
188
190
  export function localEvalCSS(value: string, type: string): string|null {
189
191
  const element = getCssEvaluationElement();
190
192
  element.setAttribute('data-value', value);
@@ -192,9 +194,11 @@ export function localEvalCSS(value: string, type: string): string|null {
192
194
  return element.computedStyleMap().get('--evaluation')?.toString() ?? null;
193
195
  }
194
196
 
195
- // It is important to establish whether a type is valid, because if it is not,
196
- // the current behavior of blink is to ignore the fallback and parse as a
197
- // raw string, returning '' if the attribute is not set.
197
+ /**
198
+ * It is important to establish whether a type is valid, because if it is not,
199
+ * the current behavior of blink is to ignore the fallback and parse as a
200
+ * raw string, returning '' if the attribute is not set.
201
+ **/
198
202
  export function isValidCSSType(type: string): boolean {
199
203
  const element = getCssEvaluationElement();
200
204
  element.setAttribute('data-custom-expr', `attr(data-nonexistent ${type}, "good")`);
@@ -1133,8 +1137,10 @@ export class GridTemplateMatcher extends matcherBase(GridTemplateMatch) {
1133
1137
  // `needClosingLineNames` tracks if the current row can still consume an optional LineNames,
1134
1138
  // which will decide if we should start a new line or not when a LineNames is encountered.
1135
1139
  let needClosingLineNames = false;
1136
- // Gather row definitions of [<line-names>? <string> <track-size>? <line-names>?], which
1137
- // be rendered into separate lines.
1140
+ /**
1141
+ * Gather row definitions of [<line-names>? <string> <track-size>? <line-names>?], which
1142
+ * be rendered into separate lines.
1143
+ **/
1138
1144
  function parseNodes(nodes: CodeMirror.SyntaxNode[], varParsingMode = false): void {
1139
1145
  for (const curNode of nodes) {
1140
1146
  if (matching.getMatch(curNode) instanceof BaseVariableMatch) {
@@ -1247,7 +1253,7 @@ export class AnchorFunctionMatcher extends matcherBase(AnchorFunctionMatch) {
1247
1253
  }
1248
1254
  }
1249
1255
 
1250
- // For linking `position-anchor: --anchor-name`.
1256
+ /** For linking `position-anchor: --anchor-name`. **/
1251
1257
  export class PositionAnchorMatch implements Match {
1252
1258
  constructor(readonly text: string, readonly matching: BottomUpTreeMatching, readonly node: CodeMirror.SyntaxNode) {
1253
1259
  }
@@ -12,6 +12,8 @@ import type * as ProtocolClient from '../protocol_client/protocol_client.js';
12
12
  import {ParallelConnection} from './Connections.js';
13
13
  import {PrimaryPageChangeType, ResourceTreeModel} from './ResourceTreeModel.js';
14
14
  import {SDKModel} from './SDKModel.js';
15
+ import {SecurityOriginManager} from './SecurityOriginManager.js';
16
+ import {StorageKeyManager} from './StorageKeyManager.js';
15
17
  import {Capability, type Target, Type} from './Target.js';
16
18
  import {Events as TargetManagerEvents, TargetManager} from './TargetManager.js';
17
19
 
@@ -204,6 +206,39 @@ export class ChildTargetManager extends SDKModel<EventTypes> implements Protocol
204
206
  if (waitingForDebugger) {
205
207
  void target.runtimeAgent().invoke_runIfWaitingForDebugger();
206
208
  }
209
+
210
+ // For top-level workers (those not attached to a frame), we need to
211
+ // initialize their storage context manually. The `Capability.STORAGE` is
212
+ // only granted in `Target.ts` to workers that are not parented by a frame,
213
+ // which makes this check safe. Frame-associated workers have their storage
214
+ // managed by ResourceTreeModel.
215
+ if (type !== Type.FRAME && target.hasAllCapabilities(Capability.STORAGE)) {
216
+ await this.initializeStorage(target);
217
+ }
218
+ }
219
+
220
+ private async initializeStorage(target: Target): Promise<void> {
221
+ const storageAgent = target.storageAgent();
222
+ const response = await storageAgent.invoke_getStorageKey({});
223
+
224
+ const storageKey = response.storageKey;
225
+ if (response.getError() || !storageKey) {
226
+ console.error(`Failed to get storage key for target ${target.id()}: ${response.getError()}`);
227
+ return;
228
+ }
229
+
230
+ const storageKeyManager = target.model(StorageKeyManager);
231
+ if (storageKeyManager) {
232
+ storageKeyManager.setMainStorageKey(storageKey);
233
+ storageKeyManager.updateStorageKeys(new Set([storageKey]));
234
+ }
235
+
236
+ const securityOriginManager = target.model(SecurityOriginManager);
237
+ if (securityOriginManager) {
238
+ const origin = new URL(storageKey).origin;
239
+ securityOriginManager.setMainSecurityOrigin(origin, '');
240
+ securityOriginManager.updateSecurityOrigins(new Set([origin]));
241
+ }
207
242
  }
208
243
 
209
244
  detachedFromTarget({sessionId}: Protocol.Target.DetachedFromTargetEvent): void {
@@ -49,7 +49,7 @@ import {SDKModel} from './SDKModel.js';
49
49
  import {Capability, type Target} from './Target.js';
50
50
  import {TargetManager} from './TargetManager.js';
51
51
 
52
- // Keep this list in sync with https://w3c.github.io/aria/#state_prop_def
52
+ /** Keep this list in sync with https://w3c.github.io/aria/#state_prop_def **/
53
53
  export const ARIA_ATTRIBUTES = new Set<string>([
54
54
  'role',
55
55
  'aria-activedescendant',
@@ -35,11 +35,10 @@ export interface RundownScriptCompiled extends EventBase {
35
35
  frameType: 'page'|'iframe',
36
36
  url: string,
37
37
  /**
38
- * isolate is a `uint64_t`, which is too much for JS number to represent exactly.
39
- * TODO: consider adjusting the trace event impl to either string or reduced precision. see https://crrev.com/c/6300647
40
- * This applies for all `isolate` in trace events we consume.
38
+ * Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
39
+ * New traces use string instead. See https://crbug.com/447654178.
41
40
  */
42
- isolate: number,
41
+ isolate: string|number,
43
42
  /** AKA V8ContextToken. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/inspector/inspector_trace_events.cc;l=1229;drc=3c88f61e18b043e70c225d8d57c77832a85e7f58 */
44
43
  v8context: string,
45
44
  origin: string,
@@ -60,7 +59,11 @@ export interface RundownScript extends EventBase {
60
59
  name: 'ScriptCatchup';
61
60
  args: {
62
61
  data: {
63
- isolate: number,
62
+ /**
63
+ * Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
64
+ * New traces use string instead. See https://crbug.com/447654178.
65
+ */
66
+ isolate: string|number,
64
67
  executionContextId: Protocol.Runtime.ExecutionContextId,
65
68
  scriptId: number,
66
69
  isModule: boolean,
@@ -119,7 +122,11 @@ interface FunctionCall extends EventBase {
119
122
  data: {
120
123
  frame: Protocol.Page.FrameId,
121
124
  scriptId: Protocol.Runtime.ScriptId,
122
- isolate?: number,
125
+ /**
126
+ * Older traces were a number, but this is an unsigned 64 bit value, so that was a bug.
127
+ * New traces use string instead. See https://crbug.com/447654178.
128
+ */
129
+ isolate?: string|number,
123
130
  },
124
131
  };
125
132
  }
@@ -51,8 +51,10 @@ export class EventBreakpointsModel extends SDKModel<void> {
51
51
  }
52
52
  }
53
53
 
54
- // This implementation (as opposed to similar class in DOMDebuggerModel) is for
55
- // instrumentation breakpoints in targets that run JS but do not have a DOM.
54
+ /**
55
+ * This implementation (as opposed to similar class in DOMDebuggerModel) is for
56
+ * instrumentation breakpoints in targets that run JS but do not have a DOM.
57
+ **/
56
58
  class EventListenerBreakpoint extends CategorizedBreakpoint {
57
59
  override setEnabled(enabled: boolean): void {
58
60
  if (this.enabled() === enabled) {
@@ -4,8 +4,10 @@
4
4
 
5
5
  import * as i18n from '../i18n/i18n.js';
6
6
 
7
- // Reason phrase sources
8
- // See https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes
7
+ /**
8
+ * Reason phrase sources
9
+ * See https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes
10
+ **/
9
11
  export function getStatusText(statusCode: number): string {
10
12
  const statusTextLookup: Record<number, string> = {
11
13
  100: 'Continue',
@@ -23,8 +23,6 @@ import {
23
23
  type IncludedCookieWithReason,
24
24
  type NameValue,
25
25
  NetworkRequest,
26
- type WebBundleInfo,
27
- type WebBundleInnerRequestInfo
28
26
  } from './NetworkRequest.js';
29
27
  import {SDKModel} from './SDKModel.js';
30
28
  import {Capability, type Target} from './Target.js';
@@ -1502,44 +1500,20 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1502
1500
  request.setTrustTokenOperationDoneEvent(event);
1503
1501
  }
1504
1502
 
1505
- subresourceWebBundleMetadataReceived({requestId, urls}: Protocol.Network.SubresourceWebBundleMetadataReceivedEvent):
1506
- void {
1507
- const extraInfoBuilder = this.getExtraInfoBuilder(requestId);
1508
- extraInfoBuilder.setWebBundleInfo({resourceUrls: urls as Platform.DevToolsPath.UrlString[]});
1509
- const finalRequest = extraInfoBuilder.finalRequest();
1510
- if (finalRequest) {
1511
- this.updateNetworkRequest(finalRequest);
1512
- }
1503
+ subresourceWebBundleMetadataReceived(): void {
1504
+ // TODO: remove implementation after deleting this methods from definition in Network.pdl
1513
1505
  }
1514
1506
 
1515
- subresourceWebBundleMetadataError({requestId, errorMessage}: Protocol.Network.SubresourceWebBundleMetadataErrorEvent):
1516
- void {
1517
- const extraInfoBuilder = this.getExtraInfoBuilder(requestId);
1518
- extraInfoBuilder.setWebBundleInfo({errorMessage});
1519
- const finalRequest = extraInfoBuilder.finalRequest();
1520
- if (finalRequest) {
1521
- this.updateNetworkRequest(finalRequest);
1522
- }
1507
+ subresourceWebBundleMetadataError(): void {
1508
+ // TODO: remove implementation after deleting this methods from definition in Network.pdl
1523
1509
  }
1524
1510
 
1525
- subresourceWebBundleInnerResponseParsed({innerRequestId, bundleRequestId}:
1526
- Protocol.Network.SubresourceWebBundleInnerResponseParsedEvent): void {
1527
- const extraInfoBuilder = this.getExtraInfoBuilder(innerRequestId);
1528
- extraInfoBuilder.setWebBundleInnerRequestInfo({bundleRequestId});
1529
- const finalRequest = extraInfoBuilder.finalRequest();
1530
- if (finalRequest) {
1531
- this.updateNetworkRequest(finalRequest);
1532
- }
1511
+ subresourceWebBundleInnerResponseParsed(): void {
1512
+ // TODO: remove implementation after deleting this methods from definition in Network.pdl
1533
1513
  }
1534
1514
 
1535
- subresourceWebBundleInnerResponseError({innerRequestId, errorMessage}:
1536
- Protocol.Network.SubresourceWebBundleInnerResponseErrorEvent): void {
1537
- const extraInfoBuilder = this.getExtraInfoBuilder(innerRequestId);
1538
- extraInfoBuilder.setWebBundleInnerRequestInfo({errorMessage});
1539
- const finalRequest = extraInfoBuilder.finalRequest();
1540
- if (finalRequest) {
1541
- this.updateNetworkRequest(finalRequest);
1542
- }
1515
+ subresourceWebBundleInnerResponseError(): void {
1516
+ // TODO: remove implementation after deleting this methods from definition in Network.pdl
1543
1517
  }
1544
1518
 
1545
1519
  reportingApiReportAdded(data: Protocol.Network.ReportingApiReportAddedEvent): void {
@@ -2151,8 +2125,6 @@ class ExtraInfoBuilder {
2151
2125
  #responseExtraInfos: Array<ExtraResponseInfo|null> = [];
2152
2126
  #responseEarlyHintsHeaders: NameValue[] = [];
2153
2127
  #finished = false;
2154
- #webBundleInfo: WebBundleInfo|null = null;
2155
- #webBundleInnerRequestInfo: WebBundleInnerRequestInfo|null = null;
2156
2128
 
2157
2129
  addRequest(req: NetworkRequest): void {
2158
2130
  this.#requests.push(req);
@@ -2189,16 +2161,6 @@ class ExtraInfoBuilder {
2189
2161
  this.updateFinalRequest();
2190
2162
  }
2191
2163
 
2192
- setWebBundleInfo(info: WebBundleInfo): void {
2193
- this.#webBundleInfo = info;
2194
- this.updateFinalRequest();
2195
- }
2196
-
2197
- setWebBundleInnerRequestInfo(info: WebBundleInnerRequestInfo): void {
2198
- this.#webBundleInnerRequestInfo = info;
2199
- this.updateFinalRequest();
2200
- }
2201
-
2202
2164
  finished(): void {
2203
2165
  this.#finished = true;
2204
2166
  // We may have missed responseReceived event in case of failure.
@@ -2260,8 +2222,6 @@ class ExtraInfoBuilder {
2260
2222
  return;
2261
2223
  }
2262
2224
  const finalRequest = this.finalRequest();
2263
- finalRequest?.setWebBundleInfo(this.#webBundleInfo);
2264
- finalRequest?.setWebBundleInnerRequestInfo(this.#webBundleInnerRequestInfo);
2265
2225
  finalRequest?.setEarlyHintsHeaders(this.#responseEarlyHintsHeaders);
2266
2226
  }
2267
2227
  }
@@ -236,8 +236,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
236
236
  #initialPriority: Protocol.Network.ResourcePriority|null = null;
237
237
  #currentPriority: Protocol.Network.ResourcePriority|null = null;
238
238
  #signedExchangeInfo: Protocol.Network.SignedExchangeInfo|null = null;
239
- #webBundleInfo: WebBundleInfo|null = null;
240
- #webBundleInnerRequestInfo: WebBundleInnerRequestInfo|null = null;
241
239
  #resourceType: Common.ResourceType.ResourceType = Common.ResourceType.resourceTypes.Other;
242
240
  #contentData: Promise<TextUtils.ContentData.ContentDataOrError>|null = null;
243
241
  #streamingContentData: Promise<TextUtils.StreamingContentData.StreamingContentDataOrError>|null = null;
@@ -1500,22 +1498,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
1500
1498
  return this.#signedExchangeInfo;
1501
1499
  }
1502
1500
 
1503
- setWebBundleInfo(info: WebBundleInfo|null): void {
1504
- this.#webBundleInfo = info;
1505
- }
1506
-
1507
- webBundleInfo(): WebBundleInfo|null {
1508
- return this.#webBundleInfo;
1509
- }
1510
-
1511
- setWebBundleInnerRequestInfo(info: WebBundleInnerRequestInfo|null): void {
1512
- this.#webBundleInnerRequestInfo = info;
1513
- }
1514
-
1515
- webBundleInnerRequestInfo(): WebBundleInnerRequestInfo|null {
1516
- return this.#webBundleInnerRequestInfo;
1517
- }
1518
-
1519
1501
  async populateImageSource(image: HTMLImageElement): Promise<void> {
1520
1502
  const contentData = await this.requestContentData();
1521
1503
  if (TextUtils.ContentData.ContentData.isError(contentData)) {
@@ -2207,16 +2189,6 @@ export interface EarlyHintsInfo {
2207
2189
  responseHeaders: NameValue[];
2208
2190
  }
2209
2191
 
2210
- export interface WebBundleInfo {
2211
- resourceUrls?: Platform.DevToolsPath.UrlString[];
2212
- errorMessage?: string;
2213
- }
2214
-
2215
- export interface WebBundleInnerRequestInfo {
2216
- bundleRequestId?: string;
2217
- errorMessage?: string;
2218
- }
2219
-
2220
2192
  export type OverrideType = 'content'|'headers';
2221
2193
 
2222
2194
  export enum DirectSocketType {
@@ -59,7 +59,7 @@ export interface PageResource {
59
59
  duration: number|null;
60
60
  }
61
61
 
62
- // Used for revealing a resource.
62
+ /** Used for revealing a resource. **/
63
63
  export class ResourceKey {
64
64
  readonly key: string;
65
65
 
@@ -23,11 +23,13 @@ export interface WithId<I, V> {
23
23
  value: V;
24
24
  }
25
25
 
26
- // Holds preloading related information.
27
- //
28
- // - SpeculationRule rule sets
29
- // - Preloading attempts
30
- // - Relationship between rule sets and preloading attempts
26
+ /**
27
+ * Holds preloading related information.
28
+ *
29
+ * - SpeculationRule rule sets
30
+ * - Preloading attempts
31
+ * - Relationship between rule sets and preloading attempts
32
+ **/
31
33
  export class PreloadingModel extends SDKModel<EventTypes> {
32
34
  private agent: ProtocolProxyApi.PreloadApi;
33
35
  private loaderIds: Protocol.Network.LoaderId[] = [];
@@ -410,19 +412,21 @@ class RuleSetRegistry {
410
412
  }
411
413
  }
412
414
 
413
- // Protocol.Preload.PreloadingStatus|'NotTriggered'
414
- //
415
- // A renderer sends SpeculationCandidate to the browser process and the
416
- // browser process checks eligibilities, and starts PreloadingAttempt.
417
- //
418
- // In the frontend, "NotTriggered" is used to denote that a
419
- // PreloadingAttempt is waiting for at trigger event (eg:
420
- // mousedown/mouseover). All PreloadingAttempts will start off as
421
- // "NotTriggered", but "eager" preloading attempts (attempts not
422
- // actually waiting for any trigger) will be processed by the browser
423
- // immediately, and will not stay in this state for long.
424
- //
425
- // TODO(https://crbug.com/1384419): Add NotEligible.
415
+ /**
416
+ * Protocol.Preload.PreloadingStatus|'NotTriggered'
417
+ *
418
+ * A renderer sends SpeculationCandidate to the browser process and the
419
+ * browser process checks eligibilities, and starts PreloadingAttempt.
420
+ *
421
+ * In the frontend, "NotTriggered" is used to denote that a
422
+ * PreloadingAttempt is waiting for at trigger event (eg:
423
+ * mousedown/mouseover). All PreloadingAttempts will start off as
424
+ * "NotTriggered", but "eager" preloading attempts (attempts not
425
+ * actually waiting for any trigger) will be processed by the browser
426
+ * immediately, and will not stay in this state for long.
427
+ *
428
+ * TODO(https://crbug.com/1384419): Add NotEligible.
429
+ **/
426
430
  export const enum PreloadingStatus {
427
431
  NOT_TRIGGERED = 'NotTriggered',
428
432
  PENDING = 'Pending',
@@ -210,7 +210,7 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
210
210
  }
211
211
  }
212
212
 
213
- // Default rehydrating session with default responses.
213
+ /** Default rehydrating session with default responses. **/
214
214
  class RehydratingSessionBase {
215
215
  connection: RehydratingConnectionInterface|null = null;
216
216
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  import type * as Protocol from '../../generated/protocol.js';
6
6
 
7
- // This object is emitted to ScriptParsed and also used in the RehydratingConnection
7
+ /** This object is emitted to ScriptParsed and also used in the RehydratingConnection **/
8
8
  export interface RehydratingScript extends Protocol.Debugger.ScriptParsedEvent {
9
9
  sourceText?: string;
10
10
  executionContextAuxData?: RehydratingExecutionContextAuxData;
@@ -9,7 +9,7 @@ import type {DOMPinnedWebIDLProp, DOMPinnedWebIDLType} from '../common/JavaScrip
9
9
  import type {DebuggerModel, FunctionDetails} from './DebuggerModel.js';
10
10
  import type {RuntimeModel} from './RuntimeModel.js';
11
11
 
12
- // This cannot be an interface due to "instanceof RemoteObject" checks in the code.
12
+ /** This cannot be an interface due to "instanceof RemoteObject" checks in the code. **/
13
13
  export abstract class RemoteObject {
14
14
  static fromLocalObject(value: unknown): RemoteObject {
15
15
  return new LocalJSONObject(value);