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:
bors-servo 2015-06-03 04:14:18 -05:00
commit bb95e07f8e
3 changed files with 3 additions and 10 deletions

View file

@ -1540,6 +1540,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
Some(element) => element,
None => return false,
};
if element.namespace() != &ns!(HTML) {
return false;
}
element.get_attribute(&ns!(""), &atom!("name")).root().map_or(false, |attr| {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();

View file

@ -1,5 +0,0 @@
[document.getElementsByName-namespace.html]
type: testharness
[getElementsByName and foreign namespaces]
expected: FAIL

View file

@ -1,5 +0,0 @@
[document.getElementsByName-namespace.xhtml]
type: testharness
[getElementsByName and foreign namespaces]
expected: FAIL