mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Prevent a crash when push_applicable_declarations is called with a non eagerly-cascaded pseudo-element
This actually didn't happen, but this should be done sooner than later.
This commit is contained in:
parent
dad1738ba7
commit
a604d605ed
1 changed files with 6 additions and 1 deletions
|
@ -261,7 +261,12 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
|
|||
"Style attributes do not apply to pseudo-elements");
|
||||
|
||||
let map = match pseudo_element {
|
||||
Some(ref pseudo) => self.pseudos_map.get(pseudo).unwrap(),
|
||||
Some(ref pseudo) => match self.pseudos_map.get(pseudo) {
|
||||
Some(map) => map,
|
||||
// TODO(ecoal95): get non eagerly-cascaded pseudo-element rules here.
|
||||
// Actually assume there are no rules applicable.
|
||||
None => return true,
|
||||
},
|
||||
None => &self.element_map,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue