mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
style: Fix tidy issues and Servo build.
This commit is contained in:
parent
64cceb328a
commit
292f899631
15 changed files with 32 additions and 56 deletions
|
@ -62,11 +62,12 @@ fn parse_rules(css: &str) -> Vec<(StyleSource, CascadeLevel)> {
|
|||
let rules = s.contents.rules.read_with(&guard);
|
||||
rules.0.iter().filter_map(|rule| {
|
||||
match *rule {
|
||||
CssRule::Style(ref style_rule) => Some(style_rule),
|
||||
CssRule::Style(ref style_rule) => Some((
|
||||
StyleSource::from_rule(style_rule.clone()),
|
||||
CascadeLevel::UserNormal,
|
||||
)),
|
||||
_ => None,
|
||||
}
|
||||
}).cloned().map(StyleSource::Style).map(|s| {
|
||||
(s, CascadeLevel::UserNormal)
|
||||
}).collect()
|
||||
}
|
||||
|
||||
|
@ -78,7 +79,7 @@ fn test_insertion_style_attribute(rule_tree: &RuleTree, rules: &[(StyleSource, C
|
|||
shared_lock: &SharedRwLock)
|
||||
-> StrongRuleNode {
|
||||
let mut rules = rules.to_vec();
|
||||
rules.push((StyleSource::Declarations(Arc::new(shared_lock.wrap(PropertyDeclarationBlock::with_one(
|
||||
rules.push((StyleSource::from_declarations(Arc::new(shared_lock.wrap(PropertyDeclarationBlock::with_one(
|
||||
PropertyDeclaration::Display(
|
||||
longhands::display::SpecifiedValue::Block),
|
||||
Importance::Normal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue