@@ -2519,11 +2519,11 @@ pub mod font {
25192519 use crate :: properties:: longhands:: {
25202520 font_family, font_feature_settings, font_language_override, font_size,
25212521 font_size_adjust, font_variant_alternates, font_variant_east_asian, font_variant_emoji,
2522- font_variant_ligatures , font_variant_numeric, font_variant_position,
2522+ font_variant_numeric, 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_variant_ligatures , font_optical_sizing, font_stretch, font_style, font_variant_caps,
2526+ 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;
2844+ use crate :: properties:: longhands:: { font_variant_caps, font_variant_ligatures } ;
28472845 #[ cfg( feature = "gecko" ) ]
28482846 use crate :: properties:: longhands:: {
28492847 font_variant_alternates, font_variant_east_asian, font_variant_emoji,
2850- font_variant_ligatures , font_variant_numeric, font_variant_position,
2848+ font_variant_numeric, font_variant_position,
28512849 } ;
2852- #[ allow( unused_imports) ]
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,7 +2874,6 @@ pub mod font_variant {
28782874 . try_parse ( |input| input. expect_ident_matching ( "none" ) )
28792875 . is_ok ( )
28802876 {
2881- #[ cfg( feature = "gecko" ) ]
28822877 {
28832878 ligatures = Some ( FontVariantLigatures :: NONE ) ;
28842879 }
@@ -2895,7 +2890,6 @@ pub mod font_variant {
28952890 {
28962891 return Err ( input. new_custom_error ( StyleParseErrorKind :: UnspecifiedError ) ) ;
28972892 }
2898- #[ cfg( feature = "gecko" ) ]
28992893 try_parse_one ! ( context, input, ligatures, font_variant_ligatures:: parse) ;
29002894 try_parse_one ! ( context, input, caps, font_variant_caps:: parse) ;
29012895 #[ cfg( feature = "gecko" ) ]
@@ -2929,6 +2923,7 @@ pub mod font_variant {
29292923 } ) ;
29302924 #[ cfg( feature = "servo" ) ]
29312925 return Ok ( expanded ! {
2926+ font_variant_ligatures: unwrap_or_initial!( font_variant_ligatures, ligatures) ,
29322927 font_variant_caps: unwrap_or_initial!( font_variant_caps, caps) ,
29332928 } ) ;
29342929 }
@@ -2939,15 +2934,12 @@ pub mod font_variant {
29392934 where
29402935 W : fmt:: Write ,
29412936 {
2942- #[ cfg( feature = "gecko" ) ]
29432937 let has_none_ligatures = self . font_variant_ligatures == & FontVariantLigatures :: NONE ;
2944- #[ cfg( feature = "servo" ) ]
2945- let has_none_ligatures = false ;
29462938
29472939 #[ cfg( feature = "gecko" ) ]
29482940 const TOTAL_SUBPROPS : usize = 7 ;
29492941 #[ cfg( feature = "servo" ) ]
2950- const TOTAL_SUBPROPS : usize = 1 ;
2942+ const TOTAL_SUBPROPS : usize = 2 ;
29512943 let mut nb_normals = 0 ;
29522944 macro_rules! count_normal {
29532945 ( $e: expr, $p: ident) => {
@@ -2959,7 +2951,6 @@ pub mod font_variant {
29592951 count_normal!( self . $v, $v) ;
29602952 } ;
29612953 }
2962- #[ cfg( feature = "gecko" ) ]
29632954 count_normal ! ( font_variant_ligatures) ;
29642955 count_normal ! ( font_variant_caps) ;
29652956 #[ cfg( feature = "gecko" ) ]
@@ -3001,7 +2992,6 @@ pub mod font_variant {
30012992 } ;
30022993 }
30032994
3004- #[ cfg( feature = "gecko" ) ]
30052995 write ! ( font_variant_ligatures) ;
30062996 write ! ( font_variant_caps) ;
30072997 #[ cfg( feature = "gecko" ) ]
0 commit comments