Replaced DOMString constructor by conversion functions.

Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
This commit is contained in:
Alan Jeffrey 2015-11-11 16:26:53 -06:00
parent 736323a779
commit 84bde75b42
64 changed files with 256 additions and 254 deletions

View file

@ -19,7 +19,6 @@ use dom::node::{Node, document_from_node, window_from_node};
use dom::virtualmethods::VirtualMethods;
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
use std::borrow::ToOwned;
use std::rc::Rc;
use string_cache::Atom;
use time;
@ -179,7 +178,7 @@ impl VirtualMethods for HTMLBodyElement {
let evtarget = window.upcast::<EventTarget>(); // forwarded event
evtarget.set_event_handler_uncompiled(cx, url, reflector,
&name[2..],
DOMString((**attr.value()).to_owned()));
DOMString::from((**attr.value()).to_owned()));
false
}
_ => true, // HTMLElement::attribute_mutated will take care of this.