Replace the Str implementation for AttrValue by a Deref implementation.

This commit is contained in:
Ms2ger 2015-04-25 15:24:27 +02:00
parent 4108af0c11
commit 41cc0a939e
16 changed files with 43 additions and 41 deletions

View file

@ -63,7 +63,7 @@ fn get_attr(element: JSRef<Element>, local_name: &Atom) -> Option<String> {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let e = e.r();
let value = e.value();
value.as_slice().to_owned()
(**value).to_owned()
})
}
@ -99,7 +99,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {
match (rel, attr.local_name()) {
(ref rel, &atom!("href")) | (ref rel, &atom!("media")) => {
if is_stylesheet(rel) {
self.handle_stylesheet_url(attr.value().as_slice());
self.handle_stylesheet_url(&attr.value());
}
}
(_, _) => ()