Fix some edge-case-y extend logic.

This commit is contained in:
Natalie Weizenbaum 2016-10-19 21:05:52 -07:00
parent 3941e4debd
commit 95508b2713

View File

@ -684,7 +684,7 @@ bool _simpleIsSuperselectorOfCompound(
if (theirSimple is PseudoSelector && if (theirSimple is PseudoSelector &&
theirSimple.selector != null && theirSimple.selector != null &&
_subselectorPseudos.contains(theirSimple.normalizedName)) { _subselectorPseudos.contains(theirSimple.normalizedName)) {
return theirSimple.selector.components.any((complex) { return theirSimple.selector.components.every((complex) {
if (complex.components.length != 1) return false; if (complex.components.length != 1) return false;
var compound = complex.components.single as CompoundSelector; var compound = complex.components.single as CompoundSelector;
return compound.components.contains(simple); return compound.components.contains(simple);
@ -775,4 +775,4 @@ Iterable<PseudoSelector> _selectorPseudosNamed(
simple is PseudoSelector && simple is PseudoSelector &&
simple.isClass && simple.isClass &&
simple.selector != null && simple.selector != null &&
simple.name == name)); simple.normalizedName == name));