mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +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>
|
namespace_filter: Option<Namespace>
|
||||||
}
|
}
|
||||||
impl CollectionFilter for TagNameNSFilter {
|
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 {
|
let ns_match = match self.namespace_filter {
|
||||||
Some(ref namespace) => {
|
Some(ref namespace) => {
|
||||||
*elem.namespace() == *namespace
|
*elem.namespace() == *namespace
|
||||||
|
|
|
@ -5,10 +5,3 @@
|
||||||
|
|
||||||
[getElementsByTagNameNS(\'*\', \'*\')]
|
[getElementsByTagNameNS(\'*\', \'*\')]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Matching the context object (wildcard namespace)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Matching the context object (specific namespace)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue