mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Auto merge of #17995 - emilio:less-pseudo-maps, r=SimonSapin
style: Don't pre-fill eager pseudo-maps. This was needed long time ago for Servo's layout. But I don't think there's any reason for doing this now. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17995) <!-- Reviewable:end -->
This commit is contained in:
commit
f8abce8b72
1 changed files with 3 additions and 11 deletions
|
@ -1646,14 +1646,10 @@ struct PerOriginCascadeData {
|
||||||
|
|
||||||
impl PerOriginCascadeData {
|
impl PerOriginCascadeData {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
let mut data = PerOriginCascadeData {
|
Self {
|
||||||
element_map: SelectorMap::new(),
|
element_map: SelectorMap::new(),
|
||||||
pseudos_map: Default::default(),
|
pseudos_map: Default::default(),
|
||||||
};
|
}
|
||||||
SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
|
|
||||||
data.pseudos_map.insert(pseudo, SelectorMap::new());
|
|
||||||
});
|
|
||||||
data
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -1677,11 +1673,7 @@ impl PerOriginCascadeData {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clear(&mut self) {
|
fn clear(&mut self) {
|
||||||
self.element_map = SelectorMap::new();
|
*self = Self::new();
|
||||||
self.pseudos_map = Default::default();
|
|
||||||
SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
|
|
||||||
self.pseudos_map.insert(pseudo, SelectorMap::new());
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn has_rules_for_pseudo(&self, pseudo: &PseudoElement) -> bool {
|
fn has_rules_for_pseudo(&self, pseudo: &PseudoElement) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue