mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #6231 - AopicieR:get_elements_by_name, r=Ms2ger
Fixes #1745 Should I adjust the expected result of the corresponding wpt test cases? html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6231) <!-- Reviewable:end -->
This commit is contained in:
commit
bb95e07f8e
3 changed files with 3 additions and 10 deletions
|
@ -1540,6 +1540,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
||||||
Some(element) => element,
|
Some(element) => element,
|
||||||
None => return false,
|
None => return false,
|
||||||
};
|
};
|
||||||
|
if element.namespace() != &ns!(HTML) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
element.get_attribute(&ns!(""), &atom!("name")).root().map_or(false, |attr| {
|
element.get_attribute(&ns!(""), &atom!("name")).root().map_or(false, |attr| {
|
||||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||||
let attr = attr.r();
|
let attr = attr.r();
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[document.getElementsByName-namespace.html]
|
|
||||||
type: testharness
|
|
||||||
[getElementsByName and foreign namespaces]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[document.getElementsByName-namespace.xhtml]
|
|
||||||
type: testharness
|
|
||||||
[getElementsByName and foreign namespaces]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue