style: Implement the font-synthesis-{weight,style,small-caps} longhand properties, and make font-synthesis into a shorthand

Differential Revision: https://phabricator.services.mozilla.com/D167480
This commit is contained in:
Jonathan Kew 2023-01-29 13:25:31 +00:00 committed by Martin Robinson
parent dbd3eab9cd
commit 05fb1b62b7
9 changed files with 169 additions and 208 deletions

View file

@ -81,12 +81,36 @@ ${helpers.predefined_type(
)}
${helpers.predefined_type(
"font-synthesis",
"font-synthesis-weight",
"FontSynthesis",
engines="gecko",
initial_value="specified::FontSynthesis::get_initial_value()",
initial_value="computed::FontSynthesis::Auto",
initial_specified_value="specified::FontSynthesis::Auto",
gecko_ffi_name="mFont.synthesisWeight",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-fonts/#propdef-font-synthesis",
spec="https://drafts.csswg.org/css-fonts-4/#font-synthesis-weight",
)}
${helpers.predefined_type(
"font-synthesis-style",
"FontSynthesis",
engines="gecko",
initial_value="computed::FontSynthesis::Auto",
initial_specified_value="specified::FontSynthesis::Auto",
gecko_ffi_name="mFont.synthesisStyle",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-fonts-4/#font-synthesis-style",
)}
${helpers.predefined_type(
"font-synthesis-small-caps",
"FontSynthesis",
engines="gecko",
initial_value="computed::FontSynthesis::Auto",
initial_specified_value="specified::FontSynthesis::Auto",
gecko_ffi_name="mFont.synthesisSmallCaps",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-fonts-4/#font-synthesis-small-caps",
)}
${helpers.predefined_type(