style: Reset the per-pseudo-element maps when update() is called

This was causing panics in stylo.
This commit is contained in:
Emilio Cobos Álvarez 2016-04-27 22:39:49 +02:00
parent 9c44062836
commit 227e39d558
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -171,6 +171,10 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
self.element_map = PerPseudoElementSelectorMap::new();
self.pseudos_map = HashMap::with_hasher(Default::default());
Impl::each_eagerly_cascaded_pseudo_element(|pseudo| {
self.pseudos_map.insert(pseudo, PerPseudoElementSelectorMap::new());
});
self.non_eagerly_cascaded_pseudo_element_decls = HashMap::with_hasher(Default::default());
self.rules_source_order = 0;
self.state_deps.clear();