mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Move the ancestor hashes out of Selector.
MozReview-Commit-ID: 5mipXnjgSED
This commit is contained in:
parent
e3d3c5a7b2
commit
713c9a63f6
8 changed files with 153 additions and 79 deletions
|
@ -345,7 +345,7 @@ impl<'a> Iterator for QuerySelectorIterator {
|
|||
type Item = Root<Node>;
|
||||
|
||||
fn next(&mut self) -> Option<Root<Node>> {
|
||||
let selectors = &self.selectors.0;
|
||||
let selectors = &self.selectors;
|
||||
|
||||
// TODO(cgaebel): Is it worth it to build a bloom filter here
|
||||
// (instead of passing `None`)? Probably.
|
||||
|
@ -722,7 +722,7 @@ impl Node {
|
|||
Ok(selectors) => {
|
||||
let mut ctx = MatchingContext::new(MatchingMode::Normal, None);
|
||||
Ok(self.traverse_preorder().filter_map(Root::downcast).find(|element| {
|
||||
matches_selector_list(&selectors.0, element, &mut ctx)
|
||||
matches_selector_list(&selectors, element, &mut ctx)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue