mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Eliminate the AFFECTED_BY_SIBLINGS StyleRelation.
MozReview-Commit-ID: Lm25v2K21v5
This commit is contained in:
parent
a754c10e79
commit
11745fb983
1 changed files with 1 additions and 13 deletions
|
@ -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<E, F>(selector: &ComplexSelector<E::Impl>,
|
|||
element,
|
||||
relations,
|
||||
flags_setter) {
|
||||
SelectorMatchingResult::Matched => {
|
||||
match selector.next {
|
||||
Some((_, Combinator::NextSibling)) |
|
||||
Some((_, Combinator::LaterSibling)) => *relations |= AFFECTED_BY_SIBLINGS,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
SelectorMatchingResult::Matched => true,
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue