mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +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.
|
/// This is used to implement efficient sharing.
|
||||||
pub flags StyleRelations: u16 {
|
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
|
/// Whether this element has matched any rule whose matching is
|
||||||
/// determined by its position in the tree (i.e., first-child,
|
/// determined by its position in the tree (i.e., first-child,
|
||||||
/// nth-child, etc.).
|
/// nth-child, etc.).
|
||||||
|
@ -182,15 +178,7 @@ pub fn matches_complex_selector<E, F>(selector: &ComplexSelector<E::Impl>,
|
||||||
element,
|
element,
|
||||||
relations,
|
relations,
|
||||||
flags_setter) {
|
flags_setter) {
|
||||||
SelectorMatchingResult::Matched => {
|
SelectorMatchingResult::Matched => true,
|
||||||
match selector.next {
|
|
||||||
Some((_, Combinator::NextSibling)) |
|
|
||||||
Some((_, Combinator::LaterSibling)) => *relations |= AFFECTED_BY_SIBLINGS,
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
true
|
|
||||||
}
|
|
||||||
_ => false
|
_ => false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue