chrome-devtools-frontend 1.0.1535712 → 1.0.1537268

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 (231) hide show
  1. package/docs/contributing/images/issues-nearestslo.png +0 -0
  2. package/docs/contributing/issues.md +17 -21
  3. package/front_end/core/common/Console.ts +1 -8
  4. package/front_end/core/common/ParsedURL.ts +10 -20
  5. package/front_end/core/common/SegmentedRange.ts +1 -2
  6. package/front_end/core/common/StringOutputStream.ts +1 -4
  7. package/front_end/core/host/AidaClient.ts +64 -5
  8. package/front_end/core/host/DispatchHttpRequestClient.ts +62 -0
  9. package/front_end/core/host/GdpClient.ts +8 -57
  10. package/front_end/core/host/host.ts +2 -0
  11. package/front_end/core/i18n/i18nImpl.ts +0 -24
  12. package/front_end/core/protocol_client/CDPConnection.ts +10 -8
  13. package/front_end/core/protocol_client/InspectorBackend.ts +36 -42
  14. package/front_end/core/sdk/AnimationModel.ts +1 -2
  15. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
  16. package/front_end/core/sdk/CSSModel.ts +1 -1
  17. package/front_end/core/sdk/CSSProperty.ts +3 -6
  18. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -4
  19. package/front_end/core/sdk/DebuggerModel.ts +1 -2
  20. package/front_end/core/sdk/EnhancedTracesParser.ts +24 -5
  21. package/front_end/core/sdk/RehydratingConnection.ts +112 -4
  22. package/front_end/core/sdk/RehydratingObject.ts +8 -0
  23. package/front_end/core/sdk/SourceMap.ts +2 -3
  24. package/front_end/core/sdk/TraceObject.ts +5 -1
  25. package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +2 -1
  26. package/front_end/generated/InspectorBackendCommands.js +1 -2
  27. package/front_end/generated/SupportedCSSProperties.js +19 -0
  28. package/front_end/generated/protocol.ts +0 -27
  29. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  30. package/front_end/models/trace/types/File.ts +9 -0
  31. package/front_end/panels/accessibility/AccessibilityNodeView.ts +18 -17
  32. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -12
  33. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -9
  34. package/front_end/panels/ai_assistance/components/ChatView.ts +63 -74
  35. package/front_end/panels/application/AppManifestView.ts +7 -6
  36. package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -4
  37. package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -6
  38. package/front_end/panels/application/OpenedWindowDetailsView.ts +6 -6
  39. package/front_end/panels/application/StorageView.ts +9 -8
  40. package/front_end/panels/application/components/BackForwardCacheView.ts +366 -342
  41. package/front_end/panels/application/components/FrameDetailsView.ts +8 -11
  42. package/front_end/panels/application/components/OriginTrialTreeView.ts +65 -69
  43. package/front_end/panels/application/components/ProtocolHandlersView.ts +3 -2
  44. package/front_end/panels/application/components/backForwardCacheView.css +4 -0
  45. package/front_end/panels/application/components/badge.css +1 -1
  46. package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -1
  47. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +44 -53
  48. package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +8 -8
  49. package/front_end/panels/common/BadgeNotification.ts +2 -1
  50. package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
  51. package/front_end/panels/console/ConsoleInsightTeaser.ts +8 -2
  52. package/front_end/panels/console/ConsolePinPane.ts +12 -7
  53. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +9 -9
  54. package/front_end/panels/elements/ComputedStyleWidget.ts +7 -7
  55. package/front_end/panels/elements/EventListenersWidget.ts +9 -9
  56. package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -6
  57. package/front_end/panels/elements/PlatformFontsWidget.ts +5 -5
  58. package/front_end/panels/elements/PropertiesWidget.ts +8 -8
  59. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
  60. package/front_end/panels/layer_viewer/PaintProfilerView.ts +3 -3
  61. package/front_end/panels/network/RequestCookiesView.ts +2 -1
  62. package/front_end/panels/network/RequestTimingView.ts +2 -1
  63. package/front_end/panels/recorder/RecorderController.ts +33 -23
  64. package/front_end/panels/recorder/components/CreateRecordingView.ts +259 -226
  65. package/front_end/panels/security/CookieControlsView.ts +2 -1
  66. package/front_end/panels/security/CookieReportView.ts +3 -2
  67. package/front_end/panels/settings/AISettingsTab.ts +164 -172
  68. package/front_end/panels/settings/KeybindsSettingsTab.ts +6 -0
  69. package/front_end/panels/settings/SettingsScreen.ts +3 -7
  70. package/front_end/panels/settings/aiSettingsTab.css +151 -148
  71. package/front_end/panels/settings/components/SyncSection.ts +2 -1
  72. package/front_end/panels/settings/settings-meta.ts +1 -2
  73. package/front_end/panels/sources/AddSourceMapURLDialog.ts +23 -26
  74. package/front_end/panels/sources/DebuggerPausedMessage.ts +4 -3
  75. package/front_end/panels/sources/ResourceOriginPlugin.ts +3 -2
  76. package/front_end/panels/sources/SourcesNavigator.ts +2 -1
  77. package/front_end/panels/sources/TabbedEditorContainer.ts +3 -2
  78. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +9 -9
  79. package/front_end/panels/timeline/TimelinePanel.ts +60 -11
  80. package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
  81. package/front_end/panels/timeline/components/DetailsView.ts +5 -4
  82. package/front_end/panels/timeline/components/ExportTraceOptions.ts +33 -34
  83. package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
  84. package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -4
  85. package/front_end/panels/timeline/components/MetricCompareStrings.ts +25 -24
  86. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -1
  87. package/front_end/third_party/chromium/README.chromium +2 -2
  88. package/front_end/third_party/puppeteer/README.chromium +2 -2
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +9 -1
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +2 -2
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +13 -1
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +2 -2
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +5 -2
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -2
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +6 -0
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -0
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +6 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +2 -1
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -2
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -1
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js +3 -1
  132. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts +1 -0
  134. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js +1 -0
  136. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +28 -3
  140. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -10
  141. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -1
  142. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +2 -2
  145. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +13 -1
  150. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +5 -2
  155. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -2
  157. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -1
  159. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
  161. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +6 -0
  163. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -0
  165. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
  167. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +6 -1
  169. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +2 -1
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
  173. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -2
  175. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -1
  177. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  179. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  180. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
  182. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js +2 -2
  184. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts +1 -0
  186. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js +1 -0
  188. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/types.d.ts +28 -3
  192. package/front_end/third_party/puppeteer/package/package.json +2 -2
  193. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
  194. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +7 -2
  195. package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -1
  196. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +8 -5
  197. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +5 -2
  198. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -0
  199. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -2
  200. package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +3 -2
  201. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +5 -5
  202. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  203. package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
  204. package/front_end/third_party/puppeteer/package/src/util/util.ts +1 -0
  205. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  206. package/front_end/ui/components/docs/tooltip/basic.ts +1 -1
  207. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +280 -0
  208. package/front_end/ui/components/text_editor/text_editor.ts +1 -0
  209. package/front_end/ui/components/tooltips/Tooltip.ts +33 -18
  210. package/front_end/ui/i18n/i18n.ts +31 -0
  211. package/front_end/ui/legacy/Dialog.ts +0 -1
  212. package/front_end/ui/legacy/SettingsUI.ts +0 -14
  213. package/front_end/ui/legacy/SoftDropDown.ts +1 -12
  214. package/front_end/ui/legacy/ViewManager.ts +2 -4
  215. package/front_end/ui/legacy/Widget.ts +33 -17
  216. package/front_end/ui/legacy/XLink.ts +0 -3
  217. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +9 -0
  218. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -1
  219. package/front_end/ui/legacy/components/utils/Linkifier.ts +9 -3
  220. package/front_end/ui/legacy/legacy.ts +0 -2
  221. package/front_end/ui/visual_logging/KnownContextValues.ts +4 -1
  222. package/mcp/mcp.ts +6 -0
  223. package/package.json +1 -1
  224. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +0 -4
  225. package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.html +0 -20
  226. package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.ts +0 -25
  227. package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.html +0 -20
  228. package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.ts +0 -36
  229. package/front_end/ui/components/docs/recorder_create_recording_view/basic.html +0 -20
  230. package/front_end/ui/components/docs/recorder_create_recording_view/basic.ts +0 -27
  231. package/front_end/ui/legacy/ThrottledWidget.ts +0 -48
@@ -42,7 +42,7 @@ import * as i18n from '../../core/i18n/i18n.js';
42
42
  import * as Platform from '../../core/platform/platform.js';
43
43
  import * as Root from '../../core/root/root.js';
44
44
  import * as SDK from '../../core/sdk/sdk.js';
45
- import type * as Protocol from '../../generated/protocol.js';
45
+ import * as Protocol from '../../generated/protocol.js';
46
46
  import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
47
47
  import * as Badges from '../../models/badges/badges.js';
48
48
  import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
@@ -1364,7 +1364,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1364
1364
  }
1365
1365
 
1366
1366
  async saveToFile(config: {
1367
- includeScriptContent: boolean,
1367
+ includeResourceContent: boolean,
1368
1368
  includeSourceMaps: boolean,
1369
1369
  /**
1370
1370
  * Includes many things:
@@ -1399,9 +1399,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1399
1399
  if (Trace.Types.Events.isAnyScriptSourceEvent(event) && event.name !== 'StubScriptCatchup') {
1400
1400
  const mappedScript = scriptByIdMap.get(`${event.args.data.isolate}.${event.args.data.scriptId}`);
1401
1401
 
1402
- // If the checkbox to include script content is not checked or if it comes from and
1403
- // extension we dont include the script content.
1404
- if (!config.includeScriptContent ||
1402
+ if (!config.includeResourceContent ||
1405
1403
  (mappedScript?.url && Trace.Helpers.Trace.isExtensionUrl(mappedScript.url))) {
1406
1404
  return {
1407
1405
  cat: event.cat,
@@ -1434,7 +1432,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1434
1432
 
1435
1433
  try {
1436
1434
  await this.innerSaveToFile(traceEvents, metadata, {
1437
- includeScriptContent: config.includeScriptContent,
1435
+ includeResourceContent: config.includeResourceContent,
1438
1436
  includeSourceMaps: config.includeSourceMaps,
1439
1437
  addModifications: config.addModifications,
1440
1438
  shouldCompress: config.shouldCompress,
@@ -1454,7 +1452,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1454
1452
  }
1455
1453
 
1456
1454
  async innerSaveToFile(traceEvents: readonly Trace.Types.Events.Event[], metadata: Trace.Types.File.MetaData, config: {
1457
- includeScriptContent: boolean,
1455
+ includeResourceContent: boolean,
1458
1456
  includeSourceMaps: boolean,
1459
1457
  addModifications: boolean,
1460
1458
  shouldCompress: boolean,
@@ -1464,9 +1462,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1464
1462
  Platform.DateUtilities.toISO8601Compact(metadata.startTime ? new Date(metadata.startTime) : new Date());
1465
1463
 
1466
1464
  const isCpuProfile = metadata.dataOrigin === Trace.Types.File.DataOrigin.CPU_PROFILE;
1467
- const {includeScriptContent, includeSourceMaps} = config;
1465
+ const {includeResourceContent, includeSourceMaps} = config;
1468
1466
  metadata.enhancedTraceVersion =
1469
- includeScriptContent ? SDK.EnhancedTracesParser.EnhancedTracesParser.enhancedTraceVersion : undefined;
1467
+ includeResourceContent ? SDK.EnhancedTracesParser.EnhancedTracesParser.enhancedTraceVersion : undefined;
1470
1468
 
1471
1469
  let fileName =
1472
1470
  (isCpuProfile ? `CPU-${isoDate}.cpuprofile` : `Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
@@ -1477,10 +1475,12 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1477
1475
  blobParts = [JSON.stringify(profile)];
1478
1476
  } else {
1479
1477
  const filteredMetadataSourceMaps =
1480
- includeScriptContent && includeSourceMaps ? this.#filterMetadataSourceMaps(metadata) : undefined;
1478
+ includeResourceContent && includeSourceMaps ? this.#filterMetadataSourceMaps(metadata) : undefined;
1479
+ const filteredResources = includeResourceContent ? this.#filterMetadataResoures(metadata) : undefined;
1481
1480
  const formattedTraceIter = traceJsonGenerator(traceEvents, {
1482
1481
  ...metadata,
1483
1482
  sourceMaps: filteredMetadataSourceMaps,
1483
+ resources: filteredResources,
1484
1484
  });
1485
1485
  blobParts = Array.from(formattedTraceIter);
1486
1486
  }
@@ -1531,7 +1531,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1531
1531
  this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions;
1532
1532
  const state = exportTraceOptionsElement.state;
1533
1533
  await this.saveToFile({
1534
- includeScriptContent: state.includeScriptContent,
1534
+ includeResourceContent: state.includeResourceContent,
1535
1535
  includeSourceMaps: state.includeSourceMaps,
1536
1536
  addModifications: state.includeAnnotations,
1537
1537
  shouldCompress: state.shouldCompress,
@@ -1550,6 +1550,14 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1550
1550
  });
1551
1551
  }
1552
1552
 
1553
+ #filterMetadataResoures(metadata: Trace.Types.File.MetaData): Trace.Types.File.MetadataResource[]|undefined {
1554
+ if (!metadata.resources) {
1555
+ return undefined;
1556
+ }
1557
+
1558
+ return metadata.resources;
1559
+ }
1560
+
1553
1561
  #showExportTraceErrorDialog(error: Error): void {
1554
1562
  if (this.statusDialog) {
1555
1563
  this.statusDialog.remove();
@@ -2744,6 +2752,45 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2744
2752
  };
2745
2753
  }
2746
2754
 
2755
+ async #retainResourceContentsForEnhancedTrace(
2756
+ parsedTrace: Trace.TraceModel.ParsedTrace, metadata: Trace.Types.File.MetaData): Promise<void> {
2757
+ // Scripts are already stored as trace events.
2758
+ const resourceTypesToRetain =
2759
+ new Set([Protocol.Network.ResourceType.Document, Protocol.Network.ResourceType.Stylesheet]);
2760
+
2761
+ for (const request of parsedTrace.data.NetworkRequests.byId.values()) {
2762
+ if (!resourceTypesToRetain.has(request.args.data.resourceType)) {
2763
+ continue;
2764
+ }
2765
+
2766
+ const url = request.args.data.url as Platform.DevToolsPath.UrlString;
2767
+ const resource = SDK.ResourceTreeModel.ResourceTreeModel.resourceForURL(url);
2768
+ if (!resource) {
2769
+ continue;
2770
+ }
2771
+
2772
+ const content = await resource.requestContentData();
2773
+ if ('error' in content) {
2774
+ continue;
2775
+ }
2776
+
2777
+ if (!content.isTextContent) {
2778
+ continue;
2779
+ }
2780
+
2781
+ if (!metadata.resources) {
2782
+ metadata.resources = [];
2783
+ }
2784
+
2785
+ metadata.resources.push({
2786
+ url,
2787
+ frame: resource.frameId ?? '',
2788
+ content: content.text,
2789
+ mimeType: content.mimeType,
2790
+ });
2791
+ }
2792
+ }
2793
+
2747
2794
  async #executeNewTrace(
2748
2795
  collectedEvents: Trace.Types.Events.Event[], isFreshRecording: boolean,
2749
2796
  metadata: Trace.Types.File.MetaData|null): Promise<void> {
@@ -2772,11 +2819,13 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2772
2819
 
2773
2820
  // Store all source maps on the trace metadata.
2774
2821
  // If not fresh, we can't validate the maps are still accurate.
2822
+ // Also handle HTML content.
2775
2823
  if (isFreshRecording && metadata) {
2776
2824
  const traceIndex = this.#traceEngineModel.lastTraceIndex();
2777
2825
  const parsedTrace = this.#traceEngineModel.parsedTrace(traceIndex);
2778
2826
  if (parsedTrace) {
2779
2827
  await this.#retainSourceMapsForEnhancedTrace(parsedTrace, metadata);
2828
+ await this.#retainResourceContentsForEnhancedTrace(parsedTrace, metadata);
2780
2829
  }
2781
2830
  }
2782
2831
  }
@@ -48,6 +48,7 @@ import * as Tracing from '../../services/tracing/tracing.js';
48
48
  import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
49
49
  // eslint-disable-next-line @devtools/es-modules-import
50
50
  import codeHighlighterStyles from '../../ui/components/code_highlighter/codeHighlighter.css.js';
51
+ import * as uiI18n from '../../ui/i18n/i18n.js';
51
52
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
52
53
  // eslint-disable-next-line @devtools/es-modules-import
53
54
  import imagePreviewStyles from '../../ui/legacy/components/utils/imagePreview.css.js';
@@ -1899,7 +1900,7 @@ export class TimelineUIUtils {
1899
1900
  const niceNodeLink = createLinkForInvalidationNode(invalidation);
1900
1901
 
1901
1902
  const text = scriptLink ?
1902
- i18n.i18n.getFormatLocalizedString(
1903
+ uiI18n.getFormatLocalizedString(
1903
1904
  str_, UIStrings.invalidationWithCallFrame, {PH1: niceNodeLink, PH2: scriptLink}) as HTMLElement :
1904
1905
  niceNodeLink;
1905
1906
 
@@ -2207,7 +2208,7 @@ export class TimelineUIUtils {
2207
2208
  PH1: i18n.TimeUtilities.millisToString(durationMilli, true),
2208
2209
  PH2: i18n.TimeUtilities.millisToString(offsetMilli, true),
2209
2210
  });
2210
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.emptyPlaceholder, {PH1: durationText});
2211
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.emptyPlaceholder, {PH1: durationText});
2211
2212
  }
2212
2213
 
2213
2214
  static quadWidth(quad: number[]): number {
@@ -7,6 +7,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
7
7
  import * as Platform from '../../../core/platform/platform.js';
8
8
  import type * as Protocol from '../../../generated/protocol.js';
9
9
  import * as Trace from '../../../models/trace/trace.js';
10
+ import * as uiI18n from '../../../ui/i18n/i18n.js';
10
11
  import * as UI from '../../../ui/legacy/legacy.js';
11
12
 
12
13
  // *********************************************************************
@@ -86,8 +87,8 @@ export function buildWarningElementsForEvent(
86
87
  const forcedReflowLink = UI.XLink.XLink.create(
87
88
  'https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts',
88
89
  i18nString(UIStrings.forcedReflow), undefined, undefined, 'forced-reflow');
89
- span.appendChild(i18n.i18n.getFormatLocalizedString(
90
- str_, UIStrings.sIsALikelyPerformanceBottleneck, {PH1: forcedReflowLink}));
90
+ span.appendChild(
91
+ uiI18n.getFormatLocalizedString(str_, UIStrings.sIsALikelyPerformanceBottleneck, {PH1: forcedReflowLink}));
91
92
  break;
92
93
  }
93
94
  case 'IDLE_CALLBACK_OVER_TIME': {
@@ -103,7 +104,7 @@ export function buildWarningElementsForEvent(
103
104
  case 'LONG_TASK': {
104
105
  const longTaskLink = UI.XLink.XLink.create(
105
106
  'https://web.dev/optimize-long-tasks/', i18nString(UIStrings.longTask), undefined, undefined, 'long-tasks');
106
- span.appendChild(i18n.i18n.getFormatLocalizedString(
107
+ span.appendChild(uiI18n.getFormatLocalizedString(
107
108
  str_, UIStrings.sTookS,
108
109
  {PH1: longTaskLink, PH2: i18n.TimeUtilities.millisToString((duration || 0), true)}));
109
110
  break;
@@ -111,7 +112,7 @@ export function buildWarningElementsForEvent(
111
112
  case 'LONG_INTERACTION': {
112
113
  const longInteractionINPLink = UI.XLink.XLink.create(
113
114
  'https://web.dev/inp', i18nString(UIStrings.longInteractionINP), undefined, undefined, 'long-interaction');
114
- span.appendChild(i18n.i18n.getFormatLocalizedString(
115
+ span.appendChild(uiI18n.getFormatLocalizedString(
115
116
  str_, UIStrings.sIsLikelyPoorPageResponsiveness, {PH1: longInteractionINPLink}));
116
117
  break;
117
118
  }
@@ -31,7 +31,7 @@ const UIStrings = {
31
31
  /**
32
32
  * @description Text for the include script content option.
33
33
  */
34
- includeScriptContent: 'Include script content',
34
+ includeResourceContent: 'Include resource content',
35
35
  /**
36
36
  * @description Text for the include script source maps option.
37
37
  */
@@ -49,9 +49,9 @@ const UIStrings = {
49
49
  */
50
50
  saveButtonTitle: 'Save',
51
51
  /**
52
- * @description Text shown in the information pop-up next to the "Include script content" option.
52
+ * @description Text shown in the information pop-up next to the "Include resource content" option.
53
53
  */
54
- scriptContentPrivacyInfo: 'Includes the full content of all loaded scripts (except extensions).',
54
+ resourceContentPrivacyInfo: 'Includes the full content of all loaded HTML, CSS, and scripts (except extensions).',
55
55
  /**
56
56
  * @description Text shown in the information pop-up next to the "Include script sourcemaps" option.
57
57
  */
@@ -67,7 +67,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
67
67
 
68
68
  export interface ExportTraceOptionsData {
69
69
  onExport: (config: {
70
- includeScriptContent: boolean,
70
+ includeResourceContent: boolean,
71
71
  includeSourceMaps: boolean,
72
72
  addModifications: boolean,
73
73
  shouldCompress: boolean,
@@ -80,30 +80,30 @@ export type ExportTraceDialogState = Dialogs.Dialog.DialogState;
80
80
  export interface ExportTraceOptionsState {
81
81
  dialogState: ExportTraceDialogState;
82
82
  includeAnnotations: boolean;
83
- includeScriptContent: boolean;
83
+ includeResourceContent: boolean;
84
84
  includeSourceMaps: boolean;
85
85
  shouldCompress: boolean;
86
86
  displayAnnotationsCheckbox?: boolean;
87
- displayScriptContentCheckbox?: boolean;
87
+ displayResourceContentCheckbox?: boolean;
88
88
  displaySourceMapsCheckbox?: boolean;
89
89
  }
90
90
 
91
- type CheckboxId = 'annotations'|'script-content'|'script-source-maps'|'compress-with-gzip';
92
- const checkboxesWithInfoDialog = new Set<CheckboxId>(['script-content', 'script-source-maps']);
91
+ type CheckboxId = 'annotations'|'resource-content'|'script-source-maps'|'compress-with-gzip';
92
+ const checkboxesWithInfoDialog = new Set<CheckboxId>(['resource-content', 'script-source-maps']);
93
93
 
94
94
  export class ExportTraceOptions extends HTMLElement {
95
95
  readonly #shadow = this.attachShadow({mode: 'open'});
96
96
  #data: ExportTraceOptionsData|null = null;
97
97
 
98
98
  static readonly #includeAnnotationsSettingString: string = 'export-performance-trace-include-annotations';
99
- static readonly #includeScriptContentSettingString: string = 'export-performance-trace-include-scripts';
99
+ static readonly #includeResourceContentSettingString: string = 'export-performance-trace-include-resources';
100
100
  static readonly #includeSourceMapsSettingString: string = 'export-performance-trace-include-sourcemaps';
101
101
  static readonly #shouldCompressSettingString: string = 'export-performance-trace-should-compress';
102
102
 
103
103
  #includeAnnotationsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
104
104
  ExportTraceOptions.#includeAnnotationsSettingString, true, Common.Settings.SettingStorageType.SESSION);
105
- #includeScriptContentSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
106
- ExportTraceOptions.#includeScriptContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
105
+ #includeResourceContentSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
106
+ ExportTraceOptions.#includeResourceContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
107
107
  #includeSourceMapsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
108
108
  ExportTraceOptions.#includeSourceMapsSettingString, false, Common.Settings.SettingStorageType.SESSION);
109
109
  #shouldCompressSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
@@ -112,7 +112,7 @@ export class ExportTraceOptions extends HTMLElement {
112
112
  #state: ExportTraceOptionsState = {
113
113
  dialogState: Dialogs.Dialog.DialogState.COLLAPSED,
114
114
  includeAnnotations: this.#includeAnnotationsSetting.get(),
115
- includeScriptContent: this.#includeScriptContentSetting.get(),
115
+ includeResourceContent: this.#includeResourceContentSetting.get(),
116
116
  includeSourceMaps: this.#includeSourceMapsSetting.get(),
117
117
  shouldCompress: this.#shouldCompressSetting.get(),
118
118
  };
@@ -121,10 +121,10 @@ export class ExportTraceOptions extends HTMLElement {
121
121
  /* title*/ i18nString(UIStrings.includeAnnotations), /* checked*/ this.#state.includeAnnotations,
122
122
  /* subtitle*/ undefined,
123
123
  /* jslogContext*/ 'timeline.export-trace-options.annotations-checkbox');
124
- #includeScriptContentCheckbox = UI.UIUtils.CheckboxLabel.create(
125
- /* title*/ i18nString(UIStrings.includeScriptContent), /* checked*/ this.#state.includeScriptContent,
124
+ #includeResourceContentCheckbox = UI.UIUtils.CheckboxLabel.create(
125
+ /* title*/ i18nString(UIStrings.includeResourceContent), /* checked*/ this.#state.includeResourceContent,
126
126
  /* subtitle*/ undefined,
127
- /* jslogContext*/ 'timeline.export-trace-options.script-content-checkbox');
127
+ /* jslogContext*/ 'timeline.export-trace-options.resource-content-checkbox');
128
128
  #includeSourceMapsCheckbox = UI.UIUtils.CheckboxLabel.create(
129
129
  /* title*/ i18nString(UIStrings.includeSourcemap), /* checked*/ this.#state.includeSourceMaps,
130
130
  /* subtitle*/ undefined,
@@ -142,7 +142,7 @@ export class ExportTraceOptions extends HTMLElement {
142
142
  set state(state: ExportTraceOptionsState) {
143
143
  this.#state = state;
144
144
  this.#includeAnnotationsSetting.set(state.includeAnnotations);
145
- this.#includeScriptContentSetting.set(state.includeScriptContent);
145
+ this.#includeResourceContentSetting.set(state.includeResourceContent);
146
146
  this.#includeSourceMapsSetting.set(state.includeSourceMaps);
147
147
  this.#shouldCompressSetting.set(state.shouldCompress);
148
148
 
@@ -154,13 +154,12 @@ export class ExportTraceOptions extends HTMLElement {
154
154
  }
155
155
 
156
156
  updateContentVisibility(options: {annotationsExist: boolean}): void {
157
- const newState = Object.assign({}, this.#state, {
157
+ this.state = {
158
+ ...this.#state,
158
159
  displayAnnotationsCheckbox: options.annotationsExist,
159
- displayScriptContentCheckbox: true,
160
+ displayResourceContentCheckbox: true,
160
161
  displaySourceMapsCheckbox: true
161
- });
162
-
163
- this.state = newState;
162
+ };
164
163
  }
165
164
 
166
165
  #scheduleRender(): void {
@@ -175,11 +174,11 @@ export class ExportTraceOptions extends HTMLElement {
175
174
  newState.includeAnnotations = checked;
176
175
  break;
177
176
  }
178
- case this.#includeScriptContentCheckbox: {
179
- newState.includeScriptContent = checked;
177
+ case this.#includeResourceContentCheckbox: {
178
+ newState.includeResourceContent = checked;
180
179
 
181
180
  // if the `Include Script` is checked off, cascade the change to `Include Script Source`
182
- if (!newState.includeScriptContent) {
181
+ if (!newState.includeResourceContent) {
183
182
  newState.includeSourceMaps = false;
184
183
  }
185
184
 
@@ -203,8 +202,8 @@ export class ExportTraceOptions extends HTMLElement {
203
202
  return i18nString(UIStrings.moreInfoLabel) + ' ' + i18nString(UIStrings.sourceMapsContentPrivacyInfo);
204
203
  }
205
204
 
206
- if (checkboxId === 'script-content') {
207
- return i18nString(UIStrings.moreInfoLabel) + ' ' + i18nString(UIStrings.scriptContentPrivacyInfo);
205
+ if (checkboxId === 'resource-content') {
206
+ return i18nString(UIStrings.moreInfoLabel) + ' ' + i18nString(UIStrings.resourceContentPrivacyInfo);
208
207
  }
209
208
 
210
209
  return '';
@@ -219,7 +218,7 @@ export class ExportTraceOptions extends HTMLElement {
219
218
  'change', this.#checkboxOptionChanged.bind(this, checkboxWithLabel, !checked), false);
220
219
 
221
220
  // Disable the includeSourceMapsSetting when the includeScriptContentSetting is also disabled.
222
- this.#includeSourceMapsCheckbox.disabled = !this.#state.includeScriptContent;
221
+ this.#includeSourceMapsCheckbox.disabled = !this.#state.includeResourceContent;
223
222
 
224
223
  // clang-format off
225
224
  return html`
@@ -252,7 +251,7 @@ export class ExportTraceOptions extends HTMLElement {
252
251
  >
253
252
  <div class="info-tooltip-container">
254
253
  <p>
255
- ${checkboxId === 'script-content' ? i18nString(UIStrings.scriptContentPrivacyInfo) : Lit.nothing}
254
+ ${checkboxId === 'resource-content' ? i18nString(UIStrings.resourceContentPrivacyInfo) : Lit.nothing}
256
255
  ${checkboxId === 'script-source-maps' ? i18nString(UIStrings.sourceMapsContentPrivacyInfo) : Lit.nothing}
257
256
  </p>
258
257
  </div>
@@ -287,9 +286,9 @@ export class ExportTraceOptions extends HTMLElement {
287
286
  ${this.#state.displayAnnotationsCheckbox ? this.#renderCheckbox('annotations', this.#includeAnnotationsCheckbox,
288
287
  i18nString(UIStrings.includeAnnotations),
289
288
  this.#state.includeAnnotations): ''}
290
- ${this.#state.displayScriptContentCheckbox ? this.#renderCheckbox('script-content', this.#includeScriptContentCheckbox,
291
- i18nString(UIStrings.includeScriptContent), this.#state.includeScriptContent): ''}
292
- ${this.#state.displayScriptContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderCheckbox(
289
+ ${this.#state.displayResourceContentCheckbox ? this.#renderCheckbox('resource-content', this.#includeResourceContentCheckbox,
290
+ i18nString(UIStrings.includeResourceContent), this.#state.includeResourceContent): ''}
291
+ ${this.#state.displayResourceContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderCheckbox(
293
292
  'script-source-maps',
294
293
  this.#includeSourceMapsCheckbox, i18nString(UIStrings.includeSourcemap), this.#state.includeSourceMaps): ''}
295
294
  ${this.#renderCheckbox('compress-with-gzip', this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
@@ -303,8 +302,8 @@ export class ExportTraceOptions extends HTMLElement {
303
302
  } as Buttons.Button.ButtonData}
304
303
  >${i18nString(UIStrings.saveButtonTitle)}</devtools-button>
305
304
  </div>
306
- ${this.#state.displayScriptContentCheckbox ? this.#renderInfoTooltip('script-content') : Lit.nothing}
307
- ${this.#state.displayScriptContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderInfoTooltip('script-source-maps') : Lit.nothing}
305
+ ${this.#state.displayResourceContentCheckbox ? this.#renderInfoTooltip('resource-content') : Lit.nothing}
306
+ ${this.#state.displayResourceContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderInfoTooltip('script-source-maps') : Lit.nothing}
308
307
  </div>
309
308
  </devtools-button-dialog>
310
309
  `;
@@ -319,7 +318,7 @@ export class ExportTraceOptions extends HTMLElement {
319
318
  async #onExportCallback(): Promise<void> {
320
319
  // Calls passed onExport function with current settings.
321
320
  await this.#data?.onExport({
322
- includeScriptContent: this.#state.includeScriptContent,
321
+ includeResourceContent: this.#state.includeResourceContent,
323
322
  includeSourceMaps: this.#state.includeSourceMaps,
324
323
  // Note: this also includes track configuration ...
325
324
  addModifications: this.#state.includeAnnotations,
@@ -11,6 +11,7 @@ import * as Buttons from '../../../ui/components/buttons/buttons.js';
11
11
  import * as Dialogs from '../../../ui/components/dialogs/dialogs.js';
12
12
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
13
13
  import * as Input from '../../../ui/components/input/input.js';
14
+ import * as uiI18n from '../../../ui/i18n/i18n.js';
14
15
  import * as UI from '../../../ui/legacy/legacy.js';
15
16
  import * as Lit from '../../../ui/lit/lit.js';
16
17
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
@@ -331,7 +332,7 @@ export class FieldSettingsDialog extends HTMLElement {
331
332
  #render = (): void => {
332
333
  const linkEl =
333
334
  UI.XLink.XLink.create('https://developer.chrome.com/docs/crux', i18n.i18n.lockedString('Chrome UX Report'));
334
- const descriptionEl = i18n.i18n.getFormatLocalizedString(str_, UIStrings.fetchAggregated, {PH1: linkEl});
335
+ const descriptionEl = uiI18n.getFormatLocalizedString(str_, UIStrings.fetchAggregated, {PH1: linkEl});
335
336
 
336
337
  // clang-format off
337
338
  const output = html`
@@ -25,6 +25,7 @@ import * as LegacyWrapper from '../../../ui/components/legacy_wrapper/legacy_wra
25
25
  import type * as Menus from '../../../ui/components/menus/menus.js';
26
26
  import * as RenderCoordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
27
27
  import type * as Settings from '../../../ui/components/settings/settings.js';
28
+ import * as uiI18n from '../../../ui/i18n/i18n.js';
28
29
  import * as UI from '../../../ui/legacy/legacy.js';
29
30
  import * as Lit from '../../../ui/lit/lit.js';
30
31
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
@@ -629,8 +630,8 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
629
630
  <div class="device-toolbar-description">${md(i18nString(UIStrings.useDeviceToolbar))}</div>
630
631
  ${fieldEnabled ? html`
631
632
  <ul class="environment-recs-list">
632
- <li>${i18n.i18n.getFormatLocalizedString(str_, UIStrings.device, {PH1: deviceRecEl})}</li>
633
- <li>${i18n.i18n.getFormatLocalizedString(str_, UIStrings.network, {PH1: networkRecEl})}</li>
633
+ <li>${uiI18n.getFormatLocalizedString(str_, UIStrings.device, {PH1: deviceRecEl})}</li>
634
+ <li>${uiI18n.getFormatLocalizedString(str_, UIStrings.network, {PH1: networkRecEl})}</li>
634
635
  </ul>
635
636
  ` : nothing}
636
637
  <div class="environment-option">
@@ -839,7 +840,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
839
840
  dateEl.classList.add('collection-period-range');
840
841
  dateEl.textContent = range || i18nString(UIStrings.notEnoughData);
841
842
 
842
- const message = i18n.i18n.getFormatLocalizedString(str_, UIStrings.collectionPeriod, {
843
+ const message = uiI18n.getFormatLocalizedString(str_, UIStrings.collectionPeriod, {
843
844
  PH1: dateEl,
844
845
  });
845
846
 
@@ -862,7 +863,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
862
863
 
863
864
  const linkEl =
864
865
  UI.XLink.XLink.create('https://developer.chrome.com/docs/crux', i18n.i18n.lockedString('Chrome UX Report'));
865
- const messageEl = i18n.i18n.getFormatLocalizedString(str_, UIStrings.seeHowYourLocalMetricsCompare, {PH1: linkEl});
866
+ const messageEl = uiI18n.getFormatLocalizedString(str_, UIStrings.seeHowYourLocalMetricsCompare, {PH1: linkEl});
866
867
 
867
868
  return html`
868
869
  <div class="field-data-message">${messageEl}</div>
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
+ import * as uiI18n from '../../../ui/i18n/i18n.js';
6
7
 
7
8
  import type {MetricRating} from './Utils.js';
8
9
 
@@ -185,40 +186,40 @@ export function renderCompareText(
185
186
  };
186
187
 
187
188
  if (rating === 'good' && compare === 'better') {
188
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodBetterCompare, values);
189
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodBetterCompare, values);
189
190
  }
190
191
  if (rating === 'good' && compare === 'worse') {
191
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodWorseCompare, values);
192
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodWorseCompare, values);
192
193
  }
193
194
  if (rating === 'good' && compare === 'similar') {
194
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodSimilarCompare, values);
195
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodSimilarCompare, values);
195
196
  }
196
197
  if (rating === 'good' && !compare) {
197
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodSummarized, values);
198
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodSummarized, values);
198
199
  }
199
200
  if (rating === 'needs-improvement' && compare === 'better') {
200
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementBetterCompare, values);
201
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementBetterCompare, values);
201
202
  }
202
203
  if (rating === 'needs-improvement' && compare === 'worse') {
203
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementWorseCompare, values);
204
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementWorseCompare, values);
204
205
  }
205
206
  if (rating === 'needs-improvement' && compare === 'similar') {
206
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSimilarCompare, values);
207
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSimilarCompare, values);
207
208
  }
208
209
  if (rating === 'needs-improvement' && !compare) {
209
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSummarized, values);
210
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSummarized, values);
210
211
  }
211
212
  if (rating === 'poor' && compare === 'better') {
212
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorBetterCompare, values);
213
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorBetterCompare, values);
213
214
  }
214
215
  if (rating === 'poor' && compare === 'worse') {
215
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorWorseCompare, values);
216
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorWorseCompare, values);
216
217
  }
217
218
  if (rating === 'poor' && compare === 'similar') {
218
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorSimilarCompare, values);
219
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorSimilarCompare, values);
219
220
  }
220
221
  if (rating === 'poor' && !compare) {
221
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorSummarized, values);
222
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorSummarized, values);
222
223
  }
223
224
 
224
225
  throw new Error('Compare string not found');
@@ -241,40 +242,40 @@ export function renderDetailedCompareText(options: {
241
242
  };
242
243
 
243
244
  if (localRating === 'good' && fieldRating === 'good') {
244
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodGoodDetailedCompare, values);
245
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodGoodDetailedCompare, values);
245
246
  }
246
247
  if (localRating === 'good' && fieldRating === 'needs-improvement') {
247
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodNeedsImprovementDetailedCompare, values);
248
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodNeedsImprovementDetailedCompare, values);
248
249
  }
249
250
  if (localRating === 'good' && fieldRating === 'poor') {
250
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodPoorDetailedCompare, values);
251
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodPoorDetailedCompare, values);
251
252
  }
252
253
  if (localRating === 'good' && !fieldRating) {
253
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.goodSummarized, values);
254
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.goodSummarized, values);
254
255
  }
255
256
  if (localRating === 'needs-improvement' && fieldRating === 'good') {
256
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementGoodDetailedCompare, values);
257
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementGoodDetailedCompare, values);
257
258
  }
258
259
  if (localRating === 'needs-improvement' && fieldRating === 'needs-improvement') {
259
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementNeedsImprovementDetailedCompare, values);
260
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementNeedsImprovementDetailedCompare, values);
260
261
  }
261
262
  if (localRating === 'needs-improvement' && fieldRating === 'poor') {
262
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementPoorDetailedCompare, values);
263
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementPoorDetailedCompare, values);
263
264
  }
264
265
  if (localRating === 'needs-improvement' && !fieldRating) {
265
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSummarized, values);
266
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSummarized, values);
266
267
  }
267
268
  if (localRating === 'poor' && fieldRating === 'good') {
268
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorGoodDetailedCompare, values);
269
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorGoodDetailedCompare, values);
269
270
  }
270
271
  if (localRating === 'poor' && fieldRating === 'needs-improvement') {
271
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorNeedsImprovementDetailedCompare, values);
272
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorNeedsImprovementDetailedCompare, values);
272
273
  }
273
274
  if (localRating === 'poor' && fieldRating === 'poor') {
274
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorPoorDetailedCompare, values);
275
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorPoorDetailedCompare, values);
275
276
  }
276
277
  if (localRating === 'poor' && !fieldRating) {
277
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.poorSummarized, values);
278
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.poorSummarized, values);
278
279
  }
279
280
 
280
281
  throw new Error('Detailed compare string not found');
@@ -8,6 +8,7 @@ import './Checklist.js';
8
8
  import * as i18n from '../../../../core/i18n/i18n.js';
9
9
  import type {LCPDiscoveryInsightModel} from '../../../../models/trace/insights/LCPDiscovery.js';
10
10
  import * as Trace from '../../../../models/trace/trace.js';
11
+ import * as uiI18n from '../../../../ui/i18n/i18n.js';
11
12
  import * as Lit from '../../../../ui/lit/lit.js';
12
13
 
13
14
  import {BaseInsightComponent} from './BaseInsightComponent.js';
@@ -63,7 +64,7 @@ export class LCPDiscovery extends BaseInsightComponent<LCPDiscoveryInsightModel>
63
64
  const timeWrapper = document.createElement('span');
64
65
  timeWrapper.classList.add('discovery-time-ms');
65
66
  timeWrapper.innerText = i18n.TimeUtilities.formatMicroSecondsAsMillisFixed(delay);
66
- return i18n.i18n.getFormatLocalizedString(str_, UIStrings.lcpLoadDelay, {PH1: timeWrapper});
67
+ return uiI18n.getFormatLocalizedString(str_, UIStrings.lcpLoadDelay, {PH1: timeWrapper});
67
68
  }
68
69
 
69
70
  override renderContent(): Lit.LitTemplate {
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
- URL: https://source.chromium.org/chromium/chromium/src/+/main:components/variations/proto/devtools/
2
+ URL: https://chromium.googlesource.com/chromium/src
3
3
  Version: N/A
4
- Revision: c7f689c4ea24e98a4a1e06c78b10633db5a9f78f
4
+ Revision: 5ea04b0081c4e9801ea4b74784e39ff75c8c7abb
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -1,10 +1,10 @@
1
1
  Name: Puppeteer Core
2
2
  Short Name: Puppeteer Core
3
3
  URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
4
- Version: 24.26.1
4
+ Version: 24.27.0
5
5
  License: Apache-2.0
6
6
  License File: LICENSE
7
- Revision: 6e2348c27e3493e53b609122888e0950d342e4d2
7
+ Revision: f73ebcde308687cd3f8d44596371a02c86626fd6
8
8
  Security Critical: no
9
9
  Shipped: yes
10
10
  Update Mechanism: Autoroll
@@ -136,6 +136,14 @@ export interface BrowserEvents extends Record<EventType, unknown> {
136
136
  export interface DebugInfo {
137
137
  pendingProtocolErrors: Error[];
138
138
  }
139
+ /**
140
+ * @public
141
+ */
142
+ export type CreatePageOptions = {
143
+ type: 'tab';
144
+ } | {
145
+ type: 'window';
146
+ };
139
147
  /**
140
148
  * {@link Browser} represents a browser instance that is either:
141
149
  *
@@ -240,7 +248,7 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
240
248
  * Creates a new {@link Page | page} in the
241
249
  * {@link Browser.defaultBrowserContext | default browser context}.
242
250
  */
243
- abstract newPage(): Promise<Page>;
251
+ abstract newPage(options?: CreatePageOptions): Promise<Page>;
244
252
  /**
245
253
  * Gets all active {@link Target | targets}.
246
254
  *