Compute expanded (transitive) longhands for all properties
(shorthands: &HashMap<String, HashSet<String>>)
| 37 | |
| 38 | /// Compute expanded (transitive) longhands for all properties |
| 39 | fn compute_all_expanded_longhands(shorthands: &HashMap<String, HashSet<String>>) -> HashMap<String, Vec<String>> { |
| 40 | let mut expanded_longhands: HashMap<String, Vec<String>> = HashMap::new(); |
| 41 | for prop_name in shorthands.keys() { |
| 42 | let mut visited = HashSet::new(); |
| 43 | let mut result = Vec::new(); |
| 44 | expand_longhands_recursive(prop_name, shorthands, &mut visited, &mut result); |
| 45 | if !result.is_empty() { |
| 46 | result.sort(); |
| 47 | expanded_longhands.insert(prop_name.clone(), result); |
| 48 | } |
| 49 | } |
| 50 | expanded_longhands |
| 51 | } |
| 52 | |
| 53 | /// Generate Rust code for a CSS spec module |
| 54 | pub fn generate_spec_module( |
no test coverage detected