From 5af73ef3a300e21ed8fb72251ef0211ebe2f4771 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 1 Oct 2019 01:04:53 +0000 Subject: [PATCH] servo: Merge #13570 - Add support for 'font-stretch' in geckolib (from Wafflespeanut:font_stretch); r=Manishearth --- - [x] `./mach build-geckolib` does not report any errors - [x] `./mach test-tidy` does not report any errors r? Manishearth Source-Repo: https://github.com/servo/servo Source-Revision: b772f4335ee82007afe26fa58dd94d097d6135ba UltraBlame original commit: dcead809bfd4d427052d40f9cd3f21bfe7844980 --- .../components/style/properties/gecko.mako.rs | 173 +++++++++++++++++- 1 file changed, 168 insertions(+), 5 deletions(-) diff --git a/servo/components/style/properties/gecko.mako.rs b/servo/components/style/properties/gecko.mako.rs index adf85b85ab589..e359ba2211323 100644 --- a/servo/components/style/properties/gecko.mako.rs +++ b/servo/components/style/properties/gecko.mako.rs @@ -3994,11 +3994,6 @@ kerning " font - -stretch -" -" -font -- variant " ] @@ -6418,6 +6413,9 @@ font family font - +stretch +font +- style font - @@ -6921,6 +6919,171 @@ mSize } pub fn +set_font_stretch +( +& +mut +self +v +: +longhands +: +: +font_stretch +: +: +computed_value +: +: +T +) +{ +use +computed_values +: +: +font_stretch +: +: +T +; +self +. +gecko +. +mFont +. +stretch += +match +v +{ +T +: +: +normal += +> +structs +: +: +NS_FONT_STRETCH_NORMAL +as +i16 +T +: +: +ultra_condensed += +> +structs +: +: +NS_FONT_STRETCH_ULTRA_CONDENSED +as +i16 +T +: +: +extra_condensed += +> +structs +: +: +NS_FONT_STRETCH_EXTRA_CONDENSED +as +i16 +T +: +: +condensed += +> +structs +: +: +NS_FONT_STRETCH_CONDENSED +as +i16 +T +: +: +semi_condensed += +> +structs +: +: +NS_FONT_STRETCH_SEMI_CONDENSED +as +i16 +T +: +: +semi_expanded += +> +structs +: +: +NS_FONT_STRETCH_SEMI_EXPANDED +as +i16 +T +: +: +expanded += +> +structs +: +: +NS_FONT_STRETCH_EXPANDED +as +i16 +T +: +: +extra_expanded += +> +structs +: +: +NS_FONT_STRETCH_EXTRA_EXPANDED +as +i16 +T +: +: +ultra_expanded += +> +structs +: +: +NS_FONT_STRETCH_ULTRA_EXPANDED +as +i16 +} +; +} +{ +impl_simple_copy +( +' +font_stretch +' +' +mFont +. +stretch +' +) +} +pub +fn set_font_weight ( &