aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbodyelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlbodyelement.rs')
-rw-r--r--components/script/dom/htmlbodyelement.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index 536e3759fb3..b5408d877ac 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -9,6 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyEle
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::js::{LayoutJS, Root};
+use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
use dom::eventtarget::EventTarget;
@@ -19,7 +20,6 @@ use script_traits::ScriptMsg as ConstellationMsg;
use string_cache::Atom;
use time;
use url::Url;
-use util::str::DOMString;
/// How long we should wait before performing the initial reflow after `<body>` is parsed, in
/// nanoseconds.
@@ -141,8 +141,10 @@ impl VirtualMethods for HTMLBodyElement {
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match *name {
atom!("bgcolor") |
- atom!("text") => AttrValue::from_legacy_color(value),
- atom!("background") => AttrValue::from_url(document_from_node(self).url(), value),
+ atom!("text") => AttrValue::from_legacy_color(value.into()),
+ atom!("background") => {
+ AttrValue::from_url(document_from_node(self).url(), value.into())
+ },
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}