chrome-devtools-frontend 1.0.1654411 → 1.0.1656897

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 (204) hide show
  1. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +116 -0
  2. package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +82 -0
  3. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +123 -0
  4. package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +125 -0
  5. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +75 -0
  6. package/AUTHORS +1 -0
  7. package/config/owner/COMMON_OWNERS +0 -4
  8. package/docs/playbook.md +1 -1
  9. package/front_end/Tests.js +1 -0
  10. package/front_end/core/common/Settings.ts +47 -30
  11. package/front_end/core/sdk/CPUThrottlingManager.ts +10 -159
  12. package/front_end/core/sdk/ConsoleModel.ts +13 -11
  13. package/front_end/core/sdk/DOMDebuggerModel.ts +11 -5
  14. package/front_end/core/sdk/DOMModel.ts +7 -5
  15. package/front_end/core/sdk/EventBreakpointsModel.ts +9 -5
  16. package/front_end/core/sdk/IsolateManager.ts +6 -6
  17. package/front_end/core/sdk/ResourceTreeModel.ts +5 -3
  18. package/front_end/core/sdk/SourceMapCache.ts +2 -4
  19. package/front_end/core/sdk/SourceMapManager.ts +8 -7
  20. package/front_end/core/sdk/TargetManager.ts +17 -0
  21. package/front_end/entrypoints/devtools_app/devtools_app.ts +0 -1
  22. package/front_end/entrypoints/main/MainImpl.ts +12 -36
  23. package/front_end/entrypoints/main/SimpleApp.ts +0 -13
  24. package/front_end/entrypoints/main/main-meta.ts +1 -1
  25. package/front_end/foundation/Universe.ts +110 -3
  26. package/front_end/generated/InspectorBackendCommands.ts +5 -1
  27. package/front_end/generated/SupportedCSSProperties.js +2 -6
  28. package/front_end/generated/protocol-mapping.d.ts +8 -0
  29. package/front_end/generated/protocol-proxy-api.d.ts +15 -0
  30. package/front_end/generated/protocol.ts +36 -1
  31. package/front_end/models/ai_assistance/AiConversation.ts +0 -6
  32. package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +1 -1
  33. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -156
  34. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
  35. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -358
  36. package/front_end/models/ai_assistance/ai_assistance.ts +0 -6
  37. package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +0 -1
  38. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +0 -2
  39. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -14
  40. package/front_end/models/autofill_manager/AutofillManager.ts +1 -2
  41. package/front_end/models/crux-manager/CrUXManager.ts +16 -11
  42. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  43. package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -13
  44. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +12 -9
  45. package/front_end/models/persistence/IsolatedFileSystemManager.ts +18 -9
  46. package/front_end/models/project_settings/ProjectSettingsModel.ts +12 -11
  47. package/front_end/models/trace/handlers/ScreenshotsHandler.ts +14 -59
  48. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +3 -29
  49. package/front_end/panels/application/DeviceBoundSessionsView.ts +15 -3
  50. package/front_end/panels/application/FrameDetailsView.ts +2 -1
  51. package/front_end/panels/application/ServiceWorkersView.ts +193 -161
  52. package/front_end/panels/application/serviceWorkersView.css +8 -0
  53. package/front_end/panels/common/CPUThrottlingOption.ts +142 -0
  54. package/front_end/panels/common/ThrottlingUtils.ts +9 -4
  55. package/front_end/panels/common/common.ts +1 -1
  56. package/front_end/panels/console/ConsoleViewMessage.ts +45 -0
  57. package/front_end/panels/elements/ElementsPanel.ts +35 -102
  58. package/front_end/panels/elements/ElementsTreeOutline.ts +0 -4
  59. package/front_end/panels/elements/elements-meta.ts +3 -2
  60. package/front_end/panels/emulation/DeviceModeToolbar.ts +46 -45
  61. package/front_end/panels/mobile_throttling/CalibrationController.ts +6 -5
  62. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +1 -1
  63. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +40 -13
  64. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +13 -17
  65. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +15 -13
  66. package/front_end/panels/network/NetworkLogView.ts +0 -9
  67. package/front_end/panels/network/NetworkPanel.ts +1 -63
  68. package/front_end/panels/network/RequestInitiatorView.ts +29 -4
  69. package/front_end/panels/network/components/HeaderSectionRow.css +9 -7
  70. package/front_end/panels/network/components/HeaderSectionRow.ts +20 -1
  71. package/front_end/panels/network/components/RequestHeaderSection.css +5 -3
  72. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -2
  73. package/front_end/panels/network/components/RequestHeadersView.css +1 -1
  74. package/front_end/panels/security/SecurityPanel.ts +36 -23
  75. package/front_end/panels/settings/SettingsScreen.ts +18 -103
  76. package/front_end/panels/settings/settings-meta.ts +0 -24
  77. package/front_end/panels/timeline/TimelineController.ts +3 -2
  78. package/front_end/panels/timeline/TimelinePanel.ts +20 -3
  79. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +15 -14
  80. package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -0
  81. package/front_end/panels/utils/utils.ts +25 -24
  82. package/front_end/third_party/chromium/README.chromium +1 -1
  83. package/front_end/third_party/puppeteer/README.chromium +2 -2
  84. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +34 -55
  85. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +96 -83
  86. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +10 -1
  87. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
  88. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
  90. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.d.ts.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.js.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +3 -2
  95. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.d.ts +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.js +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +2 -1
  105. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.js.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -2
  109. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +5 -2
  111. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +23 -13
  116. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +4 -1
  119. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Input.js +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.d.ts.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.js.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +3 -41
  126. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +4 -2
  131. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts +5 -0
  133. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js +5 -5
  139. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/types.d.ts +34 -55
  143. package/front_end/third_party/puppeteer/package/package.json +4 -4
  144. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
  145. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -3
  146. package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +3 -1
  147. package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +3 -2
  148. package/front_end/third_party/puppeteer/package/src/api/Realm.ts +1 -2
  149. package/front_end/third_party/puppeteer/package/src/api/Target.ts +1 -1
  150. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +1 -2
  151. package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +3 -1
  152. package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +1 -3
  153. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +13 -3
  154. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +1 -1
  155. package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +24 -13
  156. package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +4 -1
  157. package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +1 -1
  158. package/front_end/third_party/puppeteer/package/src/cdp/LifecycleWatcher.ts +1 -4
  159. package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +2 -4
  160. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -76
  161. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +1 -4
  162. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -1
  163. package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +5 -0
  164. package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
  165. package/front_end/third_party/puppeteer/package/src/util/httpUtils.ts +5 -5
  166. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  167. package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -1
  168. package/front_end/ui/components/dialogs/Dialog.ts +3 -0
  169. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -7
  170. package/front_end/ui/helpers/OpenInNewTab.ts +15 -7
  171. package/front_end/ui/legacy/TabbedPane.ts +1 -108
  172. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -0
  173. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +172 -123
  174. package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +89 -0
  175. package/front_end/ui/legacy/components/data_grid/dataGrid.css +10 -0
  176. package/front_end/ui/legacy/components/data_grid/data_grid.ts +3 -1
  177. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +89 -40
  178. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  179. package/package.json +1 -1
  180. package/front_end/Images/navigationControls.png +0 -0
  181. package/front_end/Images/navigationControls_2x.png +0 -0
  182. package/front_end/Images/popoverArrows.png +0 -0
  183. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -746
  184. package/front_end/entrypoints/greendev_floaty/floaty.css +0 -301
  185. package/front_end/entrypoints/greendev_floaty/floaty.html +0 -38
  186. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -415
  187. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +0 -834
  188. package/front_end/models/ai_assistance/agents/GreenDevAgentAntigravityCliSocketClient.ts +0 -53
  189. package/front_end/models/ai_assistance/agents/GreenDevAgentGeminiCliSocketClient.ts +0 -117
  190. package/front_end/models/annotations/AnnotationRepository.ts +0 -238
  191. package/front_end/models/annotations/AnnotationType.ts +0 -10
  192. package/front_end/models/annotations/README.md +0 -7
  193. package/front_end/models/annotations/annotations.ts +0 -6
  194. package/front_end/models/greendev/Prototypes.ts +0 -68
  195. package/front_end/models/greendev/README.md +0 -5
  196. package/front_end/models/greendev/greendev.ts +0 -5
  197. package/front_end/panels/common/Annotation.ts +0 -184
  198. package/front_end/panels/common/AnnotationManager.ts +0 -208
  199. package/front_end/panels/common/annotation.css +0 -40
  200. package/front_end/panels/greendev/GreenDevPanel.css +0 -282
  201. package/front_end/panels/greendev/GreenDevPanel.ts +0 -364
  202. package/front_end/panels/greendev/GreenDevShared.ts +0 -13
  203. package/front_end/panels/greendev/greendev-meta.ts +0 -52
  204. package/front_end/panels/greendev/greendev.ts +0 -9
@@ -2,7 +2,6 @@
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
  /* eslint-disable @devtools/no-imperative-dom-api */
5
-
6
5
  import * as i18n from '../../core/i18n/i18n.js';
7
6
  import * as SDK from '../../core/sdk/sdk.js';
8
7
  import * as Bindings from '../../models/bindings/bindings.js';
@@ -10,7 +9,7 @@ import * as Logs from '../../models/logs/logs.js';
10
9
  import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
11
10
  import * as Components from '../../ui/legacy/components/utils/utils.js';
12
11
  import * as UI from '../../ui/legacy/legacy.js';
13
- import {html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
12
+ import {Directives, html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
14
13
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
15
14
 
16
15
  import requestInitiatorViewStyles from './requestInitiatorView.css.js';
@@ -34,6 +33,20 @@ const UIStrings = {
34
33
  } as const;
35
34
  const str_ = i18n.i18n.registerUIStrings('panels/network/RequestInitiatorView.ts', UIStrings);
36
35
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
36
+
37
+ const MAX_URL_LENGTH = 150;
38
+
39
+ function trimUrl(url: string): string {
40
+ if (url.length <= MAX_URL_LENGTH) {
41
+ return url;
42
+ }
43
+ // To avoid performance issues with extremely long URLs (e.g. 2MB base64 data URLs),
44
+ // we do a fast O(1) slice instead of using the O(N) Platform.StringUtilities.trimMiddle
45
+ // utility which instantiates Intl.Segmenter and iterates over every grapheme.
46
+ const halfMaxLength = Math.floor(MAX_URL_LENGTH / 2);
47
+ return url.substring(0, halfMaxLength) + '…' + url.substring(url.length - halfMaxLength);
48
+ }
49
+
37
50
  export interface ViewInput {
38
51
  initiatorGraph: Logs.NetworkLog.InitiatorGraph;
39
52
  stackTrace: StackTrace.StackTrace.StackTrace|null;
@@ -87,11 +100,17 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
87
100
  const isCurrentRequest = (index === initiators.length - 1);
88
101
  const hasFurtherInitiatedNodes = index + 1 < initiators.length;
89
102
  const renderedChildren = isCurrentRequest ? renderInitiatedNodes(initiated, request, visited) : nothing;
103
+ const url = request.url();
104
+ // To avoid layout and rendering lag from extremely long URLs (like data: URLs),
105
+ // we only set the title/tooltip attribute if the URL is under 2000 characters.
106
+ const title = url.length < 2000 ? url : undefined;
90
107
 
91
108
  // clang-format off
92
109
  return html`
93
110
  <li role="treeitem" ?selected=${isCurrentRequest} aria-expanded="true" open>
94
- <span style=${isCurrentRequest ? 'font-weight: bold' : ''}>${request.url()}</span>
111
+ <span style=${isCurrentRequest ? 'font-weight: bold' : ''} title=${Directives.ifDefined(title) as string}>
112
+ ${trimUrl(url)}
113
+ </span>
95
114
  ${hasFurtherInitiatedNodes || renderedChildren !== nothing ? html`
96
115
  <ul role="group">
97
116
  ${renderInitiatorNodes(initiators, index + 1, initiated, visited)}
@@ -121,9 +140,15 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
121
140
  visited.add(child);
122
141
  }
123
142
  const renderedChildren = shouldRecurse ? renderInitiatedNodes(initiated, child, visited) : nothing;
143
+ const url = child.url();
144
+ // To avoid layout and rendering lag from extremely long URLs (like data: URLs),
145
+ // we only set the title/tooltip attribute if the URL is under 2000 characters.
146
+ const title = url.length < 2000 ? url : undefined;
124
147
  return html`
125
148
  <li role="treeitem" aria-expanded="true" open>
126
- <span>${child.url()}</span>
149
+ <span title=${Directives.ifDefined(title) as string}>
150
+ ${trimUrl(url)}
151
+ </span>
127
152
  ${renderedChildren !== nothing ? html`<ul role="group">${renderedChildren}</ul>` : nothing}
128
153
  </li>
129
154
  `;
@@ -17,9 +17,8 @@
17
17
  margin: var(--sys-size-3) 0;
18
18
  }
19
19
 
20
- .row.header-editable {
21
- font-family: var(--monospace-font-family);
22
- font-size: var(--monospace-font-size);
20
+ .row:hover {
21
+ background-color: var(--sys-color-state-hover-on-subtle);
23
22
  }
24
23
 
25
24
  .header-name {
@@ -57,7 +56,8 @@
57
56
  display: flex;
58
57
  overflow-wrap: anywhere;
59
58
  margin-inline-end: 14px;
60
- font: var(--sys-typescale-body4-regular);
59
+ font-family: var(--monospace-font-family);
60
+ font-size: var(--monospace-font-size);
61
61
  }
62
62
 
63
63
  .header-badge-text {
@@ -85,10 +85,12 @@
85
85
  }
86
86
 
87
87
  .call-to-action-body {
88
+ display: flex;
89
+ gap: var(--sys-size-4);
88
90
  padding: 6px 0;
89
- margin-left: 9.5px;
91
+ margin-left: var(--sys-size-1);
90
92
  border-left: 2px solid var(--issue-color-yellow);
91
- padding-left: 18px;
93
+ padding-left: 11px;
92
94
  line-height: 20px;
93
95
  }
94
96
 
@@ -117,7 +119,7 @@
117
119
  }
118
120
 
119
121
  .inline-icon {
120
- vertical-align: middle;
122
+ margin-top: var(--sys-size-2);
121
123
  }
122
124
 
123
125
  .row-flex-icon {
@@ -4,7 +4,6 @@
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
6
  import '../../../ui/kit/kit.js';
7
- import '../../../ui/legacy/legacy.js';
8
7
 
9
8
  import * as Host from '../../../core/host/host.js';
10
9
  import * as i18n from '../../../core/i18n/i18n.js';
@@ -14,6 +13,7 @@ import type * as Protocol from '../../../generated/protocol.js';
14
13
  import * as ClientVariations from '../../../third_party/chromium/client-variations/client-variations.js';
15
14
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
16
15
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
16
+ import * as UI from '../../../ui/legacy/legacy.js';
17
17
  import * as Lit from '../../../ui/lit/lit.js';
18
18
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
19
19
 
@@ -23,6 +23,10 @@ import headerSectionRowStyles from './HeaderSectionRow.css.js';
23
23
  const {render, html} = Lit;
24
24
 
25
25
  const UIStrings = {
26
+ /**
27
+ * @description A context menu item to copy the value of a header.
28
+ */
29
+ copyValue: 'Copy value',
26
30
  /**
27
31
  * @description Comment used in decoded X-Client-Data HTTP header output in Headers View of the Network panel
28
32
  */
@@ -197,6 +201,7 @@ export class HeaderSectionRow extends HTMLElement {
197
201
  <div
198
202
  class=${headerValueClasses}
199
203
  @copy=${():void => Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}
204
+ @contextmenu=${this.#onContextMenu}
200
205
  >
201
206
  ${this.#renderHeaderValue()}
202
207
  </div>
@@ -483,6 +488,20 @@ export class HeaderSectionRow extends HTMLElement {
483
488
  }
484
489
  event.preventDefault();
485
490
  }
491
+
492
+ #onContextMenu(event: Event): void {
493
+ if (!this.#header) {
494
+ return;
495
+ }
496
+ event.stopPropagation();
497
+ event.preventDefault();
498
+ const contextMenu = new UI.ContextMenu.ContextMenu(event);
499
+ contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copyValue), () => {
500
+ Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#header?.value || '');
501
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue);
502
+ });
503
+ void contextMenu.show();
504
+ }
486
505
  }
487
506
 
488
507
  customElements.define('devtools-header-section-row', HeaderSectionRow);
@@ -24,10 +24,12 @@
24
24
  }
25
25
 
26
26
  .call-to-action-body {
27
+ display: flex;
28
+ gap: var(--sys-size-4);
27
29
  padding: 6px 0;
28
- margin-left: 9.5px;
30
+ margin-left: var(--sys-size-1);
29
31
  border-left: 2px solid var(--issue-color-yellow);
30
- padding-left: 18px;
32
+ padding-left: 11px;
31
33
  line-height: 20px;
32
34
  }
33
35
 
@@ -56,7 +58,7 @@
56
58
  }
57
59
 
58
60
  .inline-icon {
59
- vertical-align: middle;
61
+ margin-top: var(--sys-size-2);
60
62
  }
61
63
 
62
64
  @media (forced-colors: active) {
@@ -83,9 +83,8 @@ function renderProvisionalHeadersWarning(isRequestCached: boolean): Lit.LitTempl
83
83
  return html`
84
84
  <div class="call-to-action">
85
85
  <div class="call-to-action-body">
86
+ <devtools-icon class="inline-icon medium" name='warning-filled'></devtools-icon>
86
87
  <div class="explanation" title=${cautionTitle}>
87
- <devtools-icon class="inline-icon medium" name='warning-filled'>
88
- </devtools-icon>
89
88
  ${cautionText} <devtools-link href="https://developer.chrome.com/docs/devtools/network/reference/#provisional-headers" class="link">${i18nString(UIStrings.learnMore)}</devtools-link>
90
89
  </div>
91
90
  </div>
@@ -128,7 +128,7 @@ div.raw-headers-row {
128
128
  }
129
129
 
130
130
  .inline-icon {
131
- vertical-align: middle;
131
+ vertical-align: sub;
132
132
  }
133
133
 
134
134
  .header-grid-container {
@@ -12,7 +12,7 @@ import * as Protocol from '../../generated/protocol.js';
12
12
  import * as NetworkForward from '../../panels/network/forward/forward.js';
13
13
  import {createIcon, type Icon} from '../../ui/kit/kit.js';
14
14
  import * as UI from '../../ui/legacy/legacy.js';
15
- import {html, render} from '../../ui/lit/lit.js';
15
+ import {html, render, type TemplateResult} from '../../ui/lit/lit.js';
16
16
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
17
17
 
18
18
  import lockIconStyles from './lockIcon.css.js';
@@ -510,26 +510,31 @@ export function getSecurityStateIconForOverview(
510
510
  return createIcon(iconName, className);
511
511
  }
512
512
 
513
- export function createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
513
+ function renderHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): TemplateResult {
514
514
  const schemeSeparator = '://';
515
515
  const index = url.indexOf(schemeSeparator);
516
516
 
517
517
  // If the separator is not found, just display the text without highlighting.
518
518
  if (index === -1) {
519
- const text = document.createElement('span');
520
- text.textContent = url;
521
- return text;
519
+ return html`<span>${url}</span>`;
522
520
  }
523
521
 
524
- const highlightedUrl = document.createElement('span');
525
- highlightedUrl.classList.add('highlighted-url');
526
522
  const scheme = url.substr(0, index);
527
523
  const content = url.substr(index + schemeSeparator.length);
528
- highlightedUrl.createChild('span', 'url-scheme-' + securityState).textContent = scheme;
529
- highlightedUrl.createChild('span', 'url-scheme-separator').textContent = schemeSeparator;
530
- highlightedUrl.createChild('span').textContent = content;
531
524
 
532
- return highlightedUrl;
525
+ return html`
526
+ <span class="highlighted-url">
527
+ <span class=${`url-scheme-${securityState}`}>${scheme}</span>
528
+ <span class="url-scheme-separator">${schemeSeparator}</span>
529
+ <span>${content}</span>
530
+ </span>`;
531
+ }
532
+
533
+ export function createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
534
+ const fragment = document.createDocumentFragment();
535
+ // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
536
+ render(renderHighlightedUrl(url, securityState), fragment);
537
+ return fragment.firstElementChild as Element;
533
538
  }
534
539
 
535
540
  export interface ViewInput {
@@ -1315,11 +1320,14 @@ export class SecurityMainView extends UI.Widget.VBox {
1315
1320
  }
1316
1321
 
1317
1322
  export class SecurityOriginView extends UI.Widget.VBox {
1318
- private readonly originLockIcon: HTMLElement;
1323
+ readonly #origin: Platform.DevToolsPath.UrlString;
1324
+ readonly #originDisplay: HTMLElement;
1325
+
1319
1326
  constructor(origin: Platform.DevToolsPath.UrlString, originState: OriginState) {
1320
1327
  super({jslog: `${VisualLogging.pane('security.origin-view')}`});
1321
1328
  this.registerRequiredCSS(originViewStyles, lockIconStyles);
1322
1329
  this.setMinimumSize(200, 100);
1330
+ this.#origin = origin;
1323
1331
 
1324
1332
  this.element.classList.add('security-origin-view');
1325
1333
 
@@ -1328,13 +1336,8 @@ export class SecurityOriginView extends UI.Widget.VBox {
1328
1336
  titleDiv.textContent = i18nString(UIStrings.origin);
1329
1337
  UI.ARIAUtils.markAsHeading(titleDiv, 1);
1330
1338
 
1331
- const originDisplay = titleSection.createChild('div', 'origin-display');
1332
- this.originLockIcon = originDisplay.createChild('span');
1333
- const icon = getSecurityStateIconForDetailedView(
1334
- originState.securityState, `security-property security-property-${originState.securityState}`);
1335
- this.originLockIcon.appendChild(icon);
1336
-
1337
- originDisplay.appendChild(createHighlightedUrl(origin, originState.securityState));
1339
+ this.#originDisplay = titleSection.createChild('div', 'origin-display');
1340
+ this.#renderOriginDisplay(originState.securityState);
1338
1341
 
1339
1342
  const originNetworkDiv = titleSection.createChild('div', 'view-network-button');
1340
1343
  const originNetworkButton = UI.UIUtils.createTextButton(i18nString(UIStrings.viewRequestsInNetworkPanel), event => {
@@ -1573,10 +1576,20 @@ export class SecurityOriginView extends UI.Widget.VBox {
1573
1576
  }
1574
1577
 
1575
1578
  setSecurityState(newSecurityState: Protocol.Security.SecurityState): void {
1576
- this.originLockIcon.removeChildren();
1577
- const icon = getSecurityStateIconForDetailedView(
1578
- newSecurityState, `security-property security-property-${newSecurityState}`);
1579
- this.originLockIcon.appendChild(icon);
1579
+ this.#renderOriginDisplay(newSecurityState);
1580
+ }
1581
+
1582
+ #renderOriginDisplay(securityState: Protocol.Security.SecurityState): void {
1583
+ const icon =
1584
+ getSecurityStateIconForDetailedView(securityState, `security-property security-property-${securityState}`);
1585
+
1586
+ // clang-format off
1587
+ // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
1588
+ render(html`
1589
+ ${icon}
1590
+ ${renderHighlightedUrl(this.#origin, securityState)}
1591
+ `, this.#originDisplay);
1592
+ // clang-format on
1580
1593
  }
1581
1594
  }
1582
1595
 
@@ -11,14 +11,13 @@ import * as Common from '../../core/common/common.js';
11
11
  import * as Host from '../../core/host/host.js';
12
12
  import * as i18n from '../../core/i18n/i18n.js';
13
13
  import * as Root from '../../core/root/root.js';
14
- import * as GreenDev from '../../models/greendev/greendev.js';
15
14
  import * as Buttons from '../../ui/components/buttons/buttons.js';
16
15
  import * as UIHelpers from '../../ui/helpers/helpers.js';
17
16
  import {type Card, createIcon, Link} from '../../ui/kit/kit.js';
18
17
  import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
19
18
  import * as Components from '../../ui/legacy/components/utils/utils.js';
20
19
  import * as UI from '../../ui/legacy/legacy.js';
21
- import {html, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
20
+ import {html, render} from '../../ui/lit/lit.js';
22
21
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
23
22
  import {PanelUtils} from '../utils/utils.js';
24
23
 
@@ -51,11 +50,6 @@ const UIStrings = {
51
50
  * @description Message shown in the experiments panel to warn users about any possible unstable features.
52
51
  */
53
52
  theseExperimentsCouldBeUnstable: 'Warning: These experiments could be unstable or unreliable.',
54
- /**
55
- * @description Message shown in the GreenDev prototypes panel to warn users about any possible unstable features.
56
- */
57
- greenDevUnstable:
58
- 'Warning: All these features are prototype and very unstable. They exist for user testing and are not designed to be relied on.',
59
53
  /**
60
54
  * @description Message to display if a setting change requires a reload of DevTools
61
55
  */
@@ -276,14 +270,14 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
276
270
  );
277
271
 
278
272
  for (const sectionCategory of explicitSectionOrder) {
279
- const settingsForSection = preRegisteredSettings.filter(
280
- setting => setting.category === sectionCategory && GenericSettingsTab.isSettingVisible(setting));
273
+ const settingsForSection = preRegisteredSettings.filter(setting => setting.category === sectionCategory &&
274
+ GenericSettingsTab.isSettingVisible(setting));
281
275
  this.createSectionElement(sectionCategory, settingsForSection);
282
276
  }
283
277
 
284
- const restoreAndReloadButton = UI.UIUtils.createTextButton(
285
- i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload,
286
- {jslogContext: 'settings.restore-defaults-and-reload'});
278
+ const restoreAndReloadButton =
279
+ UI.UIUtils.createTextButton(i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload,
280
+ {jslogContext: 'settings.restore-defaults-and-reload'});
287
281
  this.containerElement.appendChild(restoreAndReloadButton);
288
282
 
289
283
  function restoreAndReload(): void {
@@ -335,8 +329,8 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
335
329
  this.createStandardSectionElement(sectionName, settings, element);
336
330
  }
337
331
 
338
- private createSectionElement(
339
- category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[]): void {
332
+ private createSectionElement(category: Common.Settings.SettingCategory,
333
+ settings: Common.Settings.SettingRegistration[]): void {
340
334
  // Always create the EXTENSIONS section and append the link handling control.
341
335
  if (category === Common.Settings.SettingCategory.EXTENSIONS) {
342
336
  this.createExtensionSection(settings);
@@ -350,9 +344,8 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
350
344
  }
351
345
  }
352
346
 
353
- private createStandardSectionElement(
354
- category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[],
355
- content?: Element): void {
347
+ private createStandardSectionElement(category: Common.Settings.SettingCategory,
348
+ settings: Common.Settings.SettingRegistration[], content?: Element): void {
356
349
  const uiSectionName = Common.Settings.getLocalizedSettingsCategory(category);
357
350
  const sectionElement = document.createElement('div');
358
351
  for (const settingRegistration of settings) {
@@ -399,15 +392,14 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
399
392
 
400
393
  const filterSection = this.containerElement.createChild('div');
401
394
  filterSection.classList.add('experiments-filter');
402
- render(
403
- html`
395
+ render(html`
404
396
  <devtools-toolbar>
405
397
  <devtools-toolbar-input autofocus type="filter" placeholder=${
406
- i18nString(UIStrings.searchExperiments)} style="flex-grow:1" @change=${
407
- this.#onFilterChanged.bind(this)}></devtools-toolbar-input>
398
+ i18nString(UIStrings.searchExperiments)} style="flex-grow:1" @change=${
399
+ this.#onFilterChanged.bind(this)}></devtools-toolbar-input>
408
400
  </devtools-toolbar>
409
401
  `,
410
- filterSection);
402
+ filterSection);
411
403
  this.renderExperiments('');
412
404
  }
413
405
 
@@ -455,8 +447,8 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
455
447
  return subsection;
456
448
  }
457
449
 
458
- private createExperimentCheckbox(experiment: Root.Runtime.Experiment|Root.Runtime.HostExperiment):
459
- HTMLParagraphElement {
450
+ private createExperimentCheckbox(experiment: Root.Runtime.Experiment|
451
+ Root.Runtime.HostExperiment): HTMLParagraphElement {
460
452
  const checkbox =
461
453
  UI.UIUtils.CheckboxLabel.createWithStringLiteral(experiment.title, experiment.isEnabled(), experiment.name);
462
454
  checkbox.classList.add('experiment-label');
@@ -547,8 +539,8 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
547
539
  }
548
540
  export class Revealer implements
549
541
  Common.Revealer.Revealer<Root.Runtime.Experiment|Root.Runtime.HostExperiment|Common.Settings.Setting<unknown>> {
550
- async reveal(object: Root.Runtime.Experiment|Root.Runtime.HostExperiment|Common.Settings.Setting<unknown>):
551
- Promise<void> {
542
+ async reveal(object: Root.Runtime.Experiment|Root.Runtime.HostExperiment|
543
+ Common.Settings.Setting<unknown>): Promise<void> {
552
544
  const context = UI.Context.Context.instance();
553
545
  if (object instanceof Root.Runtime.Experiment || object instanceof Root.Runtime.HostExperiment) {
554
546
  Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();
@@ -599,80 +591,3 @@ export interface ShowSettingsScreenOptions {
599
591
  name?: string;
600
592
  focusTabHeader?: boolean;
601
593
  }
602
-
603
- export class GreenDevSettingsTab extends UI.Widget.VBox implements SettingsTab {
604
- #view: View;
605
-
606
- constructor(view = GREENDEV_VIEW) {
607
- super({jslog: `${VisualLogging.pane('greendev-prototypes')}`});
608
- this.element.id = 'greendev-prototypes-tab-content';
609
-
610
- this.#view = view;
611
-
612
- this.requestUpdate();
613
- }
614
-
615
- highlightObject(_object: Object): void {
616
- }
617
-
618
- override performUpdate(): Promise<void>|void {
619
- const settings = GreenDev.Prototypes.instance().settings();
620
- this.#view({settings}, {}, this.element);
621
- }
622
- }
623
-
624
- interface GreenDevViewInput {
625
- settings: GreenDev.GreenDevSettings;
626
- }
627
-
628
- type View = (input: GreenDevViewInput, output: object, target: HTMLElement) => void;
629
- const GREENDEV_VIEW: View = (input, _output, target) => {
630
- // clang-format off
631
- render(html`
632
- <div class="settings-card-container">
633
- <devtools-card .heading=${'GreenDev prototypes'}>
634
- <div class="experiments-warning-subsection">
635
- <devtools-icon .name=${'warning'}></devtools-icon>
636
- <span>${i18nString(UIStrings.greenDevUnstable)}</span>
637
- </div>
638
- <div class="settings-experiments-block">
639
- ${renderPrototypeCheckboxes(input.settings, ['aiAnnotations', 'beyondStylingGemini', 'beyondStylingAntigravity', 'emulationCapabilities'])}
640
- </div>
641
- </devtools-card>
642
- </div>
643
- `, target);
644
- // clang-format on
645
- };
646
-
647
- const GREENDEV_PROTOTYPE_NAMES: Record<keyof GreenDev.GreenDevSettings, string> = {
648
- aiAnnotations: 'AI auto-annotations',
649
- beyondStylingGemini: 'Beyond Styling (Gemini CLI)',
650
- beyondStylingAntigravity: 'Beyond Styling (Antigravity CLI)',
651
- emulationCapabilities: 'Emulation Capabilities',
652
- };
653
-
654
- function renderPrototypeCheckboxes(
655
- settings: GreenDev.GreenDevSettings,
656
- keys: Array<keyof GreenDev.GreenDevSettings>,
657
- ): TemplateResult {
658
- const {bindToSetting} = UI.UIUtils;
659
-
660
- function showChangeWarning(): void {
661
- UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
662
- i18nString(UIStrings.settingsChangedReloadDevTools));
663
- }
664
- // clang-format off
665
- const checkboxes = Object.keys(settings).map(name => {
666
- const settingName = name as keyof GreenDev.GreenDevSettings;
667
- if(!keys.includes(settingName)) {
668
- return nothing;
669
- }
670
- const setting = settings[settingName];
671
- const title = GREENDEV_PROTOTYPE_NAMES[settingName];
672
- return html`<p class="settings-experiment">
673
- <devtools-checkbox @change=${showChangeWarning} title=${title} ${bindToSetting(setting)}>${title}</devtools-checkbox>
674
- </p>`;
675
- });
676
- return html`${checkboxes}`;
677
- // clang-format on
678
- }
@@ -24,14 +24,6 @@ const UIStrings = {
24
24
  * @description Text in Settings Screen of the Settings
25
25
  */
26
26
  experiments: 'Experiments',
27
- /**
28
- * @description Text in Settings Screen of the Settings
29
- */
30
- greenDevProtoTypes: 'GreenDev',
31
- /**
32
- * @description Command for showing the GreenDev tab in the Settings Screen
33
- */
34
- showGreenDev: 'Show GreenDev',
35
27
  /**
36
28
  * @description Title of Ignore list settings
37
29
  */
@@ -162,22 +154,6 @@ UI.ViewManager.registerViewExtension({
162
154
  iconName: 'clear-list',
163
155
  });
164
156
 
165
- UI.ViewManager.registerViewExtension({
166
- location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,
167
- id: 'greendev-prototypes',
168
- title: i18nLazyString(UIStrings.greenDevProtoTypes),
169
- commandPrompt: i18nLazyString(UIStrings.showGreenDev),
170
- order: 101,
171
- async loadView() {
172
- const Settings = await loadSettingsModule();
173
- return new Settings.SettingsScreen.GreenDevSettingsTab();
174
- },
175
- iconName: 'experiment',
176
- condition: config => {
177
- return Boolean(config?.devToolsGreenDevUi?.enabled);
178
- },
179
- });
180
-
181
157
  UI.ViewManager.registerViewExtension({
182
158
  location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,
183
159
  id: 'keybinds',
@@ -11,6 +11,7 @@ import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
11
11
  import * as LiveMetrics from '../../models/live-metrics/live-metrics.js';
12
12
  import * as Trace from '../../models/trace/trace.js';
13
13
  import * as PanelCommon from '../../panels/common/common.js';
14
+ import * as MobileThrottling from '../../panels/mobile_throttling/mobile_throttling.js';
14
15
  import * as Tracing from '../../services/tracing/tracing.js';
15
16
 
16
17
  import * as RecordingMetadata from './RecordingMetadata.js';
@@ -355,9 +356,9 @@ export class TimelineController implements Tracing.TracingManager.TracingManager
355
356
  // temporarily disable throttling whilst the final trace event collection
356
357
  // takes place. Once it is done, we re-enable it (this is the existing
357
358
  // behaviour within DevTools; the throttling settling is sticky + global).
358
- const throttlingManager = SDK.CPUThrottlingManager.CPUThrottlingManager.instance();
359
+ const throttlingManager = MobileThrottling.ThrottlingManager.throttlingManager();
359
360
  const optionDuringRecording = throttlingManager.cpuThrottlingOption();
360
- throttlingManager.setCPUThrottlingOption(SDK.CPUThrottlingManager.NoThrottlingOption);
361
+ throttlingManager.setCPUThrottlingOption(PanelCommon.CPUThrottlingOption.NoThrottlingOption);
361
362
 
362
363
  this.client.loadingStarted();
363
364
 
@@ -316,6 +316,9 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
316
316
 
317
317
  let timelinePanelInstance: TimelinePanel|undefined;
318
318
 
319
+ // Total time to wait for source maps to load before giving up so trace processing can proceed.
320
+ const SOURCE_MAP_LOAD_TIMEOUT_MS = 5000;
321
+
319
322
  /**
320
323
  * Represents the states that the timeline panel can be in.
321
324
  * If you need to change the panel's view, use the {@link TimelinePanel.#changeView} method.
@@ -2649,12 +2652,19 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2649
2652
  };
2650
2653
 
2651
2654
  metadata.sourceMaps = [];
2655
+ await this.#handleSourceMapPromise(parsedTrace, handleScript);
2656
+ }
2652
2657
 
2658
+ async #handleSourceMapPromise(parsedTrace: Trace.TraceModel.ParsedTrace,
2659
+ handleScript: (script: Trace.Handlers.ModelHandlers.Scripts.Script) => Promise<void>):
2660
+ Promise<void> {
2653
2661
  const promises = [];
2654
2662
  for (const script of parsedTrace?.data.Scripts.scripts.values() ?? []) {
2655
2663
  promises.push(handleScript(script));
2656
2664
  }
2657
- await Promise.all(promises);
2665
+
2666
+ const timeout = new Promise<void>(resolve => setTimeout(resolve, SOURCE_MAP_LOAD_TIMEOUT_MS));
2667
+ await Promise.race([Promise.allSettled(promises), timeout]);
2658
2668
  }
2659
2669
 
2660
2670
  #createSourceMapResolver(isFreshRecording: boolean, metadata: Trace.Types.File.MetaData|null):
@@ -2688,7 +2698,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2688
2698
  return await debuggerModel.sourceMapManager().sourceMapForClientPromise(script);
2689
2699
  }
2690
2700
 
2691
- return async function resolveSourceMap(params: Trace.Types.Configuration.ResolveSourceMapParams) {
2701
+ async function resolveSourceMap(params: Trace.Types.Configuration.ResolveSourceMapParams):
2702
+ Promise<SDK.SourceMap.SourceMap|null> {
2692
2703
  const {scriptId, scriptUrl, sourceUrl, sourceMapUrl, frame, cachedRawSourceMap} = params;
2693
2704
 
2694
2705
  if (cachedRawSourceMap) {
@@ -2745,7 +2756,13 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2745
2756
  const payload = await SDK.SourceMapManager.tryLoadSourceMap(
2746
2757
  TimelinePanel.instance().#resourceLoader, sourceMapUrl, initiator);
2747
2758
  return payload ? new SDK.SourceMap.SourceMap(sourceUrl, sourceMapUrl, payload) : null;
2748
- };
2759
+ }
2760
+
2761
+ const timeout = new Promise<null>(resolve => setTimeout(() => resolve(null), SOURCE_MAP_LOAD_TIMEOUT_MS));
2762
+ return function resolveSourceMapWithTimeout(params: Trace.Types.Configuration.ResolveSourceMapParams):
2763
+ Promise<SDK.SourceMap.SourceMap|null> {
2764
+ return Promise.race([resolveSourceMap(params), timeout]);
2765
+ };
2749
2766
  }
2750
2767
 
2751
2768
  async #retainResourceContentsForEnhancedTrace(