mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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.
This commit is contained in:
parent
b11b658379
commit
c3501084f0
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