From 902078271ed28fa858ffedabfb3628aa039fe160 Mon Sep 17 00:00:00 2001 From: devtools-ci-autoroll-builder Date: Wed, 11 Dec 2024 19:13:51 -0800 Subject: [PATCH] Roll browser-protocol This roll requires a manual review. See http://go/reviewed-rolls for guidance. In case of failures or errors, reach out to someone from config/owner/COMMON_OWNERS. Roll created at https://cr-buildbucket.appspot.com/build/8728791867596756305 R=devtools-waterfall-sheriff-onduty@rotations.google.com Bug: none Change-Id: I81dae6a4e9885f3a9a8ecf0bcbf31a09b09e5166 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6088580 Bot-Commit: Devtools Autoroller Reviewed-by: Alex Rudenko Commit-Queue: Alex Rudenko --- DEPS | 2 +- .../generated/InspectorBackendCommands.js | 3 + front_end/generated/protocol-mapping.d.ts | 8 ++ front_end/generated/protocol-proxy-api.d.ts | 6 ++ front_end/generated/protocol.ts | 48 ++++++++++++ .../javascript_metadata/NativeFunctions.js | 16 +++- .../devtools_protocol/browser_protocol.json | 77 +++++++++++++++++++ .../devtools_protocol/browser_protocol.pdl | 30 ++++++++ 8 files changed, 187 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 805c46ad71..16e772a45d 100644 --- a/DEPS +++ b/DEPS @@ -24,7 +24,7 @@ vars = { 'inspector_protocol_revision': '69d69ddf3aa698b171886551a4a672c5af1ad902', # Keeping track of the last time we rollerd the browser protocol files. - 'chromium_browser_protocol_revision' : 'a4d27b40bc7e114c8a581eec4c55f5be438a11ec', + 'chromium_browser_protocol_revision' : 'f6eeb774b14259df6669d34419d3a0d1165fcdcb', 'clang_format_url': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git', 'clang_format_revision': '37f6e68a107df43b7d7e044fd36a13cbae3413f2', diff --git a/front_end/generated/InspectorBackendCommands.js b/front_end/generated/InspectorBackendCommands.js index 5b3d49a64d..a1584870c3 100644 --- a/front_end/generated/InspectorBackendCommands.js +++ b/front_end/generated/InspectorBackendCommands.js @@ -226,6 +226,7 @@ inspectorBackend.registerCommand("CSS.getBackgroundColors", [{"name": "nodeId", inspectorBackend.registerCommand("CSS.getComputedStyleForNode", [{"name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId"}], ["computedStyle"], "Returns the computed style for a DOM node identified by `nodeId`."); inspectorBackend.registerCommand("CSS.resolveValues", [{"name": "values", "type": "array", "optional": false, "description": "Substitution functions (var()/env()/attr()) and cascade-dependent keywords (revert/revert-layer) do not work.", "typeRef": "string"}, {"name": "nodeId", "type": "number", "optional": false, "description": "Id of the node in whose context the expression is evaluated", "typeRef": "DOM.NodeId"}, {"name": "propertyName", "type": "string", "optional": true, "description": "Only longhands and custom property names are accepted.", "typeRef": null}, {"name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element custom ident.", "typeRef": null}], ["results"], "Resolve the specified values in the context of the provided element. For example, a value of '1em' is evaluated according to the computed 'font-size' of the element and a value 'calc(1px + 2px)' will be resolved to '3px'."); inspectorBackend.registerCommand("CSS.getInlineStylesForNode", [{"name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId"}], ["inlineStyle", "attributesStyle"], "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM attributes) for a DOM node identified by `nodeId`."); +inspectorBackend.registerCommand("CSS.getAnimatedStylesForNode", [{"name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId"}], ["animationStyles", "transitionsStyle", "inherited"], "Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain."); inspectorBackend.registerCommand("CSS.getMatchedStylesForNode", [{"name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId"}], ["inlineStyle", "attributesStyle", "matchedCSSRules", "pseudoElements", "inherited", "inheritedPseudoElements", "cssKeyframesRules", "cssPositionTryRules", "activePositionFallbackIndex", "cssPropertyRules", "cssPropertyRegistrations", "cssFontPaletteValuesRule", "parentLayoutNodeId"], "Returns requested styles for a DOM node identified by `nodeId`."); inspectorBackend.registerCommand("CSS.getMediaQueries", [], ["medias"], "Returns all media queries parsed by the rendering engine."); inspectorBackend.registerCommand("CSS.getPlatformFontsForNode", [{"name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId"}], ["fonts"], "Requests information about platform fonts which we used to render child TextNodes in the given node."); @@ -250,7 +251,9 @@ inspectorBackend.registerCommand("CSS.stopRuleUsageTracking", [], ["ruleUsage"], inspectorBackend.registerCommand("CSS.takeCoverageDelta", [], ["coverage", "timestamp"], "Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)."); inspectorBackend.registerCommand("CSS.setLocalFontsEnabled", [{"name": "enabled", "type": "boolean", "optional": false, "description": "Whether rendering of local fonts is enabled.", "typeRef": null}], [], "Enables/disables rendering of local CSS fonts (enabled by default)."); inspectorBackend.registerType("CSS.PseudoElementMatches", [{"name": "pseudoType", "type": "string", "optional": false, "description": "Pseudo element type.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element custom ident.", "typeRef": null}, {"name": "matches", "type": "array", "optional": false, "description": "Matches of CSS rules applicable to the pseudo style.", "typeRef": "CSS.RuleMatch"}]); +inspectorBackend.registerType("CSS.CSSAnimationStyle", [{"name": "name", "type": "string", "optional": true, "description": "The name of the animation.", "typeRef": null}, {"name": "style", "type": "object", "optional": false, "description": "The style coming from the animation.", "typeRef": "CSS.CSSStyle"}]); inspectorBackend.registerType("CSS.InheritedStyleEntry", [{"name": "inlineStyle", "type": "object", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain.", "typeRef": "CSS.CSSStyle"}, {"name": "matchedCSSRules", "type": "array", "optional": false, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain.", "typeRef": "CSS.RuleMatch"}]); +inspectorBackend.registerType("CSS.InheritedAnimatedStyleEntry", [{"name": "animationStyles", "type": "array", "optional": true, "description": "Styles coming from the animations of the ancestor, if any, in the style inheritance chain.", "typeRef": "CSS.CSSAnimationStyle"}, {"name": "transitionsStyle", "type": "object", "optional": true, "description": "The style coming from the transitions of the ancestor, if any, in the style inheritance chain.", "typeRef": "CSS.CSSStyle"}]); inspectorBackend.registerType("CSS.InheritedPseudoElementMatches", [{"name": "pseudoElements", "type": "array", "optional": false, "description": "Matches of pseudo styles from the pseudos of an ancestor node.", "typeRef": "CSS.PseudoElementMatches"}]); inspectorBackend.registerType("CSS.RuleMatch", [{"name": "rule", "type": "object", "optional": false, "description": "CSS rule in the match.", "typeRef": "CSS.CSSRule"}, {"name": "matchingSelectors", "type": "array", "optional": false, "description": "Matching selector indices in the rule's selectorList selectors (0-based).", "typeRef": "integer"}]); inspectorBackend.registerType("CSS.Value", [{"name": "text", "type": "string", "optional": false, "description": "Value text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "Value range in the underlying resource (if available).", "typeRef": "CSS.SourceRange"}, {"name": "specificity", "type": "object", "optional": true, "description": "Specificity of the selector.", "typeRef": "CSS.Specificity"}]); diff --git a/front_end/generated/protocol-mapping.d.ts b/front_end/generated/protocol-mapping.d.ts index 25218039e4..a807ceab01 100644 --- a/front_end/generated/protocol-mapping.d.ts +++ b/front_end/generated/protocol-mapping.d.ts @@ -1268,6 +1268,14 @@ export namespace ProtocolMapping { paramsType: [Protocol.CSS.GetInlineStylesForNodeRequest]; returnType: Protocol.CSS.GetInlineStylesForNodeResponse; }; + /** + * Returns the styles coming from animations & transitions + * including the animation & transition styles coming from inheritance chain. + */ + 'CSS.getAnimatedStylesForNode': { + paramsType: [Protocol.CSS.GetAnimatedStylesForNodeRequest]; + returnType: Protocol.CSS.GetAnimatedStylesForNodeResponse; + }; /** * Returns requested styles for a DOM node identified by `nodeId`. */ diff --git a/front_end/generated/protocol-proxy-api.d.ts b/front_end/generated/protocol-proxy-api.d.ts index e3ff84f650..84d75e4a26 100644 --- a/front_end/generated/protocol-proxy-api.d.ts +++ b/front_end/generated/protocol-proxy-api.d.ts @@ -676,6 +676,12 @@ declare namespace ProtocolProxyApi { */ invoke_getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise; + /** + * Returns the styles coming from animations & transitions + * including the animation & transition styles coming from inheritance chain. + */ + invoke_getAnimatedStylesForNode(params: Protocol.CSS.GetAnimatedStylesForNodeRequest): Promise; + /** * Returns requested styles for a DOM node identified by `nodeId`. */ diff --git a/front_end/generated/protocol.ts b/front_end/generated/protocol.ts index 2d5811c52b..b9481a50b4 100644 --- a/front_end/generated/protocol.ts +++ b/front_end/generated/protocol.ts @@ -2272,6 +2272,20 @@ export namespace CSS { matches: RuleMatch[]; } + /** + * CSS style coming from animations with the name of the animation. + */ + export interface CSSAnimationStyle { + /** + * The name of the animation. + */ + name?: string; + /** + * The style coming from the animation. + */ + style: CSSStyle; + } + /** * Inherited CSS rule collection from ancestor node. */ @@ -2286,6 +2300,20 @@ export namespace CSS { matchedCSSRules: RuleMatch[]; } + /** + * Inherited CSS style collection for animated styles from ancestor node. + */ + export interface InheritedAnimatedStyleEntry { + /** + * Styles coming from the animations of the ancestor, if any, in the style inheritance chain. + */ + animationStyles?: CSSAnimationStyle[]; + /** + * The style coming from the transitions of the ancestor, if any, in the style inheritance chain. + */ + transitionsStyle?: CSSStyle; + } + /** * Inherited pseudo element matches from pseudos of an ancestor node. */ @@ -3269,6 +3297,26 @@ export namespace CSS { attributesStyle?: CSSStyle; } + export interface GetAnimatedStylesForNodeRequest { + nodeId: DOM.NodeId; + } + + export interface GetAnimatedStylesForNodeResponse extends ProtocolResponseWithError { + /** + * Styles coming from animations. + */ + animationStyles?: CSSAnimationStyle[]; + /** + * Style coming from transitions. + */ + transitionsStyle?: CSSStyle; + /** + * Inherited style entries for animationsStyle and transitionsStyle from + * the inheritance chain of the element. + */ + inherited?: InheritedAnimatedStyleEntry[]; + } + export interface GetMatchedStylesForNodeRequest { nodeId: DOM.NodeId; } diff --git a/front_end/models/javascript_metadata/NativeFunctions.js b/front_end/models/javascript_metadata/NativeFunctions.js index 76a61bdc17..55abc418b7 100644 --- a/front_end/models/javascript_metadata/NativeFunctions.js +++ b/front_end/models/javascript_metadata/NativeFunctions.js @@ -5277,11 +5277,23 @@ export const NativeFunctions = [ }, { name: "atob", - signatures: [["data"]] + signatures: [["data"]], + receivers: ["Window","WorkerGlobalScope"] + }, + { + name: "atob", + signatures: [["atob"]], + receivers: ["Window","ShadowRealmGlobalScope","WorkerGlobalScope"] }, { name: "btoa", - signatures: [["data"]] + signatures: [["data"]], + receivers: ["Window","WorkerGlobalScope"] + }, + { + name: "btoa", + signatures: [["btoa"]], + receivers: ["Window","ShadowRealmGlobalScope","WorkerGlobalScope"] }, { name: "clearInterval", diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.json b/third_party/blink/public/devtools_protocol/browser_protocol.json index 82f83a4cd2..2c640655c2 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.json +++ b/third_party/blink/public/devtools_protocol/browser_protocol.json @@ -3393,6 +3393,24 @@ } ] }, + { + "id": "CSSAnimationStyle", + "description": "CSS style coming from animations with the name of the animation.", + "type": "object", + "properties": [ + { + "name": "name", + "description": "The name of the animation.", + "optional": true, + "type": "string" + }, + { + "name": "style", + "description": "The style coming from the animation.", + "$ref": "CSSStyle" + } + ] + }, { "id": "InheritedStyleEntry", "description": "Inherited CSS rule collection from ancestor node.", @@ -3414,6 +3432,28 @@ } ] }, + { + "id": "InheritedAnimatedStyleEntry", + "description": "Inherited CSS style collection for animated styles from ancestor node.", + "type": "object", + "properties": [ + { + "name": "animationStyles", + "description": "Styles coming from the animations of the ancestor, if any, in the style inheritance chain.", + "optional": true, + "type": "array", + "items": { + "$ref": "CSSAnimationStyle" + } + }, + { + "name": "transitionsStyle", + "description": "The style coming from the transitions of the ancestor, if any, in the style inheritance chain.", + "optional": true, + "$ref": "CSSStyle" + } + ] + }, { "id": "InheritedPseudoElementMatches", "description": "Inherited pseudo element matches from pseudos of an ancestor node.", @@ -4769,6 +4809,43 @@ } ] }, + { + "name": "getAnimatedStylesForNode", + "description": "Returns the styles coming from animations & transitions\nincluding the animation & transition styles coming from inheritance chain.", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "$ref": "DOM.NodeId" + } + ], + "returns": [ + { + "name": "animationStyles", + "description": "Styles coming from animations.", + "optional": true, + "type": "array", + "items": { + "$ref": "CSSAnimationStyle" + } + }, + { + "name": "transitionsStyle", + "description": "Style coming from transitions.", + "optional": true, + "$ref": "CSSStyle" + }, + { + "name": "inherited", + "description": "Inherited style entries for animationsStyle and transitionsStyle from\nthe inheritance chain of the element.", + "optional": true, + "type": "array", + "items": { + "$ref": "InheritedAnimatedStyleEntry" + } + } + ] + }, { "name": "getMatchedStylesForNode", "description": "Returns requested styles for a DOM node identified by `nodeId`.", diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl index 68f6dd0bde..f5c3dc9c98 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl @@ -1701,6 +1701,14 @@ experimental domain CSS # Matches of CSS rules applicable to the pseudo style. array of RuleMatch matches + # CSS style coming from animations with the name of the animation. + type CSSAnimationStyle extends object + properties + # The name of the animation. + optional string name + # The style coming from the animation. + CSSStyle style + # Inherited CSS rule collection from ancestor node. type InheritedStyleEntry extends object properties @@ -1709,6 +1717,14 @@ experimental domain CSS # Matches of CSS rules matching the ancestor node in the style inheritance chain. array of RuleMatch matchedCSSRules + # Inherited CSS style collection for animated styles from ancestor node. + type InheritedAnimatedStyleEntry extends object + properties + # Styles coming from the animations of the ancestor, if any, in the style inheritance chain. + optional array of CSSAnimationStyle animationStyles + # The style coming from the transitions of the ancestor, if any, in the style inheritance chain. + optional CSSStyle transitionsStyle + # Inherited pseudo element matches from pseudos of an ancestor node. type InheritedPseudoElementMatches extends object properties @@ -2296,6 +2312,20 @@ experimental domain CSS # Attribute-defined element style (e.g. resulting from "width=20 height=100%"). optional CSSStyle attributesStyle + # Returns the styles coming from animations & transitions + # including the animation & transition styles coming from inheritance chain. + experimental command getAnimatedStylesForNode + parameters + DOM.NodeId nodeId + returns + # Styles coming from animations. + optional array of CSSAnimationStyle animationStyles + # Style coming from transitions. + optional CSSStyle transitionsStyle + # Inherited style entries for animationsStyle and transitionsStyle from + # the inheritance chain of the element. + optional array of InheritedAnimatedStyleEntry inherited + # Returns requested styles for a DOM node identified by `nodeId`. command getMatchedStylesForNode parameters