Skip to content

Commit

Permalink
small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpie committed Jun 20, 2015
1 parent e44f8f5 commit d3f92eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/script/dom/htmlbodyelement.rs
Expand Up @@ -162,9 +162,7 @@ impl<'a> VirtualMethods for &'a HTMLBodyElement {
let doc = document_from_node(*self);
let base = doc.r().url();

if let Ok(url) = UrlParser::new().base_url(&base).parse(&attr.value()) {
*self.background.borrow_mut() = Some(url)
}
*self.background.borrow_mut() = UrlParser::new().base_url(&base).parse(&attr.value()).ok();
}
_ => {}
}
Expand All @@ -178,6 +176,7 @@ impl<'a> VirtualMethods for &'a HTMLBodyElement {

match attr.local_name() {
&atom!("bgcolor") => self.background_color.set(None),
&atom!("background") => *self.background.borrow_mut() = None,
_ => {}
}
}
Expand Down

0 comments on commit d3f92eb

Please sign in to comment.