mirror of
https://github.com/servo/servo.git
synced 2025-06-23 08:34:42 +01:00
style: Remove a bunch of duplicated logic in add_stylesheet.
This is remminiscent of my recent @import refactor, and stayed there incorrectly. Note that it's the same code that lives in `update` (where it should live).
This commit is contained in:
parent
7ad3ac054a
commit
121b718e99
1 changed files with 0 additions and 19 deletions
|
@ -252,25 +252,6 @@ impl Stylist {
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
debug!("Stylist stats:");
|
|
||||||
debug!(" - Got {} sibling-affecting selectors",
|
|
||||||
self.sibling_affecting_selectors.len());
|
|
||||||
debug!(" - Got {} non-common-style-attribute-affecting selectors",
|
|
||||||
self.non_common_style_affecting_attributes_selectors.len());
|
|
||||||
debug!(" - Got {} deps for style-hint calculation",
|
|
||||||
self.state_deps.len());
|
|
||||||
|
|
||||||
SelectorImpl::each_precomputed_pseudo_element(|pseudo| {
|
|
||||||
// TODO: Consider not doing this and just getting the rules on the
|
|
||||||
// fly. It should be a bit slower, but we'd take rid of the
|
|
||||||
// extra field, and avoid this precomputation entirely.
|
|
||||||
if let Some(map) = self.pseudos_map.remove(&pseudo) {
|
|
||||||
let mut declarations = vec![];
|
|
||||||
map.user_agent.get_universal_rules(&mut declarations);
|
|
||||||
self.precomputed_pseudo_element_decls.insert(pseudo, declarations);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue