Commit e2682702 authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

Ribbonize IsValidFirstLetterStyleProperty

BUG=545324

Change-Id: Ic90b7e417accdbf64b110f70db41369e2edec0cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1986831Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730116}
parent d8bf4e00
...@@ -54,6 +54,10 @@ def check_property_parameters(property_to_check): ...@@ -54,6 +54,10 @@ def check_property_parameters(property_to_check):
if property_to_check['alias_for']: if property_to_check['alias_for']:
assert not property_to_check['is_internal'], \ assert not property_to_check['is_internal'], \
'Internal aliases is not supported' 'Internal aliases is not supported'
if property_to_check['valid_for_first_letter']:
assert not property_to_check['longhands'], \
'Shorthand %s should not be marked as valid_for_first_letter' % \
property_to_check['name']
class CSSProperties(object): class CSSProperties(object):
......
...@@ -42,6 +42,7 @@ namespace {{namespace}} { ...@@ -42,6 +42,7 @@ namespace {{namespace}} {
(property.affected_by_forced_colors and 'kIsAffectedByForcedColors' or ''), (property.affected_by_forced_colors and 'kIsAffectedByForcedColors' or ''),
(property.ua and 'kUA' or ''), (property.ua and 'kUA' or ''),
(property.is_animation_property and 'kAnimation' or ''), (property.is_animation_property and 'kAnimation' or ''),
(property.valid_for_first_letter and 'kValidForFirstLetter' or ''),
] | reject('==', '') | join(' | ') %} ] | reject('==', '') | join(' | ') %}
{% set ctor_args = (not is_alias and [property_id, flags, separator] or []) %} {% set ctor_args = (not is_alias and [property_id, flags, separator] or []) %}
// {{property.name}} // {{property.name}}
......
...@@ -443,6 +443,13 @@ ...@@ -443,6 +443,13 @@
valid_type: "str", valid_type: "str",
}, },
// - valid_for_first_letter: true
//
// https://drafts.csswg.org/css-pseudo-4/#first-letter-styling
valid_for_first_letter: {
default: false,
valid_type: "bool",
},
}, },
// Members in the data objects should appear in the same order as in the // Members in the data objects should appear in the same order as in the
...@@ -637,6 +644,7 @@ ...@@ -637,6 +644,7 @@
keywords: ["currentcolor"], keywords: ["currentcolor"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "direction", name: "direction",
...@@ -662,6 +670,7 @@ ...@@ -662,6 +670,7 @@
type_name: "FontDescription::FamilyDescription", type_name: "FontDescription::FamilyDescription",
converter: "ConvertFontFamily", converter: "ConvertFontFamily",
priority: "High", priority: "High",
valid_for_first_letter: true,
}, },
{ {
name: "font-kerning", name: "font-kerning",
...@@ -673,6 +682,7 @@ ...@@ -673,6 +682,7 @@
priority: "High", priority: "High",
keywords: ["auto", "normal", "none"], keywords: ["auto", "normal", "none"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-optical-sizing", name: "font-optical-sizing",
...@@ -683,7 +693,8 @@ ...@@ -683,7 +693,8 @@
type_name: "OpticalSizing", type_name: "OpticalSizing",
priority: "High", priority: "High",
keywords: ["auto", "none"], keywords: ["auto", "none"],
typedom_types: ["Keyword"] typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-size", name: "font-size",
...@@ -696,7 +707,8 @@ ...@@ -696,7 +707,8 @@
converter: "ConvertFontSize", converter: "ConvertFontSize",
priority: "High", priority: "High",
keywords: ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large", "larger", "smaller", "-webkit-xxx-large"], keywords: ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large", "larger", "smaller", "-webkit-xxx-large"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "font-size-adjust", name: "font-size-adjust",
...@@ -709,7 +721,8 @@ ...@@ -709,7 +721,8 @@
converter: "ConvertFontSizeAdjust", converter: "ConvertFontSizeAdjust",
priority: "High", priority: "High",
keywords: ["none"], keywords: ["none"],
typedom_types: ["Keyword", "Number"] typedom_types: ["Keyword", "Number"],
valid_for_first_letter: true,
}, },
{ {
name: "font-stretch", name: "font-stretch",
...@@ -724,7 +737,8 @@ ...@@ -724,7 +737,8 @@
"normal", "ultra-condensed", "extra-condensed", "condensed", "normal", "ultra-condensed", "extra-condensed", "condensed",
"semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"
], ],
typedom_types: ["Keyword", "Percentage"] typedom_types: ["Keyword", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "font-style", name: "font-style",
...@@ -737,6 +751,7 @@ ...@@ -737,6 +751,7 @@
priority: "High", priority: "High",
keywords: ["normal", "italic", "oblique"], keywords: ["normal", "italic", "oblique"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-variant-ligatures", name: "font-variant-ligatures",
...@@ -754,6 +769,7 @@ ...@@ -754,6 +769,7 @@
"no-contextual" "no-contextual"
], ],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-variant-caps", name: "font-variant-caps",
...@@ -768,6 +784,7 @@ ...@@ -768,6 +784,7 @@
"all-petite-caps", "unicase", "titling-caps" "all-petite-caps", "unicase", "titling-caps"
], ],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-variant-east-asian", name: "font-variant-east-asian",
...@@ -782,6 +799,7 @@ ...@@ -782,6 +799,7 @@
"traditional", "full-width", "proportional-width", "ruby" "traditional", "full-width", "proportional-width", "ruby"
], ],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-variant-numeric", name: "font-variant-numeric",
...@@ -797,6 +815,7 @@ ...@@ -797,6 +815,7 @@
"slashed-zero" "slashed-zero"
], ],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-weight", name: "font-weight",
...@@ -809,7 +828,8 @@ ...@@ -809,7 +828,8 @@
converter: "ConvertFontWeight", converter: "ConvertFontWeight",
priority: "High", priority: "High",
keywords: ["normal", "bold", "bolder", "lighter"], keywords: ["normal", "bold", "bolder", "lighter"],
typedom_types: ["Keyword", "Number"] typedom_types: ["Keyword", "Number"],
valid_for_first_letter: true,
}, },
{ {
name: "font-feature-settings", name: "font-feature-settings",
...@@ -822,6 +842,7 @@ ...@@ -822,6 +842,7 @@
priority: "High", priority: "High",
keywords: ["normal"], keywords: ["normal"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "font-variation-settings", name: "font-variation-settings",
...@@ -833,7 +854,8 @@ ...@@ -833,7 +854,8 @@
converter: "ConvertFontVariationSettings", converter: "ConvertFontVariationSettings",
priority: "High", priority: "High",
keywords: ["normal"], keywords: ["normal"],
typedom_types: ["Keyword"] typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "-webkit-font-smoothing", name: "-webkit-font-smoothing",
...@@ -842,6 +864,7 @@ ...@@ -842,6 +864,7 @@
font: true, font: true,
type_name: "FontSmoothingMode", type_name: "FontSmoothingMode",
priority: "High", priority: "High",
valid_for_first_letter: true,
}, },
{ {
name: "forced-color-adjust", name: "forced-color-adjust",
...@@ -1000,6 +1023,7 @@ ...@@ -1000,6 +1023,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "Attachment", fill_type: "Attachment",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-blend-mode", name: "background-blend-mode",
...@@ -1016,6 +1040,7 @@ ...@@ -1016,6 +1040,7 @@
fill_type: "BlendMode", fill_type: "BlendMode",
fill_type_getter: "GetBlendMode", fill_type_getter: "GetBlendMode",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-clip", name: "background-clip",
...@@ -1027,6 +1052,7 @@ ...@@ -1027,6 +1052,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "Clip", fill_type: "Clip",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-color", name: "background-color",
...@@ -1046,6 +1072,7 @@ ...@@ -1046,6 +1072,7 @@
initial_color: "ComputedStyleInitialValues::InitialBackgroundColor", initial_color: "ComputedStyleInitialValues::InitialBackgroundColor",
}, },
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "background-image", name: "background-image",
...@@ -1059,6 +1086,7 @@ ...@@ -1059,6 +1086,7 @@
fill_type: "Image", fill_type: "Image",
fill_type_getter: "GetImage", fill_type_getter: "GetImage",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-origin", name: "background-origin",
...@@ -1070,6 +1098,7 @@ ...@@ -1070,6 +1098,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "Origin", fill_type: "Origin",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-position-x", name: "background-position-x",
...@@ -1079,6 +1108,7 @@ ...@@ -1079,6 +1108,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "PositionX", fill_type: "PositionX",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-position-y", name: "background-position-y",
...@@ -1088,6 +1118,7 @@ ...@@ -1088,6 +1118,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "PositionY", fill_type: "PositionY",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-repeat-x", name: "background-repeat-x",
...@@ -1095,6 +1126,7 @@ ...@@ -1095,6 +1126,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "RepeatX", fill_type: "RepeatX",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-repeat-y", name: "background-repeat-y",
...@@ -1102,6 +1134,7 @@ ...@@ -1102,6 +1134,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "RepeatY", fill_type: "RepeatY",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "background-size", name: "background-size",
...@@ -1114,6 +1147,7 @@ ...@@ -1114,6 +1147,7 @@
style_builder_template_args: { style_builder_template_args: {
fill_type: "Size", fill_type: "Size",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "baseline-shift", name: "baseline-shift",
...@@ -1140,6 +1174,7 @@ ...@@ -1140,6 +1174,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "color", style_builder_template: "color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "border-bottom-left-radius", name: "border-bottom-left-radius",
...@@ -1152,6 +1187,7 @@ ...@@ -1152,6 +1187,7 @@
type_name: "LengthSize", type_name: "LengthSize",
converter: "ConvertRadius", converter: "ConvertRadius",
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "border-bottom-right-radius", name: "border-bottom-right-radius",
...@@ -1164,6 +1200,7 @@ ...@@ -1164,6 +1200,7 @@
type_name: "LengthSize", type_name: "LengthSize",
converter: "ConvertRadius", converter: "ConvertRadius",
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "border-bottom-style", name: "border-bottom-style",
...@@ -1178,6 +1215,7 @@ ...@@ -1178,6 +1215,7 @@
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "none", default_value: "none",
type_name: "EBorderStyle", type_name: "EBorderStyle",
valid_for_first_letter: true,
}, },
{ {
name: "border-bottom-width", name: "border-bottom-width",
...@@ -1193,6 +1231,7 @@ ...@@ -1193,6 +1231,7 @@
type_name: "LayoutUnit", type_name: "LayoutUnit",
computed_style_custom_functions: ["getter", "setter"], computed_style_custom_functions: ["getter", "setter"],
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
valid_for_first_letter: true,
}, },
{ {
name: "border-collapse", name: "border-collapse",
...@@ -1214,6 +1253,7 @@ ...@@ -1214,6 +1253,7 @@
style_builder_template_args: { style_builder_template_args: {
modifier_type: "Outset", modifier_type: "Outset",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-image-repeat", name: "border-image-repeat",
...@@ -1225,6 +1265,7 @@ ...@@ -1225,6 +1265,7 @@
style_builder_template_args: { style_builder_template_args: {
modifier_type: "Repeat", modifier_type: "Repeat",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-image-slice", name: "border-image-slice",
...@@ -1236,6 +1277,7 @@ ...@@ -1236,6 +1277,7 @@
style_builder_template_args: { style_builder_template_args: {
modifier_type: "Slice", modifier_type: "Slice",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-image-source", name: "border-image-source",
...@@ -1245,6 +1287,7 @@ ...@@ -1245,6 +1287,7 @@
keywords: ["none"], keywords: ["none"],
typedom_types: ["Keyword", "Image"], typedom_types: ["Keyword", "Image"],
style_builder_custom_functions: ["value"], style_builder_custom_functions: ["value"],
valid_for_first_letter: true,
}, },
{ {
name: "border-image-width", name: "border-image-width",
...@@ -1257,6 +1300,7 @@ ...@@ -1257,6 +1300,7 @@
style_builder_template_args: { style_builder_template_args: {
modifier_type: "Width", modifier_type: "Width",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-left-color", name: "border-left-color",
...@@ -1274,6 +1318,7 @@ ...@@ -1274,6 +1318,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "color", style_builder_template: "color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "border-left-style", name: "border-left-style",
...@@ -1288,6 +1333,7 @@ ...@@ -1288,6 +1333,7 @@
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "none", default_value: "none",
type_name: "EBorderStyle", type_name: "EBorderStyle",
valid_for_first_letter: true,
}, },
{ {
name: "border-left-width", name: "border-left-width",
...@@ -1303,6 +1349,7 @@ ...@@ -1303,6 +1349,7 @@
type_name: "LayoutUnit", type_name: "LayoutUnit",
computed_style_custom_functions: ["getter", "setter"], computed_style_custom_functions: ["getter", "setter"],
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
valid_for_first_letter: true,
}, },
{ {
name: "border-right-color", name: "border-right-color",
...@@ -1320,6 +1367,7 @@ ...@@ -1320,6 +1367,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "color", style_builder_template: "color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "border-right-style", name: "border-right-style",
...@@ -1334,6 +1382,7 @@ ...@@ -1334,6 +1382,7 @@
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "none", default_value: "none",
type_name: "EBorderStyle", type_name: "EBorderStyle",
valid_for_first_letter: true,
}, },
{ {
name: "border-right-width", name: "border-right-width",
...@@ -1349,6 +1398,7 @@ ...@@ -1349,6 +1398,7 @@
type_name: "LayoutUnit", type_name: "LayoutUnit",
computed_style_custom_functions: ["getter", "setter"], computed_style_custom_functions: ["getter", "setter"],
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
valid_for_first_letter: true,
}, },
{ {
name: "border-top-color", name: "border-top-color",
...@@ -1366,6 +1416,7 @@ ...@@ -1366,6 +1416,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "color", style_builder_template: "color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "border-top-left-radius", name: "border-top-left-radius",
...@@ -1378,6 +1429,7 @@ ...@@ -1378,6 +1429,7 @@
type_name: "LengthSize", type_name: "LengthSize",
converter: "ConvertRadius", converter: "ConvertRadius",
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "border-top-right-radius", name: "border-top-right-radius",
...@@ -1390,6 +1442,7 @@ ...@@ -1390,6 +1442,7 @@
type_name: "LengthSize", type_name: "LengthSize",
converter: "ConvertRadius", converter: "ConvertRadius",
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "border-top-style", name: "border-top-style",
...@@ -1404,6 +1457,7 @@ ...@@ -1404,6 +1457,7 @@
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "none", default_value: "none",
type_name: "EBorderStyle", type_name: "EBorderStyle",
valid_for_first_letter: true,
}, },
{ {
name: "border-top-width", name: "border-top-width",
...@@ -1419,6 +1473,7 @@ ...@@ -1419,6 +1473,7 @@
type_name: "LayoutUnit", type_name: "LayoutUnit",
computed_style_custom_functions: ["getter", "setter"], computed_style_custom_functions: ["getter", "setter"],
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
valid_for_first_letter: true,
}, },
{ {
name: "bottom", name: "bottom",
...@@ -1447,6 +1502,7 @@ ...@@ -1447,6 +1502,7 @@
keywords: ["none"], keywords: ["none"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "box-sizing", name: "box-sizing",
...@@ -1843,6 +1899,7 @@ ...@@ -1843,6 +1899,7 @@
default_value: "none", default_value: "none",
name_for_methods: "Floating", name_for_methods: "Floating",
type_name: "EFloat", type_name: "EFloat",
valid_for_first_letter: true,
}, },
{ {
name: "flood-color", name: "flood-color",
...@@ -2146,7 +2203,8 @@ ...@@ -2146,7 +2203,8 @@
inherited: true, inherited: true,
converter: "ConvertSpacing", converter: "ConvertSpacing",
keywords: ["normal"], keywords: ["normal"],
typedom_types: ["Keyword", "Length"] typedom_types: ["Keyword", "Length"],
valid_for_first_letter: true,
}, },
{ {
name: "lighting-color", name: "lighting-color",
...@@ -2169,7 +2227,8 @@ ...@@ -2169,7 +2227,8 @@
computed_style_custom_functions: ["getter"], computed_style_custom_functions: ["getter"],
converter: "ConvertLineHeight", converter: "ConvertLineHeight",
keywords: ["normal"], keywords: ["normal"],
typedom_types: ["Keyword", "Length", "Number", "Percentage"] typedom_types: ["Keyword", "Length", "Number", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "line-height-step", name: "line-height-step",
...@@ -2242,7 +2301,8 @@ ...@@ -2242,7 +2301,8 @@
converter: "ConvertQuirkyLength", converter: "ConvertQuirkyLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "margin-left", name: "margin-left",
...@@ -2256,7 +2316,8 @@ ...@@ -2256,7 +2316,8 @@
converter: "ConvertQuirkyLength", converter: "ConvertQuirkyLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "margin-right", name: "margin-right",
...@@ -2270,7 +2331,8 @@ ...@@ -2270,7 +2331,8 @@
converter: "ConvertQuirkyLength", converter: "ConvertQuirkyLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "margin-top", name: "margin-top",
...@@ -2284,7 +2346,8 @@ ...@@ -2284,7 +2346,8 @@
converter: "ConvertQuirkyLength", converter: "ConvertQuirkyLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "marker-end", name: "marker-end",
...@@ -2502,7 +2565,8 @@ ...@@ -2502,7 +2565,8 @@
default_value: "1.0", default_value: "1.0",
type_name: "float", type_name: "float",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Number"] typedom_types: ["Number"],
valid_for_first_letter: true,
}, },
{ {
name: "order", name: "order",
...@@ -2689,7 +2753,8 @@ ...@@ -2689,7 +2753,8 @@
default_value: "Length::Fixed()", default_value: "Length::Fixed()",
converter: "ConvertLength", converter: "ConvertLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "padding-left", name: "padding-left",
...@@ -2702,7 +2767,8 @@ ...@@ -2702,7 +2767,8 @@
default_value: "Length::Fixed()", default_value: "Length::Fixed()",
converter: "ConvertLength", converter: "ConvertLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "padding-right", name: "padding-right",
...@@ -2715,7 +2781,8 @@ ...@@ -2715,7 +2781,8 @@
default_value: "Length::Fixed()", default_value: "Length::Fixed()",
converter: "ConvertLength", converter: "ConvertLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "padding-top", name: "padding-top",
...@@ -2728,7 +2795,8 @@ ...@@ -2728,7 +2795,8 @@
default_value: "Length::Fixed()", default_value: "Length::Fixed()",
converter: "ConvertLength", converter: "ConvertLength",
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"] typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true,
}, },
{ {
name: "paint-order", name: "paint-order",
...@@ -3342,6 +3410,7 @@ ...@@ -3342,6 +3410,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "color", style_builder_template: "color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "text-decoration-line", name: "text-decoration-line",
...@@ -3354,6 +3423,7 @@ ...@@ -3354,6 +3423,7 @@
name_for_methods: "TextDecoration", name_for_methods: "TextDecoration",
type_name: "TextDecoration", type_name: "TextDecoration",
converter: "ConvertFlags<TextDecoration>", converter: "ConvertFlags<TextDecoration>",
valid_for_first_letter: true,
}, },
{ {
name: "text-decoration-skip-ink", name: "text-decoration-skip-ink",
...@@ -3364,6 +3434,7 @@ ...@@ -3364,6 +3434,7 @@
keywords: ["none", "auto"], keywords: ["none", "auto"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "auto", default_value: "auto",
valid_for_first_letter: true,
}, },
{ {
name: "text-decoration-style", name: "text-decoration-style",
...@@ -3373,6 +3444,7 @@ ...@@ -3373,6 +3444,7 @@
keywords: ["solid", "double", "dotted", "dashed", "wavy"], keywords: ["solid", "double", "dotted", "dashed", "wavy"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "solid", default_value: "solid",
valid_for_first_letter: true,
}, },
{ {
name: "text-indent", name: "text-indent",
...@@ -3397,7 +3469,8 @@ ...@@ -3397,7 +3469,8 @@
default_value: "auto", default_value: "auto",
getter: "GetTextJustify", getter: "GetTextJustify",
type_name: "TextJustify", type_name: "TextJustify",
typedom_types: ["Keyword"] typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "text-overflow", name: "text-overflow",
...@@ -3423,6 +3496,7 @@ ...@@ -3423,6 +3496,7 @@
keywords: ["none"], keywords: ["none"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "text-size-adjust", name: "text-size-adjust",
...@@ -3448,6 +3522,7 @@ ...@@ -3448,6 +3522,7 @@
keywords: ["capitalize", "uppercase", "lowercase", "none"], keywords: ["capitalize", "uppercase", "lowercase", "none"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "none", default_value: "none",
valid_for_first_letter: true,
}, },
{ {
name: "text-underline-position", name: "text-underline-position",
...@@ -3462,6 +3537,7 @@ ...@@ -3462,6 +3537,7 @@
converter: "ConvertTextUnderlinePosition", converter: "ConvertTextUnderlinePosition",
keywords: ["auto", "under", "left", "right"], keywords: ["auto", "under", "left", "right"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
valid_for_first_letter: true,
}, },
{ {
name: "top", name: "top",
...@@ -3606,6 +3682,7 @@ ...@@ -3606,6 +3682,7 @@
style_builder_custom_functions: ["inherit", "value"], style_builder_custom_functions: ["inherit", "value"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
keywords: ["baseline", "sub", "super", "text-top", "text-bottom", "middle"], keywords: ["baseline", "sub", "super", "text-top", "text-bottom", "middle"],
valid_for_first_letter: true,
}, },
{ {
name: "visibility", name: "visibility",
...@@ -3617,6 +3694,7 @@ ...@@ -3617,6 +3694,7 @@
keywords: ["visible", "hidden", "collapse"], keywords: ["visible", "hidden", "collapse"],
typedom_types: ["Keyword"], typedom_types: ["Keyword"],
default_value: "visible", default_value: "visible",
valid_for_first_letter: true,
}, },
{ {
name: "x", name: "x",
...@@ -3665,13 +3743,15 @@ ...@@ -3665,13 +3743,15 @@
name_for_methods: "HorizontalBorderSpacing", name_for_methods: "HorizontalBorderSpacing",
type_name: "short", type_name: "short",
converter: "ConvertComputedLength<short>", converter: "ConvertComputedLength<short>",
valid_for_first_letter: true,
}, },
{ {
name: "-webkit-border-image", name: "-webkit-border-image",
property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
style_builder_custom_functions: ["value"], style_builder_custom_functions: ["value"],
slots: ["border-image-outset", "border-image-repeat", "border-image-slice", slots: ["border-image-outset", "border-image-repeat", "border-image-slice",
"border-image-source", "border-image-width"] "border-image-source", "border-image-width"],
valid_for_first_letter: true,
}, },
{ {
name: "-webkit-border-vertical-spacing", name: "-webkit-border-vertical-spacing",
...@@ -3684,6 +3764,7 @@ ...@@ -3684,6 +3764,7 @@
name_for_methods: "VerticalBorderSpacing", name_for_methods: "VerticalBorderSpacing",
type_name: "short", type_name: "short",
converter: "ConvertComputedLength<short>", converter: "ConvertComputedLength<short>",
valid_for_first_letter: true,
}, },
// For valid values of box-align see // For valid values of box-align see
// http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment // http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment
...@@ -4274,7 +4355,8 @@ ...@@ -4274,7 +4355,8 @@
converter: "ConvertSpacing", converter: "ConvertSpacing",
keywords: ["normal"], keywords: ["normal"],
typedom_types: ["normal"], typedom_types: ["normal"],
typedom_types: ["Keyword", "Length"] typedom_types: ["Keyword", "Length"],
valid_for_first_letter: true,
}, },
{ {
name: "z-index", name: "z-index",
...@@ -4360,7 +4442,8 @@ ...@@ -4360,7 +4442,8 @@
physical_group: "margin", physical_group: "margin",
}, },
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
keywords: ["auto"] keywords: ["auto"],
valid_for_first_letter: true,
}, },
{ {
name: "margin-inline-end", name: "margin-inline-end",
...@@ -4371,7 +4454,8 @@ ...@@ -4371,7 +4454,8 @@
physical_group: "margin", physical_group: "margin",
}, },
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
keywords: ["auto"] keywords: ["auto"],
valid_for_first_letter: true,
}, },
{ {
name: "margin-block-start", name: "margin-block-start",
...@@ -4382,7 +4466,8 @@ ...@@ -4382,7 +4466,8 @@
physical_group: "margin", physical_group: "margin",
}, },
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
keywords: ["auto"] keywords: ["auto"],
valid_for_first_letter: true,
}, },
{ {
name: "margin-block-end", name: "margin-block-end",
...@@ -4393,7 +4478,8 @@ ...@@ -4393,7 +4478,8 @@
physical_group: "margin", physical_group: "margin",
}, },
typedom_types: ["Length", "Percentage"], typedom_types: ["Length", "Percentage"],
keywords: ["auto"] keywords: ["auto"],
valid_for_first_letter: true,
}, },
{ {
name: "padding-inline-start", name: "padding-inline-start",
...@@ -4442,6 +4528,7 @@ ...@@ -4442,6 +4528,7 @@
resolver: "inline-start", resolver: "inline-start",
physical_group: "border-width", physical_group: "border-width",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-inline-start-style", name: "border-inline-start-style",
...@@ -4449,6 +4536,7 @@ ...@@ -4449,6 +4536,7 @@
resolver: "inline-start", resolver: "inline-start",
physical_group: "border-style", physical_group: "border-style",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-inline-start-color", name: "border-inline-start-color",
...@@ -4457,6 +4545,7 @@ ...@@ -4457,6 +4545,7 @@
resolver: "inline-start", resolver: "inline-start",
physical_group: "border-color", physical_group: "border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-inline-end-width", name: "border-inline-end-width",
...@@ -4465,6 +4554,7 @@ ...@@ -4465,6 +4554,7 @@
resolver: "inline-end", resolver: "inline-end",
physical_group: "border-width", physical_group: "border-width",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-inline-end-style", name: "border-inline-end-style",
...@@ -4472,6 +4562,7 @@ ...@@ -4472,6 +4562,7 @@
resolver: "inline-end", resolver: "inline-end",
physical_group: "border-style", physical_group: "border-style",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-inline-end-color", name: "border-inline-end-color",
...@@ -4480,6 +4571,7 @@ ...@@ -4480,6 +4571,7 @@
resolver: "inline-end", resolver: "inline-end",
physical_group: "border-color", physical_group: "border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-block-start-width", name: "border-block-start-width",
...@@ -4488,6 +4580,7 @@ ...@@ -4488,6 +4580,7 @@
resolver: "block-start", resolver: "block-start",
physical_group: "border-width", physical_group: "border-width",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-block-start-style", name: "border-block-start-style",
...@@ -4495,6 +4588,7 @@ ...@@ -4495,6 +4588,7 @@
resolver: "block-start", resolver: "block-start",
physical_group: "border-style", physical_group: "border-style",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-block-start-color", name: "border-block-start-color",
...@@ -4503,6 +4597,7 @@ ...@@ -4503,6 +4597,7 @@
resolver: "block-start", resolver: "block-start",
physical_group: "border-color", physical_group: "border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-block-end-width", name: "border-block-end-width",
...@@ -4511,6 +4606,7 @@ ...@@ -4511,6 +4606,7 @@
resolver: "block-end", resolver: "block-end",
physical_group: "border-width", physical_group: "border-width",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-block-end-style", name: "border-block-end-style",
...@@ -4518,6 +4614,7 @@ ...@@ -4518,6 +4614,7 @@
resolver: "block-end", resolver: "block-end",
physical_group: "border-style", physical_group: "border-style",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "border-block-end-color", name: "border-block-end-color",
...@@ -4526,6 +4623,7 @@ ...@@ -4526,6 +4623,7 @@
resolver: "block-end", resolver: "block-end",
physical_group: "border-color", physical_group: "border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "inset-inline-start", name: "inset-inline-start",
...@@ -5331,6 +5429,7 @@ ...@@ -5331,6 +5429,7 @@
style_builder_custom_functions: ["initial", "inherit", "value"], style_builder_custom_functions: ["initial", "inherit", "value"],
priority: "High", priority: "High",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-caret-color", name: "-internal-visited-caret-color",
...@@ -5379,6 +5478,7 @@ ...@@ -5379,6 +5478,7 @@
initial_color: "ComputedStyleInitialValues::InitialBackgroundColor", initial_color: "ComputedStyleInitialValues::InitialBackgroundColor",
}, },
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-left-color", name: "-internal-visited-border-left-color",
...@@ -5394,6 +5494,7 @@ ...@@ -5394,6 +5494,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "visited_color", style_builder_template: "visited_color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-right-color", name: "-internal-visited-border-right-color",
...@@ -5409,6 +5510,7 @@ ...@@ -5409,6 +5510,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "visited_color", style_builder_template: "visited_color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-top-color", name: "-internal-visited-border-top-color",
...@@ -5424,6 +5526,7 @@ ...@@ -5424,6 +5526,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "visited_color", style_builder_template: "visited_color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-bottom-color", name: "-internal-visited-border-bottom-color",
...@@ -5439,6 +5542,7 @@ ...@@ -5439,6 +5542,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "visited_color", style_builder_template: "visited_color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-inline-start-color", name: "-internal-visited-border-inline-start-color",
...@@ -5448,6 +5552,7 @@ ...@@ -5448,6 +5552,7 @@
resolver: "inline-start", resolver: "inline-start",
physical_group: "visited-border-color", physical_group: "visited-border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-inline-end-color", name: "-internal-visited-border-inline-end-color",
...@@ -5457,6 +5562,7 @@ ...@@ -5457,6 +5562,7 @@
resolver: "inline-end", resolver: "inline-end",
physical_group: "visited-border-color", physical_group: "visited-border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-block-start-color", name: "-internal-visited-border-block-start-color",
...@@ -5466,6 +5572,7 @@ ...@@ -5466,6 +5572,7 @@
resolver: "block-start", resolver: "block-start",
physical_group: "visited-border-color", physical_group: "visited-border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-border-block-end-color", name: "-internal-visited-border-block-end-color",
...@@ -5475,6 +5582,7 @@ ...@@ -5475,6 +5582,7 @@
resolver: "block-end", resolver: "block-end",
physical_group: "visited-border-color", physical_group: "visited-border-color",
}, },
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-fill", name: "-internal-visited-fill",
...@@ -5527,6 +5635,7 @@ ...@@ -5527,6 +5635,7 @@
converter: "ConvertStyleColor", converter: "ConvertStyleColor",
style_builder_template: "visited_color", style_builder_template: "visited_color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-visited-text-emphasis-color", name: "-internal-visited-text-emphasis-color",
...@@ -5602,6 +5711,7 @@ ...@@ -5602,6 +5711,7 @@
fill_type: "Attachment", fill_type: "Attachment",
}, },
ua_property_for: "background-attachment", ua_property_for: "background-attachment",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-blend-mode", name: "-internal-ua-background-blend-mode",
...@@ -5611,6 +5721,7 @@ ...@@ -5611,6 +5721,7 @@
fill_type_getter: "GetBlendMode", fill_type_getter: "GetBlendMode",
}, },
ua_property_for: "background-blend-mode", ua_property_for: "background-blend-mode",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-clip", name: "-internal-ua-background-clip",
...@@ -5619,6 +5730,7 @@ ...@@ -5619,6 +5730,7 @@
fill_type: "Clip", fill_type: "Clip",
}, },
ua_property_for: "background-clip", ua_property_for: "background-clip",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-color", name: "-internal-ua-background-color",
...@@ -5630,6 +5742,7 @@ ...@@ -5630,6 +5742,7 @@
}, },
ua_property_for: "background-color", ua_property_for: "background-color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-image", name: "-internal-ua-background-image",
...@@ -5639,6 +5752,7 @@ ...@@ -5639,6 +5752,7 @@
fill_type_getter: "GetImage", fill_type_getter: "GetImage",
}, },
ua_property_for: "background-image", ua_property_for: "background-image",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-origin", name: "-internal-ua-background-origin",
...@@ -5647,6 +5761,7 @@ ...@@ -5647,6 +5761,7 @@
fill_type: "Origin", fill_type: "Origin",
}, },
ua_property_for: "background-origin", ua_property_for: "background-origin",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-position-x", name: "-internal-ua-background-position-x",
...@@ -5655,6 +5770,7 @@ ...@@ -5655,6 +5770,7 @@
fill_type: "PositionX", fill_type: "PositionX",
}, },
ua_property_for: "background-position-x", ua_property_for: "background-position-x",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-position-y", name: "-internal-ua-background-position-y",
...@@ -5663,6 +5779,7 @@ ...@@ -5663,6 +5779,7 @@
fill_type: "PositionY", fill_type: "PositionY",
}, },
ua_property_for: "background-position-y", ua_property_for: "background-position-y",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-background-size", name: "-internal-ua-background-size",
...@@ -5671,6 +5788,7 @@ ...@@ -5671,6 +5788,7 @@
fill_type: "Size", fill_type: "Size",
}, },
ua_property_for: "background-size", ua_property_for: "background-size",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-bottom-color", name: "-internal-ua-border-bottom-color",
...@@ -5679,6 +5797,7 @@ ...@@ -5679,6 +5797,7 @@
style_builder_template: "color", style_builder_template: "color",
ua_property_for: "border-bottom-color", ua_property_for: "border-bottom-color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-left-color", name: "-internal-ua-border-left-color",
...@@ -5687,6 +5806,7 @@ ...@@ -5687,6 +5806,7 @@
style_builder_template: "color", style_builder_template: "color",
ua_property_for: "border-left-color", ua_property_for: "border-left-color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-right-color", name: "-internal-ua-border-right-color",
...@@ -5695,6 +5815,7 @@ ...@@ -5695,6 +5815,7 @@
style_builder_template: "color", style_builder_template: "color",
ua_property_for: "border-right-color", ua_property_for: "border-right-color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-top-color", name: "-internal-ua-border-top-color",
...@@ -5703,78 +5824,91 @@ ...@@ -5703,78 +5824,91 @@
style_builder_template: "color", style_builder_template: "color",
ua_property_for: "border-top-color", ua_property_for: "border-top-color",
affected_by_forced_colors: true, affected_by_forced_colors: true,
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-bottom-style", name: "-internal-ua-border-bottom-style",
name_for_methods: "BorderBottomStyle", name_for_methods: "BorderBottomStyle",
type_name: "EBorderStyle", type_name: "EBorderStyle",
ua_property_for: "border-bottom-style", ua_property_for: "border-bottom-style",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-left-style", name: "-internal-ua-border-left-style",
name_for_methods: "BorderLeftStyle", name_for_methods: "BorderLeftStyle",
type_name: "EBorderStyle", type_name: "EBorderStyle",
ua_property_for: "border-left-style", ua_property_for: "border-left-style",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-right-style", name: "-internal-ua-border-right-style",
name_for_methods: "BorderRightStyle", name_for_methods: "BorderRightStyle",
type_name: "EBorderStyle", type_name: "EBorderStyle",
ua_property_for: "border-right-style", ua_property_for: "border-right-style",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-top-style", name: "-internal-ua-border-top-style",
name_for_methods: "BorderTopStyle", name_for_methods: "BorderTopStyle",
type_name: "EBorderStyle", type_name: "EBorderStyle",
ua_property_for: "border-top-style", ua_property_for: "border-top-style",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-bottom-width", name: "-internal-ua-border-bottom-width",
name_for_methods: "BorderBottomWidth", name_for_methods: "BorderBottomWidth",
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
ua_property_for: "border-bottom-width", ua_property_for: "border-bottom-width",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-left-width", name: "-internal-ua-border-left-width",
name_for_methods: "BorderLeftWidth", name_for_methods: "BorderLeftWidth",
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
ua_property_for: "border-left-width", ua_property_for: "border-left-width",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-right-width", name: "-internal-ua-border-right-width",
name_for_methods: "BorderRightWidth", name_for_methods: "BorderRightWidth",
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
ua_property_for: "border-right-width", ua_property_for: "border-right-width",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-top-width", name: "-internal-ua-border-top-width",
name_for_methods: "BorderTopWidth", name_for_methods: "BorderTopWidth",
converter: "ConvertBorderWidth", converter: "ConvertBorderWidth",
ua_property_for: "border-top-width", ua_property_for: "border-top-width",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-top-left-radius", name: "-internal-ua-border-top-left-radius",
name_for_methods: "BorderTopLeftRadius", name_for_methods: "BorderTopLeftRadius",
converter: "ConvertRadius", converter: "ConvertRadius",
ua_property_for: "border-top-left-radius", ua_property_for: "border-top-left-radius",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-top-right-radius", name: "-internal-ua-border-top-right-radius",
name_for_methods: "BorderTopRightRadius", name_for_methods: "BorderTopRightRadius",
converter: "ConvertRadius", converter: "ConvertRadius",
ua_property_for: "border-top-right-radius", ua_property_for: "border-top-right-radius",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-bottom-left-radius", name: "-internal-ua-border-bottom-left-radius",
name_for_methods: "BorderBottomLeftRadius", name_for_methods: "BorderBottomLeftRadius",
converter: "ConvertRadius", converter: "ConvertRadius",
ua_property_for: "border-bottom-left-radius", ua_property_for: "border-bottom-left-radius",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-bottom-right-radius", name: "-internal-ua-border-bottom-right-radius",
name_for_methods: "BorderBottomRightRadius", name_for_methods: "BorderBottomRightRadius",
converter: "ConvertRadius", converter: "ConvertRadius",
ua_property_for: "border-bottom-right-radius", ua_property_for: "border-bottom-right-radius",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-image-outset", name: "-internal-ua-border-image-outset",
...@@ -5783,6 +5917,7 @@ ...@@ -5783,6 +5917,7 @@
modifier_type: "Outset", modifier_type: "Outset",
}, },
ua_property_for: "border-image-outset", ua_property_for: "border-image-outset",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-image-repeat", name: "-internal-ua-border-image-repeat",
...@@ -5791,6 +5926,7 @@ ...@@ -5791,6 +5926,7 @@
modifier_type: "Repeat", modifier_type: "Repeat",
}, },
ua_property_for: "border-image-repeat", ua_property_for: "border-image-repeat",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-image-slice", name: "-internal-ua-border-image-slice",
...@@ -5799,6 +5935,7 @@ ...@@ -5799,6 +5935,7 @@
modifier_type: "Slice", modifier_type: "Slice",
}, },
ua_property_for: "border-image-slice", ua_property_for: "border-image-slice",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-image-source", name: "-internal-ua-border-image-source",
...@@ -5807,6 +5944,7 @@ ...@@ -5807,6 +5944,7 @@
modifier_type: "Source", modifier_type: "Source",
}, },
ua_property_for: "border-image-source", ua_property_for: "border-image-source",
valid_for_first_letter: true,
}, },
{ {
name: "-internal-ua-border-image-width", name: "-internal-ua-border-image-width",
...@@ -5815,6 +5953,7 @@ ...@@ -5815,6 +5953,7 @@
modifier_type: "Width", modifier_type: "Width",
}, },
ua_property_for: "border-image-width", ua_property_for: "border-image-width",
valid_for_first_letter: true,
}, },
// Aliases; these map to the same CSSPropertyID // Aliases; these map to the same CSSPropertyID
......
...@@ -53,6 +53,7 @@ class CORE_EXPORT CSSProperty : public CSSUnresolvedProperty { ...@@ -53,6 +53,7 @@ class CORE_EXPORT CSSProperty : public CSSUnresolvedProperty {
bool IsAffectedByForcedColors() const { bool IsAffectedByForcedColors() const {
return flags_ & kIsAffectedByForcedColors; return flags_ & kIsAffectedByForcedColors;
} }
bool IsValidForFirstLetter() const { return flags_ & kValidForFirstLetter; }
bool IsRepeated() const { return repetition_separator_ != '\0'; } bool IsRepeated() const { return repetition_separator_ != '\0'; }
char RepetitionSeparator() const { return repetition_separator_; } char RepetitionSeparator() const { return repetition_separator_; }
...@@ -118,6 +119,8 @@ class CORE_EXPORT CSSProperty : public CSSUnresolvedProperty { ...@@ -118,6 +119,8 @@ class CORE_EXPORT CSSProperty : public CSSUnresolvedProperty {
// Animation properties have this flag set. (I.e. longhands of the // Animation properties have this flag set. (I.e. longhands of the
// 'animation' and 'transition' shorthands). // 'animation' and 'transition' shorthands).
kAnimation = 1 << 11, kAnimation = 1 << 11,
// https://drafts.csswg.org/css-pseudo-4/#first-letter-styling
kValidForFirstLetter = 1 << 12,
}; };
constexpr CSSProperty(CSSPropertyID property_id, constexpr CSSProperty(CSSPropertyID property_id,
......
...@@ -34,8 +34,9 @@ class CORE_EXPORT Variable : public Longhand { ...@@ -34,8 +34,9 @@ class CORE_EXPORT Variable : public Longhand {
protected: protected:
constexpr Variable(bool inherited) constexpr Variable(bool inherited)
: Longhand(CSSPropertyID::kVariable, : Longhand(
kProperty | (inherited ? kInherited : 0), CSSPropertyID::kVariable,
kProperty | (inherited ? kInherited : 0) | kValidForFirstLetter,
'\0') {} '\0') {}
}; };
......
...@@ -1406,121 +1406,6 @@ static inline bool IsValidCueStyleProperty(CSSPropertyID id) { ...@@ -1406,121 +1406,6 @@ static inline bool IsValidCueStyleProperty(CSSPropertyID id) {
return false; return false;
} }
static inline bool IsValidFirstLetterStyleProperty(CSSPropertyID id) {
switch (id) {
// Valid ::first-letter properties listed in spec:
// https://drafts.csswg.org/css-pseudo-4/#first-letter-styling
case CSSPropertyID::kBackgroundAttachment:
case CSSPropertyID::kBackgroundBlendMode:
case CSSPropertyID::kBackgroundClip:
case CSSPropertyID::kBackgroundColor:
case CSSPropertyID::kBackgroundImage:
case CSSPropertyID::kBackgroundOrigin:
case CSSPropertyID::kBackgroundPosition:
case CSSPropertyID::kBackgroundPositionX:
case CSSPropertyID::kBackgroundPositionY:
case CSSPropertyID::kBackgroundRepeat:
case CSSPropertyID::kBackgroundRepeatX:
case CSSPropertyID::kBackgroundRepeatY:
case CSSPropertyID::kBackgroundSize:
case CSSPropertyID::kBorderBlockEnd:
case CSSPropertyID::kBorderBlockEndColor:
case CSSPropertyID::kBorderBlockEndStyle:
case CSSPropertyID::kBorderBlockEndWidth:
case CSSPropertyID::kBorderBlockStart:
case CSSPropertyID::kBorderBlockStartColor:
case CSSPropertyID::kBorderBlockStartStyle:
case CSSPropertyID::kBorderBlockStartWidth:
case CSSPropertyID::kBorderBottomColor:
case CSSPropertyID::kBorderBottomLeftRadius:
case CSSPropertyID::kBorderBottomRightRadius:
case CSSPropertyID::kBorderBottomStyle:
case CSSPropertyID::kBorderBottomWidth:
case CSSPropertyID::kBorderImageOutset:
case CSSPropertyID::kBorderImageRepeat:
case CSSPropertyID::kBorderImageSlice:
case CSSPropertyID::kBorderImageSource:
case CSSPropertyID::kBorderImageWidth:
case CSSPropertyID::kBorderInlineEnd:
case CSSPropertyID::kBorderInlineEndColor:
case CSSPropertyID::kBorderInlineEndStyle:
case CSSPropertyID::kBorderInlineEndWidth:
case CSSPropertyID::kBorderInlineStart:
case CSSPropertyID::kBorderInlineStartColor:
case CSSPropertyID::kBorderInlineStartStyle:
case CSSPropertyID::kBorderInlineStartWidth:
case CSSPropertyID::kBorderLeftColor:
case CSSPropertyID::kBorderLeftStyle:
case CSSPropertyID::kBorderLeftWidth:
case CSSPropertyID::kBorderRightColor:
case CSSPropertyID::kBorderRightStyle:
case CSSPropertyID::kBorderRightWidth:
case CSSPropertyID::kBorderTopColor:
case CSSPropertyID::kBorderTopLeftRadius:
case CSSPropertyID::kBorderTopRightRadius:
case CSSPropertyID::kBorderTopStyle:
case CSSPropertyID::kBorderTopWidth:
case CSSPropertyID::kBoxShadow:
case CSSPropertyID::kColor:
case CSSPropertyID::kFloat:
case CSSPropertyID::kFontFamily:
case CSSPropertyID::kFontFeatureSettings:
case CSSPropertyID::kFontKerning:
case CSSPropertyID::kFontOpticalSizing:
case CSSPropertyID::kFontSize:
case CSSPropertyID::kFontSizeAdjust:
case CSSPropertyID::kFontStretch:
case CSSPropertyID::kFontStyle:
case CSSPropertyID::kFontVariant:
case CSSPropertyID::kFontVariantCaps:
case CSSPropertyID::kFontVariantLigatures:
case CSSPropertyID::kFontVariantNumeric:
case CSSPropertyID::kFontVariantEastAsian:
case CSSPropertyID::kFontVariationSettings:
case CSSPropertyID::kFontWeight:
case CSSPropertyID::kLetterSpacing:
case CSSPropertyID::kLineHeight:
case CSSPropertyID::kMarginBlockEnd:
case CSSPropertyID::kMarginBlockStart:
case CSSPropertyID::kMarginBottom:
case CSSPropertyID::kMarginInlineEnd:
case CSSPropertyID::kMarginInlineStart:
case CSSPropertyID::kMarginLeft:
case CSSPropertyID::kMarginRight:
case CSSPropertyID::kMarginTop:
case CSSPropertyID::kOpacity:
case CSSPropertyID::kPaddingBottom:
case CSSPropertyID::kPaddingLeft:
case CSSPropertyID::kPaddingRight:
case CSSPropertyID::kPaddingTop:
case CSSPropertyID::kTextDecorationColor:
case CSSPropertyID::kTextDecorationLine:
case CSSPropertyID::kTextDecorationStyle:
case CSSPropertyID::kTextDecorationSkipInk:
case CSSPropertyID::kTextJustify:
case CSSPropertyID::kTextShadow:
case CSSPropertyID::kTextTransform:
case CSSPropertyID::kTextUnderlinePosition:
case CSSPropertyID::kVerticalAlign:
case CSSPropertyID::kWebkitBorderHorizontalSpacing:
case CSSPropertyID::kWebkitBorderImage:
case CSSPropertyID::kWebkitBorderVerticalSpacing:
case CSSPropertyID::kWebkitFontSmoothing:
case CSSPropertyID::kWordSpacing:
return true;
// Not directly specified in spec, but variables should be supported nearly
// anywhere.
case CSSPropertyID::kVariable:
// Properties that we currently support outside of spec.
case CSSPropertyID::kVisibility:
return true;
default:
return false;
}
}
static inline bool IsValidMarkerStyleProperty(CSSPropertyID id) { static inline bool IsValidMarkerStyleProperty(CSSPropertyID id) {
switch (id) { switch (id) {
// Valid ::marker properties listed in spec: // Valid ::marker properties listed in spec:
...@@ -1566,7 +1451,7 @@ static bool PassesPropertyFilter(ValidPropertyFilter valid_property_filter, ...@@ -1566,7 +1451,7 @@ static bool PassesPropertyFilter(ValidPropertyFilter valid_property_filter,
case ValidPropertyFilter::kNoFilter: case ValidPropertyFilter::kNoFilter:
return true; return true;
case ValidPropertyFilter::kFirstLetter: case ValidPropertyFilter::kFirstLetter:
return IsValidFirstLetterStyleProperty(property); return CSSProperty::Get(property).IsValidForFirstLetter();
case ValidPropertyFilter::kCue: case ValidPropertyFilter::kCue:
return IsValidCueStyleProperty(property); return IsValidCueStyleProperty(property);
case ValidPropertyFilter::kMarker: case ValidPropertyFilter::kMarker:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment