mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
small cleanup
This commit is contained in:
parent
e44f8f5609
commit
d3f92eb339
1 changed files with 2 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
@ -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,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue