Auto merge of #8786 - eefriedman:localname-atom, r=jdm

Remove unnecessary conversion to/from DOMString for localName.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8786)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-03 15:05:22 +05:30
commit 63762d2b52
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> {