From 121b718e9961ab499ab128b73b48663f7ffe6c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 2 Jan 2017 01:08:59 +0100 Subject: [PATCH] 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). --- components/style/stylist.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 4cb4a65b081..9faf56395ca 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -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); - } - }); }