@@ -132,23 +132,6 @@ impl PropertyDefinition {
132132 }
133133 }
134134
135- #[ must_use]
136- pub fn check_expanded_properties ( & self , _values : & [ CssValue ] ) -> bool {
137- // if values.len() != self.expanded_properties.len() {
138- // return false;
139- // }
140- //
141- // for (i, value) in values.iter().enumerate() {
142- // let prop = self.expanded_properties.get(i).unwrap();
143- // let prop_def = parse_definition_file().find(prop).unwrap();
144- // if !prop_def.matches(&[value.clone()]) {
145- // return false;
146- // }
147- // }
148-
149- true
150- }
151-
152135 #[ must_use]
153136 pub fn is_shorthand ( & self ) -> bool {
154137 self . computed . len ( ) > 1
@@ -552,12 +535,6 @@ fn parse_property_file<M: Map<String, PropertyDefinition>>(json: serde_json::Val
552535
553536 let initial_value = if obj[ "initial_value" ] . is_array ( ) {
554537 warn ! ( "Initial value is an array, not supported {obj:?}" ) ;
555- // obj["initial_value"]
556- // .as_array()
557- // .unwrap()
558- // .iter()
559- // .map(|v| CssValue::from(v))
560- // .collect()
561538 None
562539 } else if obj[ "initial_value" ] . is_string ( ) {
563540 match CssValue :: parse_str ( obj[ "initial_value" ] . as_str ( ) . unwrap ( ) ) {
@@ -568,7 +545,6 @@ fn parse_property_file<M: Map<String, PropertyDefinition>>(json: serde_json::Val
568545 }
569546 }
570547 } else {
571- // warn!("Initial value is not a string or array {:?}", obj);
572548 None
573549 } ;
574550
@@ -744,7 +720,6 @@ mod tests {
744720 let definitions = get_css_definitions ( ) ;
745721 let def = definitions. find_property ( "background-color" ) . unwrap ( ) ;
746722
747- // assert_some!(def.clone().matches(&CssValue::Inherit));
748723 assert_true ! ( def. clone( ) . matches( & [ str !( "transparent" ) ] ) ) ;
749724
750725 assert_true ! ( def. clone( ) . matches( & [ str !( "red" ) ] ) ) ;
@@ -766,7 +741,6 @@ mod tests {
766741 let definitions = get_css_definitions ( ) ;
767742 let def = definitions. find_property ( "background-attachment" ) . unwrap ( ) ;
768743
769- // assert_true!(def.clone().matches(&CssValue::Inherit));
770744 assert_true ! ( def. clone( ) . matches( & [ str !( "scroll" ) ] ) ) ;
771745 assert_true ! ( def. clone( ) . matches( & [ str !( "fixed" ) ] ) ) ;
772746
0 commit comments