mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
commit
63762d2b52
72 changed files with 202 additions and 153 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue