mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -54,12 +54,12 @@ impl PartialEq for HTMLElement {
|
|||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn new_inherited(tag_name: DOMString, prefix: Option<DOMString>,
|
||||
pub fn new_inherited(tag_name: Atom, prefix: Option<DOMString>,
|
||||
document: &Document) -> HTMLElement {
|
||||
HTMLElement::new_inherited_with_state(ElementState::empty(), tag_name, prefix, document)
|
||||
}
|
||||
|
||||
pub fn new_inherited_with_state(state: ElementState, tag_name: DOMString,
|
||||
pub fn new_inherited_with_state(state: ElementState, tag_name: Atom,
|
||||
prefix: Option<DOMString>, document: &Document)
|
||||
-> HTMLElement {
|
||||
HTMLElement {
|
||||
|
@ -71,7 +71,7 @@ impl HTMLElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> {
|
||||
pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> {
|
||||
let element = HTMLElement::new_inherited(localName, prefix, document);
|
||||
Node::reflect_node(box element, document, HTMLElementBinding::Wrap)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue