mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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 doc = document_from_node(*self);
|
||||||
let base = doc.r().url();
|
let base = doc.r().url();
|
||||||
|
|
||||||
if let Ok(url) = UrlParser::new().base_url(&base).parse(&attr.value()) {
|
*self.background.borrow_mut() = UrlParser::new().base_url(&base).parse(&attr.value()).ok();
|
||||||
*self.background.borrow_mut() = Some(url)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
@ -178,6 +176,7 @@ impl<'a> VirtualMethods for &'a HTMLBodyElement {
|
||||||
|
|
||||||
match attr.local_name() {
|
match attr.local_name() {
|
||||||
&atom!("bgcolor") => self.background_color.set(None),
|
&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