From ef4cb58b72bb8e88d44ea6a0d275eb81ef54e366 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Mon, 13 Jul 2020 08:08:33 +0200 Subject: [PATCH] Update CDP Contains the result of `scripts/deps/roll_deps.py && npm run generate-protocol-resources` DISABLE_THIRD_PARTY_CHECK=Update protocol Change-Id: I1c047c876324432a7ebb7011ef74267b555ab03c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2292275 Commit-Queue: Alex Rudenko Reviewed-by: Mathias Bynens --- .../generated/InspectorBackendCommands.js | 12 ++- front_end/generated/protocol-mapping.d.ts | 6 ++ front_end/generated/protocol-proxy-api.d.ts | 7 ++ front_end/generated/protocol.d.ts | 72 +++++++++++++ front_end/sdk/OverlayModel.js | 2 +- .../devtools_protocol/browser_protocol.json | 101 +++++++++++++++++- .../devtools_protocol/browser_protocol.pdl | 45 ++++++++ .../renderer/core/css/css_properties.json5 | 50 ++++----- 8 files changed, 263 insertions(+), 32 deletions(-) diff --git a/front_end/generated/InspectorBackendCommands.js b/front_end/generated/InspectorBackendCommands.js index 7be0642594..a982699330 100644 --- a/front_end/generated/InspectorBackendCommands.js +++ b/front_end/generated/InspectorBackendCommands.js @@ -868,6 +868,8 @@ export function registerCommands(inspectorBackend) { LandscapePrimary: 'landscapePrimary', LandscapeSecondary: 'landscapeSecondary' }); + inspectorBackend.registerEnum( + 'Emulation.DisplayFeatureOrientation', {Vertical: 'vertical', Horizontal: 'horizontal'}); inspectorBackend.registerEnum( 'Emulation.VirtualTimePolicy', {Advance: 'advance', Pause: 'pause', PauseIfNetworkFetchesPending: 'pauseIfNetworkFetchesPending'}); @@ -894,7 +896,8 @@ export function registerCommands(inspectorBackend) { {'name': 'positionY', 'type': 'number', 'optional': true}, {'name': 'dontSetVisibleSize', 'type': 'boolean', 'optional': true}, {'name': 'screenOrientation', 'type': 'object', 'optional': true}, - {'name': 'viewport', 'type': 'object', 'optional': true} + {'name': 'viewport', 'type': 'object', 'optional': true}, + {'name': 'displayFeature', 'type': 'object', 'optional': true} ], []); inspectorBackend.registerCommand( @@ -2318,6 +2321,13 @@ export function registerCommands(inspectorBackend) { {'name': 'isUserVerified', 'type': 'boolean', 'optional': false} ], []); + inspectorBackend.registerCommand( + 'WebAuthn.setAutomaticPresenceSimulation', + [ + {'name': 'authenticatorId', 'type': 'string', 'optional': false}, + {'name': 'enabled', 'type': 'boolean', 'optional': false} + ], + []); // Media. inspectorBackend.registerEnum( diff --git a/front_end/generated/protocol-mapping.d.ts b/front_end/generated/protocol-mapping.d.ts index 895958a2af..3fde6541e8 100644 --- a/front_end/generated/protocol-mapping.d.ts +++ b/front_end/generated/protocol-mapping.d.ts @@ -2431,6 +2431,12 @@ export namespace ProtocolMapping { * The default is true. */ 'WebAuthn.setUserVerified': {paramsType: [Protocol.WebAuthn.SetUserVerifiedRequest]; returnType: void;}; + /** + * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. + * The default is true. + */ + 'WebAuthn.setAutomaticPresenceSimulation': + {paramsType: [Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest]; returnType: void;}; /** * Enables the Media domain */ diff --git a/front_end/generated/protocol-proxy-api.d.ts b/front_end/generated/protocol-proxy-api.d.ts index b5cedb7122..59c11db2cb 100644 --- a/front_end/generated/protocol-proxy-api.d.ts +++ b/front_end/generated/protocol-proxy-api.d.ts @@ -3030,6 +3030,13 @@ declare namespace ProtocolProxyApi { */ invoke_setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest): Promise; + + /** + * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. + * The default is true. + */ + invoke_setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest): + Promise; } export interface WebAuthnDispatcher extends Protocol.Dispatcher {} diff --git a/front_end/generated/protocol.d.ts b/front_end/generated/protocol.d.ts index 4451582ca2..4561f60c65 100644 --- a/front_end/generated/protocol.d.ts +++ b/front_end/generated/protocol.d.ts @@ -1803,8 +1803,35 @@ declare namespace Protocol { glyphCount: number; } + /** + * Information about font variation axes for variable fonts + */ + export interface FontVariationAxis { + /** + * The font-variation-setting tag (a.k.a. "axis tag"). + */ + tag: string; + /** + * Human-readable variation name in the default language (normally, "en"). + */ + name: string; + /** + * The minimum value (inclusive) the font supports for this tag. + */ + minValue: number; + /** + * The maximum value (inclusive) the font supports for this tag. + */ + maxValue: number; + /** + * The default value. + */ + defaultValue: number; + } + /** * Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions + * and additional information such as platformFontFamily and fontVariationAxes. */ export interface FontFace { /** @@ -1839,6 +1866,10 @@ declare namespace Protocol { * The resolved platform font family */ platformFontFamily: string; + /** + * Available variation settings (a.k.a. "axes"). + */ + fontVariationAxes?: FontVariationAxis[]; } /** @@ -4366,6 +4397,29 @@ declare namespace Protocol { angle: integer; } + export enum DisplayFeatureOrientation { + Vertical = 'vertical', + Horizontal = 'horizontal', + } + + export interface DisplayFeature { + /** + * Orientation of a display feature in relation to screen + */ + orientation: DisplayFeatureOrientation; + /** + * The offset from the screen origin in either the x (for vertical + * orientation) or y (for horizontal orientation) direction. + */ + offset: integer; + /** + * A display feature may mask content such that it is not physically + * displayed - this length along with the offset describes this area. + * A display feature that only splits content will have a 0 mask_length. + */ + maskLength: integer; + } + export interface MediaFeature { name: string; value: string; @@ -4484,6 +4538,11 @@ declare namespace Protocol { * change is not observed by the page, e.g. viewport-relative elements do not change positions. */ viewport?: Page.Viewport; + /** + * If set, the display feature of a multi-segment screen. If not set, multi-segment support + * is turned-off. + */ + displayFeature?: DisplayFeature; } export interface SetScrollbarsHiddenRequest { @@ -7833,6 +7892,10 @@ declare namespace Protocol { * Show Negative line number labels (default: false). */ showNegativeLineNumbers?: boolean; + /** + * Show area name labels (default: false). + */ + showAreaNames?: boolean; /** * The grid container border highlight color (default: transparent). */ @@ -7865,6 +7928,10 @@ declare namespace Protocol { * The column gap hatching fill color (default: transparent). */ columnHatchColor?: DOM.RGBA; + /** + * The named grid areas border color (Default: transparent). + */ + areaBorderColor?: DOM.RGBA; } /** @@ -11679,6 +11746,11 @@ declare namespace Protocol { authenticatorId: AuthenticatorId; isUserVerified: boolean; } + + export interface SetAutomaticPresenceSimulationRequest { + authenticatorId: AuthenticatorId; + enabled: boolean; + } } /** diff --git a/front_end/sdk/OverlayModel.js b/front_end/sdk/OverlayModel.js index 75138a0b0c..9747189b74 100644 --- a/front_end/sdk/OverlayModel.js +++ b/front_end/sdk/OverlayModel.js @@ -439,7 +439,7 @@ export class OverlayModel extends SDKModel { showGridExtensionLines, showPositiveLineNumbers, showNegativeLineNumbers, - showAreaNames: this._showGridAreasSetting.get(), + showAreaNames: /** @type {boolean} */ (this._showGridAreasSetting.get()), areaBorderColor: Common.Color.PageHighlight.GridAreaBorder.toProtocolRGBA() }; } diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.json b/third_party/blink/public/devtools_protocol/browser_protocol.json index 4f80526098..d75c9a6510 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.json +++ b/third_party/blink/public/devtools_protocol/browser_protocol.json @@ -2560,9 +2560,41 @@ } ] }, + { + "id": "FontVariationAxis", + "description": "Information about font variation axes for variable fonts", + "type": "object", + "properties": [ + { + "name": "tag", + "description": "The font-variation-setting tag (a.k.a. \"axis tag\").", + "type": "string" + }, + { + "name": "name", + "description": "Human-readable variation name in the default language (normally, \"en\").", + "type": "string" + }, + { + "name": "minValue", + "description": "The minimum value (inclusive) the font supports for this tag.", + "type": "number" + }, + { + "name": "maxValue", + "description": "The maximum value (inclusive) the font supports for this tag.", + "type": "number" + }, + { + "name": "defaultValue", + "description": "The default value.", + "type": "number" + } + ] + }, { "id": "FontFace", - "description": "Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions", + "description": "Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions\nand additional information such as platformFontFamily and fontVariationAxes.", "type": "object", "properties": [ { @@ -2604,6 +2636,15 @@ "name": "platformFontFamily", "description": "The resolved platform font family", "type": "string" + }, + { + "name": "fontVariationAxes", + "description": "Available variation settings (a.k.a. \"axes\").", + "optional": true, + "type": "array", + "items": { + "$ref": "FontVariationAxis" + } } ] }, @@ -6504,6 +6545,31 @@ } ] }, + { + "id": "DisplayFeature", + "type": "object", + "properties": [ + { + "name": "orientation", + "description": "Orientation of a display feature in relation to screen", + "type": "string", + "enum": [ + "vertical", + "horizontal" + ] + }, + { + "name": "offset", + "description": "The offset from the screen origin in either the x (for vertical\norientation) or y (for horizontal orientation) direction.", + "type": "integer" + }, + { + "name": "maskLength", + "description": "A display feature may mask content such that it is not physically\ndisplayed - this length along with the offset describes this area.\nA display feature that only splits content will have a 0 mask_length.", + "type": "integer" + } + ] + }, { "id": "MediaFeature", "type": "object", @@ -6724,6 +6790,13 @@ "experimental": true, "optional": true, "$ref": "Page.Viewport" + }, + { + "name": "displayFeature", + "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support\nis turned-off.", + "experimental": true, + "optional": true, + "$ref": "DisplayFeature" } ] }, @@ -11365,6 +11438,12 @@ "optional": true, "type": "boolean" }, + { + "name": "showAreaNames", + "description": "Show area name labels (default: false).", + "optional": true, + "type": "boolean" + }, { "name": "gridBorderColor", "description": "The grid container border highlight color (default: transparent).", @@ -11412,6 +11491,12 @@ "description": "The column gap hatching fill color (default: transparent).", "optional": true, "$ref": "DOM.RGBA" + }, + { + "name": "areaBorderColor", + "description": "The named grid areas border color (Default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" } ] }, @@ -17229,6 +17314,20 @@ "type": "boolean" } ] + }, + { + "name": "setAutomaticPresenceSimulation", + "description": "Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.\nThe default is true.", + "parameters": [ + { + "name": "authenticatorId", + "$ref": "AuthenticatorId" + }, + { + "name": "enabled", + "type": "boolean" + } + ] } ] }, diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl index 35a994a12b..adab42df96 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl @@ -1229,7 +1229,22 @@ experimental domain CSS # Amount of glyphs that were rendered with this font. number glyphCount + # Information about font variation axes for variable fonts + type FontVariationAxis extends object + properties + # The font-variation-setting tag (a.k.a. "axis tag"). + string tag + # Human-readable variation name in the default language (normally, "en"). + string name + # The minimum value (inclusive) the font supports for this tag. + number minValue + # The maximum value (inclusive) the font supports for this tag. + number maxValue + # The default value. + number defaultValue + # Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions + # and additional information such as platformFontFamily and fontVariationAxes. type FontFace extends object properties # The font-family. @@ -1248,6 +1263,8 @@ experimental domain CSS string src # The resolved platform font family string platformFontFamily + # Available variation settings (a.k.a. "axes"). + optional array of FontVariationAxis fontVariationAxes # CSS keyframes rule representation. type CSSKeyframesRule extends object @@ -2956,6 +2973,20 @@ domain Emulation # Orientation angle. integer angle + type DisplayFeature extends object + properties + # Orientation of a display feature in relation to screen + enum orientation + vertical + horizontal + # The offset from the screen origin in either the x (for vertical + # orientation) or y (for horizontal orientation) direction. + integer offset + # A display feature may mask content such that it is not physically + # displayed - this length along with the offset describes this area. + # A display feature that only splits content will have a 0 mask_length. + integer maskLength + type MediaFeature extends object properties string name @@ -3054,6 +3085,9 @@ domain Emulation # If set, the visible area of the page will be overridden to this viewport. This viewport # change is not observed by the page, e.g. viewport-relative elements do not change positions. experimental optional Page.Viewport viewport + # If set, the display feature of a multi-segment screen. If not set, multi-segment support + # is turned-off. + experimental optional DisplayFeature displayFeature experimental command setScrollbarsHidden parameters @@ -5244,6 +5278,8 @@ experimental domain Overlay optional boolean showPositiveLineNumbers # Show Negative line number labels (default: false). optional boolean showNegativeLineNumbers + # Show area name labels (default: false). + optional boolean showAreaNames # The grid container border highlight color (default: transparent). optional DOM.RGBA gridBorderColor # The cell border color (default: transparent). @@ -5260,6 +5296,8 @@ experimental domain Overlay optional DOM.RGBA columnGapColor # The column gap hatching fill color (default: transparent). optional DOM.RGBA columnHatchColor + # The named grid areas border color (Default: transparent). + optional DOM.RGBA areaBorderColor # Configuration data for the highlighting of page elements. type HighlightConfig extends object @@ -7955,6 +7993,13 @@ experimental domain WebAuthn AuthenticatorId authenticatorId boolean isUserVerified + # Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. + # The default is true. + command setAutomaticPresenceSimulation + parameters + AuthenticatorId authenticatorId + boolean enabled + # This domain allows detailed inspection of media elements experimental domain Media diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index 91eaff51d9..dc68cc0bc0 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5 @@ -710,7 +710,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor(Color::kBlack)", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], style_builder_custom_functions: ["initial", "inherit", "value"], priority: "High", keywords: ["currentcolor"], @@ -1300,7 +1300,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -1451,7 +1451,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -1503,7 +1503,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -1555,7 +1555,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -1726,10 +1726,10 @@ inherited: true, field_group: "*", field_template: "external", - include_paths: ["third_party/blink/renderer/platform/graphics/color.h"], - default_value: "Color()", - type_name: "Color", - computed_style_custom_functions: ["getter", "setter"], + include_paths: ["third_party/blink/renderer/core/css/style_auto_color.h"], + default_value: "StyleAutoColor::AutoColor()", + type_name: "StyleAutoColor", + computed_style_custom_functions: ["getter"], style_builder_custom_functions: ["initial", "inherit", "value"], keywords: ["auto", "currentcolor"], typedom_types: ["Keyword"], @@ -2763,7 +2763,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -3595,6 +3595,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -4121,7 +4122,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter","setter"], + computed_style_custom_functions: ["getter"], keywords: ["currentcolor"], typedom_types: ["Keyword"], converter: "ConvertStyleColor", @@ -4403,8 +4404,8 @@ inherited: true, field_group: "*", field_template: "", - default_value: "LayoutTheme::TapHighlightColor()", - converter: "ConvertColor", + default_value: "StyleColor(LayoutTheme::TapHighlightColor())", + converter: "ConvertStyleColor", affected_by_forced_colors: true, }, { @@ -4422,7 +4423,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], converter: "ConvertStyleColor", style_builder_template: "color", affected_by_forced_colors: true, @@ -4453,7 +4454,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], converter: "ConvertStyleColor", style_builder_template: "color", }, @@ -4476,7 +4477,7 @@ include_paths: ["third_party/blink/renderer/core/css/style_color.h"], default_value: "StyleColor::CurrentColor()", type_name: "StyleColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], converter: "ConvertStyleColor", style_builder_template: "color", }, @@ -5699,11 +5700,11 @@ inherited: true, field_group: "*", field_template: "external", - include_paths: ["third_party/blink/renderer/platform/graphics/color.h"], - default_value: "Color()", - type_name: "Color", + include_paths: ["third_party/blink/renderer/core/css/style_auto_color.h"], + default_value: "StyleAutoColor::AutoColor()", + type_name: "StyleAutoColor", converter: "ConvertStyleAutoColor", - computed_style_custom_functions: ["getter", "setter"], + computed_style_custom_functions: ["getter"], style_builder_template: "visited_color", style_builder_template_args: { initial_color: "StyleAutoColor::AutoColor", @@ -5910,9 +5911,6 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "visited_color", - style_builder_template_args: { - initial_color: "StyleColor::CurrentColor", - }, affected_by_forced_colors: true, }, { @@ -5928,9 +5926,6 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "visited_color", - style_builder_template_args: { - initial_color: "StyleColor::CurrentColor", - }, }, { name: "-internal-visited-text-stroke-color", @@ -5945,9 +5940,6 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "visited_color", - style_builder_template_args: { - initial_color: "StyleColor::CurrentColor", - }, }, // Name: -internal-empty-line-height: