chrome-devtools-frontend 1.0.1650677 → 1.0.1652307

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 (25) hide show
  1. package/front_end/core/sdk/CSSMatchedStyles.ts +20 -4
  2. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +94 -0
  3. package/front_end/generated/InspectorBackendCommands.ts +6 -3
  4. package/front_end/generated/SupportedCSSProperties.js +370 -6
  5. package/front_end/generated/protocol-mapping.d.ts +7 -0
  6. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  7. package/front_end/generated/protocol.ts +66 -7
  8. package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
  9. package/front_end/models/ai_assistance/README.md +1 -1
  10. package/front_end/models/ai_assistance/tools/README.md +1 -1
  11. package/front_end/models/ai_assistance/tools/Tool.ts +1 -1
  12. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +6 -6
  13. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +14 -0
  14. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +4 -0
  15. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  16. package/front_end/panels/elements/CSSSpecificityBreakdown.ts +106 -0
  17. package/front_end/panels/elements/StylePropertiesSection.ts +40 -13
  18. package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -5
  19. package/front_end/panels/elements/components/CSSQuery.ts +119 -4
  20. package/front_end/panels/elements/elements.ts +3 -0
  21. package/front_end/panels/elements/stylesSidebarPane.css +34 -0
  22. package/front_end/panels/layer_viewer/PaintProfilerView.ts +0 -3
  23. package/front_end/panels/sources/ScopeChainSidebarPane.ts +0 -12
  24. package/front_end/third_party/chromium/README.chromium +1 -1
  25. package/package.json +1 -1
@@ -895,7 +895,7 @@ export class CSSMatchedStyles {
895
895
  return domCascade ? domCascade.findAvailableCSSVariables(style) : [];
896
896
  }
897
897
 
898
- computeCSSVariable(style: CSSStyleDeclaration, variableName: string): CSSVariableValue|null {
898
+ computeCSSVariable(style: CSSStyleDeclaration, variableName: string, containerNode?: DOMNode): CSSVariableValue|null {
899
899
  if (style.parentRule instanceof CSSKeyframeRule) {
900
900
  // The resolution of the variables inside of a CSS keyframe rule depends on where this keyframe rule is used.
901
901
  // So, we need to find the style with active CSS property `animation-name` that equals to the keyframe's name.
@@ -914,7 +914,7 @@ export class CSSMatchedStyles {
914
914
  }
915
915
 
916
916
  const domCascade = this.#styleToDOMCascade.get(style);
917
- return domCascade ? domCascade.computeCSSVariable(style, variableName) : null;
917
+ return domCascade ? domCascade.computeCSSVariable(style, variableName, containerNode) : null;
918
918
  }
919
919
 
920
920
  computeAttribute(style: CSSStyleDeclaration, attributeName: string, type: CSSType): string|null {
@@ -1030,6 +1030,10 @@ class NodeCascade {
1030
1030
  this.#node = node;
1031
1031
  }
1032
1032
 
1033
+ node(): DOMNode {
1034
+ return this.#node;
1035
+ }
1036
+
1033
1037
  computeActiveProperties(): void {
1034
1038
  this.propertiesState.clear();
1035
1039
  this.propertiesOverriddenByAnimation.clear();
@@ -1374,9 +1378,21 @@ class DOMInheritanceCascade {
1374
1378
  }
1375
1379
  }
1376
1380
 
1377
- computeCSSVariable(style: CSSStyleDeclaration, variableName: string): CSSVariableValue|null {
1381
+ nodeToNodeCascade(node: DOMNode): NodeCascade|null {
1382
+ for (const nodeCascade of this.#nodeCascades) {
1383
+ if (nodeCascade.node() === node) {
1384
+ return nodeCascade;
1385
+ }
1386
+ }
1387
+ if (this.#fallbackCascade) {
1388
+ return this.#fallbackCascade.nodeToNodeCascade(node);
1389
+ }
1390
+ return null;
1391
+ }
1392
+
1393
+ computeCSSVariable(style: CSSStyleDeclaration, variableName: string, containerNode?: DOMNode): CSSVariableValue|null {
1378
1394
  this.ensureInitialized();
1379
- const nodeCascade = this.#styleToNodeCascade.get(style);
1395
+ const nodeCascade = containerNode ? this.nodeToNodeCascade(containerNode) : this.#styleToNodeCascade.get(style);
1380
1396
  if (!nodeCascade) {
1381
1397
  return null;
1382
1398
  }
@@ -528,6 +528,52 @@ export class HeapSnapshotNode implements HeapSnapshotItem {
528
528
  value |= detachedness; // Set the new bits.
529
529
  this.#setDetachednessAndClassIndex(value);
530
530
  }
531
+
532
+ findInternalEdgeTarget(name: string): HeapSnapshotNode|undefined {
533
+ for (let iter = this.edges(); iter.hasNext(); iter.next()) {
534
+ const edge = iter.edge;
535
+ if (!edge.isInternal()) {
536
+ continue;
537
+ }
538
+ if (edge.name() === name) {
539
+ return edge.node();
540
+ }
541
+ }
542
+ return undefined;
543
+ }
544
+
545
+ // V8 represents boolean values in heap snapshots as a virtual node of type 'number'
546
+ // and name 'bool', which has an internal edge named 'value' pointing to a string node
547
+ // with name 'true' or 'false'.
548
+ // See V8's FindOrCreateBoolEntry in heap-snapshot-generator.cc.
549
+ nodeValueAsBool(): boolean|undefined {
550
+ if (this.rawType() !== this.snapshot.nodeNumberType) {
551
+ return undefined;
552
+ }
553
+ if (this.rawName() !== 'bool') {
554
+ return undefined;
555
+ }
556
+ const valNode = this.findInternalEdgeTarget('value');
557
+ if (!valNode) {
558
+ return undefined;
559
+ }
560
+ const rawName = valNode.rawName();
561
+ if (rawName === 'true') {
562
+ return true;
563
+ }
564
+ if (rawName === 'false') {
565
+ return false;
566
+ }
567
+ return undefined;
568
+ }
569
+
570
+ nodeIsTruncatedString(): boolean {
571
+ const truncNode = this.findInternalEdgeTarget('truncated');
572
+ if (!truncNode) {
573
+ return false;
574
+ }
575
+ return truncNode.nodeValueAsBool() === true;
576
+ }
531
577
  }
532
578
 
533
579
  export class HeapSnapshotNodeIterator implements HeapSnapshotItemIterator {
@@ -903,6 +949,7 @@ export abstract class HeapSnapshot {
903
949
  nodeSyntheticType!: number;
904
950
  nodeClosureType!: number;
905
951
  nodeRegExpType!: number;
952
+ nodeNumberType!: number;
906
953
  edgeFieldsCount!: number;
907
954
  edgeTypeOffset!: number;
908
955
  edgeNameOffset!: number;
@@ -983,6 +1030,7 @@ export abstract class HeapSnapshot {
983
1030
  this.nodeSyntheticType = this.nodeTypes.indexOf('synthetic');
984
1031
  this.nodeClosureType = this.nodeTypes.indexOf('closure');
985
1032
  this.nodeRegExpType = this.nodeTypes.indexOf('regexp');
1033
+ this.nodeNumberType = this.nodeTypes.indexOf('number');
986
1034
 
987
1035
  this.edgeFieldsCount = meta.edge_fields.length;
988
1036
  this.edgeTypeOffset = meta.edge_fields.indexOf('type');
@@ -1316,6 +1364,52 @@ export abstract class HeapSnapshot {
1316
1364
  return this.getAggregatesByClassKey(false, key, filter);
1317
1365
  }
1318
1366
 
1367
+ getDuplicateStrings(): HeapSnapshotModel.HeapSnapshotModel.DuplicateStringGroup[] {
1368
+ const filter = this.createNamedFilter('duplicatedStrings');
1369
+ const groupsMap = new Map<string, HeapSnapshotModel.HeapSnapshotModel.DuplicateStringGroup>();
1370
+ const node = this.createNode(0);
1371
+
1372
+ for (let i = 0; i < this.nodeCount; ++i) {
1373
+ node.nodeIndex = i * this.nodeFieldCount;
1374
+ if (filter(node)) {
1375
+ const name = node.name();
1376
+ const truncated = node.nodeIsTruncatedString();
1377
+
1378
+ // Note that there is exactly one group for each duplicated string value. So
1379
+ // truncated strings might end up in the same group as non-truncated strings if the
1380
+ // prefix matches the non-truncated string. This should be unlikely though and we
1381
+ // don't handle this here to avoid that additional complexity.
1382
+ let group = groupsMap.get(name);
1383
+ if (!group) {
1384
+ group = {
1385
+ value: name,
1386
+ count: 0,
1387
+ totalSelfSize: 0,
1388
+ totalRetainedSize: 0,
1389
+ nodes: [],
1390
+ truncated,
1391
+ };
1392
+ groupsMap.set(name, group);
1393
+ } else if (truncated) {
1394
+ // Make sure the truncated flag is set in case the group was initially created by a
1395
+ // non-truncated string.
1396
+ group.truncated = true;
1397
+ }
1398
+ group.count++;
1399
+ group.totalSelfSize += node.selfSize();
1400
+ group.totalRetainedSize += node.retainedSize();
1401
+ group.nodes.push({
1402
+ id: node.id(),
1403
+ selfSize: node.selfSize(),
1404
+ retainedSize: node.retainedSize(),
1405
+ distance: node.distance(),
1406
+ });
1407
+ }
1408
+ }
1409
+
1410
+ return Array.from(groupsMap.values()).sort((a, b) => b.totalRetainedSize - a.totalRetainedSize);
1411
+ }
1412
+
1319
1413
  private createNodeIdFilter(minNodeId: number, maxNodeId: number): (arg0: HeapSnapshotNode) => boolean {
1320
1414
  function nodeIdFilter(node: HeapSnapshotNode): boolean {
1321
1415
  const id = node.id();
@@ -91,7 +91,7 @@ inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {FormLabelForNameE
91
91
  inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
92
92
  inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", {ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform"});
93
93
  inspectorBackend.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", {NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts"});
94
- inspectorBackend.registerEnum("Audits.EmailVerificationRequestIssueReason", {InvalidEmail: "InvalidEmail", DnsFetchFailed: "DnsFetchFailed", DnsInvalidRecord: "DnsInvalidRecord", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", WellKnownMissingIssuanceEndpoint: "WellKnownMissingIssuanceEndpoint", WellKnownIssuanceEndpointCrossOrigin: "WellKnownIssuanceEndpointCrossOrigin", WellKnownUnsupportedSigningAlgorithm: "WellKnownUnsupportedSigningAlgorithm", TokenHttpNotFound: "TokenHttpNotFound", TokenNoResponse: "TokenNoResponse", TokenInvalidResponse: "TokenInvalidResponse", TokenInvalidContentType: "TokenInvalidContentType", TokenMalformedSdJwt: "TokenMalformedSdJwt", TokenInvalidSdJwt: "TokenInvalidSdJwt", KeyBindingSigningFailed: "KeyBindingSigningFailed", RpOriginIsOpaque: "RpOriginIsOpaque", WellKnownMissingAccountsEndpoint: "WellKnownMissingAccountsEndpoint", UserLoggedOut: "UserLoggedOut", WellKnownAccountsEndpointCrossOrigin: "WellKnownAccountsEndpointCrossOrigin", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsInvalidContentType: "AccountsInvalidContentType", AccountsEmptyList: "AccountsEmptyList", EmailVerificationWellKnownHttpNotFound: "EmailVerificationWellKnownHttpNotFound", EmailVerificationWellKnownNoResponse: "EmailVerificationWellKnownNoResponse", EmailVerificationWellKnownInvalidResponse: "EmailVerificationWellKnownInvalidResponse", EmailVerificationWellKnownInvalidContentType: "EmailVerificationWellKnownInvalidContentType", JwksHttpNotFound: "JwksHttpNotFound", JwksInvalidResponse: "JwksInvalidResponse", TokenVerificationSdJwtUnsupportedHeaderAlg: "TokenVerificationSdJwtUnsupportedHeaderAlg", TokenVerificationSdJwtMissingIss: "TokenVerificationSdJwtMissingIss", TokenVerificationSdJwtMissingIat: "TokenVerificationSdJwtMissingIat", TokenVerificationSdJwtMissingCnf: "TokenVerificationSdJwtMissingCnf", TokenVerificationSdJwtMissingEmail: "TokenVerificationSdJwtMissingEmail", TokenVerificationSdJwtInvalidIssuedAt: "TokenVerificationSdJwtInvalidIssuedAt", TokenVerificationSdJwtInvalidIssuer: "TokenVerificationSdJwtInvalidIssuer", TokenVerificationSdJwtJwksMissingKeys: "TokenVerificationSdJwtJwksMissingKeys", TokenVerificationSdJwtSignatureFailed: "TokenVerificationSdJwtSignatureFailed", TokenVerificationSdJwtInvalidEmailVerified: "TokenVerificationSdJwtInvalidEmailVerified", TokenVerificationSdJwtInvalidEmail: "TokenVerificationSdJwtInvalidEmail", TokenVerificationSdJwtInvalidHolderKey: "TokenVerificationSdJwtInvalidHolderKey", TokenVerificationKbInvalidTyp: "TokenVerificationKbInvalidTyp", TokenVerificationKbMissingAud: "TokenVerificationKbMissingAud", TokenVerificationKbMissingNonce: "TokenVerificationKbMissingNonce", TokenVerificationKbMissingIat: "TokenVerificationKbMissingIat", TokenVerificationKbMissingSdHash: "TokenVerificationKbMissingSdHash", TokenVerificationKbInvalidIssuedAt: "TokenVerificationKbInvalidIssuedAt", TokenVerificationKbInvalidAudience: "TokenVerificationKbInvalidAudience", TokenVerificationKbInvalidNonce: "TokenVerificationKbInvalidNonce", TokenVerificationKbInvalidSdHash: "TokenVerificationKbInvalidSdHash", TokenVerificationKbMissingCnf: "TokenVerificationKbMissingCnf", TokenVerificationKbSignatureFailed: "TokenVerificationKbSignatureFailed"});
94
+ inspectorBackend.registerEnum("Audits.EmailVerificationRequestIssueReason", {InvalidEmail: "InvalidEmail", DnsFetchFailed: "DnsFetchFailed", DnsInvalidRecord: "DnsInvalidRecord", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", WellKnownMissingIssuanceEndpoint: "WellKnownMissingIssuanceEndpoint", WellKnownIssuanceEndpointCrossOrigin: "WellKnownIssuanceEndpointCrossOrigin", WellKnownUnsupportedSigningAlgorithm: "WellKnownUnsupportedSigningAlgorithm", TokenHttpNotFound: "TokenHttpNotFound", TokenNoResponse: "TokenNoResponse", TokenInvalidResponse: "TokenInvalidResponse", TokenInvalidContentType: "TokenInvalidContentType", TokenMalformedSdJwt: "TokenMalformedSdJwt", TokenInvalidSdJwt: "TokenInvalidSdJwt", KeyBindingSigningFailed: "KeyBindingSigningFailed", RpOriginIsOpaque: "RpOriginIsOpaque", WellKnownMissingAccountsEndpoint: "WellKnownMissingAccountsEndpoint", UserLoggedOut: "UserLoggedOut", WellKnownAccountsEndpointCrossOrigin: "WellKnownAccountsEndpointCrossOrigin", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsInvalidContentType: "AccountsInvalidContentType", AccountsEmptyList: "AccountsEmptyList", EmailVerificationWellKnownHttpNotFound: "EmailVerificationWellKnownHttpNotFound", EmailVerificationWellKnownNoResponse: "EmailVerificationWellKnownNoResponse", EmailVerificationWellKnownInvalidResponse: "EmailVerificationWellKnownInvalidResponse", EmailVerificationWellKnownInvalidContentType: "EmailVerificationWellKnownInvalidContentType", JwksHttpNotFound: "JwksHttpNotFound", JwksInvalidResponse: "JwksInvalidResponse", TokenVerificationSdJwtUnsupportedHeaderAlg: "TokenVerificationSdJwtUnsupportedHeaderAlg", TokenVerificationSdJwtInvalidTyp: "TokenVerificationSdJwtInvalidTyp", TokenVerificationSdJwtMissingIss: "TokenVerificationSdJwtMissingIss", TokenVerificationSdJwtMissingIat: "TokenVerificationSdJwtMissingIat", TokenVerificationSdJwtMissingCnf: "TokenVerificationSdJwtMissingCnf", TokenVerificationSdJwtMissingEmail: "TokenVerificationSdJwtMissingEmail", TokenVerificationSdJwtInvalidIssuedAt: "TokenVerificationSdJwtInvalidIssuedAt", TokenVerificationSdJwtInvalidIssuer: "TokenVerificationSdJwtInvalidIssuer", TokenVerificationSdJwtJwksMissingKeys: "TokenVerificationSdJwtJwksMissingKeys", TokenVerificationSdJwtSignatureFailed: "TokenVerificationSdJwtSignatureFailed", TokenVerificationSdJwtInvalidEmailVerified: "TokenVerificationSdJwtInvalidEmailVerified", TokenVerificationSdJwtInvalidEmail: "TokenVerificationSdJwtInvalidEmail", TokenVerificationSdJwtInvalidHolderKey: "TokenVerificationSdJwtInvalidHolderKey", TokenVerificationKbInvalidTyp: "TokenVerificationKbInvalidTyp", TokenVerificationKbMissingAud: "TokenVerificationKbMissingAud", TokenVerificationKbMissingNonce: "TokenVerificationKbMissingNonce", TokenVerificationKbMissingIat: "TokenVerificationKbMissingIat", TokenVerificationKbMissingSdHash: "TokenVerificationKbMissingSdHash", TokenVerificationKbInvalidIssuedAt: "TokenVerificationKbInvalidIssuedAt", TokenVerificationKbInvalidAudience: "TokenVerificationKbInvalidAudience", TokenVerificationKbInvalidNonce: "TokenVerificationKbInvalidNonce", TokenVerificationKbInvalidSdHash: "TokenVerificationKbInvalidSdHash", TokenVerificationKbMissingCnf: "TokenVerificationKbMissingCnf", TokenVerificationKbSignatureFailed: "TokenVerificationKbSignatureFailed"});
95
95
  inspectorBackend.registerEnum("Audits.PartitioningBlobURLInfo", {BlockedCrossPartitionFetching: "BlockedCrossPartitionFetching", EnforceNoopenerForNavigation: "EnforceNoopenerForNavigation"});
96
96
  inspectorBackend.registerEnum("Audits.ElementAccessibilityIssueReason", {DisallowedSelectChild: "DisallowedSelectChild", DisallowedOptGroupChild: "DisallowedOptGroupChild", NonPhrasingContentOptionChild: "NonPhrasingContentOptionChild", InteractiveContentOptionChild: "InteractiveContentOptionChild", InteractiveContentLegendChild: "InteractiveContentLegendChild", InteractiveContentSummaryDescendant: "InteractiveContentSummaryDescendant"});
97
97
  inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImportRule: "LateImportRule", RequestFailed: "RequestFailed"});
@@ -357,7 +357,7 @@ inspectorBackend.registerCommand("CrashReportContext.getEntries", [], ["entries"
357
357
  inspectorBackend.registerType("CrashReportContext.CrashReportContextEntry", [{"name": "key", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "The ID of the frame where the key-value pair was set.", "typeRef": "Page.FrameId"}]);
358
358
 
359
359
  // DOM.
360
- inspectorBackend.registerEnum("DOM.PseudoType", {FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", ExpandIcon: "expand-icon", PickerIcon: "picker-icon", InterestButton: "interest-button", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", PermissionIcon: "permission-icon", OverscrollAreaParent: "overscroll-area-parent", Skeleton: "skeleton"});
360
+ inspectorBackend.registerEnum("DOM.PseudoType", {FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", ExpandIcon: "expand-icon", PickerIcon: "picker-icon", InterestButton: "interest-button", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", SelectListbox: "select-listbox", PermissionIcon: "permission-icon", OverscrollAreaParent: "overscroll-area-parent", Skeleton: "skeleton"});
361
361
  inspectorBackend.registerEnum("DOM.ShadowRootType", {UserAgent: "user-agent", Open: "open", Closed: "closed"});
362
362
  inspectorBackend.registerEnum("DOM.CompatibilityMode", {QuirksMode: "QuirksMode", LimitedQuirksMode: "LimitedQuirksMode", NoQuirksMode: "NoQuirksMode"});
363
363
  inspectorBackend.registerEnum("DOM.PhysicalAxes", {Horizontal: "Horizontal", Vertical: "Vertical", Both: "Both"});
@@ -965,6 +965,7 @@ inspectorBackend.registerType("Network.LoadNetworkResourceOptions", [{"name": "d
965
965
  inspectorBackend.registerEnum("Overlay.LineStylePattern", {Dashed: "dashed", Dotted: "dotted"});
966
966
  inspectorBackend.registerEnum("Overlay.ContrastAlgorithm", {Aa: "aa", Aaa: "aaa", Apca: "apca"});
967
967
  inspectorBackend.registerEnum("Overlay.ColorFormat", {Rgb: "rgb", Hsl: "hsl", Hwb: "hwb", Hex: "hex"});
968
+ inspectorBackend.registerEnum("Overlay.DisplayCutoutShape", {Pill: "pill", Notch: "notch", Circle: "circle", Rectangle: "rectangle"});
968
969
  inspectorBackend.registerEnum("Overlay.InspectMode", {SearchForNode: "searchForNode", SearchForUAShadowDOM: "searchForUAShadowDOM", CaptureAreaScreenshot: "captureAreaScreenshot", None: "none"});
969
970
  inspectorBackend.registerEvent("Overlay.inspectNodeRequested", ["backendNodeId"]);
970
971
  inspectorBackend.registerEvent("Overlay.nodeHighlightRequested", ["nodeId"]);
@@ -1000,6 +1001,7 @@ inspectorBackend.registerCommand("Overlay.setShowHitTestBorders", [{"name": "sho
1000
1001
  inspectorBackend.registerCommand("Overlay.setShowWebVitals", [{"name": "show", "type": "boolean", "optional": false, "description": "", "typeRef": null}], [], "Deprecated, no longer has any effect.");
1001
1002
  inspectorBackend.registerCommand("Overlay.setShowViewportSizeOnResize", [{"name": "show", "type": "boolean", "optional": false, "description": "Whether to paint size or not.", "typeRef": null}], [], "Paints viewport size upon main frame resize.");
1002
1003
  inspectorBackend.registerCommand("Overlay.setShowHinge", [{"name": "hingeConfig", "type": "object", "optional": true, "description": "hinge data, null means hideHinge", "typeRef": "Overlay.HingeConfig"}], [], "Add a dual screen device hinge");
1004
+ inspectorBackend.registerCommand("Overlay.setShowDisplayCutout", [{"name": "displayCutoutConfig", "type": "object", "optional": true, "description": "display cutout data, null means hide display cutout", "typeRef": "Overlay.DisplayCutoutConfig"}], [], "Add a display cutout overlay.");
1003
1005
  inspectorBackend.registerCommand("Overlay.setShowIsolatedElements", [{"name": "isolatedElementHighlightConfigs", "type": "array", "optional": false, "description": "An array of node identifiers and descriptors for the highlight appearance.", "typeRef": "Overlay.IsolatedElementHighlightConfig"}], [], "Show elements in isolation mode with overlays.");
1004
1006
  inspectorBackend.registerCommand("Overlay.setShowWindowControlsOverlay", [{"name": "windowControlsOverlayConfig", "type": "object", "optional": true, "description": "Window Controls Overlay data, null means hide Window Controls Overlay", "typeRef": "Overlay.WindowControlsOverlayConfig"}], [], "Show Window Controls Overlay for PWA");
1005
1007
  inspectorBackend.registerType("Overlay.SourceOrderConfig", [{"name": "parentOutlineColor", "type": "object", "optional": false, "description": "the color to outline the given element in.", "typeRef": "DOM.RGBA"}, {"name": "childOutlineColor", "type": "object", "optional": false, "description": "the color to outline the child elements in.", "typeRef": "DOM.RGBA"}]);
@@ -1014,6 +1016,7 @@ inspectorBackend.registerType("Overlay.FlexNodeHighlightConfig", [{"name": "flex
1014
1016
  inspectorBackend.registerType("Overlay.ScrollSnapContainerHighlightConfig", [{"name": "snapportBorder", "type": "object", "optional": true, "description": "The style of the snapport border (default: transparent)", "typeRef": "Overlay.LineStyle"}, {"name": "snapAreaBorder", "type": "object", "optional": true, "description": "The style of the snap area border (default: transparent)", "typeRef": "Overlay.LineStyle"}, {"name": "scrollMarginColor", "type": "object", "optional": true, "description": "The margin highlight fill color (default: transparent).", "typeRef": "DOM.RGBA"}, {"name": "scrollPaddingColor", "type": "object", "optional": true, "description": "The padding highlight fill color (default: transparent).", "typeRef": "DOM.RGBA"}]);
1015
1017
  inspectorBackend.registerType("Overlay.ScrollSnapHighlightConfig", [{"name": "scrollSnapContainerHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance of scroll snap containers.", "typeRef": "Overlay.ScrollSnapContainerHighlightConfig"}, {"name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId"}]);
1016
1018
  inspectorBackend.registerType("Overlay.HingeConfig", [{"name": "rect", "type": "object", "optional": false, "description": "A rectangle represent hinge", "typeRef": "DOM.Rect"}, {"name": "contentColor", "type": "object", "optional": true, "description": "The content box highlight fill color (default: a dark color).", "typeRef": "DOM.RGBA"}, {"name": "outlineColor", "type": "object", "optional": true, "description": "The content box highlight outline color (default: transparent).", "typeRef": "DOM.RGBA"}]);
1019
+ inspectorBackend.registerType("Overlay.DisplayCutoutConfig", [{"name": "rect", "type": "object", "optional": false, "description": "A rectangle representing the cutout bounds.", "typeRef": "DOM.Rect"}, {"name": "shape", "type": "string", "optional": false, "description": "Shape used to draw the cutout.", "typeRef": "Overlay.DisplayCutoutShape"}, {"name": "borderRadius", "type": "number", "optional": true, "description": "Border radius for rounded cutout shapes.", "typeRef": null}, {"name": "upperRadius", "type": "number", "optional": true, "description": "Upper shoulder radius for notch cutout shapes.", "typeRef": null}, {"name": "lowerRadius", "type": "number", "optional": true, "description": "Lower transition radius for notch cutout shapes.", "typeRef": null}, {"name": "cx", "type": "number", "optional": true, "description": "Center x coordinate for circle cutout shapes.", "typeRef": null}, {"name": "cy", "type": "number", "optional": true, "description": "Center y coordinate for circle cutout shapes.", "typeRef": null}, {"name": "radius", "type": "number", "optional": true, "description": "Radius for circle cutout shapes.", "typeRef": null}, {"name": "contentColor", "type": "object", "optional": true, "description": "The cutout fill color (default: black).", "typeRef": "DOM.RGBA"}]);
1017
1020
  inspectorBackend.registerType("Overlay.WindowControlsOverlayConfig", [{"name": "showCSS", "type": "boolean", "optional": false, "description": "Whether the title bar CSS should be shown when emulating the Window Controls Overlay.", "typeRef": null}, {"name": "selectedPlatform", "type": "string", "optional": false, "description": "Selected platforms to show the overlay.", "typeRef": null}, {"name": "themeColor", "type": "string", "optional": false, "description": "The theme color defined in app manifest.", "typeRef": null}]);
1018
1021
  inspectorBackend.registerType("Overlay.ContainerQueryHighlightConfig", [{"name": "containerQueryContainerHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance of container query containers.", "typeRef": "Overlay.ContainerQueryContainerHighlightConfig"}, {"name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the container node to highlight.", "typeRef": "DOM.NodeId"}]);
1019
1022
  inspectorBackend.registerType("Overlay.ContainerQueryContainerHighlightConfig", [{"name": "containerBorder", "type": "object", "optional": true, "description": "The style of the container border.", "typeRef": "Overlay.LineStyle"}, {"name": "descendantBorder", "type": "object", "optional": true, "description": "The style of the descendants' borders.", "typeRef": "Overlay.LineStyle"}]);
@@ -1404,7 +1407,7 @@ inspectorBackend.registerCommand("Target.closeTarget", [{"name": "targetId", "ty
1404
1407
  inspectorBackend.registerCommand("Target.exposeDevToolsProtocol", [{"name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID"}, {"name": "bindingName", "type": "string", "optional": true, "description": "Binding name, 'cdp' if not specified.", "typeRef": null}, {"name": "inheritPermissions", "type": "boolean", "optional": true, "description": "If true, inherits the current root session's permissions (default: false).", "typeRef": null}], [], "Inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as `window[bindingName]`. The object has the following API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.");
1405
1408
  inspectorBackend.registerCommand("Target.createBrowserContext", [{"name": "disposeOnDetach", "type": "boolean", "optional": true, "description": "If specified, disposes this context when debugging session disconnects.", "typeRef": null}, {"name": "proxyServer", "type": "string", "optional": true, "description": "Proxy server, similar to the one passed to --proxy-server", "typeRef": null}, {"name": "proxyBypassList", "type": "string", "optional": true, "description": "Proxy bypass list, similar to the one passed to --proxy-bypass-list", "typeRef": null}, {"name": "originsWithUniversalNetworkAccess", "type": "array", "optional": true, "description": "An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored.", "typeRef": "string"}], ["browserContextId"], "Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.");
1406
1409
  inspectorBackend.registerCommand("Target.getBrowserContexts", [], ["browserContextIds", "defaultBrowserContextId"], "Returns all browser contexts created with `Target.createBrowserContext` method.");
1407
- inspectorBackend.registerCommand("Target.createTarget", [{"name": "url", "type": "string", "optional": false, "description": "The initial URL the page will be navigated to. An empty string indicates about:blank.", "typeRef": null}, {"name": "left", "type": "number", "optional": true, "description": "Frame left origin in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "top", "type": "number", "optional": true, "description": "Frame top origin in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "width", "type": "number", "optional": true, "description": "Frame width in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "height", "type": "number", "optional": true, "description": "Frame height in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "windowState", "type": "string", "optional": true, "description": "Frame window state (requires newWindow to be true or headless shell). Default is normal.", "typeRef": "Target.WindowState"}, {"name": "browserContextId", "type": "string", "optional": true, "description": "The browser context to create the page in.", "typeRef": "Browser.BrowserContextID"}, {"name": "enableBeginFrameControl", "type": "boolean", "optional": true, "description": "Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default).", "typeRef": null}, {"name": "newWindow", "type": "boolean", "optional": true, "description": "Whether to create a new Window or Tab (false by default, not supported by headless shell).", "typeRef": null}, {"name": "background", "type": "boolean", "optional": true, "description": "Whether to create the target in background or foreground (false by default, not supported by headless shell).", "typeRef": null}, {"name": "forTab", "type": "boolean", "optional": true, "description": "Whether to create the target of type \\\"tab\\\".", "typeRef": null}, {"name": "hidden", "type": "boolean", "optional": true, "description": "Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with `forTab: true`, `newWindow: true` or `background: false`. The life-time of the tab is limited to the life-time of the session.", "typeRef": null}, {"name": "focus", "type": "boolean", "optional": true, "description": "If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error.", "typeRef": null}], ["targetId"], "Creates a new page.");
1410
+ inspectorBackend.registerCommand("Target.createTarget", [{"name": "url", "type": "string", "optional": false, "description": "The initial URL the page will be navigated to. An empty string indicates about:blank.", "typeRef": null}, {"name": "left", "type": "number", "optional": true, "description": "Frame left origin in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "top", "type": "number", "optional": true, "description": "Frame top origin in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "width", "type": "number", "optional": true, "description": "Frame width in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "height", "type": "number", "optional": true, "description": "Frame height in DIP (requires newWindow to be true or headless shell).", "typeRef": null}, {"name": "windowState", "type": "string", "optional": true, "description": "Frame window state (requires newWindow to be true or headless shell). Default is normal.", "typeRef": "Target.WindowState"}, {"name": "browserContextId", "type": "string", "optional": true, "description": "The browser context to create the page in.", "typeRef": "Browser.BrowserContextID"}, {"name": "enableBeginFrameControl", "type": "boolean", "optional": true, "description": "Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default).", "typeRef": null}, {"name": "newWindow", "type": "boolean", "optional": true, "description": "Whether to create a new Window or Tab (false by default, not supported by headless shell).", "typeRef": null}, {"name": "background", "type": "boolean", "optional": true, "description": "Whether to create the target in background or foreground (false by default, not supported by headless shell).", "typeRef": null}, {"name": "forTab", "type": "boolean", "optional": true, "description": "Whether to create the target of type \\\"tab\\\".", "typeRef": null}, {"name": "hidden", "type": "boolean", "optional": true, "description": "Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with `forTab: true`, `newWindow: true` or `background: false`. The life-time of the tab is limited to the life-time of the session.", "typeRef": null}, {"name": "focus", "type": "boolean", "optional": true, "description": "If specified, determines whether the new target should be focused. By default, the focus behavior depends on the `background` parameter: - If `background` is false (default) and `focus` is omitted, the new target is focused and the browser window is brought to the foreground. - If `background` is false and `focus` is false, the target is opened but the browser window's focus remains unchanged (e.g., if the window was in the background, it stays there). - If `background` is true, setting `focus` to true is not supported and will result in an error.", "typeRef": null}], ["targetId"], "Creates a new page.");
1408
1411
  inspectorBackend.registerCommand("Target.detachFromTarget", [{"name": "sessionId", "type": "string", "optional": true, "description": "Session to detach.", "typeRef": "Target.SessionID"}, {"name": "targetId", "type": "string", "optional": true, "description": "Deprecated.", "typeRef": "Target.TargetID"}], [], "Detaches session with given id.");
1409
1412
  inspectorBackend.registerCommand("Target.disposeBrowserContext", [{"name": "browserContextId", "type": "string", "optional": false, "description": "", "typeRef": "Browser.BrowserContextID"}], [], "Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.");
1410
1413
  inspectorBackend.registerCommand("Target.getTargetInfo", [{"name": "targetId", "type": "string", "optional": true, "description": "", "typeRef": "Target.TargetID"}], ["targetInfo"], "Returns information about a target.");