Remove unnecessary conversion to/from DOMString for localName.

This commit is contained in:
Eli Friedman 2015-12-02 13:42:45 -08:00
parent 2be60be062
commit e42dcb3712
72 changed files with 202 additions and 153 deletions

View file

@ -128,7 +128,7 @@ impl HTMLImageElement {
}
}
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement {
fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement {
HTMLImageElement {
htmlelement: HTMLElement::new_inherited(localName, prefix, document),
url: DOMRefCell::new(None),
@ -137,7 +137,7 @@ impl HTMLImageElement {
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString,
pub fn new(localName: Atom,
prefix: Option<DOMString>,
document: &Document) -> Root<HTMLImageElement> {
let element = HTMLImageElement::new_inherited(localName, prefix, document);
@ -148,7 +148,7 @@ impl HTMLImageElement {
width: Option<u32>,
height: Option<u32>) -> Fallible<Root<HTMLImageElement>> {
let document = global.as_window().Document();
let image = HTMLImageElement::new(DOMString::from("img"), None, document.r());
let image = HTMLImageElement::new(atom!("img"), None, document.r());
if let Some(w) = width {
image.SetWidth(w);
}