diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/element.rs | 9 |
1 files changed, 2 insertions, 7 deletions
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<Attr>| { - 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() }) } |