diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 06eae2592c7..88366f591d2 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -221,13 +221,8 @@ impl RawLayoutElementHelpers for Element { #[inline] unsafe fn get_classes_for_layout(&self) -> Option<&'static [Atom]> { - let attrs = self.attrs.borrow_for_layout(); - (*attrs).iter().find(|attr: & &JS| { - let attr = attr.to_layout().unsafe_get(); - (*attr).local_name_atom_forever() == atom!("class") - }).and_then(|attr| { - let attr = attr.to_layout().unsafe_get(); - (*attr).value_tokens_forever() + get_attr_for_layout(self, &ns!(""), &atom!("class")).map(|attr| { + (*attr.unsafe_get()).value_tokens_forever().unwrap() }) } diff --git a/tests/wpt/mozilla/meta/css/class-namespaces.html.ini b/tests/wpt/mozilla/meta/css/class-namespaces.html.ini deleted file mode 100644 index abf49ed322c..00000000000 --- a/tests/wpt/mozilla/meta/css/class-namespaces.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[class-namespaces.html] - type: reftest - expected: FAIL