From 9520b8830631a1beac84902184de4c18def20018 Mon Sep 17 00:00:00 2001 From: xvrh Date: Wed, 3 Dec 2025 06:07:16 +0000 Subject: [PATCH] roll to Chrome 143.0.7499.40 --- lib/protocol/browser.dart | 18 +- lib/protocol/inspector.dart | 5 + lib/protocol/network.dart | 205 ++++-------------- lib/protocol/preload.dart | 3 +- lib/src/downloader.dart | 2 +- tool/json/browser_protocol.json | 312 +++++++++++++++++++++------- tool/json/protocol_from_chrome.json | 140 ++++--------- 7 files changed, 339 insertions(+), 346 deletions(-) diff --git a/lib/protocol/browser.dart b/lib/protocol/browser.dart index c8b92417..da305dfe 100644 --- a/lib/protocol/browser.dart +++ b/lib/protocol/browser.dart @@ -19,33 +19,35 @@ class BrowserApi { .where((event) => event.name == 'Browser.downloadProgress') .map((event) => DownloadProgressEvent.fromJson(event.parameters)); - /// Set permission settings for given requesting and embedding origins. + /// Set permission settings for given embedding and embedded origins. /// [permission] Descriptor of permission to override. /// [setting] Setting of the permission. - /// [origin] Requesting origin the permission applies to, all origins if not specified. - /// [embeddingOrigin] Embedding origin the permission applies to. It is ignored unless the requesting origin is - /// present and valid. If the requesting origin is provided but the embedding origin isn't, the - /// requesting origin is used as the embedding origin. + /// [origin] Embedding origin the permission applies to, all origins if not specified. + /// [embeddedOrigin] Embedded origin the permission applies to. It is ignored unless the embedding origin is + /// present and valid. If the embedding origin is provided but the embedded origin isn't, the + /// embedding origin is used as the embedded origin. /// [browserContextId] Context to override. When omitted, default browser context is used. Future setPermission( PermissionDescriptor permission, PermissionSetting setting, { String? origin, - String? embeddingOrigin, + String? embeddedOrigin, BrowserContextID? browserContextId, }) async { await _client.send('Browser.setPermission', { 'permission': permission, 'setting': setting, if (origin != null) 'origin': origin, - if (embeddingOrigin != null) 'embeddingOrigin': embeddingOrigin, + if (embeddedOrigin != null) 'embeddedOrigin': embeddedOrigin, if (browserContextId != null) 'browserContextId': browserContextId, }); } - /// Grant specific permissions to the given origin and reject all others. + /// Grant specific permissions to the given origin and reject all others. Deprecated. Use + /// setPermission instead. /// [origin] Origin the permission applies to, all origins if not specified. /// [browserContextId] BrowserContext to override permissions. When omitted, default browser context is used. + @Deprecated('This command is deprecated') Future grantPermissions( List permissions, { String? origin, diff --git a/lib/protocol/inspector.dart b/lib/protocol/inspector.dart index 654ca468..534d6c48 100644 --- a/lib/protocol/inspector.dart +++ b/lib/protocol/inspector.dart @@ -20,6 +20,11 @@ class InspectorApi { (event) => event.name == 'Inspector.targetReloadedAfterCrash', ); + /// Fired on worker targets when main worker script and any imported scripts have been evaluated. + Stream get onWorkerScriptLoaded => _client.onEvent.where( + (event) => event.name == 'Inspector.workerScriptLoaded', + ); + /// Disables inspector domain notifications. Future disable() async { await _client.send('Inspector.disable'); diff --git a/lib/protocol/network.dart b/lib/protocol/network.dart index d5103821..5558a9f3 100644 --- a/lib/protocol/network.dart +++ b/lib/protocol/network.dart @@ -271,57 +271,6 @@ class NetworkApi { Stream get onPolicyUpdated => _client.onEvent.where((event) => event.name == 'Network.policyUpdated'); - /// Fired once when parsing the .wbn file has succeeded. - /// The event contains the information about the web bundle contents. - Stream - get onSubresourceWebBundleMetadataReceived => _client.onEvent - .where( - (event) => event.name == 'Network.subresourceWebBundleMetadataReceived', - ) - .map( - (event) => SubresourceWebBundleMetadataReceivedEvent.fromJson( - event.parameters, - ), - ); - - /// Fired once when parsing the .wbn file has failed. - Stream - get onSubresourceWebBundleMetadataError => _client.onEvent - .where( - (event) => event.name == 'Network.subresourceWebBundleMetadataError', - ) - .map( - (event) => - SubresourceWebBundleMetadataErrorEvent.fromJson(event.parameters), - ); - - /// Fired when handling requests for resources within a .wbn file. - /// Note: this will only be fired for resources that are requested by the webpage. - Stream - get onSubresourceWebBundleInnerResponseParsed => _client.onEvent - .where( - (event) => - event.name == 'Network.subresourceWebBundleInnerResponseParsed', - ) - .map( - (event) => SubresourceWebBundleInnerResponseParsedEvent.fromJson( - event.parameters, - ), - ); - - /// Fired when request for resources within a .wbn file failed. - Stream - get onSubresourceWebBundleInnerResponseError => _client.onEvent - .where( - (event) => - event.name == 'Network.subresourceWebBundleInnerResponseError', - ) - .map( - (event) => SubresourceWebBundleInnerResponseErrorEvent.fromJson( - event.parameters, - ), - ); - /// Is sent whenever a new report is added. /// And after 'enableReportingApi' for all existing reports. Stream get onReportingApiReportAdded => _client.onEvent @@ -521,7 +470,9 @@ class NetworkApi { }); } - /// Activates emulation of network conditions for individual requests using URL match patterns. + /// Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated + /// Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to + /// explicitly modify `navigator` behavior. /// [offline] True to emulate internet disconnection. /// [matchedNetworkConditions] Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global /// conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are @@ -700,10 +651,15 @@ class NetworkApi { } /// Blocks URLs from loading. - /// [urls] URL patterns to block. Wildcards ('*') are allowed. - Future setBlockedURLs(List urls) async { + /// [urlPatterns] Patterns to match in the order in which they are given. These patterns + /// also take precedence over any wildcard patterns defined in `urls`. + Future setBlockedURLs({ + List? urlPatterns, + @Deprecated('This parameter is deprecated') List? urls, + }) async { await _client.send('Network.setBlockedURLs', { - 'urls': [...urls], + if (urlPatterns != null) 'urlPatterns': [...urlPatterns], + if (urls != null) 'urls': [...urls], }); } @@ -2108,117 +2064,6 @@ class TrustTokenOperationDoneEvent { } } -class SubresourceWebBundleMetadataReceivedEvent { - /// Request identifier. Used to match this information to another event. - final RequestId requestId; - - /// A list of URLs of resources in the subresource Web Bundle. - final List urls; - - SubresourceWebBundleMetadataReceivedEvent({ - required this.requestId, - required this.urls, - }); - - factory SubresourceWebBundleMetadataReceivedEvent.fromJson( - Map json, - ) { - return SubresourceWebBundleMetadataReceivedEvent( - requestId: RequestId.fromJson(json['requestId'] as String), - urls: (json['urls'] as List).map((e) => e as String).toList(), - ); - } -} - -class SubresourceWebBundleMetadataErrorEvent { - /// Request identifier. Used to match this information to another event. - final RequestId requestId; - - /// Error message - final String errorMessage; - - SubresourceWebBundleMetadataErrorEvent({ - required this.requestId, - required this.errorMessage, - }); - - factory SubresourceWebBundleMetadataErrorEvent.fromJson( - Map json, - ) { - return SubresourceWebBundleMetadataErrorEvent( - requestId: RequestId.fromJson(json['requestId'] as String), - errorMessage: json['errorMessage'] as String, - ); - } -} - -class SubresourceWebBundleInnerResponseParsedEvent { - /// Request identifier of the subresource request - final RequestId innerRequestId; - - /// URL of the subresource resource. - final String innerRequestURL; - - /// Bundle request identifier. Used to match this information to another event. - /// This made be absent in case when the instrumentation was enabled only - /// after webbundle was parsed. - final RequestId? bundleRequestId; - - SubresourceWebBundleInnerResponseParsedEvent({ - required this.innerRequestId, - required this.innerRequestURL, - this.bundleRequestId, - }); - - factory SubresourceWebBundleInnerResponseParsedEvent.fromJson( - Map json, - ) { - return SubresourceWebBundleInnerResponseParsedEvent( - innerRequestId: RequestId.fromJson(json['innerRequestId'] as String), - innerRequestURL: json['innerRequestURL'] as String, - bundleRequestId: json.containsKey('bundleRequestId') - ? RequestId.fromJson(json['bundleRequestId'] as String) - : null, - ); - } -} - -class SubresourceWebBundleInnerResponseErrorEvent { - /// Request identifier of the subresource request - final RequestId innerRequestId; - - /// URL of the subresource resource. - final String innerRequestURL; - - /// Error message - final String errorMessage; - - /// Bundle request identifier. Used to match this information to another event. - /// This made be absent in case when the instrumentation was enabled only - /// after webbundle was parsed. - final RequestId? bundleRequestId; - - SubresourceWebBundleInnerResponseErrorEvent({ - required this.innerRequestId, - required this.innerRequestURL, - required this.errorMessage, - this.bundleRequestId, - }); - - factory SubresourceWebBundleInnerResponseErrorEvent.fromJson( - Map json, - ) { - return SubresourceWebBundleInnerResponseErrorEvent( - innerRequestId: RequestId.fromJson(json['innerRequestId'] as String), - innerRequestURL: json['innerRequestURL'] as String, - errorMessage: json['errorMessage'] as String, - bundleRequestId: json.containsKey('bundleRequestId') - ? RequestId.fromJson(json['bundleRequestId'] as String) - : null, - ); - } -} - class ReportingApiEndpointsChangedForOriginEvent { /// Origin of the document(s) which configured the endpoints. final String origin; @@ -3801,6 +3646,7 @@ enum InitiatorType { preload('preload'), signedExchange('SignedExchange'), preflight('preflight'), + fedCm('FedCM'), other('other'); final String value; @@ -4756,8 +4602,8 @@ enum ContentEncoding { class NetworkConditions { /// Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string - /// syntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p - /// connections). + /// syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are + /// matched (including p2p connections). final String urlPattern; /// Minimum latency from request sent to response headers received (ms). @@ -4827,6 +4673,29 @@ class NetworkConditions { } } +class BlockPattern { + /// URL pattern to match. Patterns use the URLPattern constructor string syntax + /// (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*/*.css`. + final String urlPattern; + + /// Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later + /// `BlockPattern`. + final bool block; + + BlockPattern({required this.urlPattern, required this.block}); + + factory BlockPattern.fromJson(Map json) { + return BlockPattern( + urlPattern: json['urlPattern'] as String, + block: json['block'] as bool? ?? false, + ); + } + + Map toJson() { + return {'urlPattern': urlPattern, 'block': block}; + } +} + enum DirectSocketDnsQueryType { ipv4('ipv4'), ipv6('ipv6'); diff --git a/lib/protocol/preload.dart b/lib/protocol/preload.dart index 49225b0e..7fe7f175 100644 --- a/lib/protocol/preload.dart +++ b/lib/protocol/preload.dart @@ -320,7 +320,8 @@ enum RuleSetErrorType { /// isn't being used by clients). enum SpeculationAction { prefetch('Prefetch'), - prerender('Prerender'); + prerender('Prerender'), + prerenderUntilScript('PrerenderUntilScript'); final String value; diff --git a/lib/src/downloader.dart b/lib/src/downloader.dart index ea8d02b0..19271ed2 100644 --- a/lib/src/downloader.dart +++ b/lib/src/downloader.dart @@ -4,7 +4,7 @@ import 'package:archive/archive.dart'; import 'package:http/http.dart' as http; import 'package:path/path.dart' as p; -const _lastVersion = '142.0.7444.175'; +const _lastVersion = '143.0.7499.40'; class DownloadedBrowserInfo { final String executablePath; diff --git a/tool/json/browser_protocol.json b/tool/json/browser_protocol.json index 40579cae..c411ca8f 100644 --- a/tool/json/browser_protocol.json +++ b/tool/json/browser_protocol.json @@ -2137,6 +2137,86 @@ } ] }, + { + "id": "PermissionElementIssueType", + "type": "string", + "enum": [ + "InvalidType", + "FencedFrameDisallowed", + "CspFrameAncestorsMissing", + "PermissionsPolicyBlocked", + "PaddingRightUnsupported", + "PaddingBottomUnsupported", + "InsetBoxShadowUnsupported", + "RequestInProgress", + "UntrustedEvent", + "RegistrationFailed", + "TypeNotSupported", + "InvalidTypeActivation", + "SecurityChecksFailed", + "ActivationDisabled", + "GeolocationDeprecated", + "InvalidDisplayStyle", + "NonOpaqueColor", + "LowContrast", + "FontSizeTooSmall", + "FontSizeTooLarge", + "InvalidSizeValue" + ] + }, + { + "id": "PermissionElementIssueDetails", + "description": "This issue warns about improper usage of the element.", + "type": "object", + "properties": [ + { + "name": "issueType", + "$ref": "PermissionElementIssueType" + }, + { + "name": "type", + "description": "The value of the type attribute.", + "optional": true, + "type": "string" + }, + { + "name": "nodeId", + "description": "The node ID of the element.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "isWarning", + "description": "True if the issue is a warning, false if it is an error.", + "optional": true, + "type": "boolean" + }, + { + "name": "permissionName", + "description": "Fields for message construction:\nUsed for messages that reference a specific permission name", + "optional": true, + "type": "string" + }, + { + "name": "occluderNodeInfo", + "description": "Used for messages about occlusion", + "optional": true, + "type": "string" + }, + { + "name": "occluderParentNodeInfo", + "description": "Used for messages about occluder's parent", + "optional": true, + "type": "string" + }, + { + "name": "disableReason", + "description": "Used for messages about activation disabled reason", + "optional": true, + "type": "string" + } + ] + }, { "id": "InspectorIssueCode", "description": "A unique identifier for the type of issue. Each type may use one of the\noptional fields in InspectorIssueDetails to convey more specific\ninformation about the kind of issue.", @@ -2167,7 +2247,8 @@ "ElementAccessibilityIssue", "SRIMessageSignatureIssue", "UnencodedDigestIssue", - "UserReidentificationIssue" + "UserReidentificationIssue", + "PermissionElementIssue" ] }, { @@ -2305,6 +2386,11 @@ "name": "userReidentificationIssueDetails", "optional": true, "$ref": "UserReidentificationIssueDetails" + }, + { + "name": "permissionElementIssueDetails", + "optional": true, + "$ref": "PermissionElementIssueDetails" } ] }, @@ -4001,10 +4087,6 @@ "Page" ], "types": [ - { - "id": "StyleSheetId", - "type": "string" - }, { "id": "StyleSheetOrigin", "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent\nstylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via\ninspector\" rules), \"regular\" for regular stylesheets.", @@ -4214,7 +4296,7 @@ { "name": "styleSheetId", "description": "The stylesheet identifier.", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "frameId", @@ -4317,7 +4399,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "selectorList", @@ -4445,7 +4527,7 @@ { "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "startOffset", @@ -4550,7 +4632,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "cssProperties", @@ -4682,7 +4764,7 @@ "name": "styleSheetId", "description": "Identifier of the stylesheet containing this object (if exists).", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "mediaList", @@ -4770,7 +4852,7 @@ "name": "styleSheetId", "description": "Identifier of the stylesheet containing this object (if exists).", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "name", @@ -4830,7 +4912,7 @@ "name": "styleSheetId", "description": "Identifier of the stylesheet containing this object (if exists).", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -4855,7 +4937,7 @@ "name": "styleSheetId", "description": "Identifier of the stylesheet containing this object (if exists).", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -4880,7 +4962,7 @@ "name": "styleSheetId", "description": "Identifier of the stylesheet containing this object (if exists).", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -4900,7 +4982,7 @@ "name": "styleSheetId", "description": "Identifier of the stylesheet containing this object (if exists).", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -5060,7 +5142,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "origin", @@ -5088,7 +5170,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "origin", @@ -5150,34 +5232,6 @@ } ] }, - { - "id": "CSSFontPaletteValuesRule", - "description": "CSS font-palette-values rule representation.", - "type": "object", - "properties": [ - { - "name": "styleSheetId", - "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", - "optional": true, - "$ref": "StyleSheetId" - }, - { - "name": "origin", - "description": "Parent stylesheet's origin.", - "$ref": "StyleSheetOrigin" - }, - { - "name": "fontPaletteName", - "description": "Associated font palette name.", - "$ref": "Value" - }, - { - "name": "style", - "description": "Associated style declaration.", - "$ref": "CSSStyle" - } - ] - }, { "id": "CSSAtRule", "description": "CSS generic @rule representation.", @@ -5217,7 +5271,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "origin", @@ -5240,7 +5294,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "origin", @@ -5347,7 +5401,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "origin", @@ -5381,7 +5435,7 @@ "name": "styleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", "optional": true, - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "origin", @@ -5408,7 +5462,7 @@ { "name": "styleSheetId", "description": "The css style sheet identifier.", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -5431,7 +5485,7 @@ { "name": "styleSheetId", "description": "The css style sheet identifier where a new rule should be inserted.", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "ruleText", @@ -5465,7 +5519,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ], "returns": [ @@ -5499,7 +5553,7 @@ { "name": "styleSheetId", "description": "Identifier of the created \"via-inspector\" stylesheet.", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -5836,12 +5890,6 @@ "$ref": "CSSPropertyRegistration" } }, - { - "name": "cssFontPaletteValuesRule", - "description": "A font-palette-values rule matching this node.", - "optional": true, - "$ref": "CSSFontPaletteValuesRule" - }, { "name": "cssAtRules", "description": "A list of simple @rules matching this node or its pseudo-elements.", @@ -5920,7 +5968,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ], "returns": [ @@ -5955,7 +6003,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "selectorText", @@ -6038,7 +6086,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6063,7 +6111,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6088,7 +6136,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6114,7 +6162,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6140,7 +6188,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6166,7 +6214,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6191,7 +6239,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "range", @@ -6216,7 +6264,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" }, { "name": "text", @@ -6344,7 +6392,7 @@ "parameters": [ { "name": "styleSheetId", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -6355,7 +6403,7 @@ { "name": "styleSheetId", "description": "Identifier of the removed stylesheet.", - "$ref": "StyleSheetId" + "$ref": "DOM.StyleSheetId" } ] }, @@ -6775,6 +6823,11 @@ "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the\nfront-end.", "type": "integer" }, + { + "id": "StyleSheetId", + "description": "Unique identifier for a CSS stylesheet.", + "type": "string" + }, { "id": "BackendNode", "description": "Backend node with a friendly name.", @@ -7103,6 +7156,15 @@ "experimental": true, "optional": true, "type": "boolean" + }, + { + "name": "adoptedStyleSheets", + "experimental": true, + "optional": true, + "type": "array", + "items": { + "$ref": "StyleSheetId" + } } ] }, @@ -8473,6 +8535,27 @@ } ] }, + { + "name": "adoptedStyleSheetsModified", + "description": "Fired when `Element`'s adoptedStyleSheets are modified.", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "description": "Id of the node that has changed.", + "$ref": "NodeId" + }, + { + "name": "adoptedStyleSheets", + "description": "New adoptedStyleSheets array.", + "experimental": true, + "type": "array", + "items": { + "$ref": "StyleSheetId" + } + } + ] + }, { "name": "attributeRemoved", "description": "Fired when `Element`'s attribute is removed.", @@ -16750,6 +16833,22 @@ "description": "Expected to be unsigned integer.", "optional": true, "type": "number" + }, + { + "name": "multicastLoopback", + "optional": true, + "type": "boolean" + }, + { + "name": "multicastTimeToLive", + "description": "Unsigned int 8.", + "optional": true, + "type": "integer" + }, + { + "name": "multicastAllowAddressSharing", + "optional": true, + "type": "boolean" } ] }, @@ -18658,6 +18757,34 @@ } ] }, + { + "name": "directUDPSocketJoinedMulticastGroup", + "experimental": true, + "parameters": [ + { + "name": "identifier", + "$ref": "RequestId" + }, + { + "name": "IPAddress", + "type": "string" + } + ] + }, + { + "name": "directUDPSocketLeftMulticastGroup", + "experimental": true, + "parameters": [ + { + "name": "identifier", + "$ref": "RequestId" + }, + { + "name": "IPAddress", + "type": "string" + } + ] + }, { "name": "directUDPSocketCreated", "description": "Fired upon direct_socket.UDPSocket creation.", @@ -20477,6 +20604,7 @@ "ambient-light-sensor", "aria-notify", "attribution-reporting", + "autofill", "autoplay", "bluetooth", "browsing-topics", @@ -20542,6 +20670,7 @@ "local-fonts", "local-network-access", "magnetometer", + "manual-text", "media-playback-while-not-visible", "microphone", "midi", @@ -20559,7 +20688,6 @@ "run-ad-auction", "screen-wake-lock", "serial", - "shared-autofill", "shared-storage", "shared-storage-select-url", "smart-card", @@ -23296,6 +23424,26 @@ "type": "boolean" } ] + }, + { + "name": "getAnnotatedPageContent", + "description": "Get the annotated page content for the main frame.\nThis is an experimental command that is subject to change.", + "experimental": true, + "parameters": [ + { + "name": "includeActionableInformation", + "description": "Whether to include actionable information. Defaults to true.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "content", + "description": "The annotated page content as a base64 encoded protobuf.\nThe format is defined by the `AnnotatedPageContent` message in\ncomponents/optimization_guide/proto/features/common_quality_data.proto (Encoded as a base64 string when passed over JSON)", + "type": "string" + } + ] } ], "events": [ @@ -28163,6 +28311,26 @@ } ] }, + { + "name": "getDevToolsTarget", + "description": "Gets the targetId of the DevTools page target opened for the given target\n(if any).", + "experimental": true, + "parameters": [ + { + "name": "targetId", + "description": "Page or tab target ID.", + "$ref": "TargetID" + } + ], + "returns": [ + { + "name": "targetId", + "description": "The targetId of DevTools page target if exists.", + "optional": true, + "$ref": "TargetID" + } + ] + }, { "name": "openDevTools", "description": "Opens a DevTools window for the target.", diff --git a/tool/json/protocol_from_chrome.json b/tool/json/protocol_from_chrome.json index 0777c86e..cc9cf2d7 100644 --- a/tool/json/protocol_from_chrome.json +++ b/tool/json/protocol_from_chrome.json @@ -3532,7 +3532,7 @@ "commands": [ { "name": "setPermission", - "description": "Set permission settings for given requesting and embedding origins.", + "description": "Set permission settings for given embedding and embedded origins.", "experimental": true, "parameters": [ { @@ -3547,13 +3547,13 @@ }, { "name": "origin", - "description": "Requesting origin the permission applies to, all origins if not specified.", + "description": "Embedding origin the permission applies to, all origins if not specified.", "optional": true, "type": "string" }, { - "name": "embeddingOrigin", - "description": "Embedding origin the permission applies to. It is ignored unless the requesting origin is\npresent and valid. If the requesting origin is provided but the embedding origin isn't, the\nrequesting origin is used as the embedding origin.", + "name": "embeddedOrigin", + "description": "Embedded origin the permission applies to. It is ignored unless the embedding origin is\npresent and valid. If the embedding origin is provided but the embedded origin isn't, the\nembedding origin is used as the embedded origin.", "optional": true, "type": "string" }, @@ -3567,8 +3567,9 @@ }, { "name": "grantPermissions", - "description": "Grant specific permissions to the given origin and reject all others.", + "description": "Grant specific permissions to the given origin and reject all others. Deprecated. Use\nsetPermission instead.", "experimental": true, + "deprecated": true, "parameters": [ { "name": "permissions", @@ -13803,6 +13804,11 @@ { "name": "targetReloadedAfterCrash", "description": "Fired when debugging target has reloaded after crash" + }, + { + "name": "workerScriptLoaded", + "description": "Fired on worker targets when main worker script and any imported scripts have been evaluated.", + "experimental": true } ] }, @@ -15863,6 +15869,7 @@ "preload", "SignedExchange", "preflight", + "FedCM", "other" ] }, @@ -16551,7 +16558,7 @@ "properties": [ { "name": "urlPattern", - "description": "Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string\nsyntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p\nconnections).", + "description": "Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string\nsyntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are\nmatched (including p2p connections).", "type": "string" }, { @@ -16595,6 +16602,23 @@ } ] }, + { + "id": "BlockPattern", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "urlPattern", + "description": "URL pattern to match. Patterns use the URLPattern constructor string syntax\n(https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*/*.css`.", + "type": "string" + }, + { + "name": "block", + "description": "Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later\n`BlockPattern`.", + "type": "boolean" + } + ] + }, { "id": "DirectSocketDnsQueryType", "experimental": true, @@ -17271,7 +17295,7 @@ }, { "name": "emulateNetworkConditionsByRule", - "description": "Activates emulation of network conditions for individual requests using URL match patterns.", + "description": "Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated\nNetwork.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to\nexplicitly modify `navigator` behavior.", "experimental": true, "parameters": [ { @@ -17571,9 +17595,20 @@ "description": "Blocks URLs from loading.", "experimental": true, "parameters": [ + { + "name": "urlPatterns", + "description": "Patterns to match in the order in which they are given. These patterns\nalso take precedence over any wildcard patterns defined in `urls`.", + "optional": true, + "type": "array", + "items": { + "$ref": "BlockPattern" + } + }, { "name": "urls", "description": "URL patterns to block. Wildcards ('*') are allowed.", + "deprecated": true, + "optional": true, "type": "array", "items": { "type": "string" @@ -18923,94 +18958,6 @@ "description": "Fired once security policy has been updated.", "experimental": true }, - { - "name": "subresourceWebBundleMetadataReceived", - "description": "Fired once when parsing the .wbn file has succeeded.\nThe event contains the information about the web bundle contents.", - "experimental": true, - "parameters": [ - { - "name": "requestId", - "description": "Request identifier. Used to match this information to another event.", - "$ref": "RequestId" - }, - { - "name": "urls", - "description": "A list of URLs of resources in the subresource Web Bundle.", - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - { - "name": "subresourceWebBundleMetadataError", - "description": "Fired once when parsing the .wbn file has failed.", - "experimental": true, - "parameters": [ - { - "name": "requestId", - "description": "Request identifier. Used to match this information to another event.", - "$ref": "RequestId" - }, - { - "name": "errorMessage", - "description": "Error message", - "type": "string" - } - ] - }, - { - "name": "subresourceWebBundleInnerResponseParsed", - "description": "Fired when handling requests for resources within a .wbn file.\nNote: this will only be fired for resources that are requested by the webpage.", - "experimental": true, - "parameters": [ - { - "name": "innerRequestId", - "description": "Request identifier of the subresource request", - "$ref": "RequestId" - }, - { - "name": "innerRequestURL", - "description": "URL of the subresource resource.", - "type": "string" - }, - { - "name": "bundleRequestId", - "description": "Bundle request identifier. Used to match this information to another event.\nThis made be absent in case when the instrumentation was enabled only\nafter webbundle was parsed.", - "optional": true, - "$ref": "RequestId" - } - ] - }, - { - "name": "subresourceWebBundleInnerResponseError", - "description": "Fired when request for resources within a .wbn file failed.", - "experimental": true, - "parameters": [ - { - "name": "innerRequestId", - "description": "Request identifier of the subresource request", - "$ref": "RequestId" - }, - { - "name": "innerRequestURL", - "description": "URL of the subresource resource.", - "type": "string" - }, - { - "name": "errorMessage", - "description": "Error message", - "type": "string" - }, - { - "name": "bundleRequestId", - "description": "Bundle request identifier. Used to match this information to another event.\nThis made be absent in case when the instrumentation was enabled only\nafter webbundle was parsed.", - "optional": true, - "$ref": "RequestId" - } - ] - }, { "name": "reportingApiReportAdded", "description": "Is sent whenever a new report is added.\nAnd after 'enableReportingApi' for all existing reports.", @@ -24225,7 +24172,8 @@ "type": "string", "enum": [ "Prefetch", - "Prerender" + "Prerender", + "PrerenderUntilScript" ] }, {