mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Don't generate catch-all branch if a image layer keyword value is exhaustive.
Bug: 1463978 Reviewed-by: emilio MozReview-Commit-ID: H8T9Low6kqY
This commit is contained in:
parent
6306cc7e2d
commit
8f367be650
3 changed files with 48 additions and 33 deletions
|
@ -3805,7 +3805,9 @@ fn static_assert() {
|
||||||
% endif
|
% endif
|
||||||
=> Keyword::${to_camel_case(value)},
|
=> Keyword::${to_camel_case(value)},
|
||||||
% endfor
|
% endfor
|
||||||
|
% if keyword.gecko_inexhaustive:
|
||||||
_ => panic!("Found unexpected value in style struct for ${ident} property"),
|
_ => panic!("Found unexpected value in style struct for ${ident} property"),
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
}).collect()
|
}).collect()
|
||||||
)
|
)
|
||||||
|
|
|
@ -60,22 +60,28 @@ ${helpers.single_keyword("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_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
|
||||||
|
|
||||||
${helpers.single_keyword("background-clip",
|
${helpers.single_keyword(
|
||||||
"border-box padding-box content-box",
|
"background-clip",
|
||||||
extra_gecko_values="text",
|
"border-box padding-box content-box",
|
||||||
vector=True, extra_prefixes="webkit",
|
extra_gecko_values="text",
|
||||||
gecko_enum_prefix="StyleGeometryBox",
|
vector=True, extra_prefixes="webkit",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-clip",
|
gecko_enum_prefix="StyleGeometryBox",
|
||||||
animation_value_type="discrete",
|
gecko_inexhaustive=True,
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-clip",
|
||||||
|
animation_value_type="discrete",
|
||||||
|
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||||
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword("background-origin",
|
${helpers.single_keyword(
|
||||||
"padding-box border-box content-box",
|
"background-origin",
|
||||||
vector=True, extra_prefixes="webkit",
|
"padding-box border-box content-box",
|
||||||
gecko_enum_prefix="StyleGeometryBox",
|
vector=True, extra_prefixes="webkit",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin",
|
gecko_enum_prefix="StyleGeometryBox",
|
||||||
animation_value_type="discrete",
|
gecko_inexhaustive=True,
|
||||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin",
|
||||||
|
animation_value_type="discrete",
|
||||||
|
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER"
|
||||||
|
)}
|
||||||
|
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
"background-size",
|
"background-size",
|
||||||
|
|
|
@ -108,25 +108,32 @@ ${helpers.predefined_type(
|
||||||
)}
|
)}
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
${helpers.single_keyword("mask-clip",
|
${helpers.single_keyword(
|
||||||
"border-box content-box padding-box",
|
"mask-clip",
|
||||||
extra_gecko_values="fill-box stroke-box view-box no-clip",
|
"border-box content-box padding-box",
|
||||||
vector=True,
|
extra_gecko_values="fill-box stroke-box view-box no-clip",
|
||||||
products="gecko",
|
vector=True,
|
||||||
extra_prefixes="webkit",
|
products="gecko",
|
||||||
gecko_enum_prefix="StyleGeometryBox",
|
extra_prefixes="webkit",
|
||||||
animation_value_type="discrete",
|
gecko_enum_prefix="StyleGeometryBox",
|
||||||
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-clip")}
|
gecko_inexhaustive=True,
|
||||||
|
animation_value_type="discrete",
|
||||||
|
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-clip",
|
||||||
|
)}
|
||||||
|
|
||||||
|
${helpers.single_keyword(
|
||||||
|
"mask-origin",
|
||||||
|
"border-box content-box padding-box",
|
||||||
|
extra_gecko_values="fill-box stroke-box view-box",
|
||||||
|
vector=True,
|
||||||
|
products="gecko",
|
||||||
|
extra_prefixes="webkit",
|
||||||
|
gecko_enum_prefix="StyleGeometryBox",
|
||||||
|
gecko_inexhaustive=True,
|
||||||
|
animation_value_type="discrete",
|
||||||
|
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-origin",
|
||||||
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword("mask-origin",
|
|
||||||
"border-box content-box padding-box",
|
|
||||||
extra_gecko_values="fill-box stroke-box view-box",
|
|
||||||
vector=True,
|
|
||||||
products="gecko",
|
|
||||||
extra_prefixes="webkit",
|
|
||||||
gecko_enum_prefix="StyleGeometryBox",
|
|
||||||
animation_value_type="discrete",
|
|
||||||
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-origin")}
|
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
"mask-size",
|
"mask-size",
|
||||||
"background::BackgroundSize",
|
"background::BackgroundSize",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue