mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove unnecessary conversion to/from DOMString for localName.
This commit is contained in:
parent
2be60be062
commit
e42dcb3712
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