chrome-devtools-frontend 1.0.1003647 → 1.0.1004895

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 (53) hide show
  1. package/config/gni/devtools_grd_files.gni +2 -0
  2. package/front_end/core/common/ParsedURL.ts +7 -3
  3. package/front_end/core/host/UserMetrics.ts +1 -1
  4. package/front_end/core/i18n/locales/en-US.json +48 -6
  5. package/front_end/core/i18n/locales/en-XL.json +48 -6
  6. package/front_end/core/sdk/DOMModel.ts +15 -0
  7. package/front_end/core/sdk/DebuggerModel.ts +12 -0
  8. package/front_end/core/sdk/NetworkManager.ts +2 -2
  9. package/front_end/core/sdk/ResourceTreeModel.ts +32 -6
  10. package/front_end/core/sdk/RuntimeModel.ts +5 -3
  11. package/front_end/core/sdk/WebAuthnModel.ts +1 -1
  12. package/front_end/entrypoints/main/MainImpl.ts +2 -2
  13. package/front_end/generated/InspectorBackendCommands.js +8 -2
  14. package/front_end/generated/SupportedCSSProperties.js +4 -0
  15. package/front_end/generated/protocol-mapping.d.ts +14 -2
  16. package/front_end/generated/protocol-proxy-api.d.ts +14 -2
  17. package/front_end/generated/protocol.ts +24 -1
  18. package/front_end/models/extensions/ExtensionPanel.ts +1 -1
  19. package/front_end/models/extensions/ExtensionServer.ts +12 -14
  20. package/front_end/models/har/Log.ts +4 -3
  21. package/front_end/models/issues_manager/DeprecationIssue.ts +3 -11
  22. package/front_end/panels/application/components/FrameDetailsView.ts +28 -0
  23. package/front_end/panels/console/ErrorStackParser.ts +2 -5
  24. package/front_end/panels/elements/ElementsTreeElement.ts +41 -0
  25. package/front_end/panels/elements/ElementsTreeOutline.ts +5 -0
  26. package/front_end/panels/elements/components/AdornerManager.ts +7 -0
  27. package/front_end/panels/elements/elementsTreeOutline.css +9 -0
  28. package/front_end/panels/issues/AffectedDirectivesView.ts +4 -3
  29. package/front_end/panels/lighthouse/LighthouseController.ts +6 -6
  30. package/front_end/panels/lighthouse/LighthousePanel.ts +1 -3
  31. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +2 -1
  32. package/front_end/panels/network/NetworkItemView.ts +10 -1
  33. package/front_end/panels/network/NetworkLogView.ts +7 -4
  34. package/front_end/panels/network/RequestHeadersView.ts +1 -1
  35. package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -2
  36. package/front_end/panels/network/components/RequestHeadersView.css +78 -0
  37. package/front_end/panels/network/components/RequestHeadersView.ts +262 -0
  38. package/front_end/panels/network/components/components.ts +2 -0
  39. package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
  40. package/front_end/panels/network/networkLogView.css +3 -3
  41. package/front_end/panels/network/requestHeadersTree.css +6 -0
  42. package/front_end/panels/profiler/HeapSnapshotView.ts +11 -13
  43. package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -1
  44. package/front_end/panels/screencast/ScreencastView.ts +0 -1
  45. package/front_end/panels/settings/SettingsScreen.ts +0 -1
  46. package/front_end/panels/sources/CallStackSidebarPane.ts +13 -0
  47. package/front_end/panels/sources/NavigatorView.ts +0 -2
  48. package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
  49. package/front_end/panels/sources/SourcesSearchScope.ts +0 -2
  50. package/front_end/panels/sources/sourcesView.css +4 -0
  51. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +16 -2
  52. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +2 -2
  53. package/package.json +1 -1
@@ -1112,6 +1112,8 @@ grd_files_debug_sources = [
1112
1112
  "front_end/panels/network/SignedExchangeInfoView.js",
1113
1113
  "front_end/panels/network/binaryResourceView.css.js",
1114
1114
  "front_end/panels/network/blockedURLsPane.css.js",
1115
+ "front_end/panels/network/components/RequestHeadersView.css.js",
1116
+ "front_end/panels/network/components/RequestHeadersView.js",
1115
1117
  "front_end/panels/network/components/RequestTrustTokensView.css.js",
1116
1118
  "front_end/panels/network/components/RequestTrustTokensView.js",
1117
1119
  "front_end/panels/network/components/WebBundleInfoView.css.js",
@@ -264,15 +264,19 @@ export class ParsedURL {
264
264
  return devToolsPaths.join(separator) as DevToolsPathType;
265
265
  }
266
266
 
267
- static split<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType, separator: string|RegExp):
268
- DevToolsPathType[] {
269
- return devToolsPath.split(separator) as DevToolsPathType[];
267
+ static split<DevToolsPathType extends BrandedPathString>(
268
+ devToolsPath: DevToolsPathType, separator: string|RegExp, limit?: number): DevToolsPathType[] {
269
+ return devToolsPath.split(separator, limit) as DevToolsPathType[];
270
270
  }
271
271
 
272
272
  static toLowerCase<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType): DevToolsPathType {
273
273
  return devToolsPath.toLowerCase() as DevToolsPathType;
274
274
  }
275
275
 
276
+ static isValidUrlString(str: string): str is Platform.DevToolsPath.UrlString {
277
+ return new ParsedURL(str).isValid;
278
+ }
279
+
276
280
  static urlWithoutHash(url: string): string {
277
281
  const hashIndex = url.indexOf('#');
278
282
  if (hashIndex !== -1) {
@@ -593,7 +593,7 @@ export enum DevtoolsExperiments {
593
593
  'developerResourcesView' = 15,
594
594
  'recordCoverageWithPerformanceTracing' = 16,
595
595
  'samplingHeapProfilerTimeline' = 17,
596
- 'showOptionToNotTreatGlobalObjectsAsRoots' = 18,
596
+ 'showOptionToExposeInternalsInHeapSnapshot' = 18,
597
597
  'sourceOrderViewer' = 20,
598
598
  'webauthnPane' = 22,
599
599
  'timelineEventInitiators' = 24,
@@ -1421,9 +1421,6 @@
1421
1421
  "models/issues_manager/DeprecationIssue.ts | localCSSFileExtensionRejected": {
1422
1422
  "message": "CSS cannot be loaded from file: URLs unless they end in a .css file extension."
1423
1423
  },
1424
- "models/issues_manager/DeprecationIssue.ts | mediaElementAudioSourceNode": {
1425
- "message": "Creating a MediaElementAudioSourceNode on an OfflineAudioContext is deprecated and will be removed."
1426
- },
1427
1424
  "models/issues_manager/DeprecationIssue.ts | mediaSourceAbortRemove": {
1428
1425
  "message": "Using SourceBuffer.abort() to abort remove()'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should instead await updateend. abort() is intended to only abort an asynchronous media append or reset parser state."
1429
1426
  },
@@ -3068,6 +3065,12 @@
3068
3065
  "panels/application/components/FrameDetailsView.ts | parentIsAdExplanation": {
3069
3066
  "message": "This frame is considered an ad frame because its parent frame is an ad frame."
3070
3067
  },
3068
+ "panels/application/components/FrameDetailsView.ts | prerendering": {
3069
+ "message": "Prerendering"
3070
+ },
3071
+ "panels/application/components/FrameDetailsView.ts | prerenderingStatus": {
3072
+ "message": "Prerendering Status"
3073
+ },
3071
3074
  "panels/application/components/FrameDetailsView.ts | refresh": {
3072
3075
  "message": "Refresh"
3073
3076
  },
@@ -6593,6 +6596,42 @@
6593
6596
  "panels/network/BlockedURLsPane.ts | textPatternToBlockMatching": {
6594
6597
  "message": "Text pattern to block matching requests; use * for wildcard"
6595
6598
  },
6599
+ "panels/network/components/RequestHeadersView.ts | fromDiskCache": {
6600
+ "message": "(from disk cache)"
6601
+ },
6602
+ "panels/network/components/RequestHeadersView.ts | fromMemoryCache": {
6603
+ "message": "(from memory cache)"
6604
+ },
6605
+ "panels/network/components/RequestHeadersView.ts | fromPrefetchCache": {
6606
+ "message": "(from prefetch cache)"
6607
+ },
6608
+ "panels/network/components/RequestHeadersView.ts | fromServiceWorker": {
6609
+ "message": "(from service worker)"
6610
+ },
6611
+ "panels/network/components/RequestHeadersView.ts | fromSignedexchange": {
6612
+ "message": "(from signed-exchange)"
6613
+ },
6614
+ "panels/network/components/RequestHeadersView.ts | fromWebBundle": {
6615
+ "message": "(from Web Bundle)"
6616
+ },
6617
+ "panels/network/components/RequestHeadersView.ts | general": {
6618
+ "message": "General"
6619
+ },
6620
+ "panels/network/components/RequestHeadersView.ts | referrerPolicy": {
6621
+ "message": "Referrer Policy"
6622
+ },
6623
+ "panels/network/components/RequestHeadersView.ts | remoteAddress": {
6624
+ "message": "Remote Address"
6625
+ },
6626
+ "panels/network/components/RequestHeadersView.ts | requestMethod": {
6627
+ "message": "Request Method"
6628
+ },
6629
+ "panels/network/components/RequestHeadersView.ts | requestUrl": {
6630
+ "message": "Request URL"
6631
+ },
6632
+ "panels/network/components/RequestHeadersView.ts | statusCode": {
6633
+ "message": "Status Code"
6634
+ },
6596
6635
  "panels/network/components/RequestTrustTokensView.ts | aClientprovidedArgumentWas": {
6597
6636
  "message": "A client-provided argument was malformed or otherwise invalid."
6598
6637
  },
@@ -8072,6 +8111,9 @@
8072
8111
  "panels/profiler/HeapSnapshotView.ts | containment": {
8073
8112
  "message": "Containment"
8074
8113
  },
8114
+ "panels/profiler/HeapSnapshotView.ts | exposeInternals": {
8115
+ "message": "Expose internals (includes additional implementation-specific details)"
8116
+ },
8075
8117
  "panels/profiler/HeapSnapshotView.ts | filter": {
8076
8118
  "message": "Filter"
8077
8119
  },
@@ -8159,9 +8201,6 @@
8159
8201
  "panels/profiler/HeapSnapshotView.ts | takeHeapSnapshot": {
8160
8202
  "message": "Take heap snapshot"
8161
8203
  },
8162
- "panels/profiler/HeapSnapshotView.ts | treatGlobalObjectsAsRoots": {
8163
- "message": "Treat global objects as roots (recommended, unchecking this exposes internal nodes and introduces excessive detail, but might help debugging cycles in retaining paths)"
8164
- },
8165
8204
  "panels/profiler/HeapSnapshotView.ts | typedArrays": {
8166
8205
  "message": "Typed arrays"
8167
8206
  },
@@ -9455,6 +9494,9 @@
9455
9494
  "panels/sources/CallStackSidebarPane.ts | removeFromIgnoreList": {
9456
9495
  "message": "Remove from ignore list"
9457
9496
  },
9497
+ "panels/sources/CallStackSidebarPane.ts | restartFrame": {
9498
+ "message": "Restart frame"
9499
+ },
9458
9500
  "panels/sources/CallStackSidebarPane.ts | showIgnorelistedFrames": {
9459
9501
  "message": "Show ignore-listed frames"
9460
9502
  },
@@ -1421,9 +1421,6 @@
1421
1421
  "models/issues_manager/DeprecationIssue.ts | localCSSFileExtensionRejected": {
1422
1422
  "message": "ĈŚŜ ćâńn̂ót̂ b́ê ĺôád̂éd̂ f́r̂óm̂ file: ÚR̂Ĺŝ ún̂ĺêśŝ t́ĥéŷ én̂d́ îń â .css f́îĺê éx̂t́êńŝíôń."
1423
1423
  },
1424
- "models/issues_manager/DeprecationIssue.ts | mediaElementAudioSourceNode": {
1425
- "message": "Ĉŕêát̂ín̂ǵ â MediaElementAudioSourceNode ón̂ án̂ OfflineAudioContext íŝ d́êṕr̂éĉát̂éd̂ án̂d́ ŵíl̂ĺ b̂é r̂ém̂óv̂éd̂."
1426
- },
1427
1424
  "models/issues_manager/DeprecationIssue.ts | mediaSourceAbortRemove": {
1428
1425
  "message": "Ûśîńĝ SourceBuffer.abort() t́ô áb̂ór̂t́ remove()'ŝ áŝýn̂ćĥŕôńôúŝ ŕâńĝé r̂ém̂óv̂ál̂ íŝ d́êṕr̂éĉát̂éd̂ d́ûé t̂ó ŝṕêćîf́îćât́îón̂ ćĥán̂ǵê. Śûṕp̂ór̂t́ ŵíl̂ĺ b̂é r̂ém̂óv̂éd̂ ín̂ t́ĥé f̂út̂úr̂é. Ŷóû śĥóûĺd̂ ín̂śt̂éâd́ âẃâít̂ updateend. abort() íŝ ín̂t́êńd̂éd̂ t́ô ón̂ĺŷ áb̂ór̂t́ âń âśŷńĉh́r̂ón̂óûś m̂éd̂íâ áp̂ṕêńd̂ ór̂ ŕêśêt́ p̂ár̂śêŕ ŝt́ât́ê."
1429
1426
  },
@@ -3068,6 +3065,12 @@
3068
3065
  "panels/application/components/FrameDetailsView.ts | parentIsAdExplanation": {
3069
3066
  "message": "T̂h́îś f̂ŕâḿê íŝ ćôńŝíd̂ér̂éd̂ án̂ ád̂ f́r̂ám̂é b̂éĉáûśê ít̂ś p̂ár̂én̂t́ f̂ŕâḿê íŝ án̂ ád̂ f́r̂ám̂é."
3070
3067
  },
3068
+ "panels/application/components/FrameDetailsView.ts | prerendering": {
3069
+ "message": "P̂ŕêŕêńd̂ér̂ín̂ǵ"
3070
+ },
3071
+ "panels/application/components/FrameDetailsView.ts | prerenderingStatus": {
3072
+ "message": "P̂ŕêŕêńd̂ér̂ín̂ǵ Ŝt́ât́ûś"
3073
+ },
3071
3074
  "panels/application/components/FrameDetailsView.ts | refresh": {
3072
3075
  "message": "R̂éf̂ŕêśĥ"
3073
3076
  },
@@ -6593,6 +6596,42 @@
6593
6596
  "panels/network/BlockedURLsPane.ts | textPatternToBlockMatching": {
6594
6597
  "message": "T̂éx̂t́ p̂át̂t́êŕn̂ t́ô b́l̂óĉḱ m̂át̂ćĥín̂ǵ r̂éq̂úêśt̂ś; ûśê * f́ôŕ ŵíl̂d́ĉár̂d́"
6595
6598
  },
6599
+ "panels/network/components/RequestHeadersView.ts | fromDiskCache": {
6600
+ "message": "(f̂ŕôḿ d̂íŝḱ ĉáĉh́ê)"
6601
+ },
6602
+ "panels/network/components/RequestHeadersView.ts | fromMemoryCache": {
6603
+ "message": "(f̂ŕôḿ m̂ém̂ór̂ý ĉáĉh́ê)"
6604
+ },
6605
+ "panels/network/components/RequestHeadersView.ts | fromPrefetchCache": {
6606
+ "message": "(f̂ŕôḿ p̂ŕêf́êt́ĉh́ ĉáĉh́ê)"
6607
+ },
6608
+ "panels/network/components/RequestHeadersView.ts | fromServiceWorker": {
6609
+ "message": "(f̂ŕôḿ service worker)"
6610
+ },
6611
+ "panels/network/components/RequestHeadersView.ts | fromSignedexchange": {
6612
+ "message": "(f̂ŕôḿ ŝíĝńêd́-êx́ĉh́âńĝé)"
6613
+ },
6614
+ "panels/network/components/RequestHeadersView.ts | fromWebBundle": {
6615
+ "message": "(f̂ŕôḿ Ŵéb̂ B́ûńd̂ĺê)"
6616
+ },
6617
+ "panels/network/components/RequestHeadersView.ts | general": {
6618
+ "message": "Ĝén̂ér̂ál̂"
6619
+ },
6620
+ "panels/network/components/RequestHeadersView.ts | referrerPolicy": {
6621
+ "message": "R̂éf̂ér̂ŕêŕ P̂ól̂íĉý"
6622
+ },
6623
+ "panels/network/components/RequestHeadersView.ts | remoteAddress": {
6624
+ "message": "R̂ém̂ót̂é Âd́d̂ŕêśŝ"
6625
+ },
6626
+ "panels/network/components/RequestHeadersView.ts | requestMethod": {
6627
+ "message": "R̂éq̂úêśt̂ Ḿêt́ĥód̂"
6628
+ },
6629
+ "panels/network/components/RequestHeadersView.ts | requestUrl": {
6630
+ "message": "R̂éq̂úêśt̂ ÚR̂Ĺ"
6631
+ },
6632
+ "panels/network/components/RequestHeadersView.ts | statusCode": {
6633
+ "message": "Ŝt́ât́ûś Ĉód̂é"
6634
+ },
6596
6635
  "panels/network/components/RequestTrustTokensView.ts | aClientprovidedArgumentWas": {
6597
6636
  "message": "Â ćl̂íêńt̂-ṕr̂óv̂íd̂éd̂ ár̂ǵûḿêńt̂ ẃâś m̂ál̂f́ôŕm̂éd̂ ór̂ ót̂h́êŕŵíŝé îńv̂ál̂íd̂."
6598
6637
  },
@@ -8072,6 +8111,9 @@
8072
8111
  "panels/profiler/HeapSnapshotView.ts | containment": {
8073
8112
  "message": "Ĉón̂t́âín̂ḿêńt̂"
8074
8113
  },
8114
+ "panels/profiler/HeapSnapshotView.ts | exposeInternals": {
8115
+ "message": "Êx́p̂óŝé îńt̂ér̂ńâĺŝ (ín̂ćl̂úd̂éŝ ád̂d́ît́îón̂ál̂ ím̂ṕl̂ém̂én̂t́ât́îón̂-śp̂éĉíf̂íĉ d́êt́âíl̂ś)"
8116
+ },
8075
8117
  "panels/profiler/HeapSnapshotView.ts | filter": {
8076
8118
  "message": "F̂íl̂t́êŕ"
8077
8119
  },
@@ -8159,9 +8201,6 @@
8159
8201
  "panels/profiler/HeapSnapshotView.ts | takeHeapSnapshot": {
8160
8202
  "message": "T̂ák̂é ĥéâṕ ŝńâṕŝh́ôt́"
8161
8203
  },
8162
- "panels/profiler/HeapSnapshotView.ts | treatGlobalObjectsAsRoots": {
8163
- "message": "T̂ŕêát̂ ǵl̂ób̂ál̂ ób̂j́êćt̂ś âś r̂óôt́ŝ (ŕêćôḿm̂én̂d́êd́, ûńĉh́êćk̂ín̂ǵ t̂h́îś êx́p̂óŝéŝ ín̂t́êŕn̂ál̂ ńôd́êś âńd̂ ín̂t́r̂ód̂úĉéŝ éx̂ćêśŝív̂é d̂ét̂áîĺ, b̂út̂ ḿîǵĥt́ ĥél̂ṕ d̂éb̂úĝǵîńĝ ćŷćl̂éŝ ín̂ ŕêt́âín̂ín̂ǵ p̂át̂h́ŝ)"
8164
- },
8165
8204
  "panels/profiler/HeapSnapshotView.ts | typedArrays": {
8166
8205
  "message": "T̂ýp̂éd̂ ár̂ŕâýŝ"
8167
8206
  },
@@ -9455,6 +9494,9 @@
9455
9494
  "panels/sources/CallStackSidebarPane.ts | removeFromIgnoreList": {
9456
9495
  "message": "R̂ém̂óv̂é f̂ŕôḿ îǵn̂ór̂é l̂íŝt́"
9457
9496
  },
9497
+ "panels/sources/CallStackSidebarPane.ts | restartFrame": {
9498
+ "message": "R̂éŝt́âŕt̂ f́r̂ám̂é"
9499
+ },
9458
9500
  "panels/sources/CallStackSidebarPane.ts | showIgnorelistedFrames": {
9459
9501
  "message": "Ŝh́ôẃ îǵn̂ór̂é-l̂íŝt́êd́ f̂ŕâḿêś"
9460
9502
  },
@@ -71,6 +71,7 @@ export class DOMNode {
71
71
  #creationStackTraceInternal: Promise<Protocol.Runtime.StackTrace|null>|null;
72
72
  pseudoElementsInternal: Map<string, DOMNode>;
73
73
  #distributedNodesInternal: DOMNodeShortcut[];
74
+ assignedSlot: DOMNodeShortcut|null;
74
75
  readonly shadowRootsInternal: DOMNode[];
75
76
  #attributesInternal: Map<string, Attribute>;
76
77
  // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
@@ -101,6 +102,7 @@ export class DOMNode {
101
102
  this.#creationStackTraceInternal = null;
102
103
  this.pseudoElementsInternal = new Map();
103
104
  this.#distributedNodesInternal = [];
105
+ this.assignedSlot = null;
104
106
  this.shadowRootsInternal = [];
105
107
  this.#attributesInternal = new Map();
106
108
  this.#markers = new Map();
@@ -181,6 +183,10 @@ export class DOMNode {
181
183
  this.setDistributedNodePayloads(payload.distributedNodes);
182
184
  }
183
185
 
186
+ if (payload.assignedSlot) {
187
+ this.setAssignedSlot(payload.assignedSlot);
188
+ }
189
+
184
190
  if (payload.children) {
185
191
  this.setChildrenPayload(payload.children);
186
192
  }
@@ -341,6 +347,10 @@ export class DOMNode {
341
347
  return this.pseudoElementsInternal.get(DOMNode.PseudoElementNames.Marker) || null;
342
348
  }
343
349
 
350
+ hasAssignedSlot(): boolean {
351
+ return this.assignedSlot !== null;
352
+ }
353
+
344
354
  isInsertionPoint(): boolean {
345
355
  return !this.isXMLNode() &&
346
356
  (this.#nodeNameInternal === 'SHADOW' || this.#nodeNameInternal === 'CONTENT' ||
@@ -680,6 +690,11 @@ export class DOMNode {
680
690
  }
681
691
  }
682
692
 
693
+ setAssignedSlot(payload: Protocol.DOM.BackendNode): void {
694
+ this.assignedSlot =
695
+ new DOMNodeShortcut(this.#domModelInternal.target(), payload.backendNodeId, payload.nodeType, payload.nodeName);
696
+ }
697
+
683
698
  private renumber(): void {
684
699
  if (!this.childrenInternal) {
685
700
  throw new Error('DOMNode._children is expected to not be null.');
@@ -1248,6 +1248,8 @@ export class CallFrame {
1248
1248
  #returnValueInternal: RemoteObject|null;
1249
1249
  readonly warnings: string[] = [];
1250
1250
 
1251
+ readonly canBeRestarted: boolean;
1252
+
1251
1253
  constructor(
1252
1254
  debuggerModel: DebuggerModel, script: Script, payload: Protocol.Debugger.CallFrame, inlineFrameIndex?: number,
1253
1255
  functionName?: string) {
@@ -1259,6 +1261,7 @@ export class CallFrame {
1259
1261
  this.#localScopeInternal = null;
1260
1262
  this.#inlineFrameIndexInternal = inlineFrameIndex || 0;
1261
1263
  this.#functionNameInternal = functionName || payload.functionName;
1264
+ this.canBeRestarted = Boolean(payload.canBeRestarted);
1262
1265
  for (let i = 0; i < payload.scopeChain.length; ++i) {
1263
1266
  const scope = new Scope(this, i);
1264
1267
  this.#scopeChainInternal.push(scope);
@@ -1390,6 +1393,15 @@ export class CallFrame {
1390
1393
  return {object: runtimeModel.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails};
1391
1394
  }
1392
1395
 
1396
+ async restart(): Promise<void> {
1397
+ console.assert(this.canBeRestarted, 'This frame can not be restarted.');
1398
+ // Note that even if `canBeRestarted` is true, the restart frame call can still fail.
1399
+ // The user can evaluate arbitrary code between pausing and restarting the frame that
1400
+ // could mess with the call stack.
1401
+ await this.debuggerModel.agent.invoke_restartFrame(
1402
+ {callFrameId: this.id, mode: Protocol.Debugger.RestartFrameRequestMode.StepInto});
1403
+ }
1404
+
1393
1405
  getPayload(): Protocol.Debugger.CallFrame {
1394
1406
  return this.payload;
1395
1407
  }
@@ -1101,7 +1101,7 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
1101
1101
  #updatingInterceptionPatternsPromise: Promise<void>|null;
1102
1102
  readonly #blockingEnabledSetting: Common.Settings.Setting<boolean>;
1103
1103
  readonly #blockedPatternsSetting: Common.Settings.Setting<BlockedPattern[]>;
1104
- #effectiveBlockedURLs: Platform.DevToolsPath.UrlString[];
1104
+ #effectiveBlockedURLs: string[];
1105
1105
  readonly #urlsForRequestInterceptor:
1106
1106
  Platform.MapUtilities.Multimap<(arg0: InterceptedRequest) => Promise<void>, InterceptionPattern>;
1107
1107
  #extraHeaders?: Protocol.Network.Headers;
@@ -1715,7 +1715,7 @@ export interface Conditions {
1715
1715
  }
1716
1716
 
1717
1717
  export interface BlockedPattern {
1718
- url: Platform.DevToolsPath.UrlString;
1718
+ url: string;
1719
1719
  enabled: boolean;
1720
1720
  }
1721
1721
 
@@ -64,6 +64,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
64
64
  isInterstitialShowing: boolean;
65
65
  mainFrame: ResourceTreeFrame|null;
66
66
  #pendingBackForwardCacheNotUsedEvents: Set<Protocol.Page.BackForwardCacheNotUsedEvent>;
67
+ #pendingPrerenderAttemptCompletedEvents: Set<Protocol.Page.PrerenderAttemptCompletedEvent>;
67
68
 
68
69
  constructor(target: Target) {
69
70
  super(target);
@@ -77,6 +78,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
77
78
  void this.agent.invoke_enable();
78
79
  this.#securityOriginManager = (target.model(SecurityOriginManager) as SecurityOriginManager);
79
80
  this.#pendingBackForwardCacheNotUsedEvents = new Set<Protocol.Page.BackForwardCacheNotUsedEvent>();
81
+ this.#pendingPrerenderAttemptCompletedEvents = new Set<Protocol.Page.PrerenderAttemptCompletedEvent>();
80
82
  target.registerPageDispatcher(new PageDispatcher(this));
81
83
 
82
84
  this.framesInternal = new Map();
@@ -213,7 +215,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
213
215
  this.dispatchEventToListeners(Events.FrameNavigated, frame);
214
216
 
215
217
  if (frame.isMainFrame()) {
216
- this.processPendingBackForwardCacheNotUsedEvents(frame);
218
+ this.processPendingEvents(frame);
217
219
  this.dispatchEventToListeners(Events.MainFrameNavigated, frame);
218
220
  const networkManager = this.target().model(NetworkManager);
219
221
  if (networkManager) {
@@ -539,7 +541,16 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
539
541
  }
540
542
  }
541
543
 
542
- processPendingBackForwardCacheNotUsedEvents(frame: ResourceTreeFrame): void {
544
+ onPrerenderAttemptCompleted(event: Protocol.Page.PrerenderAttemptCompletedEvent): void {
545
+ if (this.mainFrame && this.mainFrame.id === event.initiatingFrameId) {
546
+ this.mainFrame.setPrerenderFinalStatus(event.finalStatus);
547
+ this.dispatchEventToListeners(Events.PrerenderingStatusUpdated, this.mainFrame);
548
+ } else {
549
+ this.#pendingPrerenderAttemptCompletedEvents.add(event);
550
+ }
551
+ }
552
+
553
+ processPendingEvents(frame: ResourceTreeFrame): void {
543
554
  if (!frame.isMainFrame()) {
544
555
  return;
545
556
  }
@@ -547,11 +558,17 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
547
558
  if (frame.id === event.frameId && frame.loaderId === event.loaderId) {
548
559
  frame.setBackForwardCacheDetails(event);
549
560
  this.#pendingBackForwardCacheNotUsedEvents.delete(event);
550
- // No need to dispatch the `BackForwardCacheDetailsUpdated` event here,
551
- // as this method call is followed by a `MainFrameNavigated` event.
552
- return;
561
+ break;
553
562
  }
554
563
  }
564
+ for (const event of this.#pendingPrerenderAttemptCompletedEvents) {
565
+ if (frame.id === event.initiatingFrameId) {
566
+ frame.setPrerenderFinalStatus(event.finalStatus);
567
+ this.#pendingPrerenderAttemptCompletedEvents.delete(event);
568
+ break;
569
+ }
570
+ }
571
+ // No need to dispatch events here as this method call is followed by a `MainFrameNavigated` event.
555
572
  }
556
573
  }
557
574
 
@@ -575,6 +592,7 @@ export enum Events {
575
592
  InterstitialShown = 'InterstitialShown',
576
593
  InterstitialHidden = 'InterstitialHidden',
577
594
  BackForwardCacheDetailsUpdated = 'BackForwardCacheDetailsUpdated',
595
+ PrerenderingStatusUpdated = 'PrerenderingStatusUpdated',
578
596
  }
579
597
 
580
598
  export type EventTypes = {
@@ -595,6 +613,7 @@ export type EventTypes = {
595
613
  [Events.InterstitialShown]: void,
596
614
  [Events.InterstitialHidden]: void,
597
615
  [Events.BackForwardCacheDetailsUpdated]: ResourceTreeFrame,
616
+ [Events.PrerenderingStatusUpdated]: ResourceTreeFrame,
598
617
  };
599
618
 
600
619
  export class ResourceTreeFrame {
@@ -625,6 +644,7 @@ export class ResourceTreeFrame {
625
644
  explanations: [],
626
645
  explanationsTree: undefined,
627
646
  };
647
+ prerenderFinalStatus: Protocol.Page.PrerenderFinalStatus|null;
628
648
 
629
649
  constructor(
630
650
  model: ResourceTreeModel, parentFrame: ResourceTreeFrame|null, frameId: Protocol.Page.FrameId,
@@ -653,6 +673,7 @@ export class ResourceTreeFrame {
653
673
  this.#childFramesInternal = new Set();
654
674
 
655
675
  this.resourcesMap = new Map();
676
+ this.prerenderFinalStatus = null;
656
677
 
657
678
  if (this.#sameTargetParentFrameInternal) {
658
679
  this.#sameTargetParentFrameInternal.#childFramesInternal.add(this);
@@ -984,6 +1005,10 @@ export class ResourceTreeFrame {
984
1005
  getResourcesMap(): Map<string, Resource> {
985
1006
  return this.resourcesMap;
986
1007
  }
1008
+
1009
+ setPrerenderFinalStatus(status: Protocol.Page.PrerenderFinalStatus): void {
1010
+ this.prerenderFinalStatus = status;
1011
+ }
987
1012
  }
988
1013
 
989
1014
  export class PageDispatcher implements ProtocolProxyApi.PageDispatcher {
@@ -1086,7 +1111,8 @@ export class PageDispatcher implements ProtocolProxyApi.PageDispatcher {
1086
1111
  downloadProgress(): void {
1087
1112
  }
1088
1113
 
1089
- prerenderAttemptCompleted({}: Protocol.Page.PrerenderAttemptCompletedEvent): void {
1114
+ prerenderAttemptCompleted(params: Protocol.Page.PrerenderAttemptCompletedEvent): void {
1115
+ this.#resourceTreeModel.onPrerenderAttemptCompleted(params);
1090
1116
  }
1091
1117
  }
1092
1118
 
@@ -36,6 +36,7 @@ import * as Common from '../common/common.js';
36
36
  import * as Host from '../host/host.js';
37
37
  import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
38
38
  import type * as Protocol from '../../generated/protocol.js';
39
+ import type * as Platform from '../platform/platform.js';
39
40
 
40
41
  import type {FunctionDetails} from './DebuggerModel.js';
41
42
  import {DebuggerModel} from './DebuggerModel.js';
@@ -121,7 +122,8 @@ export class RuntimeModel extends SDKModel<EventTypes> {
121
122
  executionContextCreated(context: Protocol.Runtime.ExecutionContextDescription): void {
122
123
  const data = context.auxData || {isDefault: true};
123
124
  const executionContext = new ExecutionContext(
124
- this, context.id, context.uniqueId, context.name, context.origin, data['isDefault'], data['frameId']);
125
+ this, context.id, context.uniqueId, context.name, context.origin as Platform.DevToolsPath.UrlString,
126
+ data['isDefault'], data['frameId']);
125
127
  this.#executionContextById.set(executionContext.id, executionContext);
126
128
  this.dispatchEventToListeners(Events.ExecutionContextCreated, executionContext);
127
129
  }
@@ -561,14 +563,14 @@ export class ExecutionContext {
561
563
  uniqueId: string;
562
564
  name: string;
563
565
  #labelInternal: string|null;
564
- origin: string;
566
+ origin: Platform.DevToolsPath.UrlString;
565
567
  isDefault: boolean;
566
568
  runtimeModel: RuntimeModel;
567
569
  debuggerModel: DebuggerModel;
568
570
  frameId: Protocol.Page.FrameId|undefined;
569
571
  constructor(
570
572
  runtimeModel: RuntimeModel, id: Protocol.Runtime.ExecutionContextId, uniqueId: string, name: string,
571
- origin: string, isDefault: boolean, frameId?: Protocol.Page.FrameId) {
573
+ origin: Platform.DevToolsPath.UrlString, isDefault: boolean, frameId?: Protocol.Page.FrameId) {
572
574
  this.id = id;
573
575
  this.uniqueId = uniqueId;
574
576
  this.name = name;
@@ -18,7 +18,7 @@ export class WebAuthnModel extends SDKModel {
18
18
 
19
19
  setVirtualAuthEnvEnabled(enable: boolean): Promise<Object> {
20
20
  if (enable) {
21
- return this.#agent.invoke_enable();
21
+ return this.#agent.invoke_enable({enableUI: true});
22
22
  }
23
23
  return this.#agent.invoke_disable();
24
24
  }
@@ -292,8 +292,7 @@ export class MainImpl {
292
292
  'recordCoverageWithPerformanceTracing', 'Record coverage while performance tracing');
293
293
  Root.Runtime.experiments.register('samplingHeapProfilerTimeline', 'Sampling heap profiler timeline', true);
294
294
  Root.Runtime.experiments.register(
295
- 'showOptionToNotTreatGlobalObjectsAsRoots',
296
- 'Show option to take heap snapshot where globals are not treated as root');
295
+ 'showOptionToExposeInternalsInHeapSnapshot', 'Show option to expose internals in heap snapshots');
297
296
  Root.Runtime.experiments.register(
298
297
  'sourceOrderViewer', 'Source order viewer', undefined,
299
298
  'https://developer.chrome.com/blog/new-in-devtools-92/#source-order');
@@ -420,6 +419,7 @@ export class MainImpl {
420
419
  'backgroundServicesNotifications',
421
420
  'backgroundServicesPushMessaging',
422
421
  'backgroundServicesPaymentHandler',
422
+ 'bfcacheDisplayTree',
423
423
  'webauthnPane',
424
424
  'developerResourcesView',
425
425
  ]);
@@ -2081,6 +2081,7 @@ export function registerCommands(inspectorBackend) {
2081
2081
  AmbientLightSensor: 'ambient-light-sensor',
2082
2082
  AttributionReporting: 'attribution-reporting',
2083
2083
  Autoplay: 'autoplay',
2084
+ Bluetooth: 'bluetooth',
2084
2085
  BrowsingTopics: 'browsing-topics',
2085
2086
  Camera: 'camera',
2086
2087
  ChDpr: 'ch-dpr',
@@ -3073,7 +3074,7 @@ export function registerCommands(inspectorBackend) {
3073
3074
  inspectorBackend.registerEnum('WebAuthn.Ctap2Version', {Ctap2_0: 'ctap2_0', Ctap2_1: 'ctap2_1'});
3074
3075
  inspectorBackend.registerEnum(
3075
3076
  'WebAuthn.AuthenticatorTransport', {Usb: 'usb', Nfc: 'nfc', Ble: 'ble', Cable: 'cable', Internal: 'internal'});
3076
- inspectorBackend.registerCommand('WebAuthn.enable', [], []);
3077
+ inspectorBackend.registerCommand('WebAuthn.enable', [{'name': 'enableUI', 'type': 'boolean', 'optional': true}], []);
3077
3078
  inspectorBackend.registerCommand('WebAuthn.disable', [], []);
3078
3079
  inspectorBackend.registerCommand(
3079
3080
  'WebAuthn.addVirtualAuthenticator', [{'name': 'options', 'type': 'object', 'optional': false}],
@@ -3223,8 +3224,13 @@ export function registerCommands(inspectorBackend) {
3223
3224
  'Debugger.pauseOnAsyncCall', [{'name': 'parentStackTraceId', 'type': 'object', 'optional': false}], []);
3224
3225
  inspectorBackend.registerCommand(
3225
3226
  'Debugger.removeBreakpoint', [{'name': 'breakpointId', 'type': 'string', 'optional': false}], []);
3227
+ inspectorBackend.registerEnum('Debugger.RestartFrameRequestMode', {StepInto: 'StepInto'});
3226
3228
  inspectorBackend.registerCommand(
3227
- 'Debugger.restartFrame', [{'name': 'callFrameId', 'type': 'string', 'optional': false}],
3229
+ 'Debugger.restartFrame',
3230
+ [
3231
+ {'name': 'callFrameId', 'type': 'string', 'optional': false},
3232
+ {'name': 'mode', 'type': 'string', 'optional': true}
3233
+ ],
3228
3234
  ['callFrames', 'asyncStackTrace', 'asyncStackTraceId']);
3229
3235
  inspectorBackend.registerCommand(
3230
3236
  'Debugger.resume', [{'name': 'terminateOnResume', 'type': 'boolean', 'optional': true}], []);
@@ -98,6 +98,7 @@ export const generatedProperties = [
98
98
  ]
99
99
  },
100
100
  {'name': 'all'},
101
+ {'name': 'anchor-name', 'keywords': ['none']},
101
102
  {
102
103
  'longhands': [
103
104
  'animation-duration', 'animation-timing-function', 'animation-delay', 'animation-iteration-count',
@@ -660,6 +661,7 @@ export const generatedProperties = [
660
661
  ]
661
662
  },
662
663
  {'name': 'position', 'keywords': ['static', 'relative', 'absolute', 'fixed', 'sticky']},
664
+ {'name': 'position-fallback', 'keywords': ['none']},
663
665
  {'name': 'prefix'},
664
666
  {'name': 'quotes', 'inherited': true, 'keywords': ['auto', 'none']},
665
667
  {'name': 'r'},
@@ -866,6 +868,7 @@ export const generatedPropertyValues = {
866
868
  'text-before-edge', 'after-edge', 'text-after-edge', 'hanging'
867
869
  ]
868
870
  },
871
+ 'anchor-name': {'values': ['none']},
869
872
  'animation-direction': {'values': ['normal', 'reverse', 'alternate', 'alternate-reverse']},
870
873
  'animation-fill-mode': {'values': ['none', 'forwards', 'backwards', 'both']},
871
874
  'animation-iteration-count': {'values': ['infinite']},
@@ -1127,6 +1130,7 @@ export const generatedPropertyValues = {
1127
1130
  ]
1128
1131
  },
1129
1132
  'position': {'values': ['static', 'relative', 'absolute', 'fixed', 'sticky']},
1133
+ 'position-fallback': {'values': ['none']},
1130
1134
  'quotes': {'values': ['auto', 'none']},
1131
1135
  'resize': {'values': ['none', 'both', 'horizontal', 'vertical', 'block', 'inline']},
1132
1136
  'right': {'values': ['auto']},
@@ -2752,7 +2752,7 @@ export namespace ProtocolMapping {
2752
2752
  * Enable the WebAuthn domain and start intercepting credential storage and
2753
2753
  * retrieval with a virtual authenticator.
2754
2754
  */
2755
- 'WebAuthn.enable': {paramsType: []; returnType: void;};
2755
+ 'WebAuthn.enable': {paramsType: [Protocol.WebAuthn.EnableRequest?]; returnType: void;};
2756
2756
  /**
2757
2757
  * Disable the WebAuthn domain.
2758
2758
  */
@@ -2866,7 +2866,19 @@ export namespace ProtocolMapping {
2866
2866
  */
2867
2867
  'Debugger.removeBreakpoint': {paramsType: [Protocol.Debugger.RemoveBreakpointRequest]; returnType: void;};
2868
2868
  /**
2869
- * Restarts particular call frame from the beginning.
2869
+ * Restarts particular call frame from the beginning. The old, deprecated
2870
+ * behavior of `restartFrame` is to stay paused and allow further CDP commands
2871
+ * after a restart was scheduled. This can cause problems with restarting, so
2872
+ * we now continue execution immediatly after it has been scheduled until we
2873
+ * reach the beginning of the restarted frame.
2874
+ *
2875
+ * To stay back-wards compatible, `restartFrame` now expects a `mode`
2876
+ * parameter to be present. If the `mode` parameter is missing, `restartFrame`
2877
+ * errors out.
2878
+ *
2879
+ * The various return values are deprecated and `callFrames` is always empty.
2880
+ * Use the call frames from the `Debugger#paused` events instead, that fires
2881
+ * once V8 pauses at the beginning of the restarted function.
2870
2882
  */
2871
2883
  'Debugger.restartFrame':
2872
2884
  {paramsType: [Protocol.Debugger.RestartFrameRequest]; returnType: Protocol.Debugger.RestartFrameResponse;};
@@ -3508,7 +3508,7 @@ declare namespace ProtocolProxyApi {
3508
3508
  * Enable the WebAuthn domain and start intercepting credential storage and
3509
3509
  * retrieval with a virtual authenticator.
3510
3510
  */
3511
- invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3511
+ invoke_enable(params: Protocol.WebAuthn.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
3512
3512
 
3513
3513
  /**
3514
3514
  * Disable the WebAuthn domain.
@@ -3680,7 +3680,19 @@ declare namespace ProtocolProxyApi {
3680
3680
  Promise<Protocol.ProtocolResponseWithError>;
3681
3681
 
3682
3682
  /**
3683
- * Restarts particular call frame from the beginning.
3683
+ * Restarts particular call frame from the beginning. The old, deprecated
3684
+ * behavior of `restartFrame` is to stay paused and allow further CDP commands
3685
+ * after a restart was scheduled. This can cause problems with restarting, so
3686
+ * we now continue execution immediatly after it has been scheduled until we
3687
+ * reach the beginning of the restarted frame.
3688
+ *
3689
+ * To stay back-wards compatible, `restartFrame` now expects a `mode`
3690
+ * parameter to be present. If the `mode` parameter is missing, `restartFrame`
3691
+ * errors out.
3692
+ *
3693
+ * The various return values are deprecated and `callFrames` is always empty.
3694
+ * Use the call frames from the `Debugger#paused` events instead, that fires
3695
+ * once V8 pauses at the beginning of the restarted function.
3684
3696
  */
3685
3697
  invoke_restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
3686
3698