chrome-devtools-frontend 1.0.1575635 → 1.0.1576915

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 (87) hide show
  1. package/front_end/core/host/AidaClient.ts +21 -0
  2. package/front_end/core/sdk/DebuggerModel.ts +14 -4
  3. package/front_end/core/sdk/NetworkManager.ts +3 -1
  4. package/front_end/core/sdk/NetworkRequest.ts +7 -0
  5. package/front_end/core/sdk/SourceMapScopesInfo.ts +2 -1
  6. package/front_end/generated/SupportedCSSProperties.js +44 -0
  7. package/front_end/models/ai_assistance/agents/AiAgent.ts +6 -0
  8. package/front_end/models/ai_code_generation/AiCodeGeneration.ts +6 -0
  9. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +37 -38
  10. package/front_end/models/javascript_metadata/NativeFunctions.js +12 -0
  11. package/front_end/models/source_map_scopes/NamesResolver.ts +5 -8
  12. package/front_end/models/stack_trace/StackTrace.ts +19 -18
  13. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +5 -3
  14. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -2
  15. package/front_end/panels/ai_assistance/components/ChatMessage.ts +5 -1
  16. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
  17. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +22 -1
  18. package/front_end/panels/application/DeviceBoundSessionsView.ts +44 -33
  19. package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -0
  20. package/front_end/panels/application/components/BackForwardCacheView.ts +4 -2
  21. package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
  22. package/front_end/panels/autofill/AutofillView.ts +1 -1
  23. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +1 -0
  24. package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +12 -4
  25. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -5
  26. package/front_end/panels/console/ConsoleViewMessage.ts +1 -0
  27. package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
  28. package/front_end/panels/elements/LayoutPane.ts +8 -7
  29. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  30. package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -1
  31. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
  32. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
  33. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
  34. package/front_end/panels/media/PlayerListView.ts +1 -1
  35. package/front_end/panels/network/NetworkItemView.ts +32 -3
  36. package/front_end/panels/network/NetworkLogViewColumns.ts +2 -1
  37. package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +160 -0
  38. package/front_end/panels/network/RequestPayloadView.ts +111 -185
  39. package/front_end/panels/network/ShowMoreDetailsWidget.ts +96 -0
  40. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
  41. package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
  42. package/front_end/panels/network/network.ts +5 -0
  43. package/front_end/panels/network/requestDeviceBoundSessionsView.css +14 -0
  44. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  45. package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
  46. package/front_end/panels/recorder/components/StepEditor.ts +3 -3
  47. package/front_end/panels/settings/AISettingsTab.ts +2 -2
  48. package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -1
  49. package/front_end/panels/sources/CallStackSidebarPane.ts +58 -11
  50. package/front_end/panels/sources/DebuggerPlugin.ts +19 -22
  51. package/front_end/panels/sources/SourcesPanel.ts +6 -24
  52. package/front_end/panels/sources/components/HeadersView.ts +2 -2
  53. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +1 -1
  54. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -1
  55. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +7 -0
  56. package/front_end/panels/whats_new/resources/WNDT.md +1 -1
  57. package/front_end/third_party/chromium/README.chromium +1 -1
  58. package/front_end/third_party/source-map-scopes-codec/README.chromium +2 -2
  59. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +2 -2
  60. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -1
  61. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +1 -1
  62. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +1 -1
  63. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +9 -1
  64. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +1 -1
  65. package/front_end/third_party/source-map-scopes-codec/package/deno.json +8 -1
  66. package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
  67. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +20 -7
  68. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
  69. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +29 -9
  70. package/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +1 -1
  71. package/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +1 -0
  72. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js +1 -1
  73. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.ts +12 -1
  74. package/front_end/ui/components/report_view/ReportView.ts +2 -2
  75. package/front_end/ui/components/report_view/report.css +1 -0
  76. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +7 -12
  77. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +37 -5
  78. package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
  79. package/front_end/ui/legacy/ContextMenu.ts +12 -7
  80. package/front_end/ui/legacy/ListControl.ts +2 -1
  81. package/front_end/ui/legacy/ListWidget.ts +1 -1
  82. package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
  83. package/front_end/ui/legacy/Treeoutline.ts +1 -0
  84. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -2
  85. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
  86. package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
  87. package/package.json +1 -1
@@ -656,6 +656,13 @@ export class AidaClient {
656
656
  }
657
657
 
658
658
  registerClientEvent(clientEvent: AidaRegisterClientEvent): Promise<AidaClientResult> {
659
+ // Disable logging for now.
660
+ // For context, see b/454563259#comment35.
661
+ // We should be able to remove this ~end of April.
662
+ if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
663
+ clientEvent.disable_user_content_logging = true;
664
+ }
665
+
659
666
  const {promise, resolve} = Promise.withResolvers<AidaClientResult>();
660
667
  InspectorFrontendHostInstance.registerAidaClientEvent(
661
668
  JSON.stringify({
@@ -673,6 +680,14 @@ export class AidaClient {
673
680
  if (!InspectorFrontendHostInstance.aidaCodeComplete) {
674
681
  throw new Error('aidaCodeComplete is not available');
675
682
  }
683
+
684
+ // Disable logging for now.
685
+ // For context, see b/454563259#comment35.
686
+ // We should be able to remove this ~end of April.
687
+ if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
688
+ request.metadata.disable_user_content_logging = true;
689
+ }
690
+
676
691
  const {promise, resolve} = Promise.withResolvers<AidaCodeCompleteResult>();
677
692
  InspectorFrontendHostInstance.aidaCodeComplete(JSON.stringify(request), resolve);
678
693
  const completeCodeResult = await promise;
@@ -718,6 +733,12 @@ export class AidaClient {
718
733
 
719
734
  async generateCode(request: GenerateCodeRequest, options?: {signal?: AbortSignal}):
720
735
  Promise<GenerateCodeResponse|null> {
736
+ // Disable logging for now.
737
+ // For context, see b/454563259#comment35.
738
+ // We should be able to remove this ~end of April.
739
+ if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
740
+ request.metadata.disable_user_content_logging = true;
741
+ }
721
742
  const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateCodeResponse>(
722
743
  {
723
744
  service: SERVICE_NAME,
@@ -1186,11 +1186,21 @@ export interface MissingDebugFiles {
1186
1186
  initiator: PageResourceLoadInitiator;
1187
1187
  }
1188
1188
 
1189
- export interface MissingDebugInfoDetails {
1190
- details: string;
1191
- resources: MissingDebugFiles[];
1189
+ export const enum MissingDebugInfoType {
1190
+ /** No debug information at all for the call frame */
1191
+ NO_INFO = 'NO_INFO',
1192
+
1193
+ /** Some debug information available, but it references files with debug information we were not able to retrieve */
1194
+ PARTIAL_INFO = 'PARTIAL_INFO',
1192
1195
  }
1193
1196
 
1197
+ export type MissingDebugInfo = {
1198
+ type: MissingDebugInfoType.NO_INFO,
1199
+ }|{
1200
+ type: MissingDebugInfoType.PARTIAL_INFO,
1201
+ missingDebugFiles: MissingDebugFiles[],
1202
+ };
1203
+
1194
1204
  export class CallFrame {
1195
1205
  debuggerModel: DebuggerModel;
1196
1206
  readonly script: Script;
@@ -1202,7 +1212,7 @@ export class CallFrame {
1202
1212
  readonly functionName: string;
1203
1213
  readonly #functionLocation: Location|undefined;
1204
1214
  #returnValue: RemoteObject|null;
1205
- missingDebugInfoDetails: MissingDebugInfoDetails|null;
1215
+ missingDebugInfoDetails: MissingDebugInfo|null;
1206
1216
  readonly exception: RemoteObject|null;
1207
1217
 
1208
1218
  readonly canBeRestarted: boolean;
@@ -1022,6 +1022,7 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1022
1022
  requestId,
1023
1023
  associatedCookies,
1024
1024
  headers,
1025
+ deviceBoundSessionUsages,
1025
1026
  clientSecurityState,
1026
1027
  connectTiming,
1027
1028
  siteHasCookieInOtherPartition,
@@ -1036,10 +1037,11 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1036
1037
  blockedRequestCookies.push({blockedReasons, cookie: Cookie.fromProtocolCookie(cookie)});
1037
1038
  }
1038
1039
  }
1039
- const extraRequestInfo = {
1040
+ const extraRequestInfo: ExtraRequestInfo = {
1040
1041
  blockedRequestCookies,
1041
1042
  includedRequestCookies,
1042
1043
  requestHeaders: this.headersMapToHeadersArray(headers),
1044
+ deviceBoundSessionUsages,
1043
1045
  clientSecurityState,
1044
1046
  connectTiming,
1045
1047
  siteHasCookieInOtherPartition,
@@ -258,6 +258,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
258
258
  #exemptedResponseCookies: ExemptedSetCookieWithReason[] = [];
259
259
  #responseCookiesPartitionKey: Protocol.Network.CookiePartitionKey|null = null;
260
260
  #responseCookiesPartitionKeyOpaque: boolean|null = null;
261
+ #deviceBoundSessionUsages: Protocol.Network.DeviceBoundSessionWithUsage[] = [];
261
262
  #siteHasCookieInOtherPartition = false;
262
263
  localizedFailDescription: string|null = null;
263
264
  #url!: Platform.DevToolsPath.UrlString;
@@ -1612,6 +1613,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
1612
1613
  this.setRequestHeaders(extraRequestInfo.requestHeaders);
1613
1614
  this.#hasExtraRequestInfo = true;
1614
1615
  this.setRequestHeadersText(''); // Mark request headers as non-provisional
1616
+ this.#deviceBoundSessionUsages = extraRequestInfo.deviceBoundSessionUsages || [];
1615
1617
  this.#clientSecurityState = extraRequestInfo.clientSecurityState;
1616
1618
  this.#appliedNetworkConditionsId = extraRequestInfo.appliedNetworkConditionsId;
1617
1619
  if (extraRequestInfo.connectTiming) {
@@ -1630,6 +1632,10 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
1630
1632
  this.#appliedNetworkConditionsId = appliedNetworkConditionsId;
1631
1633
  }
1632
1634
 
1635
+ getDeviceBoundSessionUsages(): Protocol.Network.DeviceBoundSessionWithUsage[] {
1636
+ return this.#deviceBoundSessionUsages;
1637
+ }
1638
+
1633
1639
  hasExtraRequestInfo(): boolean {
1634
1640
  return this.#hasExtraRequestInfo;
1635
1641
  }
@@ -2151,6 +2157,7 @@ export interface ExtraRequestInfo {
2151
2157
  blockedRequestCookies: Array<{blockedReasons: Protocol.Network.CookieBlockedReason[], cookie: Cookie}>;
2152
2158
  requestHeaders: NameValue[];
2153
2159
  includedRequestCookies: IncludedCookieWithReason[];
2160
+ deviceBoundSessionUsages?: Protocol.Network.DeviceBoundSessionWithUsage[];
2154
2161
  clientSecurityState?: Protocol.Network.ClientSecurityState;
2155
2162
  connectTiming: Protocol.Network.ConnectTiming;
2156
2163
  siteHasCookieInOtherPartition?: boolean;
@@ -190,7 +190,8 @@ export class SourceMapScopesInfo {
190
190
  }
191
191
 
192
192
  isEmpty(): boolean {
193
- return !this.#originalScopes.length && !this.#generatedRanges.length;
193
+ const noScopes = this.#originalScopes.every(scope => scope === null);
194
+ return noScopes && !this.#generatedRanges.length;
194
195
  }
195
196
 
196
197
  addOriginalScopesAtIndex(sourceIdx: number, scope: ScopesCodec.OriginalScope): void {
@@ -499,6 +499,7 @@ export const generatedProperties = [
499
499
  "font-variation-settings",
500
500
  "font-weight",
501
501
  "forced-color-adjust",
502
+ "frame-sizing",
502
503
  "gap-rule-overlap",
503
504
  "grid-auto-columns",
504
505
  "grid-auto-flow",
@@ -518,6 +519,7 @@ export const generatedProperties = [
518
519
  "hyphenate-character",
519
520
  "hyphenate-limit-chars",
520
521
  "hyphens",
522
+ "image-animation",
521
523
  "image-orientation",
522
524
  "image-rendering",
523
525
  "inherits",
@@ -2597,6 +2599,16 @@ export const generatedProperties = [
2597
2599
  ],
2598
2600
  "name": "forced-color-adjust"
2599
2601
  },
2602
+ {
2603
+ "keywords": [
2604
+ "auto",
2605
+ "content-width",
2606
+ "content-height",
2607
+ "content-block-size",
2608
+ "content-inline-size"
2609
+ ],
2610
+ "name": "frame-sizing"
2611
+ },
2600
2612
  {
2601
2613
  "longhands": [
2602
2614
  "row-gap",
@@ -2779,6 +2791,15 @@ export const generatedProperties = [
2779
2791
  ],
2780
2792
  "name": "hyphens"
2781
2793
  },
2794
+ {
2795
+ "inherited": true,
2796
+ "keywords": [
2797
+ "normal",
2798
+ "running",
2799
+ "paused"
2800
+ ],
2801
+ "name": "image-animation"
2802
+ },
2782
2803
  {
2783
2804
  "inherited": true,
2784
2805
  "name": "image-orientation"
@@ -3925,6 +3946,13 @@ export const generatedProperties = [
3925
3946
  ],
3926
3947
  "name": "rule-style"
3927
3948
  },
3949
+ {
3950
+ "longhands": [
3951
+ "column-rule-visibility-items",
3952
+ "row-rule-visibility-items"
3953
+ ],
3954
+ "name": "rule-visibility-items"
3955
+ },
3928
3956
  {
3929
3957
  "longhands": [
3930
3958
  "column-rule-width",
@@ -6027,6 +6055,15 @@ export const generatedPropertyValues = {
6027
6055
  "preserve-parent-color"
6028
6056
  ]
6029
6057
  },
6058
+ "frame-sizing": {
6059
+ "values": [
6060
+ "auto",
6061
+ "content-width",
6062
+ "content-height",
6063
+ "content-block-size",
6064
+ "content-inline-size"
6065
+ ]
6066
+ },
6030
6067
  "gap-rule-overlap": {
6031
6068
  "values": [
6032
6069
  "row-over-column",
@@ -6123,6 +6160,13 @@ export const generatedPropertyValues = {
6123
6160
  "auto"
6124
6161
  ]
6125
6162
  },
6163
+ "image-animation": {
6164
+ "values": [
6165
+ "normal",
6166
+ "running",
6167
+ "paused"
6168
+ ]
6169
+ },
6126
6170
  "image-rendering": {
6127
6171
  "values": [
6128
6172
  "auto",
@@ -309,6 +309,12 @@ export abstract class AiAgent<T> {
309
309
  constructor(opts: AgentOptions) {
310
310
  this.#aidaClient = opts.aidaClient;
311
311
  this.#serverSideLoggingEnabled = opts.serverSideLoggingEnabled ?? false;
312
+ // Disable logging for now.
313
+ // For context, see b/454563259#comment35.
314
+ // We should be able to remove this ~end of April.
315
+ if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
316
+ this.#serverSideLoggingEnabled = false;
317
+ }
312
318
  this.#sessionId = opts.sessionId ?? crypto.randomUUID();
313
319
  this.confirmSideEffect = opts.confirmSideEffectForTest ?? (() => Promise.withResolvers());
314
320
  }
@@ -54,6 +54,12 @@ export class AiCodeGeneration {
54
54
  constructor(opts: Options) {
55
55
  this.#aidaClient = opts.aidaClient;
56
56
  this.#serverSideLoggingEnabled = opts.serverSideLoggingEnabled ?? false;
57
+ // Disable logging for now.
58
+ // For context, see b/454563259#comment35.
59
+ // We should be able to remove this ~end of April.
60
+ if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
61
+ this.#serverSideLoggingEnabled = false;
62
+ }
57
63
  }
58
64
 
59
65
  #buildRequest(
@@ -58,16 +58,6 @@ const UIStrings = {
58
58
  * @example {File not found} PH3
59
59
  */
60
60
  failedToLoadDebugSymbolsFor: '[{PH1}] Failed to load debug symbols for {PH2} ({PH3})',
61
- /**
62
- * @description Error message that is displayed in UI debugging information cannot be found for a call frame
63
- * @example {main} PH1
64
- */
65
- failedToLoadDebugSymbolsForFunction: 'No debug information for function "{PH1}"',
66
- /**
67
- * @description Error message that is displayed in UI when a file needed for debugging information for a call frame is missing
68
- * @example {mainp.debug.wasm.dwp} PH1
69
- */
70
- debugSymbolsIncomplete: 'The debug information for function {PH1} is incomplete',
71
61
  } as const;
72
62
  const str_ = i18n.i18n.registerUIStrings('models/bindings/DebuggerLanguagePlugins.ts', UIStrings);
73
63
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -508,14 +498,12 @@ export class DebuggerLanguagePluginManager implements
508
498
  return functionInfo.frames.map(({name}, index) => callFrame.createVirtualCallFrame(index, name));
509
499
  }
510
500
  if ('missingSymbolFiles' in functionInfo && functionInfo.missingSymbolFiles.length) {
511
- const resources = functionInfo.missingSymbolFiles;
512
- const details = i18nString(UIStrings.debugSymbolsIncomplete, {PH1: callFrame.functionName});
513
- callFrame.missingDebugInfoDetails = {details, resources};
514
- } else {
515
501
  callFrame.missingDebugInfoDetails = {
516
- details: i18nString(UIStrings.failedToLoadDebugSymbolsForFunction, {PH1: callFrame.functionName}),
517
- resources: [],
502
+ type: SDK.DebuggerModel.MissingDebugInfoType.PARTIAL_INFO,
503
+ missingDebugFiles: functionInfo.missingSymbolFiles,
518
504
  };
505
+ } else {
506
+ callFrame.missingDebugInfoDetails = {type: SDK.DebuggerModel.MissingDebugInfoType.NO_INFO};
519
507
  }
520
508
  }
521
509
  return callFrame;
@@ -792,26 +780,18 @@ export class DebuggerLanguagePluginManager implements
792
780
  const rawLocation = new SDK.DebuggerModel.Location(
793
781
  script.debuggerModel, script.scriptId, frame.lineNumber, frame.columnNumber, index);
794
782
  const uiLocation = await this.rawLocationToUILocation(rawLocation);
795
- return {
796
- uiSourceCode: uiLocation?.uiSourceCode,
797
- url: uiLocation ? undefined : frame.url,
798
- name,
799
- line: uiLocation?.lineNumber ?? frame.lineNumber,
800
- column: uiLocation?.columnNumber ?? frame.columnNumber,
801
- };
783
+ return translatedFromUILocation(uiLocation, name, frame);
802
784
  });
803
785
 
804
786
  translatedFrames.push(await Promise.all(framePromises));
805
787
  return true;
806
788
  }
807
789
 
808
- // Identity map the frame, then add the missing debug info details.
809
- const mappedFrame: (typeof translatedFrames)[number][number] = {
810
- url: frame.url,
811
- name: frame.functionName,
812
- line: frame.lineNumber,
813
- column: frame.columnNumber,
814
- };
790
+ // Translate the location only. We go through via "DebuggerWorkspaceBinding". It'll still try the plugin
791
+ // first, but this way, we'll get a UISourceCode for the raw script if the plugin fails to translate.
792
+ const uiLocation = await this.#debuggerWorkspaceBinding.rawLocationToUILocation(
793
+ new SDK.DebuggerModel.Location(script.debuggerModel, script.scriptId, frame.lineNumber, frame.columnNumber));
794
+ const mappedFrame = translatedFromUILocation(uiLocation, frame.functionName, frame);
815
795
 
816
796
  if ('missingSymbolFiles' in functionInfo && functionInfo.missingSymbolFiles.length) {
817
797
  translatedFrames.push([{
@@ -831,6 +811,27 @@ export class DebuggerLanguagePluginManager implements
831
811
  }
832
812
 
833
813
  return true;
814
+
815
+ function translatedFromUILocation(
816
+ uiLocation: Workspace.UISourceCode.UILocation|null, name: string|undefined,
817
+ fallback: StackTraceImpl.Trie.RawFrame): (typeof translatedFrames)[number][number] {
818
+ if (uiLocation) {
819
+ return {
820
+ uiSourceCode: uiLocation.uiSourceCode,
821
+ url: undefined,
822
+ name,
823
+ line: uiLocation.lineNumber,
824
+ column: uiLocation.columnNumber ?? -1,
825
+ };
826
+ }
827
+ return {
828
+ uiSourceCode: undefined,
829
+ url: fallback.url,
830
+ name: fallback.functionName,
831
+ line: fallback.lineNumber,
832
+ column: fallback.columnNumber,
833
+ };
834
+ }
834
835
  }
835
836
 
836
837
  scriptsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): SDK.Script.Script[] {
@@ -920,15 +921,13 @@ export class DebuggerLanguagePluginManager implements
920
921
  // for the DebuggerModel again, which may disappear
921
922
  // in the meantime...
922
923
  void rawModuleHandle.addRawModulePromise.then(sourceFileURLs => {
923
- if (!('missingSymbolFiles' in sourceFileURLs)) {
924
- // The script might have disappeared meanwhile...
925
- if (script.debuggerModel.scriptForId(script.scriptId) === script) {
926
- const modelData = this.#debuggerModelToData.get(script.debuggerModel);
927
- if (modelData) { // The DebuggerModel could have disappeared meanwhile...
928
- modelData.addSourceFiles(script, sourceFileURLs);
929
- void this.#debuggerWorkspaceBinding.updateLocations(script);
930
- }
924
+ // The script might have disappeared meanwhile...
925
+ if (script.debuggerModel.scriptForId(script.scriptId) === script) {
926
+ const modelData = this.#debuggerModelToData.get(script.debuggerModel);
927
+ if (modelData && Array.isArray(sourceFileURLs)) { // The DebuggerModel could have disappeared meanwhile...
928
+ modelData.addSourceFiles(script, sourceFileURLs);
931
929
  }
930
+ void this.#debuggerWorkspaceBinding.updateLocations(script);
932
931
  }
933
932
  });
934
933
  return;
@@ -7137,10 +7137,18 @@ export const NativeFunctions = [
7137
7137
  name: "intercept",
7138
7138
  signatures: [["?options"]]
7139
7139
  },
7140
+ {
7141
+ name: "deferPageSwap",
7142
+ signatures: [["options"]]
7143
+ },
7140
7144
  {
7141
7145
  name: "NavigationCurrentEntryChangeEvent",
7142
7146
  signatures: [["type","eventInit"]]
7143
7147
  },
7148
+ {
7149
+ name: "addRestoreCallback",
7150
+ signatures: [["callback"]]
7151
+ },
7144
7152
  {
7145
7153
  name: "addHandler",
7146
7154
  signatures: [["handler"]]
@@ -7189,6 +7197,10 @@ export const NativeFunctions = [
7189
7197
  name: "setMenuListOptionsBoundsInAXTree",
7190
7198
  signatures: [["options_bounds","children_updated"]]
7191
7199
  },
7200
+ {
7201
+ name: "debugLog",
7202
+ signatures: [["message"]]
7203
+ },
7192
7204
  {
7193
7205
  name: "allowsFeature",
7194
7206
  signatures: [["feature","?origin"]]
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as SDK from '../../core/sdk/sdk.js';
8
7
  import * as Protocol from '../../generated/protocol.js';
9
8
  import * as Bindings from '../bindings/bindings.js';
@@ -366,17 +365,15 @@ const resolveScope = async(script: SDK.Script.Script, scopeChain: Formatter.Form
366
365
  export const resolveScopeChain =
367
366
  async function(callFrame: SDK.DebuggerModel.CallFrame): Promise<SDK.DebuggerModel.ScopeChainEntry[]> {
368
367
  const {pluginManager} = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
369
- let scopeChain: SDK.DebuggerModel.ScopeChainEntry[]|null|undefined = await pluginManager.resolveScopeChain(callFrame);
368
+ const scopeChain: SDK.DebuggerModel.ScopeChainEntry[]|null|undefined =
369
+ await pluginManager.resolveScopeChain(callFrame);
370
370
  if (scopeChain) {
371
371
  return scopeChain;
372
372
  }
373
373
 
374
- scopeChain = Root.Runtime.experiments.isEnabled(Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES) ?
375
- callFrame.script.sourceMap()?.resolveScopeChain(callFrame) :
376
- null;
377
- if (scopeChain) {
378
- return scopeChain;
379
- }
374
+ // TODO(crbug.com/465968290): Re-enable creating the scope chain from the source map once:
375
+ // 1) We have a flag indicating whether the source map contained variable/binding information.
376
+ // 2) We have a chrome feature flag.
380
377
 
381
378
  if (callFrame.script.isWasm()) {
382
379
  return callFrame.scopeChain();
@@ -65,29 +65,29 @@ export interface EventTypes {
65
65
 
66
66
  /**
67
67
  * A small wrapper around a DebuggableFrame usable as a UI.Context flavor.
68
- * This is necessary as Frame and DebuggableFrame are updated in place, but
69
- * for UI.Context we need a new instance.
68
+ * This is necessary as DebuggableFrame are just interfaces and the impl classes are hidden.
69
+ *
70
+ * Moreover, re-translation creates a new DebuggableFrame instance even though the
71
+ * translation result stays the same, in which case we don't need a new instance for the flavor.
70
72
  */
71
- export class DebuggableFrameFlavor implements DebuggableFrame {
73
+ export class DebuggableFrameFlavor {
72
74
  static #last?: DebuggableFrameFlavor;
73
75
 
74
- readonly url?: string;
75
- readonly uiSourceCode?: Workspace.UISourceCode.UISourceCode;
76
- readonly name?: string;
77
- readonly line: number;
78
- readonly column: number;
79
- readonly missingDebugInfo?: MissingDebugInfo;
80
- readonly sdkFrame: SDK.DebuggerModel.CallFrame;
76
+ readonly frame: DebuggableFrame;
77
+
78
+ // TODO(crbug.com/465879478): Remove once this is no longer part of SDK.CallFrame.
79
+ // We need to stash this separately because DebuggerModel sets this on CallFrame after the
80
+ // fact so we can't just check it in the `equals` below.
81
+ readonly #missingDebugInfo: SDK.DebuggerModel.MissingDebugInfo|null;
81
82
 
82
83
  /** Use the static {@link for}. Only public to satisfy the `setFlavor` Ctor type */
83
84
  constructor(frame: DebuggableFrame) {
84
- this.url = frame.url;
85
- this.uiSourceCode = frame.uiSourceCode;
86
- this.name = frame.name;
87
- this.line = frame.line;
88
- this.column = frame.column;
89
- this.missingDebugInfo = frame.missingDebugInfo;
90
- this.sdkFrame = frame.sdkFrame;
85
+ this.frame = frame;
86
+ this.#missingDebugInfo = frame.sdkFrame.missingDebugInfoDetails;
87
+ }
88
+
89
+ get sdkFrame(): SDK.DebuggerModel.CallFrame {
90
+ return this.frame.sdkFrame;
91
91
  }
92
92
 
93
93
  /** @returns the same instance of DebuggableFrameFlavor for repeated calls with the same (i.e. deep equal) DebuggableFrame */
@@ -97,7 +97,8 @@ export class DebuggableFrameFlavor implements DebuggableFrame {
97
97
  a.column === b.column && a.sdkFrame === b.sdkFrame;
98
98
  }
99
99
 
100
- if (!DebuggableFrameFlavor.#last || !equals(DebuggableFrameFlavor.#last, frame)) {
100
+ if (!DebuggableFrameFlavor.#last || !equals(DebuggableFrameFlavor.#last.frame, frame) ||
101
+ DebuggableFrameFlavor.#last.#missingDebugInfo !== frame.sdkFrame.missingDebugInfoDetails) {
101
102
  DebuggableFrameFlavor.#last = new DebuggableFrameFlavor(frame);
102
103
  }
103
104
  return DebuggableFrameFlavor.#last;
@@ -452,9 +452,11 @@ export class AXBreadcrumb {
452
452
 
453
453
  this.#element = document.createElement('div');
454
454
  this.#element.classList.add('ax-breadcrumb');
455
- this.#element.setAttribute(
456
- 'jslog',
457
- `${VisualLogging.treeItem().track({click: true, keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter'})}`);
455
+ this.#element.setAttribute('jslog', `${VisualLogging.treeItem().track({
456
+ click: true,
457
+ resize: true,
458
+ keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter'
459
+ })}`);
458
460
  elementsToAXBreadcrumb.set(this.#element, this);
459
461
 
460
462
  this.#nodeElement = document.createElement('div');
@@ -204,7 +204,16 @@ const UIStringsNotTranslate = {
204
204
  */
205
205
  inputDisclaimerForPerformanceEnterpriseNoLogging:
206
206
  'Chat messages and data from your performance trace are sent to Google. The content you submit and that is generated by this feature will not be used to improve Google’s AI models. This is an experimental AI feature and won’t always get it right.',
207
-
207
+ /**
208
+ * @description Disclaimer text right after the chat input.
209
+ */
210
+ inputDisclaimerForNoContext:
211
+ 'Chat messages, any data the inspected page can see using Web APIs, and the items you select such as files, network requests, and performance traces are sent to Google and may be seen by human reviewers to improve this feature. This is an experimental AI feature and won’t always get it right.',
212
+ /**
213
+ * @description Disclaimer text right after the chat input.
214
+ */
215
+ inputDisclaimerForNoContextEnterpriseNoLogging:
216
+ 'Chat messages, any data the inspected page can see using Web APIs, and the items you select such as files, network requests, and performance traces are sent to Google. This data will not be used to improve Google’s AI models. This is an experimental AI feature and won’t always get it right.',
208
217
  } as const;
209
218
 
210
219
  const str_ = i18n.i18n.registerUIStrings('panels/ai_assistance/AiAssistancePanel.ts', UIStrings);
@@ -1037,7 +1046,10 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1037
1046
  return lockedString(UIStringsNotTranslate.inputDisclaimerForPerformance);
1038
1047
 
1039
1048
  case AiAssistanceModel.AiHistoryStorage.ConversationType.NONE:
1040
- return lockedString(UIStringsNotTranslate.inputDisclaimerForPerformance);
1049
+ if (noLogging) {
1050
+ return lockedString(UIStringsNotTranslate.inputDisclaimerForNoContextEnterpriseNoLogging);
1051
+ }
1052
+ return lockedString(UIStringsNotTranslate.inputDisclaimerForNoContext);
1041
1053
  }
1042
1054
  }
1043
1055
 
@@ -110,6 +110,10 @@ const UIStringsNotTranslate = {
110
110
  * @description The generic name of the AI agent (do not translate)
111
111
  */
112
112
  ai: 'AI',
113
+ /**
114
+ * @description Gemini (do not translate)
115
+ */
116
+ gemini: 'Gemini',
113
117
  /**
114
118
  * @description The fallback text when we can't find the user full name
115
119
  */
@@ -306,7 +310,7 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
306
310
  <div class="message-info">
307
311
  <devtools-icon name=${icon}></devtools-icon>
308
312
  <div class="message-name">
309
- <h2>${lockedString(UIStringsNotTranslate.ai)}</h2>
313
+ <h2>${AiAssistanceModel.AiUtils.isGeminiBranding() ? lockedString(UIStringsNotTranslate.gemini) : lockedString(UIStringsNotTranslate.ai)}</h2>
310
314
  </div>
311
315
  </div>
312
316
  ${Lit.Directives.repeat(
@@ -98,7 +98,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
98
98
  render(html`
99
99
  <div class="animation-group-preview-ui">
100
100
  <button
101
- jslog=${VisualLogging.item(`animations.buffer-preview${input.isScrollDrivenAnimationGroup ? '-sda' : ''}`).track({click: true})}
101
+ jslog=${VisualLogging.item(`animations.buffer-preview${input.isScrollDrivenAnimationGroup ? '-sda' : ''}`).track({click: true, resize: true})}
102
102
  class=${classes}
103
103
  role="option"
104
104
  aria-label=${input.label}
@@ -6,6 +6,7 @@ import type * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import type * as Platform from '../../core/platform/platform.js';
8
8
  import {createIcon} from '../../ui/kit/kit.js';
9
+ import * as UI from '../../ui/legacy/legacy.js';
9
10
 
10
11
  import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
11
12
  import {
@@ -46,6 +47,16 @@ const UIStrings = {
46
47
  * linked to a session.
47
48
  */
48
49
  noSession: 'No session',
50
+ /**
51
+ *@description Tooltip text for a terminated session.
52
+ *@example {session_1} sessionName
53
+ */
54
+ terminatedSession: '{sessionName}, Session terminated',
55
+ /**
56
+ *@description Tooltip text for a session with errors.
57
+ *@example {session_1} sessionName
58
+ */
59
+ sessionWithErrors: '{sessionName}, Session has errors',
49
60
  } as const;
50
61
 
51
62
  const str_ = i18n.i18n.registerUIStrings('panels/application/DeviceBoundSessionsTreeElement.ts', UIStrings);
@@ -122,13 +133,23 @@ export class RootTreeElement extends ApplicationPanelTreeElement {
122
133
 
123
134
  #updateElementIconAndStyling(
124
135
  sessionElement: ApplicationPanelTreeElement, isSessionTerminated: boolean, sessionHasErrors: boolean): void {
136
+ const title = sessionElement.title as string;
125
137
  if (isSessionTerminated) {
126
138
  sessionElement.listItemElement.classList.add('device-bound-session-terminated');
127
139
  sessionElement.setLeadingIcons([createIcon('database-off')]);
140
+ const terminatedTitle = i18nString(UIStrings.terminatedSession, {sessionName: title});
141
+ UI.ARIAUtils.setLabel(sessionElement.listItemElement, terminatedTitle);
128
142
  return;
129
143
  }
130
144
  sessionElement.listItemElement.classList.remove('device-bound-session-terminated');
131
- sessionElement.setLeadingIcons([createIcon(sessionHasErrors ? 'warning' : 'database')]);
145
+ if (sessionHasErrors) {
146
+ sessionElement.setLeadingIcons([createIcon('warning')]);
147
+ const errorTitle = i18nString(UIStrings.sessionWithErrors, {sessionName: title});
148
+ UI.ARIAUtils.setLabel(sessionElement.listItemElement, errorTitle);
149
+ } else {
150
+ sessionElement.setLeadingIcons([createIcon('database')]);
151
+ UI.ARIAUtils.setLabel(sessionElement.listItemElement, title);
152
+ }
132
153
  }
133
154
 
134
155
  #updateIconAndStyling(site: string, sessionId: string|undefined): void {