Bug 1891296 - Fix an assertion in selector-matching. r=dshin
We can have combinator sequences like [>, <part>], and they are fine. Add a test to make sure they're handled correctly. Differential Revision: https://phabricator.services.mozilla.com/D208668
This commit is contained in:
@@ -362,12 +362,7 @@ where
|
||||
|
||||
let iter = selector.iter_from(selector.len() - from_offset);
|
||||
debug_assert!(
|
||||
iter.clone().next().is_some() ||
|
||||
(from_offset != selector.len() &&
|
||||
matches!(
|
||||
selector.combinator_at_parse_order(from_offset),
|
||||
Combinator::SlotAssignment | Combinator::PseudoElement
|
||||
)),
|
||||
iter.clone().next().is_some() || from_offset != selector.len(),
|
||||
"Got the math wrong: {:?} | {:?} | {} {}",
|
||||
selector,
|
||||
selector.iter_raw_match_order().as_slice(),
|
||||
|
||||
Reference in New Issue
Block a user