chrome-devtools-frontend 1.0.1515796 → 1.0.1516909

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 (163) hide show
  1. package/docs/contributing/infrastructure.md +131 -82
  2. package/front_end/Tests.js +3 -29
  3. package/front_end/core/common/Progress.ts +73 -55
  4. package/front_end/core/host/GdpClient.ts +1 -1
  5. package/front_end/core/host/UserMetrics.ts +5 -2
  6. package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
  7. package/front_end/core/root/Runtime.ts +0 -1
  8. package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
  9. package/front_end/core/sdk/CSSModel.ts +1 -31
  10. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
  11. package/front_end/core/sdk/DebuggerModel.ts +1 -31
  12. package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
  13. package/front_end/core/sdk/NetworkManager.ts +1 -31
  14. package/front_end/core/sdk/NetworkRequest.ts +1 -31
  15. package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
  16. package/front_end/core/sdk/RehydratingConnection.ts +13 -18
  17. package/front_end/core/sdk/RehydratingObject.ts +8 -31
  18. package/front_end/core/sdk/RemoteObject.ts +1 -31
  19. package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
  20. package/front_end/core/sdk/RuntimeModel.ts +1 -31
  21. package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
  22. package/front_end/core/sdk/SourceMap.ts +1 -31
  23. package/front_end/core/sdk/TraceObject.ts +8 -3
  24. package/front_end/entrypoints/main/MainImpl.ts +1 -3
  25. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
  26. package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
  27. package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
  28. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +110 -76
  29. package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
  30. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
  31. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
  32. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
  33. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +100 -100
  34. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
  35. package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
  36. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +24 -8
  37. package/front_end/models/badges/UserBadges.ts +38 -3
  38. package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
  39. package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
  40. package/front_end/models/formatter/FormatterWorkerPool.ts +3 -3
  41. package/front_end/models/har/Writer.ts +11 -11
  42. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
  43. package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
  44. package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
  45. package/front_end/models/persistence/PersistenceImpl.ts +8 -8
  46. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  47. package/front_end/models/trace/ModelImpl.ts +2 -16
  48. package/front_end/models/trace/Processor.ts +15 -9
  49. package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
  50. package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
  51. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
  52. package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
  53. package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
  54. package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
  55. package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
  56. package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
  57. package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
  58. package/front_end/models/trace/insights/DocumentLatency.ts +3 -4
  59. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
  60. package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
  61. package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
  62. package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
  63. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  64. package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
  65. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
  66. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  67. package/front_end/models/trace/insights/types.ts +2 -0
  68. package/front_end/models/trace/types/TraceEvents.ts +41 -64
  69. package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
  70. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
  71. package/front_end/panels/application/ServiceWorkersView.ts +0 -1
  72. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
  73. package/front_end/panels/common/BadgeNotification.ts +46 -10
  74. package/front_end/panels/common/GdpSignUpDialog.ts +6 -3
  75. package/front_end/panels/console/ConsoleView.ts +23 -28
  76. package/front_end/panels/console/ConsoleViewport.ts +2 -2
  77. package/front_end/panels/console/consoleView.css +11 -1
  78. package/front_end/panels/coverage/CoverageView.ts +2 -2
  79. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -2
  80. package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
  81. package/front_end/panels/elements/LayoutPane.ts +1 -1
  82. package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
  83. package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
  84. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  85. package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
  86. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  87. package/front_end/panels/layers/LayerTreeModel.ts +3 -3
  88. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
  89. package/front_end/panels/network/NetworkLogView.ts +6 -2
  90. package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
  91. package/front_end/panels/network/NetworkSearchScope.ts +6 -6
  92. package/front_end/panels/search/SearchResultsPane.ts +32 -47
  93. package/front_end/panels/search/SearchView.ts +58 -80
  94. package/front_end/panels/settings/components/SyncSection.ts +7 -2
  95. package/front_end/panels/sources/OutlineQuickOpen.ts +3 -1
  96. package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
  97. package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
  98. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
  99. package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
  100. package/front_end/panels/timeline/TimelinePanel.ts +41 -22
  101. package/front_end/panels/timeline/TimelineUIUtils.ts +13 -8
  102. package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
  103. package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
  104. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
  105. package/front_end/third_party/axe-core/README.chromium +1 -0
  106. package/front_end/third_party/codemirror/README.chromium +1 -0
  107. package/front_end/third_party/codemirror.next/README.chromium +1 -0
  108. package/front_end/third_party/csp_evaluator/README.chromium +1 -0
  109. package/front_end/third_party/diff/README.chromium +1 -0
  110. package/front_end/third_party/i18n/README.chromium +1 -0
  111. package/front_end/third_party/intl-messageformat/README.chromium +1 -0
  112. package/front_end/third_party/json5/README.chromium +1 -0
  113. package/front_end/third_party/legacy-javascript/README.chromium +1 -0
  114. package/front_end/third_party/lighthouse/README.chromium +1 -0
  115. package/front_end/third_party/lit/README.chromium +1 -0
  116. package/front_end/third_party/marked/README.chromium +1 -0
  117. package/front_end/third_party/puppeteer/README.chromium +2 -2
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +0 -20
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  128. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +2 -23
  129. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +0 -20
  130. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  136. package/front_end/third_party/puppeteer/package/package.json +1 -1
  137. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -21
  138. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  139. package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
  140. package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
  141. package/front_end/third_party/third-party-web/README.chromium +1 -0
  142. package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
  143. package/front_end/third_party/wasmparser/README.chromium +1 -0
  144. package/front_end/third_party/web-vitals/README.chromium +1 -0
  145. package/front_end/ui/components/text_editor/config.ts +30 -1
  146. package/front_end/ui/components/tooltips/Tooltip.ts +18 -4
  147. package/front_end/ui/legacy/ContextMenu.ts +2 -2
  148. package/front_end/ui/legacy/GlassPane.ts +7 -3
  149. package/front_end/ui/legacy/ProgressIndicator.ts +29 -16
  150. package/front_end/ui/legacy/TabbedPane.ts +2 -2
  151. package/front_end/ui/legacy/Treeoutline.ts +10 -5
  152. package/front_end/ui/legacy/UIUtils.ts +42 -10
  153. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
  154. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
  155. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
  156. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
  157. package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
  158. package/inspector_overlay/highlight_common.ts +1 -27
  159. package/inspector_overlay/highlight_grid_common.ts +1 -27
  160. package/inspector_overlay/tool_highlight.ts +1 -27
  161. package/inspector_overlay/tool_persistent.ts +1 -27
  162. package/inspector_overlay/tool_source_order.ts +1 -27
  163. package/package.json +1 -1
@@ -940,9 +940,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
940
940
  throw new Error('could not create performance agent focus');
941
941
  }
942
942
 
943
- const agent = conversationHandler.createAgent(AiAssistanceModel.ConversationType.PERFORMANCE_FULL);
943
+ const agent = conversationHandler.createAgent(AiAssistanceModel.ConversationType.PERFORMANCE);
944
944
  const conversation = new AiAssistanceModel.Conversation(
945
- AiAssistanceModel.ConversationType.PERFORMANCE_FULL,
945
+ AiAssistanceModel.ConversationType.PERFORMANCE,
946
946
  [],
947
947
  agent.id,
948
948
  /* isReadOnly */ true,
@@ -950,6 +950,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
950
950
  );
951
951
 
952
952
  const selected = new AiAssistanceModel.PerformanceTraceContext(focus);
953
+ selected.external = true;
953
954
 
954
955
  this.#externalAIConversationData = {
955
956
  conversationHandler,
@@ -1373,18 +1374,17 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1373
1374
  void contextMenu.show();
1374
1375
  }
1375
1376
 
1376
- /**
1377
- * Saves a trace file to disk.
1378
- * Pass `config.savingEnhancedTrace === true` to include source maps in the resulting metadata.
1379
- * Pass `config.addModifications === true` to include user modifications to the trace file, which includes:
1380
- * 1. Annotations
1381
- * 2. Filtering / collapsing of the flame chart.
1382
- * 3. Visual track configuration (re-ordering or hiding tracks).
1383
- */
1384
1377
  async saveToFile(config: {
1385
1378
  includeScriptContent: boolean,
1386
1379
  includeSourceMaps: boolean,
1380
+ /**
1381
+ * Includes many things:
1382
+ * 1. annotations
1383
+ * 2. filtering / collapsing of the flame chart
1384
+ * 3. visual track configuration (re-ordering or hiding tracks)
1385
+ **/
1387
1386
  addModifications: boolean,
1387
+ shouldCompress: boolean,
1388
1388
  }): Promise<void> {
1389
1389
  if (this.state !== State.IDLE) {
1390
1390
  return;
@@ -1407,7 +1407,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1407
1407
  }
1408
1408
 
1409
1409
  const traceEvents = parsedTrace.traceEvents.map(event => {
1410
- if (Trace.Types.Events.isAnyScriptCatchupEvent(event) && event.name !== 'StubScriptCatchup') {
1410
+ if (Trace.Types.Events.isAnyScriptSourceEvent(event) && event.name !== 'StubScriptCatchup') {
1411
1411
  const mappedScript = scriptByIdMap.get(`${event.args.data.isolate}.${event.args.data.scriptId}`);
1412
1412
 
1413
1413
  // If the checkbox to include script content is not checked or if it comes from and
@@ -1425,7 +1425,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1425
1425
  args: {
1426
1426
  data: {isolate: event.args.data.isolate, scriptId: event.args.data.scriptId},
1427
1427
  },
1428
- } as Trace.Types.Events.V8SourceRundownSourcesStubScriptCatchupEvent;
1428
+ } as Trace.Types.Events.RundownScriptStub;
1429
1429
  }
1430
1430
  }
1431
1431
 
@@ -1447,7 +1447,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1447
1447
  await this.innerSaveToFile(traceEvents, metadata, {
1448
1448
  includeScriptContent: config.includeScriptContent,
1449
1449
  includeSourceMaps: config.includeSourceMaps,
1450
- addModifications: config.addModifications
1450
+ addModifications: config.addModifications,
1451
+ shouldCompress: config.shouldCompress,
1451
1452
  });
1452
1453
  } catch (e) {
1453
1454
  // We expect the error to be an Error class, but this deals with any weird case where it's not.
@@ -1467,6 +1468,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1467
1468
  includeScriptContent: boolean,
1468
1469
  includeSourceMaps: boolean,
1469
1470
  addModifications: boolean,
1471
+ shouldCompress: boolean,
1470
1472
  }): Promise<void> {
1471
1473
  // Base the filename on the trace's time of recording
1472
1474
  const isoDate =
@@ -1501,8 +1503,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1501
1503
 
1502
1504
  let blob = new Blob(blobParts, {type: 'application/json'});
1503
1505
 
1504
- // TODO: Enable by default and connect with upcoming SaveDialog
1505
- if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_SAVE_AS_GZ)) {
1506
+ if (config.shouldCompress) {
1506
1507
  fileName = `${fileName}.gz` as Platform.DevToolsPath.RawPathString;
1507
1508
  const gzStream = Common.Gzip.compressStream(blob.stream());
1508
1509
  blob = await new Response(gzStream, {
@@ -1537,6 +1538,18 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1537
1538
  }
1538
1539
  }
1539
1540
 
1541
+ async handleSaveToFileAction(): Promise<void> {
1542
+ const exportTraceOptionsElement =
1543
+ this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions;
1544
+ const state = exportTraceOptionsElement.state;
1545
+ await this.saveToFile({
1546
+ includeScriptContent: state.includeScriptContent,
1547
+ includeSourceMaps: state.includeSourceMaps,
1548
+ addModifications: state.includeAnnotations,
1549
+ shouldCompress: state.shouldCompress,
1550
+ });
1551
+ }
1552
+
1540
1553
  #filterMetadataSourceMaps(metadata: Trace.Types.File.MetaData): Trace.Types.File.MetadataSourceMap[]|undefined {
1541
1554
  if (!metadata.sourceMaps) {
1542
1555
  return undefined;
@@ -2125,8 +2138,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2125
2138
 
2126
2139
  const exclusiveFilter = this.#exclusiveFilterPerTrace.get(traceIndex) ?? null;
2127
2140
  this.#applyActiveFilters(parsedTrace.data.Meta.traceIsGeneric, exclusiveFilter);
2128
- (this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions)
2129
- .updateContentVisibility(currentManager ? currentManager.getAnnotations()?.length > 0 : false);
2141
+ (this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions).updateContentVisibility({
2142
+ annotationsExist: currentManager ? currentManager.getAnnotations()?.length > 0 : false
2143
+ });
2130
2144
 
2131
2145
  // Add ModificationsManager listeners for annotations change to update the
2132
2146
  // Annotation Overlays.
@@ -2226,6 +2240,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2226
2240
  Host.UserMetrics.TimelineNavigationSetting.MODERN_AT_SESSION_FIRST_TRACE);
2227
2241
  }
2228
2242
  }
2243
+
2244
+ UI.Context.Context.instance().setFlavor(
2245
+ AiAssistanceModel.AgentFocus, AiAssistanceModel.AgentFocus.full(parsedTrace));
2229
2246
  }
2230
2247
 
2231
2248
  #onAnnotationModifiedEvent(e: Event): void {
@@ -2258,8 +2275,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2258
2275
  const annotations = currentManager?.getAnnotations() ?? [];
2259
2276
  const annotationEntryToColorMap = this.buildColorsAnnotationsMap(annotations);
2260
2277
  this.#sideBar.setAnnotations(annotations, annotationEntryToColorMap);
2261
- (this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions)
2262
- .updateContentVisibility(currentManager ? currentManager.getAnnotations()?.length > 0 : false);
2278
+ (this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions).updateContentVisibility({
2279
+ annotationsExist: currentManager ? currentManager.getAnnotations()?.length > 0 : false
2280
+ });
2263
2281
  }
2264
2282
 
2265
2283
  /**
@@ -2650,7 +2668,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2650
2668
  }
2651
2669
 
2652
2670
  #createSourceMapResolver(isFreshRecording: boolean, metadata: Trace.Types.File.MetaData|null):
2653
- Trace.TraceModel.ParseConfig['resolveSourceMap'] {
2671
+ Trace.Types.Configuration.ParseOptions['resolveSourceMap'] {
2654
2672
  const debuggerModelForFrameId = new Map<string, SDK.DebuggerModel.DebuggerModel>();
2655
2673
  for (const target of SDK.TargetManager.TargetManager.instance().targets()) {
2656
2674
  const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
@@ -2742,6 +2760,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2742
2760
  metadata: metadata ?? undefined,
2743
2761
  isFreshRecording,
2744
2762
  resolveSourceMap: this.#createSourceMapResolver(isFreshRecording, metadata),
2763
+ isCPUProfile: metadata?.dataOrigin === Trace.Types.File.DataOrigin.CPU_PROFILE,
2745
2764
  };
2746
2765
 
2747
2766
  if (window.location.href.includes('devtools/bundled') || window.location.search.includes('debugFrontend')) {
@@ -3112,7 +3131,7 @@ ${responseTextForPassedInsights}`;
3112
3131
  Promise<AsyncGenerator<AiAssistanceModel.ExternalRequestResponse, AiAssistanceModel.ExternalRequestResponse>> {
3113
3132
  const data = TimelinePanel.instance().getOrCreateExternalAIConversationData();
3114
3133
  return await data.conversationHandler.handleExternalRequest({
3115
- conversationType: AiAssistanceModel.ConversationType.PERFORMANCE_FULL,
3134
+ conversationType: AiAssistanceModel.ConversationType.PERFORMANCE,
3116
3135
  prompt,
3117
3136
  data,
3118
3137
  });
@@ -3196,7 +3215,7 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
3196
3215
  panel.recordReload();
3197
3216
  return true;
3198
3217
  case 'timeline.save-to-file':
3199
- void panel.saveToFile({includeScriptContent: false, includeSourceMaps: false, addModifications: false});
3218
+ void panel.handleSaveToFileAction();
3200
3219
  return true;
3201
3220
  case 'timeline.load-from-file':
3202
3221
  panel.selectFileToLoad();
@@ -880,9 +880,9 @@ export class TimelineUIUtils {
880
880
  }
881
881
  }
882
882
 
883
- static maybeCreateLinkElement(url: string): HTMLElement|null {
884
- const protocol = URL.parse(url)?.protocol;
885
- if (!protocol || protocol.length === 0) {
883
+ static maybeCreateLinkElement(url: string): Element|null {
884
+ const parsedURL = new Common.ParsedURL.ParsedURL(url);
885
+ if (!parsedURL.scheme) {
886
886
  return null;
887
887
  }
888
888
 
@@ -890,11 +890,16 @@ export class TimelineUIUtils {
890
890
  if (!splitResult) {
891
891
  return null;
892
892
  }
893
- const {lineNumber, columnNumber} = splitResult;
894
- const options = {text: url, lineNumber, columnNumber} as LegacyComponents.Linkifier.LinkifyURLOptions;
895
- const linkElement =
896
- LegacyComponents.Linkifier.Linkifier.linkifyURL(url as Platform.DevToolsPath.UrlString, (options));
897
- return linkElement;
893
+ const {url: rawURL, lineNumber, columnNumber} = splitResult;
894
+
895
+ const options = {
896
+ lineNumber,
897
+ columnNumber,
898
+ showColumnNumber: true,
899
+ omitOrigin: true,
900
+ };
901
+
902
+ return LegacyComponents.Linkifier.Linkifier.linkifyURL(rawURL as Platform.DevToolsPath.UrlString, options);
898
903
  }
899
904
 
900
905
  /**
@@ -38,10 +38,10 @@ export class TracingLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
38
38
  this.layersById = new Map();
39
39
  this.setContentRoot(null);
40
40
  if (root) {
41
- const convertedLayers = this.innerSetLayers(oldLayersById, root);
41
+ const convertedLayers = this.#setLayers(oldLayersById, root);
42
42
  this.setRoot(convertedLayers);
43
43
  } else if (layers) {
44
- const processedLayers = layers.map(this.innerSetLayers.bind(this, oldLayersById));
44
+ const processedLayers = layers.map(this.#setLayers.bind(this, oldLayersById));
45
45
  const contentRoot = this.contentRoot();
46
46
  if (!contentRoot) {
47
47
  throw new Error('Content root is not set.');
@@ -86,8 +86,7 @@ export class TracingLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
86
86
  }
87
87
  }
88
88
 
89
- private innerSetLayers(oldLayersById: Map<string|number, SDK.LayerTreeBase.Layer>, payload: TracingLayerPayload):
90
- TracingLayer {
89
+ #setLayers(oldLayersById: Map<string|number, SDK.LayerTreeBase.Layer>, payload: TracingLayerPayload): TracingLayer {
91
90
  let layer = (oldLayersById.get(payload.layer_id) as TracingLayer | null);
92
91
  if (layer) {
93
92
  layer.reset(payload);
@@ -102,7 +101,7 @@ export class TracingLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
102
101
  this.setContentRoot(layer);
103
102
  }
104
103
  for (let i = 0; payload.children && i < payload.children.length; ++i) {
105
- layer.addChild(this.innerSetLayers(oldLayersById, payload.children[i]));
104
+ layer.addChild(this.#setLayers(oldLayersById, payload.children[i]));
106
105
  }
107
106
  return layer;
108
107
  }
@@ -38,6 +38,10 @@ const UIStrings = {
38
38
  * @description Text for the include annotations option.
39
39
  */
40
40
  includeAnnotations: 'Include annotations',
41
+ /**
42
+ * @description Text for the compression option.
43
+ */
44
+ shouldCompress: 'Compress with gzip',
41
45
  /**
42
46
  * @description Text for the save trace button
43
47
  */
@@ -52,6 +56,7 @@ export interface ExportTraceOptionsData {
52
56
  includeScriptContent: boolean,
53
57
  includeSourceMaps: boolean,
54
58
  addModifications: boolean,
59
+ shouldCompress: boolean,
55
60
  }) => Promise<void>;
56
61
  buttonEnabled: boolean;
57
62
  }
@@ -63,6 +68,7 @@ export interface ExportTraceOptionsState {
63
68
  includeAnnotations: boolean;
64
69
  includeScriptContent: boolean;
65
70
  includeSourceMaps: boolean;
71
+ shouldCompress: boolean;
66
72
  displayAnnotationsCheckbox?: boolean;
67
73
  displayScriptContentCheckbox?: boolean;
68
74
  displaySourceMapsCheckbox?: boolean;
@@ -72,22 +78,26 @@ export class ExportTraceOptions extends HTMLElement {
72
78
  readonly #shadow = this.attachShadow({mode: 'open'});
73
79
  #data: ExportTraceOptionsData|null = null;
74
80
 
75
- readonly #includeAnnotationsSettingString: string = 'export-performance-trace-include-annotations';
76
- readonly #includeScriptContentSettingString: string = 'export-performance-trace-include-scripts';
77
- readonly #includeSourceMapsSettingString: string = 'export-performance-trace-include-sourcemaps';
81
+ static readonly #includeAnnotationsSettingString: string = 'export-performance-trace-include-annotations';
82
+ static readonly #includeScriptContentSettingString: string = 'export-performance-trace-include-scripts';
83
+ static readonly #includeSourceMapsSettingString: string = 'export-performance-trace-include-sourcemaps';
84
+ static readonly #shouldCompressSettingString: string = 'export-performance-trace-should-compress';
78
85
 
79
86
  #includeAnnotationsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
80
- this.#includeAnnotationsSettingString, true, Common.Settings.SettingStorageType.SESSION);
87
+ ExportTraceOptions.#includeAnnotationsSettingString, true, Common.Settings.SettingStorageType.SESSION);
81
88
  #includeScriptContentSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
82
- this.#includeScriptContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
89
+ ExportTraceOptions.#includeScriptContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
83
90
  #includeSourceMapsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
84
- this.#includeSourceMapsSettingString, false, Common.Settings.SettingStorageType.SESSION);
91
+ ExportTraceOptions.#includeSourceMapsSettingString, false, Common.Settings.SettingStorageType.SESSION);
92
+ #shouldCompressSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
93
+ ExportTraceOptions.#shouldCompressSettingString, true, Common.Settings.SettingStorageType.SYNCED);
85
94
 
86
95
  #state: ExportTraceOptionsState = {
87
96
  dialogState: Dialogs.Dialog.DialogState.COLLAPSED,
88
97
  includeAnnotations: this.#includeAnnotationsSetting.get(),
89
98
  includeScriptContent: this.#includeScriptContentSetting.get(),
90
99
  includeSourceMaps: this.#includeSourceMapsSetting.get(),
100
+ shouldCompress: this.#shouldCompressSetting.get(),
91
101
  };
92
102
 
93
103
  #includeAnnotationsCheckbox = UI.UIUtils.CheckboxLabel.create(
@@ -102,6 +112,10 @@ export class ExportTraceOptions extends HTMLElement {
102
112
  /* title*/ i18nString(UIStrings.includeSourcemap), /* checked*/ this.#state.includeSourceMaps,
103
113
  /* subtitle*/ undefined,
104
114
  /* jslogContext*/ 'timeline.export-trace-options.source-maps-checkbox');
115
+ #shouldCompressCheckbox = UI.UIUtils.CheckboxLabel.create(
116
+ /* title*/ i18nString(UIStrings.shouldCompress), /* checked*/ this.#state.shouldCompress,
117
+ /* subtitle*/ undefined,
118
+ /* jslogContext*/ 'timeline.export-trace-options.should-compress-checkbox');
105
119
 
106
120
  set data(data: ExportTraceOptionsData) {
107
121
  this.#data = data;
@@ -113,18 +127,23 @@ export class ExportTraceOptions extends HTMLElement {
113
127
  this.#includeAnnotationsSetting.set(state.includeAnnotations);
114
128
  this.#includeScriptContentSetting.set(state.includeScriptContent);
115
129
  this.#includeSourceMapsSetting.set(state.includeSourceMaps);
130
+ this.#shouldCompressSetting.set(state.shouldCompress);
116
131
 
117
132
  this.#scheduleRender();
118
133
  }
119
134
 
120
- updateContentVisibility(annotationsExist: boolean): void {
135
+ get state(): Readonly<ExportTraceOptionsState> {
136
+ return this.#state;
137
+ }
138
+
139
+ updateContentVisibility(options: {annotationsExist: boolean}): void {
121
140
  const showIncludeScriptContentCheckbox =
122
141
  Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_ENHANCED_TRACES);
123
142
  const showIncludeSourceMapCheckbox =
124
143
  Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_COMPILED_SOURCES);
125
144
 
126
145
  const newState = Object.assign({}, this.#state, {
127
- displayAnnotationsCheckbox: annotationsExist,
146
+ displayAnnotationsCheckbox: options.annotationsExist,
128
147
  displayScriptContentCheckbox: showIncludeScriptContentCheckbox,
129
148
  displaySourceMapsCheckbox: showIncludeSourceMapCheckbox
130
149
  });
@@ -158,6 +177,10 @@ export class ExportTraceOptions extends HTMLElement {
158
177
  newState.includeSourceMaps = checked;
159
178
  break;
160
179
  }
180
+ case this.#shouldCompressCheckbox: {
181
+ newState.shouldCompress = checked;
182
+ break;
183
+ }
161
184
  }
162
185
 
163
186
  this.state = newState;
@@ -189,10 +212,6 @@ export class ExportTraceOptions extends HTMLElement {
189
212
  throw new Error('Export trace options dialog render was not scheduled');
190
213
  }
191
214
 
192
- const emptyDialog =
193
- !(this.#state.displayAnnotationsCheckbox || this.#state.displayScriptContentCheckbox ||
194
- this.#state.displaySourceMapsCheckbox);
195
-
196
215
  // clang-format off
197
216
  const output = html`
198
217
  <style>${exportTraceOptionsStyles}</style>
@@ -208,7 +227,7 @@ export class ExportTraceOptions extends HTMLElement {
208
227
  horizontalAlignment: Dialogs.Dialog.DialogHorizontalAlignment.AUTO,
209
228
  closeButton: false,
210
229
  dialogTitle: i18nString(UIStrings.exportTraceOptionsDialogTitle),
211
- state: emptyDialog ? Dialogs.Dialog.DialogState.DISABLED : this.#state.dialogState,
230
+ state: this.#state.dialogState,
212
231
  } as Dialogs.ButtonDialog.ButtonDialogData}>
213
232
  <div class='export-trace-options-content'>
214
233
  ${this.#state.displayAnnotationsCheckbox ? this.#renderCheckbox(this.#includeAnnotationsCheckbox,
@@ -218,6 +237,7 @@ export class ExportTraceOptions extends HTMLElement {
218
237
  i18nString(UIStrings.includeScriptContent), this.#state.includeScriptContent): ''}
219
238
  ${this.#state.displayScriptContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderCheckbox(
220
239
  this.#includeSourceMapsCheckbox, i18nString(UIStrings.includeSourcemap), this.#state.includeSourceMaps): ''}
240
+ ${this.#renderCheckbox(this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
221
241
  <div class='export-trace-options-row'><div class='export-trace-blank'></div><devtools-button
222
242
  class="setup-button"
223
243
  @click=${this.#onExportClick.bind(this)}
@@ -235,14 +255,7 @@ export class ExportTraceOptions extends HTMLElement {
235
255
  }
236
256
 
237
257
  async #onButtonDialogClick(): Promise<void> {
238
- // Handles button dialog click. Either expands dialog with options or
239
- // directly exports if no options available.
240
- if (!(this.#state.displayAnnotationsCheckbox || this.#state.displayScriptContentCheckbox ||
241
- this.#state.displaySourceMapsCheckbox)) {
242
- void this.#onExportCallback();
243
- } else {
244
- this.state = Object.assign({}, this.#state, {dialogState: Dialogs.Dialog.DialogState.EXPANDED});
245
- }
258
+ this.state = Object.assign({}, this.#state, {dialogState: Dialogs.Dialog.DialogState.EXPANDED});
246
259
  }
247
260
 
248
261
  async #onExportCallback(): Promise<void> {
@@ -250,7 +263,9 @@ export class ExportTraceOptions extends HTMLElement {
250
263
  await this.#data?.onExport({
251
264
  includeScriptContent: this.#state.includeScriptContent,
252
265
  includeSourceMaps: this.#state.includeSourceMaps,
253
- addModifications: this.#state.includeAnnotations
266
+ // Note: this also includes track configuration ...
267
+ addModifications: this.#state.includeAnnotations,
268
+ shouldCompress: this.#state.shouldCompress,
254
269
  });
255
270
 
256
271
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceExported);
@@ -175,20 +175,24 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
175
175
  }
176
176
 
177
177
  #dispatchInsightToggle(): void {
178
+ if (!this.data.insightSetKey || !this.model) {
179
+ // Shouldn't happen, but needed to satisfy TS.
180
+ return;
181
+ }
182
+
183
+ const focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
178
184
  if (this.#selected) {
179
185
  this.dispatchEvent(new SidebarInsight.InsightDeactivated());
180
186
 
181
187
  // Clear agent (but only if currently focused on an insight).
182
- const focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
183
- if (focus && focus.data.type === 'insight') {
184
- UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, null);
188
+ if (focus) {
189
+ UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus.withInsight(null));
185
190
  }
186
191
  return;
187
192
  }
188
193
 
189
- if (!this.data.insightSetKey || !this.model) {
190
- // Shouldn't happen, but needed to satisfy TS.
191
- return;
194
+ if (focus) {
195
+ UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus.withInsight(this.model));
192
196
  }
193
197
 
194
198
  this.sharedTableState.selectedRowEl?.classList.remove('selected');
@@ -359,7 +363,13 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
359
363
  return;
360
364
  }
361
365
 
362
- UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, this.#agentFocus);
366
+ let focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
367
+ if (focus) {
368
+ focus = focus.withInsight(this.model);
369
+ } else {
370
+ focus = this.#agentFocus;
371
+ }
372
+ UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus);
363
373
 
364
374
  // Trigger the AI Assistance panel to open.
365
375
  const action = UI.ActionRegistry.ActionRegistry.instance().getAction(actionId);
@@ -4,6 +4,7 @@ URL: https://github.com/dequelabs/axe-core/
4
4
  Version: N/A
5
5
  Date: 2017-07-24
6
6
  Revision: d02dba3223fefe525438330e40b5da5de81eeeb5
7
+ Update Mechanism: Manual
7
8
  License: MPL-2.0
8
9
  License File: LICENSE
9
10
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: CodeMirror
3
3
  URL: https://github.com/codemirror/CodeMirror/
4
4
  Version: 5.61.0
5
5
  Revision: eac70bb1a31a08201e5705c788cd72e6283958f0
6
+ Update Mechanism: Manual
6
7
  License: MIT
7
8
  License File: package/LICENSE
8
9
  Security Critical: no
@@ -2,6 +2,7 @@ Name: CodeMirror 6
2
2
  Short Name: CodeMirror.next
3
3
  URL: https://github.com/codemirror/CodeMirror.next/
4
4
  Version: 0.19.0
5
+ Update Mechanism: Manual
5
6
  License: MIT
6
7
  License File: LICENSE
7
8
  Security Critical: no
@@ -2,6 +2,7 @@ Name: CSP Evaluator Core Library, a tool that allows developers to check if a Co
2
2
  Short Name: csp_evaluator
3
3
  URL: https://www.npmjs.com/package/csp_evaluator
4
4
  Version: 1.1.1
5
+ Update Mechanism: Manual
5
6
  License: Apache-2.0
6
7
  License File: package/LICENSE
7
8
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: diff-match-patch
3
3
  URL: https://github.com/google/diff-match-patch/tree/master/javascript
4
4
  Version: 5.60.0
5
5
  Revision: 0ae308daa77aeddb089cd6b7b0a443fca026266e
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: i18n
3
3
  URL: https://github.com/GoogleChrome/lighthouse
4
4
  Version: 15dad3944c2754a9e147fef9ef99934169e2ca08
5
5
  Revision: 15dad3944c2754a9e147fef9ef99934169e2ca08
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: intl-messageformat
3
3
  URL: https://github.com/formatjs/formatjs
4
4
  Version: 9.8.0
5
5
  Revision: 51a665ca0a7c6129c0c93b6b7837603a8e31caa4
6
+ Update Mechanism: Manual
6
7
  License: BSD-3-Clause
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: json5
3
3
  URL: https://github.com/json5/json5
4
4
  Version: 2.2.3
5
5
  Revision: de344f0
6
+ Update Mechanism: Manual
6
7
  License: MIT
7
8
  License File: LICENSE
8
9
  Shipped: yes
@@ -3,6 +3,7 @@ Short Name: legacy-javascript
3
3
  URL: https://github.com/GoogleChrome/lighthouse/tree/main/core/lib/legacy-javascript
4
4
  Version: 0.0.1
5
5
  Revision: 410adb1220ca0d36c317f64cdbc652b798561413
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -2,6 +2,7 @@ Name: Lighthouse
2
2
  Short Name: lighthouse
3
3
  Version: 12.8.2
4
4
  Revision: 8dc40bb0e13a71b1c58aaf891810ac9360b86ac9
5
+ Update Mechanism: Manual
5
6
  URL: https://github.com/GoogleChrome/lighthouse
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
@@ -3,6 +3,7 @@ Short Name: lit
3
3
  URL: https://github.com/lit/lit
4
4
  Version: 2.4.1
5
5
  Revision: 02c28397c612845ffab9e22af08eecc869f8ce47
6
+ Update Mechanism: Manual
6
7
  License: BSD-3-Clause
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: marked
3
3
  URL: https://github.com/markedjs/marked
4
4
  Version: 13.0.1
5
5
  Revision: aaee616d54e82295d61a61aa26192416c2547ac4
6
+ Update Mechanism: Manual
6
7
  License: BSD-3-Clause, MIT
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -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.21.0
4
+ Version: 24.22.0
5
5
  License: Apache-2.0
6
6
  License File: LICENSE
7
- Revision: fcbfb730b8abb9412ce797ccfd0e1579d4e1d490
7
+ Revision: 0e2affad10d4e4e19ef07504d9b8784b3da9ff91
8
8
  Security Critical: no
9
9
  Shipped: yes
10
10
  Update Mechanism: Autoroll
@@ -34,8 +34,8 @@ export declare abstract class Realm extends EventEmitter<{
34
34
  }> {
35
35
  #private;
36
36
  protected readonly disposables: {
37
- "__#59112@#disposed": boolean;
38
- "__#59112@#stack": Disposable[];
37
+ "__#59109@#disposed": boolean;
38
+ "__#59109@#stack": Disposable[];
39
39
  readonly disposed: boolean;
40
40
  dispose(): void;
41
41
  use<T extends Disposable | null | undefined>(value: T): T;
@@ -239,7 +239,6 @@ class AXNode {
239
239
  #name;
240
240
  #role;
241
241
  #ignored;
242
- #cachedHasFocusableChild;
243
242
  #realm;
244
243
  constructor(realm, payload) {
245
244
  this.payload = payload;
@@ -276,18 +275,6 @@ class AXNode {
276
275
  role === 'InlineTextBox' ||
277
276
  role === 'StaticText');
278
277
  }
279
- #hasFocusableChild() {
280
- if (this.#cachedHasFocusableChild === undefined) {
281
- this.#cachedHasFocusableChild = false;
282
- for (const child of this.children) {
283
- if (child.#focusable || child.#hasFocusableChild()) {
284
- this.#cachedHasFocusableChild = true;
285
- break;
286
- }
287
- }
288
- }
289
- return this.#cachedHasFocusableChild;
290
- }
291
278
  find(predicate) {
292
279
  if (predicate(this)) {
293
280
  return this;
@@ -329,13 +316,6 @@ class AXNode {
329
316
  default:
330
317
  break;
331
318
  }
332
- // Here and below: Android heuristics
333
- if (this.#hasFocusableChild()) {
334
- return false;
335
- }
336
- if (this.#focusable && this.#name && this.#name !== 'Document') {
337
- return true;
338
- }
339
319
  if (this.#role === 'heading' && this.#name) {
340
320
  return true;
341
321
  }