зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #12214 - Skip the root node in querySelectorAll (from nox:queryselector); r=Ms2ger
Source-Repo: https://github.com/servo/servo Source-Revision: 3c51290f9e3bb5a1b4118671f24fba219abeabc8
This commit is contained in:
Родитель
a3dd321d7e
Коммит
fb4a37ba95
|
@ -740,7 +740,10 @@ impl Node {
|
|||
Err(()) => Err(Error::Syntax),
|
||||
// Step 3.
|
||||
Ok(selectors) => {
|
||||
Ok(QuerySelectorIterator::new(self.traverse_preorder(), selectors))
|
||||
let mut descendants = self.traverse_preorder();
|
||||
// Skip the root of the tree.
|
||||
assert!(&*descendants.next().unwrap() == self);
|
||||
Ok(QuerySelectorIterator::new(descendants, selectors))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче