mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
selectors: add an is_nested method to MatchingContext, instead of nesting_level.
This commit is contained in:
parent
8e25c9e674
commit
9f00a2fdc0
2 changed files with 8 additions and 7 deletions
|
@ -182,10 +182,10 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// How many times deep are we in a selector.
|
||||
/// Whether we're matching a nested selector.
|
||||
#[inline]
|
||||
pub fn nesting_level(&self) -> usize {
|
||||
self.nesting_level
|
||||
pub fn is_nested(&self) -> bool {
|
||||
self.nesting_level != 0
|
||||
}
|
||||
|
||||
/// The quirks mode of the document.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue