chrome-devtools-frontend 1.0.1009515 → 1.0.1010780

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 (33) hide show
  1. package/extension-api/ExtensionAPI.d.ts +5 -5
  2. package/front_end/core/host/UserMetrics.ts +3 -1
  3. package/front_end/core/i18n/locales/en-US.json +16 -7
  4. package/front_end/core/i18n/locales/en-XL.json +16 -7
  5. package/front_end/core/sdk/CSSProperty.ts +3 -3
  6. package/front_end/core/sdk/DebuggerModel.ts +12 -3
  7. package/front_end/core/sdk/EmulationModel.ts +9 -3
  8. package/front_end/core/sdk/Script.ts +3 -2
  9. package/front_end/generated/InspectorBackendCommands.js +3 -6
  10. package/front_end/generated/SupportedCSSProperties.js +2 -2
  11. package/front_end/generated/protocol.ts +24 -7
  12. package/front_end/models/bindings/BreakpointManager.ts +58 -22
  13. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +72 -65
  14. package/front_end/models/bindings/ResourceScriptMapping.ts +13 -1
  15. package/front_end/models/extensions/ExtensionAPI.ts +14 -5
  16. package/front_end/models/extensions/ExtensionServer.ts +2 -2
  17. package/front_end/models/extensions/RecorderExtensionEndpoint.ts +16 -5
  18. package/front_end/models/issues_manager/DeprecationIssue.ts +1 -10
  19. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -4
  20. package/front_end/models/persistence/Automapping.ts +18 -12
  21. package/front_end/models/persistence/PersistenceImpl.ts +10 -2
  22. package/front_end/models/workspace/WorkspaceImpl.ts +16 -9
  23. package/front_end/panels/application/DOMStorageItemsView.ts +6 -0
  24. package/front_end/panels/console/ConsoleViewMessage.ts +2 -1
  25. package/front_end/panels/sources/CallStackSidebarPane.ts +11 -4
  26. package/front_end/panels/sources/DebuggerPlugin.ts +51 -1
  27. package/front_end/ui/components/data_grid/DataGrid.ts +5 -0
  28. package/front_end/ui/components/data_grid/DataGridController.ts +5 -0
  29. package/front_end/ui/legacy/Infobar.ts +1 -0
  30. package/front_end/ui/legacy/ViewManager.ts +2 -2
  31. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  32. package/front_end/ui/legacy/infobar.css +17 -0
  33. package/package.json +1 -1
@@ -181,7 +181,8 @@ export namespace Chrome {
181
181
  * A new raw module has been loaded. If the raw wasm module references an external debug info module, its URL will be
182
182
  * passed as symbolsURL.
183
183
  */
184
- addRawModule(rawModuleId: string, symbolsURL: string|undefined, rawModule: RawModule): Promise<string[]>;
184
+ addRawModule(rawModuleId: string, symbolsURL: string|undefined, rawModule: RawModule):
185
+ Promise<string[]|{missingSymbolFiles: string[]}>;
185
186
 
186
187
  /**
187
188
  * Find locations in raw modules from a location in a source file.
@@ -242,9 +243,8 @@ export namespace Chrome {
242
243
  /**
243
244
  * Find locations in source files from a location in a raw module
244
245
  */
245
- getFunctionInfo(rawLocation: RawLocation): Promise<{
246
- frames: Array<FunctionInfo>,
247
- }>;
246
+ getFunctionInfo(rawLocation: RawLocation):
247
+ Promise<{frames: Array<FunctionInfo>}|{missingSymbolFiles: Array<string>}>;
248
248
 
249
249
  /**
250
250
  * Find locations in raw modules corresponding to the inline function
@@ -279,7 +279,7 @@ export namespace Chrome {
279
279
  }
280
280
 
281
281
  export interface RecorderExtensions {
282
- registerRecorderExtensionPlugin(plugin: RecorderExtensionPlugin, pluginName: string, mimeType: string):
282
+ registerRecorderExtensionPlugin(plugin: RecorderExtensionPlugin, pluginName: string, mediaType: string):
283
283
  Promise<void>;
284
284
  unregisterRecorderExtensionPlugin(plugin: RecorderExtensionPlugin): Promise<void>;
285
285
  }
@@ -939,7 +939,9 @@ export enum RecordingEdited {
939
939
  export enum RecordingExported {
940
940
  ToPuppeteer = 1,
941
941
  ToJSON = 2,
942
- MaxValue = 3,
942
+ ToPuppeteerReplay = 3,
943
+ ToExtension = 4,
944
+ MaxValue = 5,
943
945
  }
944
946
 
945
947
  /* eslint-disable @typescript-eslint/naming-convention */
@@ -1241,6 +1241,9 @@
1241
1241
  "models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile": {
1242
1242
  "message": "Unknown error loading file"
1243
1243
  },
1244
+ "models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete": {
1245
+ "message": "The debug information for function {PH1} is incomplete"
1246
+ },
1244
1247
  "models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin": {
1245
1248
  "message": "Error in debugger language plugin: {PH1}"
1246
1249
  },
@@ -1248,7 +1251,7 @@
1248
1251
  "message": "[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"
1249
1252
  },
1250
1253
  "models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction": {
1251
- "message": "Missing debug symbols for function \"{PH1}\""
1254
+ "message": "No debug information for function \"{PH1}\""
1252
1255
  },
1253
1256
  "models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt": {
1254
1257
  "message": "[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files"
@@ -1262,9 +1265,6 @@
1262
1265
  "models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia": {
1263
1266
  "message": "[{PH1}] Loading debug symbols for {PH2} (via {PH3})..."
1264
1267
  },
1265
- "models/bindings/DebuggerLanguagePlugins.ts | symbolFileNotFound": {
1266
- "message": "Symbol file \"{PH1}\" not found"
1267
- },
1268
1268
  "models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed": {
1269
1269
  "message": "LiveEdit compile failed: {PH1}"
1270
1270
  },
@@ -1442,9 +1442,6 @@
1442
1442
  "models/issues_manager/DeprecationIssue.ts | obsoleteWebRtcCipherSuite": {
1443
1443
  "message": "Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed."
1444
1444
  },
1445
- "models/issues_manager/DeprecationIssue.ts | paymentRequestBasicCard": {
1446
- "message": "The basic-card payment method is deprecated and will be removed."
1447
- },
1448
1445
  "models/issues_manager/DeprecationIssue.ts | pictureSourceSrc": {
1449
1446
  "message": "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."
1450
1447
  },
@@ -3293,6 +3290,9 @@
3293
3290
  "panels/application/DOMStorageItemsView.ts | domStorageItems": {
3294
3291
  "message": "DOM Storage Items"
3295
3292
  },
3293
+ "panels/application/DOMStorageItemsView.ts | domStorageItemsCleared": {
3294
+ "message": "{PH1} cleared"
3295
+ },
3296
3296
  "panels/application/DOMStorageItemsView.ts | domStorageNumberEntries": {
3297
3297
  "message": "Number of entries shown in table: {PH1}"
3298
3298
  },
@@ -9515,6 +9515,9 @@
9515
9515
  "panels/sources/CallStackSidebarPane.ts | copyStackTrace": {
9516
9516
  "message": "Copy stack trace"
9517
9517
  },
9518
+ "panels/sources/CallStackSidebarPane.ts | debugFileNotFound": {
9519
+ "message": "Failed to load debug file \"{PH1}\"."
9520
+ },
9518
9521
  "panels/sources/CallStackSidebarPane.ts | notPaused": {
9519
9522
  "message": "Not paused"
9520
9523
  },
@@ -9650,6 +9653,12 @@
9650
9653
  "panels/sources/DebuggerPlugin.ts | configure": {
9651
9654
  "message": "Configure"
9652
9655
  },
9656
+ "panels/sources/DebuggerPlugin.ts | debugFileNotFound": {
9657
+ "message": "Failed to load debug file \"{PH1}\"."
9658
+ },
9659
+ "panels/sources/DebuggerPlugin.ts | debugInfoNotFound": {
9660
+ "message": "Failed to load any debug info for {PH1}."
9661
+ },
9653
9662
  "panels/sources/DebuggerPlugin.ts | disableBreakpoint": {
9654
9663
  "message": "{n, plural, =1 {Disable breakpoint} other {Disable all breakpoints in line}}"
9655
9664
  },
@@ -1241,6 +1241,9 @@
1241
1241
  "models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile": {
1242
1242
  "message": "Ûńk̂ńôẃn̂ ér̂ŕôŕ l̂óâd́îńĝ f́îĺê"
1243
1243
  },
1244
+ "models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete": {
1245
+ "message": "T̂h́ê d́êb́ûǵ îńf̂ór̂ḿât́îón̂ f́ôŕ f̂ún̂ćt̂íôń {PH1} îś îńĉóm̂ṕl̂ét̂é"
1246
+ },
1244
1247
  "models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin": {
1245
1248
  "message": "Êŕr̂ór̂ ín̂ d́êb́ûǵĝér̂ ĺâńĝúâǵê ṕl̂úĝín̂: {PH1}"
1246
1249
  },
@@ -1248,7 +1251,7 @@
1248
1251
  "message": "[{PH1}] F̂áîĺêd́ t̂ó l̂óâd́ d̂éb̂úĝ śŷḿb̂ól̂ś f̂ór̂ {PH2} ({PH3})"
1249
1252
  },
1250
1253
  "models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction": {
1251
- "message": "M̂íŝśîńĝ d́êb́ûǵ ŝým̂b́ôĺôún̂ćt̂íô \"{PH1}\""
1254
+ "message": "N̂ó d̂éb̂úĝ ín̂f́ôŕm̂át̂íôń f̂ór̂ f́ûńĉt́îón̂ \"{PH1}\""
1252
1255
  },
1253
1256
  "models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt": {
1254
1257
  "message": "[{PH1}] L̂óâd́êd́ d̂éb̂úĝ śŷḿb̂ól̂ś f̂ór̂ {PH2}, b́ût́ d̂íd̂ń't̂ f́îńd̂ án̂ý ŝóûŕĉé f̂íl̂éŝ"
@@ -1262,9 +1265,6 @@
1262
1265
  "models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia": {
1263
1266
  "message": "[{PH1}] L̂óâd́îńĝ d́êb́ûǵ ŝým̂b́ôĺŝ f́ôŕ {PH2} (v̂íâ {PH3})..."
1264
1267
  },
1265
- "models/bindings/DebuggerLanguagePlugins.ts | symbolFileNotFound": {
1266
- "message": "Ŝým̂b́ôĺ f̂íl̂é \"{PH1}\" n̂ót̂ f́ôún̂d́"
1267
- },
1268
1268
  "models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed": {
1269
1269
  "message": "LiveEdit ĉóm̂ṕîĺê f́âíl̂éd̂: {PH1}"
1270
1270
  },
@@ -1442,9 +1442,6 @@
1442
1442
  "models/issues_manager/DeprecationIssue.ts | obsoleteWebRtcCipherSuite": {
1443
1443
  "message": "Ŷóûŕ p̂ár̂t́n̂ér̂ íŝ ńêǵôt́îát̂ín̂ǵ âń ôb́ŝól̂ét̂é (D̂)T́L̂Ś v̂ér̂śîón̂. Ṕl̂éâśê ćĥéĉḱ ŵít̂h́ ŷóûŕ p̂ár̂t́n̂ér̂ t́ô h́âv́ê t́ĥíŝ f́îx́êd́."
1444
1444
  },
1445
- "models/issues_manager/DeprecationIssue.ts | paymentRequestBasicCard": {
1446
- "message": "T̂h́ê basic-card ṕâým̂én̂t́ m̂ét̂h́ôd́ îś d̂ép̂ŕêćât́êd́ âńd̂ ẃîĺl̂ b́ê ŕêḿôv́êd́."
1447
- },
1448
1445
  "models/issues_manager/DeprecationIssue.ts | pictureSourceSrc": {
1449
1446
  "message": "<source src> ŵít̂h́ â <picture> ṕâŕêńt̂ íŝ ín̂v́âĺîd́ âńd̂ t́ĥér̂éf̂ór̂é îǵn̂ór̂éd̂. Ṕl̂éâśê úŝé <source srcset> îńŝt́êád̂."
1450
1447
  },
@@ -3293,6 +3290,9 @@
3293
3290
  "panels/application/DOMStorageItemsView.ts | domStorageItems": {
3294
3291
  "message": "D̂ÓM̂ Śt̂ór̂áĝé Ît́êḿŝ"
3295
3292
  },
3293
+ "panels/application/DOMStorageItemsView.ts | domStorageItemsCleared": {
3294
+ "message": "{PH1} ĉĺêár̂éd̂"
3295
+ },
3296
3296
  "panels/application/DOMStorageItemsView.ts | domStorageNumberEntries": {
3297
3297
  "message": "N̂úm̂b́êŕ ôf́ êńt̂ŕîéŝ śĥóŵń îń t̂áb̂ĺê: {PH1}"
3298
3298
  },
@@ -9515,6 +9515,9 @@
9515
9515
  "panels/sources/CallStackSidebarPane.ts | copyStackTrace": {
9516
9516
  "message": "Ĉóp̂ý ŝt́âćk̂ t́r̂áĉé"
9517
9517
  },
9518
+ "panels/sources/CallStackSidebarPane.ts | debugFileNotFound": {
9519
+ "message": "F̂áîĺêd́ t̂ó l̂óâd́ d̂éb̂úĝ f́îĺê \"{PH1}\"."
9520
+ },
9518
9521
  "panels/sources/CallStackSidebarPane.ts | notPaused": {
9519
9522
  "message": "N̂ót̂ ṕâúŝéd̂"
9520
9523
  },
@@ -9650,6 +9653,12 @@
9650
9653
  "panels/sources/DebuggerPlugin.ts | configure": {
9651
9654
  "message": "Ĉón̂f́îǵûŕê"
9652
9655
  },
9656
+ "panels/sources/DebuggerPlugin.ts | debugFileNotFound": {
9657
+ "message": "F̂áîĺêd́ t̂ó l̂óâd́ d̂éb̂úĝ f́îĺê \"{PH1}\"."
9658
+ },
9659
+ "panels/sources/DebuggerPlugin.ts | debugInfoNotFound": {
9660
+ "message": "F̂áîĺêd́ t̂ó l̂óâd́ âńŷ d́êb́ûǵ îńf̂ó f̂ór̂ {PH1}."
9661
+ },
9653
9662
  "panels/sources/DebuggerPlugin.ts | disableBreakpoint": {
9654
9663
  "message": "{n, plural, =1 {D̂íŝáb̂ĺê b́r̂éâḱp̂óîńt̂} other {D́îśâb́l̂é âĺl̂ b́r̂éâḱp̂óîńt̂ś îń l̂ín̂é}}"
9655
9664
  },
@@ -188,7 +188,7 @@ export class CSSProperty {
188
188
  if (insideProperty) {
189
189
  result += propertyText;
190
190
  }
191
- result = result.substring(2, result.length - 1).trimRight();
191
+ result = result.substring(2, result.length - 1).trimEnd();
192
192
  return result + (indentation ? '\n' + endIndentation : '');
193
193
 
194
194
  function processToken(token: string, tokenType: string|null): void {
@@ -230,8 +230,8 @@ export class CSSProperty {
230
230
  }
231
231
  if (cssMetadata().isGridAreaDefiningProperty(propertyName)) {
232
232
  const rowResult = GridAreaRowRegex.exec(token);
233
- if (rowResult && rowResult.index === 0 && !propertyText.trimRight().endsWith(']')) {
234
- propertyText = propertyText.trimRight() + '\n' + doubleIndent;
233
+ if (rowResult && rowResult.index === 0 && !propertyText.trimEnd().endsWith(']')) {
234
+ propertyText = propertyText.trimEnd() + '\n' + doubleIndent;
235
235
  }
236
236
  }
237
237
  if (!propertyName && token === ':') {
@@ -1242,6 +1242,11 @@ export class BreakLocation extends Location {
1242
1242
  }
1243
1243
  }
1244
1244
 
1245
+ export interface MissingDebugInfoDetails {
1246
+ details: string;
1247
+ resources: string[];
1248
+ }
1249
+
1245
1250
  export class CallFrame {
1246
1251
  debuggerModel: DebuggerModel;
1247
1252
  readonly #scriptInternal: Script;
@@ -1253,7 +1258,7 @@ export class CallFrame {
1253
1258
  readonly #functionNameInternal: string;
1254
1259
  readonly #functionLocationInternal: Location|undefined;
1255
1260
  #returnValueInternal: RemoteObject|null;
1256
- readonly warnings: string[] = [];
1261
+ #missingDebugInfoDetails: MissingDebugInfoDetails|null = null;
1257
1262
 
1258
1263
  readonly canBeRestarted: boolean;
1259
1264
 
@@ -1299,8 +1304,12 @@ export class CallFrame {
1299
1304
  return new CallFrame(this.debuggerModel, this.#scriptInternal, this.payload, inlineFrameIndex, name);
1300
1305
  }
1301
1306
 
1302
- addWarning(warning: string): void {
1303
- this.warnings.push(warning);
1307
+ setMissingDebugInfoDetails(details: MissingDebugInfoDetails): void {
1308
+ this.#missingDebugInfoDetails = details;
1309
+ }
1310
+
1311
+ get missingDebugInfoDetails(): MissingDebugInfoDetails|null {
1312
+ return this.#missingDebugInfoDetails;
1304
1313
  }
1305
1314
 
1306
1315
  get script(): Script {
@@ -21,6 +21,7 @@ export class EmulationModel extends SDKModel<void> {
21
21
  readonly #mediaConfiguration: Map<string, string>;
22
22
  #touchEnabled: boolean;
23
23
  #touchMobile: boolean;
24
+ #touchEmulationAllowed: boolean;
24
25
  #customTouchEnabled: boolean;
25
26
  #touchConfiguration: {
26
27
  enabled: boolean,
@@ -176,6 +177,7 @@ export class EmulationModel extends SDKModel<void> {
176
177
  updateDisabledImageFormats();
177
178
  }
178
179
 
180
+ this.#touchEmulationAllowed = true;
179
181
  this.#touchEnabled = false;
180
182
  this.#touchMobile = false;
181
183
  this.#customTouchEnabled = false;
@@ -185,6 +187,10 @@ export class EmulationModel extends SDKModel<void> {
185
187
  };
186
188
  }
187
189
 
190
+ setTouchEmulationAllowed(touchEmulationAllowed: boolean): void {
191
+ this.#touchEmulationAllowed = touchEmulationAllowed;
192
+ }
193
+
188
194
  supportsDeviceEmulation(): boolean {
189
195
  return this.target().hasAllCapabilities(Capability.DeviceEmulation);
190
196
  }
@@ -322,13 +328,13 @@ export class EmulationModel extends SDKModel<void> {
322
328
  }
323
329
 
324
330
  async emulateTouch(enabled: boolean, mobile: boolean): Promise<void> {
325
- this.#touchEnabled = enabled;
326
- this.#touchMobile = mobile;
331
+ this.#touchEnabled = enabled && this.#touchEmulationAllowed;
332
+ this.#touchMobile = mobile && this.#touchEmulationAllowed;
327
333
  await this.updateTouch();
328
334
  }
329
335
 
330
336
  async overrideEmulateTouch(enabled: boolean): Promise<void> {
331
- this.#customTouchEnabled = enabled;
337
+ this.#customTouchEnabled = enabled && this.#touchEmulationAllowed;
332
338
  await this.updateTouch();
333
339
  }
334
340
 
@@ -192,7 +192,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
192
192
 
193
193
  originalContentProvider(): TextUtils.ContentProvider.ContentProvider {
194
194
  if (!this.#originalContentProviderInternal) {
195
- /* } */
196
195
  let lazyContentPromise: Promise<TextUtils.ContentProvider.DeferredContent>|null;
197
196
  this.#originalContentProviderInternal =
198
197
  new TextUtils.StaticContentProvider.StaticContentProvider(this.contentURL(), this.contentType(), () => {
@@ -220,7 +219,9 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
220
219
  return {content: bytecode, isEncoded: true};
221
220
  }
222
221
  let content: string = scriptSource || '';
223
- if (this.hasSourceURL) {
222
+ if (this.hasSourceURL && this.sourceURL.startsWith('snippet://')) {
223
+ // TODO(crbug.com/1330846): Find a better way to establish the snippet automapping binding then adding
224
+ // a sourceURL comment before evaluation and removing it here.
224
225
  content = Script.trimSourceURLComment(content);
225
226
  }
226
227
  return {content, isEncoded: false};
@@ -296,7 +296,6 @@ export function registerCommands(inspectorBackend) {
296
296
  NotificationInsecureOrigin: 'NotificationInsecureOrigin',
297
297
  NotificationPermissionRequestedIframe: 'NotificationPermissionRequestedIframe',
298
298
  ObsoleteWebRtcCipherSuite: 'ObsoleteWebRtcCipherSuite',
299
- PaymentRequestBasicCard: 'PaymentRequestBasicCard',
300
299
  PictureSourceSrc: 'PictureSourceSrc',
301
300
  PrefixedCancelAnimationFrame: 'PrefixedCancelAnimationFrame',
302
301
  PrefixedRequestAnimationFrame: 'PrefixedRequestAnimationFrame',
@@ -1735,9 +1734,10 @@ export function registerCommands(inspectorBackend) {
1735
1734
  inspectorBackend.registerEnum('Network.CrossOriginOpenerPolicyValue', {
1736
1735
  SameOrigin: 'SameOrigin',
1737
1736
  SameOriginAllowPopups: 'SameOriginAllowPopups',
1737
+ RestrictProperties: 'RestrictProperties',
1738
1738
  UnsafeNone: 'UnsafeNone',
1739
1739
  SameOriginPlusCoep: 'SameOriginPlusCoep',
1740
- SameOriginAllowPopupsPlusCoep: 'SameOriginAllowPopupsPlusCoep'
1740
+ RestrictPropertiesPlusCoep: 'RestrictPropertiesPlusCoep'
1741
1741
  });
1742
1742
  inspectorBackend.registerEnum(
1743
1743
  'Network.CrossOriginEmbedderPolicyValue',
@@ -2085,7 +2085,6 @@ export function registerCommands(inspectorBackend) {
2085
2085
  ChDeviceMemory: 'ch-device-memory',
2086
2086
  ChDownlink: 'ch-downlink',
2087
2087
  ChEct: 'ch-ect',
2088
- ChPartitionedCookies: 'ch-partitioned-cookies',
2089
2088
  ChPrefersColorScheme: 'ch-prefers-color-scheme',
2090
2089
  ChRtt: 'ch-rtt',
2091
2090
  ChSaveData: 'ch-save-data',
@@ -2317,7 +2316,6 @@ export function registerCommands(inspectorBackend) {
2317
2316
  ContentMediaDevicesDispatcherHost: 'ContentMediaDevicesDispatcherHost',
2318
2317
  ContentWebBluetooth: 'ContentWebBluetooth',
2319
2318
  ContentWebUSB: 'ContentWebUSB',
2320
- ContentMediaSession: 'ContentMediaSession',
2321
2319
  ContentMediaSessionService: 'ContentMediaSessionService',
2322
2320
  ContentScreenReader: 'ContentScreenReader',
2323
2321
  EmbedderPopupBlockerTabHelper: 'EmbedderPopupBlockerTabHelper',
@@ -2379,8 +2377,7 @@ export function registerCommands(inspectorBackend) {
2379
2377
  inspectorBackend.registerEnum(
2380
2378
  'Page.FileChooserOpenedEventMode', {SelectSingle: 'selectSingle', SelectMultiple: 'selectMultiple'});
2381
2379
  inspectorBackend.registerEvent('Page.fileChooserOpened', ['frameId', 'backendNodeId', 'mode']);
2382
- inspectorBackend.registerEvent(
2383
- 'Page.frameAttached', ['frameId', 'parentFrameId', 'stack', 'adScriptId', 'debuggerId']);
2380
+ inspectorBackend.registerEvent('Page.frameAttached', ['frameId', 'parentFrameId', 'stack', 'adScriptId']);
2384
2381
  inspectorBackend.registerEvent('Page.frameClearedScheduledNavigation', ['frameId']);
2385
2382
  inspectorBackend.registerEnum('Page.FrameDetachedEventReason', {Remove: 'remove', Swap: 'swap'});
2386
2383
  inspectorBackend.registerEvent('Page.frameDetached', ['frameId', 'reason']);
@@ -571,9 +571,9 @@ export const generatedProperties = [
571
571
  {'name': 'math-depth', 'inherited': true},
572
572
  {'name': 'math-shift', 'inherited': true, 'keywords': ['normal', 'compact']},
573
573
  {'name': 'math-style', 'inherited': true, 'keywords': ['normal', 'compact']},
574
- {'keywords': ['none'], 'name': 'max-block-size'},
574
+ {'name': 'max-block-size', 'keywords': ['none']},
575
575
  {'name': 'max-height', 'keywords': ['none']},
576
- {'keywords': ['none'], 'name': 'max-inline-size'},
576
+ {'name': 'max-inline-size', 'keywords': ['none']},
577
577
  {'name': 'max-width', 'keywords': ['none']},
578
578
  {'name': 'max-zoom'},
579
579
  {'name': 'min-block-size'},
@@ -970,7 +970,7 @@ export namespace Audits {
970
970
 
971
971
  /**
972
972
  * Details for issues around "Attribution Reporting API" usage.
973
- * Explainer: https://github.com/WICG/conversion-measurement-api
973
+ * Explainer: https://github.com/WICG/attribution-reporting-api
974
974
  */
975
975
  export interface AttributionReportingIssueDetails {
976
976
  violationType: AttributionReportingIssueType;
@@ -1043,7 +1043,6 @@ export namespace Audits {
1043
1043
  NotificationInsecureOrigin = 'NotificationInsecureOrigin',
1044
1044
  NotificationPermissionRequestedIframe = 'NotificationPermissionRequestedIframe',
1045
1045
  ObsoleteWebRtcCipherSuite = 'ObsoleteWebRtcCipherSuite',
1046
- PaymentRequestBasicCard = 'PaymentRequestBasicCard',
1047
1046
  PictureSourceSrc = 'PictureSourceSrc',
1048
1047
  PrefixedCancelAnimationFrame = 'PrefixedCancelAnimationFrame',
1049
1048
  PrefixedRequestAnimationFrame = 'PrefixedRequestAnimationFrame',
@@ -8156,9 +8155,10 @@ export namespace Network {
8156
8155
  export const enum CrossOriginOpenerPolicyValue {
8157
8156
  SameOrigin = 'SameOrigin',
8158
8157
  SameOriginAllowPopups = 'SameOriginAllowPopups',
8158
+ RestrictProperties = 'RestrictProperties',
8159
8159
  UnsafeNone = 'UnsafeNone',
8160
8160
  SameOriginPlusCoep = 'SameOriginPlusCoep',
8161
- SameOriginAllowPopupsPlusCoep = 'SameOriginAllowPopupsPlusCoep',
8161
+ RestrictPropertiesPlusCoep = 'RestrictPropertiesPlusCoep',
8162
8162
  }
8163
8163
 
8164
8164
  export interface CrossOriginOpenerPolicyStatus {
@@ -10138,6 +10138,22 @@ export namespace Page {
10138
10138
  explanations?: AdFrameExplanation[];
10139
10139
  }
10140
10140
 
10141
+ /**
10142
+ * Identifies the bottom-most script which caused the frame to be labelled
10143
+ * as an ad.
10144
+ */
10145
+ export interface AdScriptId {
10146
+ /**
10147
+ * Script Id of the bottom-most script which caused the frame to be labelled
10148
+ * as an ad.
10149
+ */
10150
+ scriptId: Runtime.ScriptId;
10151
+ /**
10152
+ * Id of adScriptId's debugger.
10153
+ */
10154
+ debuggerId: Runtime.UniqueDebuggerId;
10155
+ }
10156
+
10141
10157
  /**
10142
10158
  * Indicates whether the frame is a secure context and why it is the case.
10143
10159
  */
@@ -10180,7 +10196,6 @@ export namespace Page {
10180
10196
  ChDeviceMemory = 'ch-device-memory',
10181
10197
  ChDownlink = 'ch-downlink',
10182
10198
  ChEct = 'ch-ect',
10183
- ChPartitionedCookies = 'ch-partitioned-cookies',
10184
10199
  ChPrefersColorScheme = 'ch-prefers-color-scheme',
10185
10200
  ChRtt = 'ch-rtt',
10186
10201
  ChSaveData = 'ch-save-data',
@@ -10914,7 +10929,6 @@ export namespace Page {
10914
10929
  ContentMediaDevicesDispatcherHost = 'ContentMediaDevicesDispatcherHost',
10915
10930
  ContentWebBluetooth = 'ContentWebBluetooth',
10916
10931
  ContentWebUSB = 'ContentWebUSB',
10917
- ContentMediaSession = 'ContentMediaSession',
10918
10932
  ContentMediaSessionService = 'ContentMediaSessionService',
10919
10933
  ContentScreenReader = 'ContentScreenReader',
10920
10934
  EmbedderPopupBlockerTabHelper = 'EmbedderPopupBlockerTabHelper',
@@ -11764,8 +11778,11 @@ export namespace Page {
11764
11778
  * JavaScript stack trace of when frame was attached, only set if frame initiated from script.
11765
11779
  */
11766
11780
  stack?: Runtime.StackTrace;
11767
- adScriptId?: Runtime.ScriptId;
11768
- debuggerId?: Runtime.UniqueDebuggerId;
11781
+ /**
11782
+ * Identifies the bottom-most script which caused the frame to be labelled
11783
+ * as an ad. Only sent if frame is labelled as an ad and id is available.
11784
+ */
11785
+ adScriptId?: AdScriptId;
11769
11786
  }
11770
11787
 
11771
11788
  /**
@@ -51,6 +51,7 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
51
51
  readonly debuggerWorkspaceBinding: DebuggerWorkspaceBinding;
52
52
  readonly #breakpointsForUISourceCode: Map<Workspace.UISourceCode.UISourceCode, Map<string, BreakpointLocation>>;
53
53
  readonly #breakpointByStorageId: Map<string, Breakpoint>;
54
+ #updateBindingsCallbacks: ((uiSourceCode: Workspace.UISourceCode.UISourceCode) => Promise<void>)[];
54
55
 
55
56
  private constructor(
56
57
  targetManager: SDK.TargetManager.TargetManager, workspace: Workspace.Workspace.WorkspaceImpl,
@@ -69,6 +70,7 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
69
70
  this.#workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.projectRemoved, this);
70
71
 
71
72
  this.targetManager.observeModels(SDK.DebuggerModel.DebuggerModel, this);
73
+ this.#updateBindingsCallbacks = [];
72
74
  }
73
75
 
74
76
  static instance(opts: {
@@ -108,6 +110,10 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
108
110
  debuggerModel.setSynchronizeBreakpointsCallback(null);
109
111
  }
110
112
 
113
+ addUpdateBindingsCallback(callback: ((uiSourceCode: Workspace.UISourceCode.UISourceCode) => Promise<void>)): void {
114
+ this.#updateBindingsCallbacks.push(callback);
115
+ }
116
+
111
117
  async copyBreakpoints(fromURL: Platform.DevToolsPath.UrlString, toSourceCode: Workspace.UISourceCode.UISourceCode):
112
118
  Promise<void> {
113
119
  const breakpointItems = this.storage.breakpointItems(fromURL);
@@ -122,15 +128,13 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
122
128
  if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS)) {
123
129
  return;
124
130
  }
131
+ if (!script.sourceURL) {
132
+ return;
133
+ }
134
+
125
135
  const debuggerModel = script.debuggerModel;
136
+ const uiSourceCode = await this.getUpdatedUISourceCode(script);
126
137
  if (this.#hasBreakpointsForUrl(script.sourceURL)) {
127
- // Handle inline scripts without sourceURL comment separately:
128
- // The UISourceCode of inline scripts without sourceURLs will not be availabe
129
- // until a later point. Use the v8 script for setting the breakpoint.
130
- const isInlineScriptWithoutSourceURL = script.isInlineScript() && !script.hasSourceURL;
131
- const sourceURL =
132
- isInlineScriptWithoutSourceURL ? DefaultScriptMapping.createV8ScriptURL(script) : script.sourceURL;
133
- const uiSourceCode = await Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURLPromise(sourceURL);
134
138
  await this.#restoreBreakpointsForUrl(uiSourceCode);
135
139
  }
136
140
 
@@ -149,7 +153,7 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
149
153
  const {pluginManager} = this.debuggerWorkspaceBinding;
150
154
  if (pluginManager) {
151
155
  const sourceUrls = await pluginManager.getSourcesForScript(script);
152
- if (sourceUrls) {
156
+ if (Array.isArray(sourceUrls)) {
153
157
  for (const sourceURL of sourceUrls) {
154
158
  if (this.#hasBreakpointsForUrl(sourceURL)) {
155
159
  const uiSourceCode =
@@ -161,6 +165,34 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
161
165
  }
162
166
  }
163
167
 
168
+ async getUpdatedUISourceCode(script: SDK.Script.Script): Promise<Workspace.UISourceCode.UISourceCode> {
169
+ const isSnippet = script.sourceURL.startsWith('snippet://');
170
+ const projectType = isSnippet ? Workspace.Workspace.projectTypes.Network : undefined;
171
+
172
+ // Handle inline scripts without sourceURL comment separately:
173
+ // The UISourceCode of inline scripts without sourceURLs will not be availabe
174
+ // until a later point. Use the v8 script for setting the breakpoint.
175
+ const isInlineScriptWithoutSourceURL = script.isInlineScript() && !script.hasSourceURL;
176
+ const sourceURL =
177
+ isInlineScriptWithoutSourceURL ? DefaultScriptMapping.createV8ScriptURL(script) : script.sourceURL;
178
+ const uiSourceCode =
179
+ await Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURLPromise(sourceURL, projectType);
180
+
181
+ if (this.#updateBindingsCallbacks.length > 0) {
182
+ // It's possible to set breakpoints on files on the file system, and to have them
183
+ // hit whenever we navigate to a page that serves that file.
184
+ // To make sure that we have all breakpoint information moved from the file system
185
+ // to the served file, we need to update the bindings and await it. This will
186
+ // move the breakpoints from the FileSystem UISourceCode to the Network UiSourceCode.
187
+ const promises = [];
188
+ for (const callback of this.#updateBindingsCallbacks) {
189
+ promises.push(callback(uiSourceCode));
190
+ }
191
+ await Promise.all(promises);
192
+ }
193
+ return uiSourceCode;
194
+ }
195
+
164
196
  async #restoreBreakpointsForUrl(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<void> {
165
197
  this.restoreBreakpoints(uiSourceCode);
166
198
  const breakpoints = this.#breakpointByStorageId.values();
@@ -713,20 +745,24 @@ export class ModelBreakpoint {
713
745
  };
714
746
  });
715
747
  newState = new Breakpoint.State(positions, condition);
716
- } else if (this.#breakpoint.currentState) {
717
- newState = new Breakpoint.State(this.#breakpoint.currentState.positions, condition);
718
- } else {
719
- // TODO(bmeurer): This fallback doesn't make a whole lot of sense, we should
720
- // at least signal a warning to the developer that this #breakpoint wasn't
721
- // really resolved.
722
- const position = {
723
- url: this.#breakpoint.url(),
724
- scriptId: '' as Protocol.Runtime.ScriptId,
725
- scriptHash: '',
726
- lineNumber,
727
- columnNumber,
728
- };
729
- newState = new Breakpoint.State([position], condition);
748
+ } else if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS)) {
749
+ // Use this fallback if we do not have instrumentation breakpoints enabled yet. This currently makes
750
+ // sure that v8 knows about the breakpoint and is able to restore it whenever the script is parsed.
751
+ if (this.#breakpoint.currentState) {
752
+ newState = new Breakpoint.State(this.#breakpoint.currentState.positions, condition);
753
+ } else {
754
+ // TODO(bmeurer): This fallback doesn't make a whole lot of sense, we should
755
+ // at least signal a warning to the developer that this #breakpoint wasn't
756
+ // really resolved.
757
+ const position = {
758
+ url: this.#breakpoint.url(),
759
+ scriptId: '' as Protocol.Runtime.ScriptId,
760
+ scriptHash: '',
761
+ lineNumber,
762
+ columnNumber,
763
+ };
764
+ newState = new Breakpoint.State([position], condition);
765
+ }
730
766
  }
731
767
  }
732
768