mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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 {
|
||||
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue