From 11745fb983f39f3985e53ff86cbf1c8843aa89af Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Sat, 15 Apr 2017 15:27:35 -0700 Subject: [PATCH] Eliminate the AFFECTED_BY_SIBLINGS StyleRelation. MozReview-Commit-ID: Lm25v2K21v5 --- components/selectors/matching.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs index 206e98a77d6..c6255605468 100644 --- a/components/selectors/matching.rs +++ b/components/selectors/matching.rs @@ -19,10 +19,6 @@ bitflags! { /// /// This is used to implement efficient sharing. pub flags StyleRelations: u16 { - /// Whether this element has matched any rule that is determined by a - /// sibling (when using the `+` or `~` combinators). - const AFFECTED_BY_SIBLINGS = 1 << 0, - /// Whether this element has matched any rule whose matching is /// determined by its position in the tree (i.e., first-child, /// nth-child, etc.). @@ -182,15 +178,7 @@ pub fn matches_complex_selector(selector: &ComplexSelector, element, relations, flags_setter) { - SelectorMatchingResult::Matched => { - match selector.next { - Some((_, Combinator::NextSibling)) | - Some((_, Combinator::LaterSibling)) => *relations |= AFFECTED_BY_SIBLINGS, - _ => {} - } - - true - } + SelectorMatchingResult::Matched => true, _ => false } }