mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Don't include the root element when calling Element#getElementsByTagNameNS.
This commit is contained in:
parent
758d79fff4
commit
5913ba983b
2 changed files with 4 additions and 8 deletions
|
@ -119,7 +119,10 @@ impl HTMLCollection {
|
|||
namespace_filter: Option<Namespace>
|
||||
}
|
||||
impl CollectionFilter for TagNameNSFilter {
|
||||
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
|
||||
}
|
||||
let ns_match = match self.namespace_filter {
|
||||
Some(ref namespace) => {
|
||||
*elem.namespace() == *namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue