mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: restrict CSS properties for '::cue'.
According to the spec [1], only those CSS properties listed on the spec can be applied on the `::cue`. [1] https://www.w3.org/TR/webvtt1/#the-cue-pseudo-element Differential Revision: https://phabricator.services.mozilla.com/D34262
This commit is contained in:
parent
5db88db8fc
commit
84a5ab2ba8
9 changed files with 50 additions and 41 deletions
|
@ -186,6 +186,7 @@ impl PseudoElement {
|
||||||
PseudoElement::FirstLetter => Some(PropertyFlags::APPLIES_TO_FIRST_LETTER),
|
PseudoElement::FirstLetter => Some(PropertyFlags::APPLIES_TO_FIRST_LETTER),
|
||||||
PseudoElement::FirstLine => Some(PropertyFlags::APPLIES_TO_FIRST_LINE),
|
PseudoElement::FirstLine => Some(PropertyFlags::APPLIES_TO_FIRST_LINE),
|
||||||
PseudoElement::Placeholder => Some(PropertyFlags::APPLIES_TO_PLACEHOLDER),
|
PseudoElement::Placeholder => Some(PropertyFlags::APPLIES_TO_PLACEHOLDER),
|
||||||
|
PseudoElement::Cue => Some(PropertyFlags::APPLIES_TO_CUE),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ ${helpers.predefined_type(
|
||||||
animation_value_type="AnimatedColor",
|
animation_value_type="AnimatedColor",
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
allow_quirks="Yes",
|
allow_quirks="Yes",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER \
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER \
|
||||||
CAN_ANIMATE_ON_COMPOSITOR",
|
CAN_ANIMATE_ON_COMPOSITOR",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ ${helpers.predefined_type(
|
||||||
vector="True",
|
vector="True",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
ignored_when_colors_disabled="True",
|
ignored_when_colors_disabled="True",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
% for (axis, direction, initial) in [("x", "Horizontal", "left"), ("y", "Vertical", "top")]:
|
% for (axis, direction, initial) in [("x", "Horizontal", "left"), ("y", "Vertical", "top")]:
|
||||||
|
@ -41,7 +41,7 @@ ${helpers.predefined_type(
|
||||||
animation_value_type="ComputedValue",
|
animation_value_type="ComputedValue",
|
||||||
vector=True,
|
vector=True,
|
||||||
vector_animation_type="repeatable_list",
|
vector_animation_type="repeatable_list",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
)}
|
)}
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ ${helpers.predefined_type(
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
vector=True,
|
vector=True,
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-repeat",
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-repeat",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword(
|
${helpers.single_keyword(
|
||||||
|
@ -63,7 +63,7 @@ ${helpers.single_keyword(
|
||||||
gecko_enum_prefix="StyleImageLayerAttachment",
|
gecko_enum_prefix="StyleImageLayerAttachment",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword(
|
${helpers.single_keyword(
|
||||||
|
@ -75,7 +75,7 @@ ${helpers.single_keyword(
|
||||||
gecko_inexhaustive=True,
|
gecko_inexhaustive=True,
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-clip",
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-clip",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword(
|
${helpers.single_keyword(
|
||||||
|
@ -86,7 +86,7 @@ ${helpers.single_keyword(
|
||||||
gecko_inexhaustive=True,
|
gecko_inexhaustive=True,
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin",
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER"
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
|
@ -98,7 +98,7 @@ ${helpers.predefined_type(
|
||||||
vector=True,
|
vector=True,
|
||||||
vector_animation_type="repeatable_list",
|
vector_animation_type="repeatable_list",
|
||||||
animation_value_type="BackgroundSizeList",
|
animation_value_type="BackgroundSizeList",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
extra_prefixes="webkit")}
|
extra_prefixes="webkit")}
|
||||||
|
|
||||||
// https://drafts.fxtf.org/compositing/#background-blend-mode
|
// https://drafts.fxtf.org/compositing/#background-blend-mode
|
||||||
|
@ -110,5 +110,5 @@ ${helpers.single_keyword(
|
||||||
gecko_constant_prefix="NS_STYLE_BLEND",
|
gecko_constant_prefix="NS_STYLE_BLEND",
|
||||||
vector=True, products="gecko", animation_value_type="discrete",
|
vector=True, products="gecko", animation_value_type="discrete",
|
||||||
spec="https://drafts.fxtf.org/compositing/#background-blend-mode",
|
spec="https://drafts.fxtf.org/compositing/#background-blend-mode",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -12,7 +12,7 @@ ${helpers.predefined_type(
|
||||||
"Opacity",
|
"Opacity",
|
||||||
"1.0",
|
"1.0",
|
||||||
animation_value_type="ComputedValue",
|
animation_value_type="ComputedValue",
|
||||||
flags="CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER \
|
flags="APPLIES_TO_CUE CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER \
|
||||||
CAN_ANIMATE_ON_COMPOSITOR",
|
CAN_ANIMATE_ON_COMPOSITOR",
|
||||||
spec="https://drafts.csswg.org/css-color/#opacity",
|
spec="https://drafts.csswg.org/css-color/#opacity",
|
||||||
servo_restyle_damage = "reflow_out_of_flow",
|
servo_restyle_damage = "reflow_out_of_flow",
|
||||||
|
|
|
@ -12,7 +12,7 @@ ${helpers.predefined_type(
|
||||||
"FontFamily",
|
"FontFamily",
|
||||||
initial_value="computed::FontFamily::serif()",
|
initial_value="computed::FontFamily::serif()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -23,7 +23,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontStyle::normal()",
|
initial_value="computed::FontStyle::normal()",
|
||||||
initial_specified_value="specified::FontStyle::normal()",
|
initial_specified_value="specified::FontStyle::normal()",
|
||||||
animation_value_type="FontStyle",
|
animation_value_type="FontStyle",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-style",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-style",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -42,7 +42,7 @@ ${helpers.single_keyword_system(
|
||||||
gecko_ffi_name="mFont.variantCaps",
|
gecko_ffi_name="mFont.variantCaps",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps",
|
||||||
custom_consts=font_variant_caps_custom_consts,
|
custom_consts=font_variant_caps_custom_consts,
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -53,7 +53,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontWeight::normal()",
|
initial_value="computed::FontWeight::normal()",
|
||||||
initial_specified_value="specified::FontWeight::normal()",
|
initial_specified_value="specified::FontWeight::normal()",
|
||||||
animation_value_type="Number",
|
animation_value_type="Number",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-weight",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-weight",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -65,7 +65,7 @@ ${helpers.predefined_type(
|
||||||
initial_specified_value="specified::FontSize::medium()",
|
initial_specified_value="specified::FontSize::medium()",
|
||||||
animation_value_type="NonNegativeLength",
|
animation_value_type="NonNegativeLength",
|
||||||
allow_quirks="Yes",
|
allow_quirks="Yes",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -77,7 +77,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontSizeAdjust::none()",
|
initial_value="computed::FontSizeAdjust::none()",
|
||||||
initial_specified_value="specified::FontSizeAdjust::none()",
|
initial_specified_value="specified::FontSizeAdjust::none()",
|
||||||
animation_value_type="ComputedValue",
|
animation_value_type="ComputedValue",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ ${helpers.predefined_type(
|
||||||
products="gecko",
|
products="gecko",
|
||||||
initial_value="specified::FontSynthesis::get_initial_value()",
|
initial_value="specified::FontSynthesis::get_initial_value()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-synthesis",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-synthesis",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontStretch::hundred()",
|
initial_value="computed::FontStretch::hundred()",
|
||||||
initial_specified_value="specified::FontStretch::normal()",
|
initial_specified_value="specified::FontStretch::normal()",
|
||||||
animation_value_type="Percentage",
|
animation_value_type="Percentage",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-stretch",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-stretch",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -109,7 +109,7 @@ ${helpers.single_keyword_system(
|
||||||
gecko_ffi_name="mFont.kerning",
|
gecko_ffi_name="mFont.kerning",
|
||||||
gecko_constant_prefix="NS_FONT_KERNING",
|
gecko_constant_prefix="NS_FONT_KERNING",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-kerning",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-kerning",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontVariantAlternates::get_initial_value()",
|
initial_value="computed::FontVariantAlternates::get_initial_value()",
|
||||||
initial_specified_value="specified::FontVariantAlternates::get_initial_specified_value()",
|
initial_specified_value="specified::FontVariantAlternates::get_initial_specified_value()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-alternates",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-alternates",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontVariantEastAsian::empty()",
|
initial_value="computed::FontVariantEastAsian::empty()",
|
||||||
initial_specified_value="specified::FontVariantEastAsian::empty()",
|
initial_specified_value="specified::FontVariantEastAsian::empty()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-east-asian",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-east-asian",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontVariantLigatures::empty()",
|
initial_value="computed::FontVariantLigatures::empty()",
|
||||||
initial_specified_value="specified::FontVariantLigatures::empty()",
|
initial_specified_value="specified::FontVariantLigatures::empty()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-ligatures",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-ligatures",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontVariantNumeric::empty()",
|
initial_value="computed::FontVariantNumeric::empty()",
|
||||||
initial_specified_value="specified::FontVariantNumeric::empty()",
|
initial_specified_value="specified::FontVariantNumeric::empty()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-numeric",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-numeric",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ ${helpers.single_keyword_system(
|
||||||
gecko_ffi_name="mFont.variantPosition",
|
gecko_ffi_name="mFont.variantPosition",
|
||||||
gecko_constant_prefix="NS_FONT_VARIANT_POSITION",
|
gecko_constant_prefix="NS_FONT_VARIANT_POSITION",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-position",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-position",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ ${helpers.predefined_type(
|
||||||
initial_specified_value="specified::FontFeatureSettings::normal()",
|
initial_specified_value="specified::FontFeatureSettings::normal()",
|
||||||
extra_prefixes="moz:layout.css.prefixes.font-features",
|
extra_prefixes="moz:layout.css.prefixes.font-features",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-feature-settings",
|
spec="https://drafts.csswg.org/css-fonts/#propdef-font-feature-settings",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::FontVariationSettings::normal()",
|
initial_value="computed::FontVariationSettings::normal()",
|
||||||
initial_specified_value="specified::FontVariationSettings::normal()",
|
initial_specified_value="specified::FontVariationSettings::normal()",
|
||||||
animation_value_type="ComputedValue",
|
animation_value_type="ComputedValue",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="${variation_spec}",
|
spec="${variation_spec}",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ ${helpers.predefined_type(
|
||||||
initial_specified_value="specified::FontLanguageOverride::normal()",
|
initial_specified_value="specified::FontLanguageOverride::normal()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
extra_prefixes="moz:layout.css.prefixes.font-features",
|
extra_prefixes="moz:layout.css.prefixes.font-features",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override",
|
spec="https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ ${helpers.single_keyword_system(
|
||||||
gecko_ffi_name="mFont.opticalSizing",
|
gecko_ffi_name="mFont.opticalSizing",
|
||||||
gecko_constant_prefix="NS_FONT_OPTICAL_SIZING",
|
gecko_constant_prefix="NS_FONT_OPTICAL_SIZING",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://www.w3.org/TR/css-fonts-4/#font-optical-sizing-def",
|
spec="https://www.w3.org/TR/css-fonts-4/#font-optical-sizing-def",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ ${helpers.single_keyword(
|
||||||
gecko_pref="layout.css.osx-font-smoothing.enabled",
|
gecko_pref="layout.css.osx-font-smoothing.enabled",
|
||||||
products="gecko",
|
products="gecko",
|
||||||
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth)",
|
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth)",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ ${helpers.single_keyword(
|
||||||
gecko_ffi_name="mVisible",
|
gecko_ffi_name="mVisible",
|
||||||
animation_value_type="ComputedValue",
|
animation_value_type="ComputedValue",
|
||||||
spec="https://drafts.csswg.org/css-box/#propdef-visibility",
|
spec="https://drafts.csswg.org/css-box/#propdef-visibility",
|
||||||
|
flags="APPLIES_TO_CUE",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
// CSS Writing Modes Level 3
|
// CSS Writing Modes Level 3
|
||||||
|
|
|
@ -11,7 +11,7 @@ ${helpers.predefined_type(
|
||||||
"ColorPropertyValue",
|
"ColorPropertyValue",
|
||||||
"::cssparser::RGBA::new(0, 0, 0, 255)",
|
"::cssparser::RGBA::new(0, 0, 0, 255)",
|
||||||
animation_value_type="AnimatedRGBA",
|
animation_value_type="AnimatedRGBA",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
ignored_when_colors_disabled="True",
|
ignored_when_colors_disabled="True",
|
||||||
spec="https://drafts.csswg.org/css-color/#color",
|
spec="https://drafts.csswg.org/css-color/#color",
|
||||||
)}
|
)}
|
||||||
|
@ -21,7 +21,7 @@ ${helpers.predefined_type(
|
||||||
"LineHeight",
|
"LineHeight",
|
||||||
"computed::LineHeight::normal()",
|
"computed::LineHeight::normal()",
|
||||||
animation_value_type="LineHeight",
|
animation_value_type="LineHeight",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE \
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE \
|
||||||
APPLIES_TO_PLACEHOLDER GETCS_NEEDS_LAYOUT_FLUSH",
|
APPLIES_TO_PLACEHOLDER GETCS_NEEDS_LAYOUT_FLUSH",
|
||||||
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height",
|
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height",
|
||||||
servo_restyle_damage="reflow"
|
servo_restyle_damage="reflow"
|
||||||
|
@ -181,7 +181,7 @@ ${helpers.predefined_type(
|
||||||
needs_conversion="True"
|
needs_conversion="True"
|
||||||
animation_value_type="discrete"
|
animation_value_type="discrete"
|
||||||
// Only allowed for UA sheets, which set it !important.
|
// Only allowed for UA sheets, which set it !important.
|
||||||
flags="APPLIES_TO_PLACEHOLDER"
|
flags="APPLIES_TO_CUE APPLIES_TO_PLACEHOLDER"
|
||||||
spec="https://drafts.csswg.org/css-text/#propdef-white-space"
|
spec="https://drafts.csswg.org/css-text/#propdef-white-space"
|
||||||
servo_restyle_damage="rebuild_and_reflow"
|
servo_restyle_damage="rebuild_and_reflow"
|
||||||
>
|
>
|
||||||
|
@ -229,7 +229,7 @@ ${helpers.predefined_type(
|
||||||
animation_value_type="AnimatedTextShadowList",
|
animation_value_type="AnimatedTextShadowList",
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
simple_vector_bindings=True,
|
simple_vector_bindings=True,
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property",
|
spec="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -337,6 +337,7 @@ ${helpers.single_keyword(
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
spec="https://drafts.csswg.org/css-ruby/#ruby-position-property",
|
spec="https://drafts.csswg.org/css-ruby/#ruby-position-property",
|
||||||
|
flags="APPLIES_TO_CUE",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
// CSS Writing Modes Module Level 3
|
// CSS Writing Modes Module Level 3
|
||||||
|
@ -348,6 +349,7 @@ ${helpers.single_keyword(
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
spec="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright",
|
spec="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright",
|
||||||
|
flags="APPLIES_TO_CUE",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
// SVG 1.1: Section 11 - Painting: Filling, Stroking and Marker Symbols
|
// SVG 1.1: Section 11 - Painting: Filling, Stroking and Marker Symbols
|
||||||
|
|
|
@ -18,6 +18,7 @@ ${helpers.predefined_type(
|
||||||
animation_value_type="AnimatedColor",
|
animation_value_type="AnimatedColor",
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color",
|
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color",
|
||||||
|
flags="APPLIES_TO_CUE",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
|
@ -27,6 +28,7 @@ ${helpers.predefined_type(
|
||||||
initial_specified_value="specified::OutlineStyle::none()",
|
initial_specified_value="specified::OutlineStyle::none()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
|
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
|
||||||
|
flags="APPLIES_TO_CUE",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
|
@ -37,6 +39,7 @@ ${helpers.predefined_type(
|
||||||
computed_type="crate::values::computed::NonNegativeLength",
|
computed_type="crate::values::computed::NonNegativeLength",
|
||||||
animation_value_type="NonNegativeLength",
|
animation_value_type="NonNegativeLength",
|
||||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width",
|
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width",
|
||||||
|
flags="APPLIES_TO_CUE",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
// The -moz-outline-radius-* properties are non-standard and not on a standards track.
|
// The -moz-outline-radius-* properties are non-standard and not on a standards track.
|
||||||
|
|
|
@ -32,7 +32,7 @@ ${helpers.predefined_type(
|
||||||
"specified::TextDecorationLine::none()",
|
"specified::TextDecorationLine::none()",
|
||||||
initial_specified_value="specified::TextDecorationLine::none()",
|
initial_specified_value="specified::TextDecorationLine::none()",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
|
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
|
||||||
servo_restyle_damage="rebuild_and_reflow",
|
servo_restyle_damage="rebuild_and_reflow",
|
||||||
)}
|
)}
|
||||||
|
@ -42,7 +42,7 @@ ${helpers.single_keyword(
|
||||||
"solid double dotted dashed wavy -moz-none",
|
"solid double dotted dashed wavy -moz-none",
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style",
|
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ ${helpers.predefined_type(
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animation_value_type="AnimatedColor",
|
animation_value_type="AnimatedColor",
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
flags="APPLIES_TO_CUE APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color",
|
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -939,7 +939,7 @@ impl CSSWideKeyword {
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
/// A set of flags for properties.
|
/// A set of flags for properties.
|
||||||
pub struct PropertyFlags: u8 {
|
pub struct PropertyFlags: u16 {
|
||||||
/// This property requires a stacking context.
|
/// This property requires a stacking context.
|
||||||
const CREATES_STACKING_CONTEXT = 1 << 0;
|
const CREATES_STACKING_CONTEXT = 1 << 0;
|
||||||
/// This property has values that can establish a containing block for
|
/// This property has values that can establish a containing block for
|
||||||
|
@ -954,13 +954,15 @@ bitflags! {
|
||||||
const APPLIES_TO_FIRST_LINE = 1 << 4;
|
const APPLIES_TO_FIRST_LINE = 1 << 4;
|
||||||
/// This longhand property applies to ::placeholder.
|
/// This longhand property applies to ::placeholder.
|
||||||
const APPLIES_TO_PLACEHOLDER = 1 << 5;
|
const APPLIES_TO_PLACEHOLDER = 1 << 5;
|
||||||
|
/// This longhand property applies to ::cue.
|
||||||
|
const APPLIES_TO_CUE = 1 << 6;
|
||||||
/// This property's getComputedStyle implementation requires layout
|
/// This property's getComputedStyle implementation requires layout
|
||||||
/// to be flushed.
|
/// to be flushed.
|
||||||
const GETCS_NEEDS_LAYOUT_FLUSH = 1 << 6;
|
const GETCS_NEEDS_LAYOUT_FLUSH = 1 << 7;
|
||||||
/// This property is a legacy shorthand.
|
/// This property is a legacy shorthand.
|
||||||
///
|
///
|
||||||
/// https://drafts.csswg.org/css-cascade/#legacy-shorthand
|
/// https://drafts.csswg.org/css-cascade/#legacy-shorthand
|
||||||
const IS_LEGACY_SHORTHAND = 1 << 7;
|
const IS_LEGACY_SHORTHAND = 1 << 8;
|
||||||
|
|
||||||
/* The following flags are currently not used in Rust code, they
|
/* The following flags are currently not used in Rust code, they
|
||||||
* only need to be listed in corresponding properties so that
|
* only need to be listed in corresponding properties so that
|
||||||
|
@ -1184,7 +1186,7 @@ impl LonghandId {
|
||||||
pub fn flags(self) -> PropertyFlags {
|
pub fn flags(self) -> PropertyFlags {
|
||||||
// TODO(emilio): This can be simplified further as Rust gains more
|
// TODO(emilio): This can be simplified further as Rust gains more
|
||||||
// constant expression support.
|
// constant expression support.
|
||||||
const FLAGS: [u8; ${len(data.longhands)}] = [
|
const FLAGS: [u16; ${len(data.longhands)}] = [
|
||||||
% for property in data.longhands:
|
% for property in data.longhands:
|
||||||
% for flag in property.flags:
|
% for flag in property.flags:
|
||||||
PropertyFlags::${flag}.bits |
|
PropertyFlags::${flag}.bits |
|
||||||
|
@ -1446,7 +1448,7 @@ impl ShorthandId {
|
||||||
/// Returns PropertyFlags for the given shorthand property.
|
/// Returns PropertyFlags for the given shorthand property.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn flags(self) -> PropertyFlags {
|
pub fn flags(self) -> PropertyFlags {
|
||||||
const FLAGS: [u8; ${len(data.shorthands)}] = [
|
const FLAGS: [u16; ${len(data.shorthands)}] = [
|
||||||
% for property in data.shorthands:
|
% for property in data.shorthands:
|
||||||
% for flag in property.flags:
|
% for flag in property.flags:
|
||||||
PropertyFlags::${flag}.bits |
|
PropertyFlags::${flag}.bits |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue