Bug 1471063: Remove unneeded combinator check in selector-matching. r?xidorn
The combinator doesn't change during the loop, no need to check it.
MozReview-Commit-ID: KIAt0WiEOtI
--- a/servo/components/selectors/matching.rs
+++ b/servo/components/selectors/matching.rs
@@ -571,17 +571,17 @@ where
// NotMatchedAndRestartFromClosestLaterSibling or
// NotMatchedAndRestartFromClosestDescendant, or the
// Combinator::LaterSibling combinator and the status is
// NotMatchedAndRestartFromClosestDescendant, we can continue to
// matching on the next candidate element.
_ => {},
}
- if element.is_link() || combinator.is_sibling() {
+ if element.is_link() {
visited_handling = VisitedHandlingMode::AllLinksUnvisited;
}
next_element = next_element_for_combinator(&element, combinator, &selector_iter);
}
}
#[inline]