зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #17995 - style: Don't pre-fill eager pseudo-maps (from emilio:less-pseudo-maps); r=SimonSapin
This was needed long time ago for Servo's layout. But I don't think there's any reason for doing this now. Source-Repo: https://github.com/servo/servo Source-Revision: f8abce8b72bf3fb09d39d6c7d708a79d1b89c9db --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 7974c18af7dc3873105bbe2b89ff98ca3deb3b49
This commit is contained in:
Родитель
e1f76e8883
Коммит
2fb6351050
|
@ -1646,14 +1646,10 @@ struct PerOriginCascadeData {
|
|||
|
||||
impl PerOriginCascadeData {
|
||||
fn new() -> Self {
|
||||
let mut data = PerOriginCascadeData {
|
||||
Self {
|
||||
element_map: SelectorMap::new(),
|
||||
pseudos_map: Default::default(),
|
||||
};
|
||||
SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
|
||||
data.pseudos_map.insert(pseudo, SelectorMap::new());
|
||||
});
|
||||
data
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -1677,11 +1673,7 @@ impl PerOriginCascadeData {
|
|||
}
|
||||
|
||||
fn clear(&mut self) {
|
||||
self.element_map = SelectorMap::new();
|
||||
self.pseudos_map = Default::default();
|
||||
SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
|
||||
self.pseudos_map.insert(pseudo, SelectorMap::new());
|
||||
});
|
||||
*self = Self::new();
|
||||
}
|
||||
|
||||
fn has_rules_for_pseudo(&self, pseudo: &PseudoElement) -> bool {
|
||||
|
|
Загрузка…
Ссылка в новой задаче