@@ -2517,13 +2517,13 @@ pub mod font {
25172517 use super :: * ;
25182518 #[ cfg( feature = "gecko" ) ]
25192519 use crate :: properties:: longhands:: {
2520- font_family, font_feature_settings, font_language_override, font_size,
2521- font_size_adjust , font_variant_alternates, font_variant_east_asian, font_variant_emoji,
2522- font_variant_ligatures , font_variant_numeric , font_variant_position,
2520+ font_family, font_feature_settings, font_language_override, font_size, font_size_adjust ,
2521+ font_variant_alternates, font_variant_east_asian, font_variant_emoji, font_variant_numeric ,
2522+ font_variant_position,
25232523 } ;
25242524 use crate :: properties:: longhands:: {
2525- font_kerning, font_optical_sizing, font_stretch, font_style, font_variant_caps, font_variation_settings ,
2526- font_weight,
2525+ font_kerning, font_optical_sizing, font_stretch, font_style, font_variant_caps,
2526+ font_variant_ligatures , font_variation_settings , font_weight,
25272527 } ;
25282528 #[ cfg( feature = "gecko" ) ]
25292529 use crate :: values:: specified:: font:: SystemFont ;
@@ -2634,7 +2634,6 @@ pub mod font {
26342634 font_variant_east_asian : font_variant_east_asian:: get_initial_specified_value ( ) ,
26352635 #[ cfg( feature = "gecko" ) ]
26362636 font_variant_emoji : font_variant_emoji:: get_initial_specified_value ( ) ,
2637- #[ cfg( feature = "gecko" ) ]
26382637 font_variant_ligatures : font_variant_ligatures:: get_initial_specified_value ( ) ,
26392638 #[ cfg( feature = "gecko" ) ]
26402639 font_variant_numeric : font_variant_numeric:: get_initial_specified_value ( ) ,
@@ -2705,7 +2704,6 @@ pub mod font {
27052704 {
27062705 return Ok ( ( ) ) ;
27072706 }
2708- #[ cfg( feature = "gecko" ) ]
27092707 if self . font_variant_ligatures != & font_variant_ligatures:: get_initial_specified_value ( )
27102708 {
27112709 return Ok ( ( ) ) ;
@@ -2843,20 +2841,18 @@ pub mod font_variant {
28432841 pub use crate :: properties:: generated:: shorthands:: font_variant:: * ;
28442842
28452843 use super :: * ;
2846- use crate :: properties:: longhands:: font_variant_caps;
28472844 #[ cfg( feature = "gecko" ) ]
28482845 use crate :: properties:: longhands:: {
2849- font_variant_alternates, font_variant_east_asian, font_variant_emoji,
2850- font_variant_ligatures , font_variant_numeric , font_variant_position,
2846+ font_variant_alternates, font_variant_east_asian, font_variant_emoji, font_variant_numeric ,
2847+ font_variant_position,
28512848 } ;
2852- # [ allow ( unused_imports ) ]
2849+ use crate :: properties :: longhands :: { font_variant_caps , font_variant_ligatures } ;
28532850 use crate :: values:: specified:: FontVariantLigatures ;
28542851
28552852 pub fn parse_value < ' i , ' t > (
28562853 context : & ParserContext ,
28572854 input : & mut Parser < ' i , ' t > ,
28582855 ) -> Result < Longhands , ParseError < ' i > > {
2859- #[ cfg( feature = "gecko" ) ]
28602856 let mut ligatures = None ;
28612857 let mut caps = None ;
28622858 #[ cfg( feature = "gecko" ) ]
@@ -2878,10 +2874,7 @@ pub mod font_variant {
28782874 . try_parse ( |input| input. expect_ident_matching ( "none" ) )
28792875 . is_ok ( )
28802876 {
2881- #[ cfg( feature = "gecko" ) ]
2882- {
2883- ligatures = Some ( FontVariantLigatures :: NONE ) ;
2884- }
2877+ ligatures = Some ( FontVariantLigatures :: NONE ) ;
28852878 } else {
28862879 let mut parsed = 0 ;
28872880 loop {
@@ -2895,7 +2888,6 @@ pub mod font_variant {
28952888 {
28962889 return Err ( input. new_custom_error ( StyleParseErrorKind :: UnspecifiedError ) ) ;
28972890 }
2898- #[ cfg( feature = "gecko" ) ]
28992891 try_parse_one ! ( context, input, ligatures, font_variant_ligatures:: parse) ;
29002892 try_parse_one ! ( context, input, caps, font_variant_caps:: parse) ;
29012893 #[ cfg( feature = "gecko" ) ]
@@ -2929,6 +2921,7 @@ pub mod font_variant {
29292921 } ) ;
29302922 #[ cfg( feature = "servo" ) ]
29312923 return Ok ( expanded ! {
2924+ font_variant_ligatures: unwrap_or_initial!( font_variant_ligatures, ligatures) ,
29322925 font_variant_caps: unwrap_or_initial!( font_variant_caps, caps) ,
29332926 } ) ;
29342927 }
@@ -2939,15 +2932,12 @@ pub mod font_variant {
29392932 where
29402933 W : fmt:: Write ,
29412934 {
2942- #[ cfg( feature = "gecko" ) ]
29432935 let has_none_ligatures = self . font_variant_ligatures == & FontVariantLigatures :: NONE ;
2944- #[ cfg( feature = "servo" ) ]
2945- let has_none_ligatures = false ;
29462936
29472937 #[ cfg( feature = "gecko" ) ]
29482938 const TOTAL_SUBPROPS : usize = 7 ;
29492939 #[ cfg( feature = "servo" ) ]
2950- const TOTAL_SUBPROPS : usize = 1 ;
2940+ const TOTAL_SUBPROPS : usize = 2 ;
29512941 let mut nb_normals = 0 ;
29522942 macro_rules! count_normal {
29532943 ( $e: expr, $p: ident) => {
@@ -2959,7 +2949,6 @@ pub mod font_variant {
29592949 count_normal!( self . $v, $v) ;
29602950 } ;
29612951 }
2962- #[ cfg( feature = "gecko" ) ]
29632952 count_normal ! ( font_variant_ligatures) ;
29642953 count_normal ! ( font_variant_caps) ;
29652954 #[ cfg( feature = "gecko" ) ]
@@ -3001,7 +2990,6 @@ pub mod font_variant {
30012990 } ;
30022991 }
30032992
3004- #[ cfg( feature = "gecko" ) ]
30052993 write ! ( font_variant_ligatures) ;
30062994 write ! ( font_variant_caps) ;
30072995 #[ cfg( feature = "gecko" ) ]
0 commit comments