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

@ -93,12 +93,12 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTableCellElement> {
match attr.local_name() {
&atom!("bgcolor") => {
self.background_color.set(str::parse_legacy_color(attr.value().as_slice()).ok())
self.background_color.set(str::parse_legacy_color(&attr.value()).ok())
}
&atom!("colspan") => {
self.colspan.set(str::parse_unsigned_integer(attr.value().as_slice().chars()));
self.colspan.set(str::parse_unsigned_integer(attr.value().chars()));
}
&atom!("width") => self.width.set(str::parse_length(attr.value().as_slice())),
&atom!("width") => self.width.set(str::parse_length(&attr.value())),
_ => ()
}
}