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

@ -126,20 +126,20 @@ impl Element {
}
pub fn new_inherited(local_name: DOMString,
pub fn new_inherited(local_name: Atom,
namespace: Namespace, prefix: Option<DOMString>,
document: &Document) -> Element {
Element::new_inherited_with_state(ElementState::empty(), local_name,
namespace, prefix, document)
}
pub fn new_inherited_with_state(state: ElementState, local_name: DOMString,
pub fn new_inherited_with_state(state: ElementState, local_name: Atom,
namespace: Namespace, prefix: Option<DOMString>,
document: &Document)
-> Element {
Element {
node: Node::new_inherited(document),
local_name: Atom::from(&*local_name),
local_name: local_name,
namespace: namespace,
prefix: prefix,
attrs: DOMRefCell::new(vec![]),
@ -151,7 +151,7 @@ impl Element {
}
}
pub fn new(local_name: DOMString,
pub fn new(local_name: Atom,
namespace: Namespace,
prefix: Option<DOMString>,
document: &Document) -> Root<Element> {