diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/css_properties.json5')
-rw-r--r-- | chromium/third_party/blink/renderer/core/css/css_properties.json5 | 466 |
1 files changed, 416 insertions, 50 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/css_properties.json5 b/chromium/third_party/blink/renderer/core/css/css_properties.json5 index 1611163451e..132294a4830 100644 --- a/chromium/third_party/blink/renderer/core/css/css_properties.json5 +++ b/chromium/third_party/blink/renderer/core/css/css_properties.json5 @@ -70,8 +70,8 @@ "legacy", "mask_box", "mask_layer", - "svg_paint", "transition", + "visited_color", ], }, @@ -292,15 +292,21 @@ // Tweaks how we choose defaults for getter, setter, initial and type_name. // For example, setting this to BlendMode will make us use a setter of // setBlendMode + // - initial + // The static function to invoke on ComputedStyleInitialValues, + // SVGComputedStyle, or FontBuilder to retrieve the initial value. + // Defaults to e.g. InitialBorderBottomLeft. // - getter - // The ComputedStyle getter, defaults to e.g. borderBottomLeft + // The ComputedStyle getter, defaults to e.g. BorderBottomLeft // - setter - // The ComputedStyle setter, defaults to e.g. setBorderBottomLeft + // The ComputedStyle setter, defaults to e.g. GetBorderBottomLeft // - type_name // The computed type for the property. Only required for the default value // application, defaults to e.g. EDisplay name_for_methods: { }, + initial: { + }, getter: { }, setter: { @@ -348,8 +354,9 @@ physical_group: { valid_type: "str", valid_values: ["border", "border-color", "border-style", "border-width", - "inset", "margin", "max-size", "min-size", "padding", - "scroll-margin", "scroll-padding", "size"], + "inset", "margin", "max-size", "min-size", "overflow", + "padding", "scroll-margin", "scroll-padding", "size", + "visited-border-color"], } }, @@ -375,11 +382,25 @@ valid_type: "bool", }, - // - valid_for_visited_link - // Most CSS properties do not apply to :visited and :link for privacy - // reasons. Mark properties which apply to :visited and :link by setting - // this flag to true. - valid_for_visited_link: { + // - visited_property_for: "other-property" + // CSS properties that are allowed in :visited selectors each have an + // internal "companion" property with the visited value. For privacy reasons + // CSSOM APIs must return computed values as if links aren't visited, but + // for rendering purposes we need the value with the :visited rules applied. + // + // This means that the regular property (e.g. background-color) represents + // the value as seen by CSSOM, and the -internal-visited counterpart (e.g. + // -internal-visited-background-color) represents the same property as seen + // by painting. + visited_property_for: { + valid_type: "str", + }, + + // - affected_by_forced_colors + // The property value will be overridden with the default value defined in + // the forced colors UA style sheet when forced colors mode is enabled and + // forced-color-adjust is set to auto. + affected_by_forced_colors: { default: false, valid_type: "bool", }, @@ -485,7 +506,19 @@ attribute: "TimingFunction", }, priority: "Animation", - keywords: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"], + keywords: [ + "linear", + "ease", + "ease-in", + "ease-out", + "ease-in-out", + "jump-both", + "jump-end", + "jump-none", + "jump-start", + "step-start", + "step-end" + ], typedom_types: ["Keyword"], separator: ",", }, @@ -530,7 +563,18 @@ attribute: "TimingFunction", }, priority: "Animation", - keywords: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"], + keywords: [ + "linear", + "ease", + "ease-in", + "ease-out", + "ease-in-out", + "jump-both", + "jump-end", + "jump-none", + "jump-start", + "step-start", + "step-end"], typedom_types: ["Keyword"], separator: ",", }, @@ -553,7 +597,7 @@ priority: "High", keywords: ["currentcolor"], typedom_types: ["Keyword"], - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "direction", @@ -750,6 +794,17 @@ priority: "High", }, { + name: "forced-color-adjust", + property_methods: ["CSSValueFromComputedStyleInternal"], + inherited: true, + runtime_flag: "ForcedColors", + field_template: "keyword", + priority: "High", + keywords: ["auto", "none"], + typedom_types: ["Keyword"], + default_value: "auto", + }, + { name: "-webkit-locale", property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], inherited: true, @@ -938,7 +993,7 @@ style_builder_template_args: { initial_color: "ComputedStyleInitialValues::InitialBackgroundColor", }, - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "background-image", @@ -1031,7 +1086,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "border-bottom-left-radius", @@ -1157,7 +1212,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "border-left-style", @@ -1200,7 +1255,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "border-right-style", @@ -1243,7 +1298,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "border-top-left-radius", @@ -1321,6 +1376,7 @@ converter: "ConvertShadowList", keywords: ["none"], typedom_types: ["Keyword"], + affected_by_forced_colors: true, }, { name: "box-sizing", @@ -1398,7 +1454,6 @@ style_builder_custom_functions: ["initial", "inherit", "value"], keywords: ["auto", "currentcolor"], typedom_types: ["Keyword"], - valid_for_visited_link: true, }, { name: "clear", @@ -1617,13 +1672,10 @@ interpolable: true, inherited: true, svg: true, + initial: "InitialFillPaint", setter: "SetFillPaint", + getter: "FillPaint", converter: "ConvertSVGPaint", - style_builder_template: "svg_paint", - style_builder_template_args: { - paint_type: "FillPaint", - }, - valid_for_visited_link: true, }, { name: "fill-opacity", @@ -2360,7 +2412,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "outline-offset", @@ -2424,6 +2476,22 @@ typedom_types: ["Keyword"] }, { + name: "overflow-inline", + direction_aware_options: { + resolver: "inline", + physical_group: "overflow", + }, + runtime_flag: "CSSLogicalOverflow", + }, + { + name: "overflow-block", + direction_aware_options: { + resolver: "block", + physical_group: "overflow", + }, + runtime_flag: "CSSLogicalOverflow", + }, + { name: "overflow-x", property_methods: ["CSSValueFromComputedStyleInternal"], field_template: "keyword", @@ -2446,6 +2514,20 @@ type_name: "EOverflow", }, { + name: "overscroll-behavior-inline", + direction_aware_options: { + resolver: "inline", + physical_group: "overscroll-behavior", + }, + }, + { + name: "overscroll-behavior-block", + direction_aware_options: { + resolver: "block", + physical_group: "overscroll-behavior", + }, + }, + { name: "overscroll-behavior-x", property_methods: ["CSSValueFromComputedStyleInternal"], field_template: "keyword", @@ -2934,13 +3016,10 @@ interpolable: true, inherited: true, svg: true, + initial: "InitialStrokePaint", setter: "SetStrokePaint", + getter: "StrokePaint", converter: "ConvertSVGPaint", - style_builder_template: "svg_paint", - style_builder_template_args: { - paint_type: "StrokePaint", - }, - valid_for_visited_link: true, }, { name: "stroke-dasharray", @@ -3092,7 +3171,6 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, }, { name: "text-decoration-line", @@ -3172,7 +3250,8 @@ type_name: "ShadowList", converter: "ConvertShadowList", keywords: ["none"], - typedom_types: ["Keyword"] + typedom_types: ["Keyword"], + affected_by_forced_colors: true, }, { name: "text-size-adjust", @@ -3556,7 +3635,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, + affected_by_forced_colors: true, }, { name: "column-rule-style", @@ -3856,6 +3935,7 @@ field_template: "<color>", default_value: "LayoutTheme::TapHighlightColor()", converter: "ConvertColor", + affected_by_forced_colors: true, }, { name: "-webkit-text-combine", @@ -3875,7 +3955,6 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, }, { name: "-webkit-text-emphasis-position", @@ -3906,7 +3985,6 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, }, { name: "-webkit-text-security", @@ -3916,7 +3994,6 @@ field_template: "keyword", keywords: ["none", "disc", "circle", "square"], default_value: "none", - valid_for_visited_link: true, }, { name: "-webkit-text-stroke-color", @@ -3931,7 +4008,6 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "color", - valid_for_visited_link: true, }, { name: "-webkit-text-stroke-width", @@ -4135,6 +4211,7 @@ resolver: "inline-start", physical_group: "margin", }, + typedom_types: ["Length", "Percentage"], keywords: ["auto"] }, { @@ -4144,6 +4221,7 @@ resolver: "inline-end", physical_group: "margin", }, + typedom_types: ["Length", "Percentage"], keywords: ["auto"] }, { @@ -4153,6 +4231,7 @@ resolver: "block-start", physical_group: "margin", }, + typedom_types: ["Length", "Percentage"], keywords: ["auto"] }, { @@ -4162,6 +4241,7 @@ resolver: "block-end", physical_group: "margin", }, + typedom_types: ["Length", "Percentage"], keywords: ["auto"] }, { @@ -4170,7 +4250,8 @@ direction_aware_options: { resolver: "inline-start", physical_group: "padding", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "padding-inline-end", @@ -4178,7 +4259,8 @@ direction_aware_options: { resolver: "inline-end", physical_group: "padding", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "padding-block-start", @@ -4186,7 +4268,8 @@ direction_aware_options: { resolver: "block-start", physical_group: "padding", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "padding-block-end", @@ -4194,7 +4277,8 @@ direction_aware_options: { resolver: "block-end", physical_group: "padding", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "border-inline-start-width", @@ -4214,7 +4298,6 @@ { name: "border-inline-start-color", property_methods: ["ParseSingleValue"], - valid_for_visited_link: true, direction_aware_options: { resolver: "inline-start", physical_group: "border-color", @@ -4238,7 +4321,6 @@ { name: "border-inline-end-color", property_methods: ["ParseSingleValue"], - valid_for_visited_link: true, direction_aware_options: { resolver: "inline-end", physical_group: "border-color", @@ -4262,7 +4344,6 @@ { name: "border-block-start-color", property_methods: ["ParseSingleValue"], - valid_for_visited_link: true, direction_aware_options: { resolver: "block-start", physical_group: "border-color", @@ -4286,7 +4367,6 @@ { name: "border-block-end-color", property_methods: ["ParseSingleValue"], - valid_for_visited_link: true, direction_aware_options: { resolver: "block-end", physical_group: "border-color", @@ -4299,7 +4379,8 @@ direction_aware_options: { resolver: "inline-start", physical_group: "inset", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "inset-inline-end", @@ -4308,7 +4389,8 @@ direction_aware_options: { resolver: "inline-end", physical_group: "inset", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "inset-block-start", @@ -4317,7 +4399,8 @@ direction_aware_options: { resolver: "block-start", physical_group: "inset", - } + }, + typedom_types: ["Length", "Percentage"] }, { name: "inset-block-end", @@ -4326,7 +4409,8 @@ direction_aware_options: { resolver: "block-end", physical_group: "inset", - } + }, + typedom_types: ["Length", "Percentage"] }, // Non-standard direction aware properties @@ -4503,6 +4587,24 @@ is_property: false, runtime_flag: "DisplayCutoutAPI", }, + { + name: "syntax", + is_descriptor: true, + is_property: false, + runtime_flag: "CSSVariables2AtProperty", + }, + { + name: "initial-value", + is_descriptor: true, + is_property: false, + runtime_flag: "CSSVariables2AtProperty", + }, + { + name: "inherits", + is_descriptor: true, + is_property: false, + runtime_flag: "CSSVariables2AtProperty", + }, // Shorthands { @@ -4840,7 +4942,7 @@ }, { name: "list-style", - longhands: ["list-style-type", "list-style-position", "list-style-image"], + longhands: ["list-style-position", "list-style-image", "list-style-type"], property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], }, { @@ -5059,6 +5161,270 @@ property_methods: ["ParseShorthand"], }, + // Visited properties. + { + name: "-internal-visited-color", + visited_property_for: "color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + inherited: true, + field_group: "inherited", + field_template: "external", + include_paths: ["third_party/blink/renderer/platform/graphics/color.h"], + default_value: "Color::kBlack", + type_name: "Color", + computed_style_custom_functions: ["getter", "setter"], + style_builder_custom_functions: ['value'], + style_builder_template: "visited_color", + style_builder_template_args: { + initial_color: "ComputedStyleInitialValues::InitialColor", + }, + priority: "High", + }, + { + name: "-internal-visited-caret-color", + visited_property_for: "caret-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + inherited: true, + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/platform/graphics/color.h"], + default_value: "Color()", + type_name: "Color", + converter: "ConvertStyleAutoColor", + computed_style_custom_functions: ["getter", "setter"], + style_builder_template: "visited_color", + style_builder_template_args: { + initial_color: "StyleAutoColor::AutoColor", + }, + }, + { + name: "-internal-visited-column-rule-color", + visited_property_for: "column-rule-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*->multi-col", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter","setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-background-color", + visited_property_for: "background-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor(Color::kTransparent)", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + style_builder_template_args: { + initial_color: "ComputedStyleInitialValues::InitialBackgroundColor", + }, + }, + { + name: "-internal-visited-border-left-color", + visited_property_for: "border-left-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-border-right-color", + visited_property_for: "border-right-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-border-top-color", + visited_property_for: "border-top-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-border-bottom-color", + visited_property_for: "border-bottom-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-border-inline-start-color", + visited_property_for: "border-inline-start-color", + property_methods: ["ParseSingleValue"], + direction_aware_options: { + resolver: "inline-start", + physical_group: "visited-border-color", + }, + }, + { + name: "-internal-visited-border-inline-end-color", + visited_property_for: "border-inline-end-color", + property_methods: ["ParseSingleValue"], + direction_aware_options: { + resolver: "inline-end", + physical_group: "visited-border-color", + }, + }, + { + name: "-internal-visited-border-block-start-color", + visited_property_for: "border-block-start-color", + property_methods: ["ParseSingleValue"], + direction_aware_options: { + resolver: "block-start", + physical_group: "visited-border-color", + }, + }, + { + name: "-internal-visited-border-block-end-color", + visited_property_for: "border-block-end-color", + property_methods: ["ParseSingleValue"], + direction_aware_options: { + resolver: "block-end", + physical_group: "visited-border-color", + }, + }, + { + name: "-internal-visited-fill", + visited_property_for: "fill", + property_methods: ["ParseSingleValue"], + inherited: true, + svg: true, + initial: "InitialFillPaint", + setter: "SetInternalVisitedFillPaint", + getter: "FillPaint", + converter: "ConvertSVGPaint", + }, + { + name: "-internal-visited-outline-color", + visited_property_for: "outline-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-stroke", + visited_property_for: "stroke", + property_methods: ["ParseSingleValue"], + inherited: true, + svg: true, + initial: "InitialStrokePaint", + setter: "SetInternalVisitedStrokePaint", + getter: "StrokePaint", + converter: "ConvertSVGPaint", + }, + { + name: "-internal-visited-text-decoration-color", + visited_property_for: "text-decoration-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + field_group: "*", + field_template: "external", + include_paths: ["third_party/blink/renderer/core/css/style_color.h"], + default_value: "StyleColor::CurrentColor()", + type_name: "StyleColor", + computed_style_custom_functions: ["getter", "setter"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + }, + { + name: "-internal-visited-text-emphasis-color", + visited_property_for: "-webkit-text-emphasis-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + 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"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + style_builder_template_args: { + initial_color: "blink::Color", + }, + }, + { + name: "-internal-visited-text-fill-color", + visited_property_for: "-webkit-text-fill-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + 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"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + style_builder_template_args: { + initial_color: "blink::Color", + }, + }, + { + name: "-internal-visited-text-stroke-color", + visited_property_for: "-webkit-text-stroke-color", + property_methods: ["ParseSingleValue", "ColorIncludingFallback"], + 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"], + converter: "ConvertStyleColor", + style_builder_template: "visited_color", + style_builder_template_args: { + initial_color: "blink::Color", + }, + }, + { + name: "-internal-effective-zoom", + property_methods: ["ParseSingleValue"], + inherited: true, + field_template: "primitive", + type_name: "float", + default_value: "1.0f", + field_group: "*", + priority: "High", + style_builder_custom_functions: ["initial", "inherit", "value"], + }, + // Aliases; these map to the same CSSPropertyID { name: "-epub-caption-side", |