mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Follow-up to work done in #4304.
all_elements should ignore root as well.
This commit is contained in:
parent
5913ba983b
commit
b30cdb8a5c
3 changed files with 4 additions and 12 deletions
|
@ -62,7 +62,10 @@ impl HTMLCollection {
|
|||
namespace_filter: Option<Namespace>
|
||||
}
|
||||
impl CollectionFilter for AllElementFilter {
|
||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
|
||||
if NodeCast::from_ref(elem) == root {
|
||||
return false
|
||||
}
|
||||
match self.namespace_filter {
|
||||
None => true,
|
||||
Some(ref namespace) => *elem.namespace() == *namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue