chrome-devtools-frontend 1.0.1616061 → 1.0.1621064

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 (318) hide show
  1. package/AUTHORS +1 -0
  2. package/docs/checklist/README.md +8 -7
  3. package/eslint.config.mjs +7 -0
  4. package/front_end/core/common/Object.ts +11 -2
  5. package/front_end/core/dom_extension/DOMExtension.ts +11 -8
  6. package/front_end/core/host/AidaClient.ts +8 -0
  7. package/front_end/core/host/AidaGcaTranslation.ts +1 -0
  8. package/front_end/core/host/UserMetrics.ts +0 -1
  9. package/front_end/core/platform/api/HostRuntime.ts +2 -2
  10. package/front_end/core/platform/browser/HostRuntime.ts +4 -2
  11. package/front_end/core/platform/node/HostRuntime.ts +2 -2
  12. package/front_end/core/root/ExperimentNames.ts +0 -1
  13. package/front_end/core/sdk/NetworkManager.ts +30 -4
  14. package/front_end/core/sdk/NetworkRequest.ts +2 -10
  15. package/front_end/core/sdk/Resource.ts +2 -1
  16. package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
  17. package/front_end/core/sdk/TraceObject.ts +7 -2
  18. package/front_end/entrypoint_template.html +1 -2
  19. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
  20. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
  21. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
  22. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
  23. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
  24. package/front_end/entrypoints/main/MainImpl.ts +0 -2
  25. package/front_end/generated/InspectorBackendCommands.ts +8 -7
  26. package/front_end/generated/SupportedCSSProperties.js +119 -100
  27. package/front_end/generated/protocol-mapping.d.ts +1 -9
  28. package/front_end/generated/protocol-proxy-api.d.ts +1 -9
  29. package/front_end/generated/protocol.ts +24 -1
  30. package/front_end/legacy/legacy-defs.d.ts +1 -1
  31. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  32. package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
  33. package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
  34. package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
  35. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
  36. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
  37. package/front_end/models/ai_assistance/agents/README.md +0 -5
  38. package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
  39. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  40. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
  41. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
  42. package/front_end/models/bindings/SymbolizedError.ts +95 -8
  43. package/front_end/models/emulation/DeviceModeModel.ts +42 -13
  44. package/front_end/models/emulation/EmulatedDevices.ts +1 -1
  45. package/front_end/models/issues_manager/IssuesManager.ts +13 -6
  46. package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
  47. package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
  48. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
  49. package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
  50. package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
  51. package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
  52. package/front_end/models/text_utils/ContentData.ts +71 -10
  53. package/front_end/models/trace/types/File.ts +8 -1
  54. package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
  55. package/front_end/models/workspace/UISourceCode.ts +4 -4
  56. package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
  57. package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
  58. package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
  59. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
  60. package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
  61. package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
  62. package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
  63. package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
  64. package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
  65. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
  66. package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
  67. package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
  68. package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
  69. package/front_end/panels/application/CookieItemsView.ts +8 -9
  70. package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
  71. package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
  72. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
  73. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
  74. package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
  75. package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
  76. package/front_end/panels/application/ResourcesPanel.ts +5 -5
  77. package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
  78. package/front_end/panels/application/WebMCPView.ts +285 -86
  79. package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
  80. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
  81. package/front_end/panels/application/webMCPView.css +261 -182
  82. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
  83. package/front_end/panels/changes/ChangesSidebar.ts +2 -2
  84. package/front_end/panels/changes/ChangesView.ts +9 -14
  85. package/front_end/panels/console/ConsolePanel.ts +10 -3
  86. package/front_end/panels/console/ConsoleSidebar.ts +5 -5
  87. package/front_end/panels/console/ConsoleView.ts +11 -4
  88. package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
  89. package/front_end/panels/coverage/CoverageView.ts +4 -5
  90. package/front_end/panels/elements/ElementsPanel.ts +9 -12
  91. package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
  92. package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
  93. package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
  94. package/front_end/panels/elements/LayersWidget.ts +2 -2
  95. package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
  96. package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
  97. package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
  98. package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
  99. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
  100. package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
  101. package/front_end/panels/elements/components/QueryContainer.ts +5 -6
  102. package/front_end/panels/elements/components/components.ts +0 -2
  103. package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
  104. package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
  105. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  106. package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
  107. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
  108. package/front_end/panels/network/NetworkConfigView.ts +11 -11
  109. package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
  110. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  111. package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
  112. package/front_end/panels/network/RequestHeadersView.ts +2 -2
  113. package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
  114. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
  115. package/front_end/panels/profiler/HeapProfileView.ts +29 -4
  116. package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
  117. package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
  118. package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
  119. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
  120. package/front_end/panels/recorder/components/ControlButton.ts +4 -4
  121. package/front_end/panels/recorder/components/StepView.ts +6 -6
  122. package/front_end/panels/search/SearchView.ts +4 -7
  123. package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
  124. package/front_end/panels/sources/SourcesView.ts +1 -1
  125. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
  126. package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
  127. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
  128. package/front_end/panels/timeline/StatusDialog.ts +5 -8
  129. package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
  130. package/front_end/panels/timeline/TimelineLoader.ts +3 -4
  131. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
  132. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
  133. package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
  134. package/front_end/panels/timeline/components/timelineSummary.css +4 -0
  135. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
  136. package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
  137. package/front_end/panels/web_audio/WebAudioView.ts +5 -4
  138. package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
  139. package/front_end/panels/whats_new/resources/WNDT.md +9 -6
  140. package/front_end/third_party/chromium/README.chromium +1 -1
  141. package/front_end/third_party/puppeteer/README.chromium +2 -2
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
  187. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
  188. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
  189. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
  191. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
  235. package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
  236. package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
  237. package/front_end/third_party/puppeteer/package/package.json +3 -2
  238. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
  239. package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
  240. package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
  241. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
  242. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
  243. package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
  244. package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
  245. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
  246. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
  247. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
  248. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
  249. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
  250. package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
  251. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  252. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
  253. package/front_end/third_party/web-vitals/README.chromium +2 -2
  254. package/front_end/third_party/web-vitals/package/README.md +21 -10
  255. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
  256. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
  257. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
  258. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
  259. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
  260. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
  261. package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
  262. package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
  263. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
  264. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
  265. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
  266. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
  267. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
  268. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
  269. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
  270. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
  271. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
  272. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
  273. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
  274. package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
  275. package/front_end/third_party/web-vitals/package/package.json +24 -27
  276. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
  277. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
  278. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
  279. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
  280. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
  281. package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
  282. package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
  283. package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
  284. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
  285. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
  286. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
  287. package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
  288. package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
  289. package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
  290. package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
  291. package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
  292. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
  293. package/front_end/third_party/web-vitals/rebuild.sh +3 -3
  294. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
  295. package/front_end/ui/components/icon_button/iconButton.css +1 -0
  296. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
  297. package/front_end/ui/components/lists/list.css +4 -0
  298. package/front_end/ui/legacy/Dialog.ts +21 -2
  299. package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
  300. package/front_end/ui/legacy/SplitWidget.ts +9 -9
  301. package/front_end/ui/legacy/TabbedPane.ts +12 -12
  302. package/front_end/ui/legacy/View.ts +24 -22
  303. package/front_end/ui/legacy/ViewManager.ts +12 -12
  304. package/front_end/ui/legacy/ViewRegistration.ts +2 -2
  305. package/front_end/ui/legacy/Widget.ts +165 -119
  306. package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
  307. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
  308. package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
  309. package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
  310. package/front_end/ui/legacy/inspectorCommon.css +0 -6
  311. package/front_end/ui/lit/render.ts +11 -9
  312. package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
  313. package/package.json +1 -1
  314. package/front_end/Images/src/dots-circle.svg +0 -10
  315. package/front_end/panels/elements/components/Helper.ts +0 -35
  316. package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
  317. package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
  318. package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
@@ -7,7 +7,7 @@ import * as Platform from '../../core/platform/platform.js';
7
7
  import * as Root from '../../core/root/root.js';
8
8
  import * as SDK from '../../core/sdk/sdk.js';
9
9
  import * as Protocol from '../../generated/protocol.js';
10
- import type * as StackTrace from '../stack_trace/stack_trace.js';
10
+ import * as StackTrace from '../stack_trace/stack_trace.js';
11
11
  // eslint-disable-next-line @devtools/es-modules-import
12
12
  import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
13
13
  import type * as TextUtils from '../text_utils/text_utils.js';
@@ -20,7 +20,12 @@ import {type LiveLocation, type LiveLocationPool, LiveLocationWithPool} from './
20
20
  import {NetworkProject} from './NetworkProject.js';
21
21
  import type {ResourceMapping} from './ResourceMapping.js';
22
22
  import {type ResourceScriptFile, ResourceScriptMapping} from './ResourceScriptMapping.js';
23
- import {SymbolizedError} from './SymbolizedError.js';
23
+ import {
24
+ type SymbolizedError,
25
+ SymbolizedErrorObject,
26
+ SymbolizedSyntaxError,
27
+ UnparsableError
28
+ } from './SymbolizedError.js';
24
29
 
25
30
  export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
26
31
  readonly resourceMapping: ResourceMapping;
@@ -206,7 +211,7 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
206
211
 
207
212
  async createStackTraceFromErrorStackLikeString(
208
213
  target: SDK.Target.Target, stack: string,
209
- exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace> {
214
+ exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace|null> {
210
215
  const model =
211
216
  target.model(StackTraceImpl.StackTraceModel.StackTraceModel) as StackTraceImpl.StackTraceModel.StackTraceModel;
212
217
  const stackTracePromise =
@@ -215,24 +220,54 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
215
220
  return await stackTracePromise;
216
221
  }
217
222
 
218
- async createSymbolizedError(remoteObject: SDK.RemoteObject.RemoteObject): Promise<SymbolizedError|null> {
219
- if (remoteObject.subtype !== 'error') {
223
+ async createSymbolizedError(
224
+ remoteObject: SDK.RemoteObject.RemoteObject,
225
+ exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<SymbolizedError|null> {
226
+ let errorStack = '';
227
+ let causeRemoteObject: SDK.RemoteObject.RemoteObject|undefined;
228
+ let fetchedExceptionDetails = exceptionDetails;
229
+
230
+ if (remoteObject.subtype === 'error') {
231
+ const remoteError = SDK.RemoteObject.RemoteError.objectAsError(remoteObject);
232
+ errorStack = remoteError.errorStack;
233
+
234
+ const [details, causeRemote] = await Promise.all([
235
+ exceptionDetails ? Promise.resolve(exceptionDetails) : remoteError.exceptionDetails(),
236
+ remoteError.cause(),
237
+ ]);
238
+ fetchedExceptionDetails = details;
239
+ causeRemoteObject = causeRemote;
240
+
241
+ if (remoteObject.className === 'SyntaxError' && fetchedExceptionDetails) {
242
+ const syntaxError = await SymbolizedSyntaxError.fromExceptionDetails(
243
+ remoteObject.runtimeModel().target(), this, fetchedExceptionDetails);
244
+ if (syntaxError) {
245
+ return syntaxError;
246
+ }
247
+ }
248
+ } else if (remoteObject.type === 'string') {
249
+ errorStack = remoteObject.description || '';
250
+ } else {
220
251
  return null;
221
252
  }
222
253
 
223
- const remoteError = SDK.RemoteObject.RemoteError.objectAsError(remoteObject);
224
- const [exceptionDetails, causeRemoteObject] = await Promise.all([
225
- remoteError.exceptionDetails(),
226
- remoteError.cause(),
227
- ]);
228
-
229
254
  const [stackTrace, cause] = await Promise.all([
230
255
  this.createStackTraceFromErrorStackLikeString(
231
- remoteObject.runtimeModel().target(), remoteError.errorStack, exceptionDetails),
256
+ remoteObject.runtimeModel().target(), errorStack, fetchedExceptionDetails),
232
257
  causeRemoteObject ? this.createSymbolizedError(causeRemoteObject) : Promise.resolve(null),
233
258
  ]);
234
259
 
235
- return new SymbolizedError(remoteError, stackTrace, cause);
260
+ const issueSummary = fetchedExceptionDetails?.exceptionMetaData?.issueSummary;
261
+ if (typeof issueSummary === 'string') {
262
+ errorStack = StackTrace.ErrorStackParser.concatErrorDescriptionAndIssueSummary(errorStack, issueSummary);
263
+ }
264
+
265
+ if (!stackTrace) {
266
+ return new UnparsableError(errorStack, cause);
267
+ }
268
+
269
+ const message = StackTraceImpl.DetailedErrorStackParser.parseMessage(errorStack);
270
+ return new SymbolizedErrorObject(message, stackTrace, cause);
236
271
  }
237
272
 
238
273
  async createLiveLocation(
@@ -2,19 +2,106 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import type * as SDK from '../../core/sdk/sdk.js';
6
- import type * as StackTrace from '../stack_trace/stack_trace.js';
5
+ import * as Common from '../../core/common/common.js';
6
+ import * as SDK from '../../core/sdk/sdk.js';
7
+ import type * as Protocol from '../../generated/protocol.js';
8
+ import * as StackTrace from '../stack_trace/stack_trace.js';
9
+ import type * as Workspace from '../workspace/workspace.js';
7
10
 
8
- export class SymbolizedError {
9
- readonly remoteError: SDK.RemoteObject.RemoteError;
11
+ import type {DebuggerWorkspaceBinding} from './DebuggerWorkspaceBinding.js';
12
+ import {type LiveLocation, LiveLocationPool} from './LiveLocation.js';
13
+
14
+ export type SymbolizedError = SymbolizedErrorObject|SymbolizedSyntaxError|UnparsableError;
15
+
16
+ export class UnparsableError extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
17
+ readonly errorStack: string;
18
+ readonly cause: SymbolizedError|null;
19
+
20
+ constructor(errorStack: string, cause: SymbolizedError|null) {
21
+ super();
22
+ this.errorStack = errorStack;
23
+ this.cause = cause;
24
+ }
25
+ }
26
+
27
+ export class SymbolizedErrorObject extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
28
+ readonly message: string;
10
29
  readonly stackTrace: StackTrace.StackTrace.ParsedErrorStackTrace;
11
30
  readonly cause: SymbolizedError|null;
12
31
 
13
- constructor(
14
- remoteError: SDK.RemoteObject.RemoteError, stackTrace: StackTrace.StackTrace.ParsedErrorStackTrace,
15
- cause: SymbolizedError|null) {
16
- this.remoteError = remoteError;
32
+ constructor(message: string, stackTrace: StackTrace.StackTrace.ParsedErrorStackTrace, cause: SymbolizedError|null) {
33
+ super();
34
+ this.message = message;
17
35
  this.stackTrace = stackTrace;
18
36
  this.cause = cause;
37
+
38
+ this.stackTrace.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.#fireUpdated, this);
39
+ this.cause?.addEventListener(Events.UPDATED, this.#fireUpdated, this);
40
+ }
41
+
42
+ dispose(): void {
43
+ this.stackTrace.removeEventListener(StackTrace.StackTrace.Events.UPDATED, this.#fireUpdated, this);
44
+ this.cause?.removeEventListener(Events.UPDATED, this.#fireUpdated, this);
45
+ if (this.cause instanceof SymbolizedErrorObject) {
46
+ this.cause.dispose();
47
+ }
48
+ }
49
+
50
+ #fireUpdated(): void {
51
+ this.dispatchEventToListeners(Events.UPDATED);
19
52
  }
20
53
  }
54
+
55
+ export class SymbolizedSyntaxError extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
56
+ readonly message: string;
57
+ #uiLocation: Workspace.UISourceCode.UILocation|null = null;
58
+
59
+ constructor(message: string) {
60
+ super();
61
+ this.message = message;
62
+ }
63
+
64
+ get uiLocation(): Workspace.UISourceCode.UILocation|null {
65
+ return this.#uiLocation;
66
+ }
67
+
68
+ static async fromExceptionDetails(
69
+ target: SDK.Target.Target, debuggerWorkspaceBinding: DebuggerWorkspaceBinding,
70
+ exceptionDetails: Protocol.Runtime.ExceptionDetails): Promise<SymbolizedSyntaxError|null> {
71
+ const {exception, scriptId, lineNumber, columnNumber} = exceptionDetails;
72
+ if (!exception || exception.subtype !== 'error' || exception.className !== 'SyntaxError') {
73
+ throw new Error('SymbolizedSyntaxError.fromExceptionDetails expects a SyntaxError');
74
+ }
75
+ if (!scriptId) {
76
+ return null;
77
+ }
78
+
79
+ const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
80
+ if (!debuggerModel) {
81
+ return null;
82
+ }
83
+
84
+ const rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber);
85
+ const symbolizedSyntaxError = new SymbolizedSyntaxError(exception.description || '');
86
+
87
+ // We don't implement dispose here. We won't create many of these so a couple
88
+ // LiveLocationPools and SymbolizedSyntaxError instances leaking is fine.
89
+ await debuggerWorkspaceBinding.createLiveLocation(
90
+ rawLocation, symbolizedSyntaxError.#update.bind(symbolizedSyntaxError), new LiveLocationPool());
91
+
92
+ return symbolizedSyntaxError;
93
+ }
94
+
95
+ async #update(liveLocation: LiveLocation): Promise<void> {
96
+ this.#uiLocation = await liveLocation.uiLocation();
97
+ this.dispatchEventToListeners(Events.UPDATED);
98
+ }
99
+ }
100
+
101
+ export const enum Events {
102
+ UPDATED = 'UPDATED',
103
+ }
104
+
105
+ export interface EventTypes {
106
+ [Events.UPDATED]: void;
107
+ }
@@ -634,7 +634,9 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
634
634
  screenHeight >= screenWidth ? Protocol.Emulation.ScreenOrientationType.PortraitPrimary :
635
635
  Protocol.Emulation.ScreenOrientationType.LandscapePrimary,
636
636
  resetPageScaleFactor);
637
- this.applyUserAgent(mobile ? defaultMobileUserAgent : '', mobile ? defaultMobileUserAgentMetadata : null);
637
+ this.applyUserAgent(
638
+ mobile ? DeviceModeModel.defaultMobileUserAgent() : '',
639
+ mobile ? DeviceModeModel.defaultMobileUserAgentMetadata() : null);
638
640
  this.applyTouch(
639
641
  this.#uaSetting.get() === UA.DESKTOP_TOUCH || this.#uaSetting.get() === UA.MOBILE,
640
642
  this.#uaSetting.get() === UA.MOBILE);
@@ -872,6 +874,45 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
872
874
  maskLength: (this.#mode.orientation === VerticalSpanned) ? hinge.width : hinge.height,
873
875
  };
874
876
  }
877
+
878
+ /**
879
+ * Heuristic to keep the default mobile User Agent fresh and aligned with the adoption bell curve.
880
+ * Android: We target N-1 versions (where N is the latest) to represent the plurality of global users.
881
+ * iOS: We follow the calendar year (starting from the 2025 shift to year-based versioning).
882
+ * Data sources:
883
+ * - StatCounter Global Stats: https://gs.statcounter.com/os-version-market-share/android
884
+ * - Android adoption typically lags by ~12-18 months for plurality.
885
+ * - iOS adoption typically reaches majority within ~3-6 months.
886
+ */
887
+ static getDynamicMobileUA(): {userAgent: string, metadata: Protocol.Emulation.UserAgentMetadata} {
888
+ const now = new Date();
889
+ const year = now.getFullYear();
890
+ const isLateInYear = now.getMonth() >= 9; // Oct, Nov, Dec
891
+
892
+ // Android: Released in late summer/fall. plurality is usually Year - 2011 (e.g. Android 15 in early 2026).
893
+ const androidVersion = isLateInYear ? (year - 2010) : (year - 2011);
894
+ const pixelModel = isLateInYear ? (year - 2016) : (year - 2017);
895
+
896
+ const ua = `Mozilla/5.0 (Linux; Android ${androidVersion}; Pixel ${
897
+ pixelModel}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36`;
898
+ const metadata = {
899
+ platform: 'Android',
900
+ platformVersion: androidVersion.toString(),
901
+ architecture: '',
902
+ model: `Pixel ${pixelModel}`,
903
+ mobile: true,
904
+ };
905
+ return {userAgent: ua, metadata};
906
+ }
907
+
908
+ static defaultMobileUserAgent(): string {
909
+ return SDK.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion(
910
+ DeviceModeModel.getDynamicMobileUA().userAgent);
911
+ }
912
+
913
+ static defaultMobileUserAgentMetadata(): Protocol.Emulation.UserAgentMetadata {
914
+ return DeviceModeModel.getDynamicMobileUA().metadata;
915
+ }
875
916
  }
876
917
 
877
918
  export class Insets {
@@ -937,16 +978,4 @@ export const MinDeviceScaleFactor = 0;
937
978
  export const MaxDeviceScaleFactor = 10;
938
979
  export const MaxDeviceNameLength = 50;
939
980
 
940
- const mobileUserAgent =
941
- 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36';
942
- const defaultMobileUserAgent =
943
- SDK.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion(mobileUserAgent);
944
-
945
- const defaultMobileUserAgentMetadata = {
946
- platform: 'Android',
947
- platformVersion: '6.0',
948
- architecture: '',
949
- model: 'Nexus 5',
950
- mobile: true,
951
- };
952
981
  export const defaultMobileScaleFactor = 2;
@@ -793,7 +793,7 @@ const emulatedDevices = [
793
793
  'user-agent':
794
794
  'Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
795
795
  'user-agent-metadata':
796
- {'platform': 'Android', 'platformVersion': '13', 'architecture': '', 'model': 'Pixel 5', 'mobile': true},
796
+ {'platform': 'Android', 'platformVersion': '13', 'architecture': '', 'model': 'Pixel 7', 'mobile': true},
797
797
  'type': 'phone',
798
798
  },
799
799
  {
@@ -435,12 +435,11 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
435
435
  // In case a user wants to hide a specific issue, the issue code is added to "code" section
436
436
  // of our setting and its value is set to IssueStatus.Hidden. Then issue then gets hidden.
437
437
  if (values?.[code]) {
438
- if (values[code] === IssueStatus.HIDDEN) {
439
- issue.setHidden(true);
440
- return;
438
+ const isHidden = values[code] === IssueStatus.HIDDEN;
439
+ if (issue.isHidden() !== isHidden) {
440
+ issue.setHidden(isHidden);
441
+ this.dispatchEventToListeners(Events.ISSUE_HIDDEN_STATUS_UPDATED, {issue});
441
442
  }
442
- issue.setHidden(false);
443
- return;
444
443
  }
445
444
  }
446
445
 
@@ -471,7 +470,10 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
471
470
 
472
471
  unhideAllIssues(): void {
473
472
  for (const issue of this.#allIssues.values()) {
474
- issue.setHidden(false);
473
+ if (issue.isHidden()) {
474
+ issue.setHidden(false);
475
+ this.dispatchEventToListeners(Events.ISSUE_HIDDEN_STATUS_UPDATED, {issue});
476
+ }
475
477
  }
476
478
  this.hideIssueSetting?.set(defaultHideIssueByCodeSetting());
477
479
  }
@@ -486,10 +488,15 @@ export interface IssueAddedEvent {
486
488
  issue: Issue;
487
489
  }
488
490
 
491
+ export interface IssueHiddenStatusUpdatedEvent {
492
+ issue: Issue;
493
+ }
494
+
489
495
  export interface EventTypes {
490
496
  [Events.ISSUES_COUNT_UPDATED]: void;
491
497
  [Events.FULL_UPDATE_REQUIRED]: void;
492
498
  [Events.ISSUE_ADDED]: IssueAddedEvent;
499
+ [Events.ISSUE_HIDDEN_STATUS_UPDATED]: IssueHiddenStatusUpdatedEvent;
493
500
  }
494
501
 
495
502
  // @ts-expect-error
@@ -6,4 +6,5 @@ export const enum Events {
6
6
  ISSUES_COUNT_UPDATED = 'IssuesCountUpdated',
7
7
  ISSUE_ADDED = 'IssueAdded',
8
8
  FULL_UPDATE_REQUIRED = 'FullUpdateRequired',
9
+ ISSUE_HIDDEN_STATUS_UPDATED = 'IssueHiddenStatusUpdated',
9
10
  }
@@ -8339,7 +8339,7 @@ export const NativeFunctions = [
8339
8339
  },
8340
8340
  {
8341
8341
  name: "setConstraints",
8342
- signatures: [["constraints"]]
8342
+ signatures: [["?constraints"]]
8343
8343
  },
8344
8344
  {
8345
8345
  name: "createContext",
@@ -9353,7 +9353,7 @@ export const NativeFunctions = [
9353
9353
  },
9354
9354
  {
9355
9355
  name: "copyElementImageToTexture",
9356
- signatures: [["source","destination"],["source","width","height","destination"],["source","sx","sy","swidth","sheight","destination"]]
9356
+ signatures: [["source","destination"],["source","width","height","destination"],["source","sx","sy","swidth","sheight","destination"],["source","sx","sy","swidth","sheight","width","height","destination"]]
9357
9357
  },
9358
9358
  {
9359
9359
  name: "multiDrawIndirect",
@@ -251,6 +251,7 @@ function initialize(): void {
251
251
  }, {
252
252
  reportAllChanges: true,
253
253
  durationThreshold: 0,
254
+ includeProcessedEventEntries: false,
254
255
  onEachInteraction,
255
256
  generateTarget(el) {
256
257
  if (el) {
@@ -8,19 +8,34 @@ import type * as Protocol from '../../generated/protocol.js';
8
8
 
9
9
  import type {RawFrame} from './Trie.js';
10
10
 
11
+ const CALL_FRAME_REGEX = /^\s*at\s+/;
12
+
11
13
  /**
12
14
  * Takes a V8 Error#stack string and extracts structured information.
15
+ *
16
+ * @returns Null if the provided string has an unexpected format. A
17
+ * populated `RawFrame[]` otherwise.
13
18
  */
14
- export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
19
+ export function parseRawFramesFromErrorStack(stack: string): RawFrame[]|null {
15
20
  const lines = stack.split('\n');
21
+ const firstAtLineIndex = findFramesStartLine(lines);
16
22
  const rawFrames: RawFrame[] = [];
17
- for (const line of lines) {
18
- const match = /^\s*at\s+(.*)/.exec(line);
23
+
24
+ if (firstAtLineIndex === -1) {
25
+ return rawFrames;
26
+ }
27
+
28
+ for (let i = firstAtLineIndex; i < lines.length; ++i) {
29
+ const line = lines[i];
30
+ const match = CALL_FRAME_REGEX.exec(line);
19
31
  if (!match) {
20
- continue;
32
+ if (line.trim() === '') {
33
+ continue;
34
+ }
35
+ return null;
21
36
  }
22
37
 
23
- let lineContent = match[1];
38
+ let lineContent = line.substring(match[0].length);
24
39
  let isAsync = false;
25
40
  if (lineContent.startsWith('async ')) {
26
41
  isAsync = true;
@@ -71,15 +86,17 @@ export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
71
86
  if (innerOpenParen !== -1) {
72
87
  evalFunctionName = evalOriginStr.substring(0, innerOpenParen).trim();
73
88
  evalLocation = evalOriginStr.substring(innerOpenParen + 2, evalOriginStr.length - 1);
74
- evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName} (${evalLocation})`)[0];
89
+ evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName} (${evalLocation})`)?.[0];
75
90
  } else {
76
- evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName}`)[0];
91
+ evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName}`)?.[0];
77
92
  }
78
93
  }
79
94
 
80
95
  if (location.startsWith('index ')) {
81
96
  promiseIndex = parseInt(location.substring(6), 10);
82
97
  url = '';
98
+ } else if (location === '<anonymous>' || location === 'native') {
99
+ url = '';
83
100
  } else if (location.includes(':wasm-function[')) {
84
101
  isWasm = true;
85
102
  const wasmMatch = /^(.*):wasm-function\[(\d+)\]:(0x[0-9a-fA-F]+)$/.exec(location);
@@ -142,6 +159,20 @@ export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
142
159
  return rawFrames;
143
160
  }
144
161
 
162
+ function findFramesStartLine(lines: string[]): number {
163
+ return lines.findIndex(line => CALL_FRAME_REGEX.test(line));
164
+ }
165
+
166
+ export function parseMessage(stack: string): string {
167
+ const lines = stack.split('\n');
168
+ const firstAtLineIndex = findFramesStartLine(lines);
169
+
170
+ if (firstAtLineIndex !== -1) {
171
+ return lines.slice(0, firstAtLineIndex).join('\n');
172
+ }
173
+ return stack;
174
+ }
175
+
145
176
  /**
146
177
  * Error#stack output only contains script URLs. In some cases we are able to
147
178
  * retrieve additional exception details from V8 that we can use to augment
@@ -150,9 +181,17 @@ export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
150
181
  export function augmentRawFramesWithScriptIds(
151
182
  rawFrames: RawFrame[], protocolStackTrace: Protocol.Runtime.StackTrace): void {
152
183
  for (const rawFrame of rawFrames) {
153
- const protocolFrame = protocolStackTrace.callFrames.find(
154
- frame => rawFrame.url === frame.url && rawFrame.lineNumber === frame.lineNumber &&
155
- rawFrame.columnNumber === frame.columnNumber);
184
+ const isWasm = rawFrame.parsedFrameInfo?.isWasm;
185
+ const protocolFrame = protocolStackTrace.callFrames.find(frame => {
186
+ if (isWasm) {
187
+ // The parser parses Wasm offsets into the `columnNumber` field. The `lineNumber` is always -1.
188
+ // In the protocol trace, the `lineNumber` is 0 (for Wasm) and `columnNumber` is the bytecode offset.
189
+ return rawFrame.url === frame.url && rawFrame.columnNumber === frame.columnNumber;
190
+ }
191
+ return rawFrame.url === frame.url && rawFrame.lineNumber === frame.lineNumber &&
192
+ rawFrame.columnNumber === frame.columnNumber;
193
+ });
194
+
156
195
  if (protocolFrame) {
157
196
  // @ts-expect-error scriptId is a readonly property.
158
197
  rawFrame.scriptId = protocolFrame.scriptId;
@@ -21,6 +21,24 @@ export interface ParsedErrorFrame {
21
21
  };
22
22
  }
23
23
 
24
+ /**
25
+ * Combines the error description (essentially the `Error#stack` property value)
26
+ * with the `issueSummary`.
27
+ *
28
+ * @param description the `description` property of the `Error` remote object.
29
+ * @param issueSummary the optional `issueSummary` of the `exceptionMetaData`.
30
+ * @returns the enriched description.
31
+ * @see https://goo.gle/devtools-reduce-network-noise-design
32
+ */
33
+ export function concatErrorDescriptionAndIssueSummary(description: string, issueSummary: string): string {
34
+ // Insert the issue summary right after the error message.
35
+ const pos = description.indexOf('\n');
36
+ const prefix = pos === -1 ? description : description.substring(0, pos);
37
+ const suffix = pos === -1 ? '' : description.substring(pos);
38
+ description = `${prefix}. ${issueSummary}${suffix}`;
39
+ return description;
40
+ }
41
+
24
42
  /**
25
43
  * Takes a V8 Error#stack string and extracts source position information.
26
44
  *
@@ -58,8 +58,12 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
58
58
 
59
59
  async createFromErrorStackLikeString(
60
60
  stack: string, rawFramesToUIFrames: TranslateRawFrames,
61
- exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace> {
61
+ exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace|null> {
62
62
  const rawFrames = parseRawFramesFromErrorStack(stack);
63
+ if (!rawFrames) {
64
+ return null;
65
+ }
66
+
63
67
  if (exceptionDetails?.stackTrace) {
64
68
  augmentRawFramesWithScriptIds(rawFrames, exceptionDetails.stackTrace);
65
69
  }
@@ -2,11 +2,23 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ import * as Common from '../../core/common/common.js';
5
6
  import * as Platform from '../../core/platform/platform.js';
6
7
 
7
- import { contentAsDataURL, type DeferredContent } from './ContentProvider.js';
8
+ import {contentAsDataURL, type DeferredContent} from './ContentProvider.js';
8
9
  import {Text} from './Text.js';
9
10
 
11
+ const objectUrlRegistry = new FinalizationRegistry<string>(url => {
12
+ URL.revokeObjectURL(url);
13
+ });
14
+
15
+ /**
16
+ * The maximum size in bytes that we are willing to convert to a Blob.
17
+ * 10MB is chosen as a safe upper limit to prevent freezing the DevTools UI
18
+ * when synchronously decoding large Base64 strings.
19
+ */
20
+ const MAX_BLOB_SIZE_BYTES = 10 * 1024 * 1024;
21
+
10
22
  /**
11
23
  * This class is a small wrapper around either raw binary or text data.
12
24
  * As the binary data can actually contain textual data, we also store the
@@ -26,11 +38,10 @@ import {Text} from './Text.js';
26
38
  export class ContentData {
27
39
  readonly mimeType: string;
28
40
  readonly charset: string;
29
-
30
41
  #contentAsBase64?: string;
31
42
  #contentAsText?: string;
32
-
33
43
  #contentAsTextObj?: Text;
44
+ #imagePreviewUrl?: string;
34
45
 
35
46
  constructor(data: string, isBase64: boolean, mimeType: string, charset?: string) {
36
47
  this.charset = charset || 'utf-8';
@@ -75,13 +86,7 @@ export class ContentData {
75
86
  throw new Error('Cannot interpret binary data as text');
76
87
  }
77
88
 
78
- const binaryString = window.atob(this.#contentAsBase64 as string);
79
- const len = binaryString.length;
80
- const bytes = new Uint8Array(len);
81
- for (let i = 0; i < len; i++) {
82
- bytes[i] = binaryString.charCodeAt(i);
83
- }
84
-
89
+ const bytes = Common.Base64.decode(this.#contentAsBase64 as string);
85
90
  this.#contentAsText = new TextDecoder(this.charset).decode(bytes);
86
91
  return this.#contentAsText;
87
92
  }
@@ -145,6 +150,62 @@ export class ContentData {
145
150
  return contentAsDataURL(this.text, this.mimeType ?? '', false, 'utf-8');
146
151
  }
147
152
 
153
+ /**
154
+ * Returns the content as a Blob.
155
+ *
156
+ * We prefer Base64 as the source for the Blob because it represents the raw binary
157
+ * bytes. Converting binary data (like an image) to a UTF-16 string (contentAsText)
158
+ * is destructive and will corrupt the image data.
159
+ *
160
+ * @returns The Blob representation, or `null` if the content exceeds the 10MB safety limit.
161
+ */
162
+ asBlob(): Blob|null {
163
+ // We prefer Base64 as the source for the Blob because it represents the raw binary
164
+ // bytes. Converting binary data (like an image) to a UTF-16 string (contentAsText)
165
+ // is destructive and will corrupt the image data.
166
+ if (this.#contentAsBase64 !== undefined) {
167
+ // Base64 encoding uses 4 characters to represent 3 bytes of data.
168
+ // Therefore, the byte size is approximately 75% of the string length.
169
+ if (this.#contentAsBase64.length * 0.75 > MAX_BLOB_SIZE_BYTES) {
170
+ return null;
171
+ }
172
+ const bytes = Common.Base64.decode(this.#contentAsBase64);
173
+ return new Blob([bytes], {type: this.mimeType});
174
+ }
175
+ const text = this.#contentAsText ?? '';
176
+ if (text.length > MAX_BLOB_SIZE_BYTES) {
177
+ return null;
178
+ }
179
+ return new Blob([text], {type: this.mimeType});
180
+ }
181
+
182
+ /**
183
+ * Gets the image as either a data: or blob: URL.
184
+ *
185
+ * We prefer data: for simplicity, but these are limited in size to 1MB. If
186
+ * the resource is >1MB, we fall back to a blob: URL.
187
+ *
188
+ * @returns An object URL, or `null` if the content exceeds the 10MB safety limit.
189
+ */
190
+ asImagePreviewUrl(): string|null {
191
+ if (this.#imagePreviewUrl) {
192
+ return this.#imagePreviewUrl;
193
+ }
194
+ const url = this.asDataUrl();
195
+ if (url !== null) {
196
+ this.#imagePreviewUrl = url;
197
+ return this.#imagePreviewUrl;
198
+ }
199
+
200
+ const blob = this.asBlob();
201
+ if (blob === null) {
202
+ return null;
203
+ }
204
+ this.#imagePreviewUrl = URL.createObjectURL(blob);
205
+ objectUrlRegistry.register(this, this.#imagePreviewUrl);
206
+ return this.#imagePreviewUrl;
207
+ }
208
+
148
209
  /**
149
210
  * @deprecated Used during migration from `DeferredContent` to `ContentData`.
150
211
  */
@@ -14,6 +14,13 @@ export interface TraceFile {
14
14
  metadata: MetaData;
15
15
  }
16
16
 
17
+ // When a file is imported, it could have come from another tool which does not
18
+ // define metadata.
19
+ interface TraceFileWithUnknownMetadata {
20
+ traceEvents: readonly Event[];
21
+ metadata?: MetaData;
22
+ }
23
+
17
24
  export interface Breadcrumb {
18
25
  window: TraceWindowMicro;
19
26
  child: Breadcrumb|null;
@@ -239,7 +246,7 @@ export interface MetadataResource {
239
246
  mimeType: string;
240
247
  }
241
248
 
242
- export type Contents = TraceFile|Event[];
249
+ export type Contents = TraceFileWithUnknownMetadata|Event[];
243
250
 
244
251
  export function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {
245
252
  const parts = key.split('-');