mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Check iterator length in SelectorIter::is_featureless_host_selector.
I'm going to unconditionally generate the PseudoElement combinator, and this causes issues since we'll put the raw `::pseudo` selectors in the host bucket, which is obviously wrong. Differential Revision: https://phabricator.services.mozilla.com/D27528
This commit is contained in:
parent
c990c9623d
commit
9f73576f6a
1 changed files with 2 additions and 1 deletions
|
@ -736,7 +736,8 @@ impl<'a, Impl: 'a + SelectorImpl> SelectorIter<'a, Impl> {
|
|||
/// combinators to the left.
|
||||
#[inline]
|
||||
pub(crate) fn is_featureless_host_selector(&mut self) -> bool {
|
||||
self.all(|component| matches!(*component, Component::Host(..))) &&
|
||||
self.selector_length() > 0 &&
|
||||
self.all(|component| matches!(*component, Component::Host(..))) &&
|
||||
self.next_sequence().is_none()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue