auto merge of #4030 : achals/servo/master, r=Ms2ger

https://github.com/servo/servo/issues/3995

This is my first PR, so please let me know if I'm doing something wrong!
This commit is contained in:
bors-servo 2014-11-18 08:45:35 -07:00
commit 8cecb03d75
4 changed files with 2 additions and 17 deletions

View file

@ -140,8 +140,8 @@ impl HTMLCollection {
classes: Vec<Atom>
}
impl CollectionFilter for ClassNameFilter {
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
self.classes.iter().all(|class| elem.has_class(class))
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
(NodeCast::from_ref(elem) != root) && self.classes.iter().all(|class| elem.has_class(class))
}
}
let filter = ClassNameFilter {

View file

@ -1,5 +0,0 @@
[getElementsByClassName-12.htm]
type: testharness
[element.getElementsByClassName(): simple]
expected: FAIL

View file

@ -1,5 +0,0 @@
[getElementsByClassName-13.htm]
type: testharness
[element.getElementsByClassName(): adding an element]
expected: FAIL

View file

@ -1,5 +0,0 @@
[getElementsByClassName-18.htm]
type: testharness
[element.getElementsByClassName(array): "a", "b"]
expected: FAIL