Use DOMString more consistently.

This commit is contained in:
Ms2ger 2014-02-13 19:32:59 +01:00
parent a0a61fe976
commit 0f5c9a35b9
76 changed files with 161 additions and 146 deletions

View file

@ -11,11 +11,11 @@ use dom::node::{Node, NodeTypeId};
pub struct CharacterData { pub struct CharacterData {
node: Node, node: Node,
data: ~str data: DOMString,
} }
impl CharacterData { impl CharacterData {
pub fn new_inherited(id: NodeTypeId, data: ~str, document: AbstractDocument) -> CharacterData { pub fn new_inherited(id: NodeTypeId, data: DOMString, document: AbstractDocument) -> CharacterData {
CharacterData { CharacterData {
node: Node::new_inherited(id, document), node: Node::new_inherited(id, document),
data: data data: data

View file

@ -15,13 +15,13 @@ pub struct Comment {
} }
impl Comment { impl Comment {
pub fn new_inherited(text: ~str, document: AbstractDocument) -> Comment { pub fn new_inherited(text: DOMString, document: AbstractDocument) -> Comment {
Comment { Comment {
element: CharacterData::new_inherited(CommentNodeTypeId, text, document) element: CharacterData::new_inherited(CommentNodeTypeId, text, document)
} }
} }
pub fn new(text: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(text: DOMString, document: AbstractDocument) -> AbstractNode {
let node = Comment::new_inherited(text, document); let node = Comment::new_inherited(text, document);
Node::reflect_node(@mut node, document, CommentBinding::Wrap) Node::reflect_node(@mut node, document, CommentBinding::Wrap)
} }

View file

@ -132,7 +132,7 @@ pub struct Event {
reflector_: Reflector, reflector_: Reflector,
current_target: Option<AbstractEventTarget>, current_target: Option<AbstractEventTarget>,
target: Option<AbstractEventTarget>, target: Option<AbstractEventTarget>,
type_: ~str, type_: DOMString,
phase: EventPhase, phase: EventPhase,
default_prevented: bool, default_prevented: bool,
stop_propagation: bool, stop_propagation: bool,

View file

@ -36,7 +36,7 @@ struct EventListenerEntry {
pub struct EventTarget { pub struct EventTarget {
type_id: EventTargetTypeId, type_id: EventTargetTypeId,
reflector_: Reflector, reflector_: Reflector,
handlers: HashMap<~str, ~[EventListenerEntry]>, handlers: HashMap<DOMString, ~[EventListenerEntry]>,
} }
pub struct AbstractEventTarget { pub struct AbstractEventTarget {

View file

@ -17,7 +17,7 @@ enum FormDatum {
} }
pub struct FormData { pub struct FormData {
data: HashMap<~str, FormDatum>, data: HashMap<DOMString, FormDatum>,
reflector_: Reflector, reflector_: Reflector,
window: @mut Window, window: @mut Window,
form: Option<AbstractNode> form: Option<AbstractNode>

View file

@ -14,13 +14,13 @@ pub struct HTMLAnchorElement {
} }
impl HTMLAnchorElement { impl HTMLAnchorElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAnchorElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAnchorElement {
HTMLAnchorElement { HTMLAnchorElement {
htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLAnchorElement::new_inherited(localName, document); let element = HTMLAnchorElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLAnchorElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLAnchorElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLAppletElement {
} }
impl HTMLAppletElement { impl HTMLAppletElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAppletElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAppletElement {
HTMLAppletElement { HTMLAppletElement {
htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLAppletElement::new_inherited(localName, document); let element = HTMLAppletElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLAppletElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLAppletElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLAreaElement {
} }
impl HTMLAreaElement { impl HTMLAreaElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAreaElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAreaElement {
HTMLAreaElement { HTMLAreaElement {
htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLAreaElement::new_inherited(localName, document); let element = HTMLAreaElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLAreaElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLAreaElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLAudioElementBinding; use dom::bindings::codegen::HTMLAudioElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLAudioElementTypeId; use dom::element::HTMLAudioElementTypeId;
use dom::htmlmediaelement::HTMLMediaElement; use dom::htmlmediaelement::HTMLMediaElement;
@ -13,13 +14,13 @@ pub struct HTMLAudioElement {
} }
impl HTMLAudioElement { impl HTMLAudioElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAudioElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLAudioElement {
HTMLAudioElement { HTMLAudioElement {
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, document) htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLAudioElement::new_inherited(localName, document); let element = HTMLAudioElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLAudioElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLAudioElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLBaseElement {
} }
impl HTMLBaseElement { impl HTMLBaseElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBaseElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLBaseElement {
HTMLBaseElement { HTMLBaseElement {
htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLBaseElement::new_inherited(localName, document); let element = HTMLBaseElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLBaseElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLBaseElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLBodyElement {
} }
impl HTMLBodyElement { impl HTMLBodyElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBodyElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLBodyElement {
HTMLBodyElement { HTMLBodyElement {
htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLBodyElement::new_inherited(localName, document); let element = HTMLBodyElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLBodyElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLBodyElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLBRElement {
} }
impl HTMLBRElement { impl HTMLBRElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLBRElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLBRElement {
HTMLBRElement { HTMLBRElement {
htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLBRElement::new_inherited(localName, document); let element = HTMLBRElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLBRElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLBRElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct HTMLButtonElement {
} }
impl HTMLButtonElement { impl HTMLButtonElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLButtonElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLButtonElement {
HTMLButtonElement { HTMLButtonElement {
htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLButtonElement::new_inherited(localName, document); let element = HTMLButtonElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLButtonElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLButtonElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLCanvasElementBinding; use dom::bindings::codegen::HTMLCanvasElementBinding;
use dom::bindings::utils::DOMString;
use dom::bindings::utils::{ErrorResult}; use dom::bindings::utils::{ErrorResult};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLCanvasElementTypeId; use dom::element::HTMLCanvasElementTypeId;
@ -14,13 +15,13 @@ pub struct HTMLCanvasElement {
} }
impl HTMLCanvasElement { impl HTMLCanvasElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLCanvasElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLCanvasElement {
HTMLCanvasElement { HTMLCanvasElement {
htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLCanvasElement::new_inherited(localName, document); let element = HTMLCanvasElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLCanvasElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLCanvasElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLDataElement {
} }
impl HTMLDataElement { impl HTMLDataElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDataElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDataElement {
HTMLDataElement { HTMLDataElement {
htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLDataElement::new_inherited(localName, document); let element = HTMLDataElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLDataElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLDataElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLDataListElementBinding; use dom::bindings::codegen::HTMLDataListElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLDataListElementTypeId; use dom::element::HTMLDataListElementTypeId;
use dom::htmlcollection::HTMLCollection; use dom::htmlcollection::HTMLCollection;
@ -14,13 +15,13 @@ pub struct HTMLDataListElement {
} }
impl HTMLDataListElement { impl HTMLDataListElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDataListElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDataListElement {
HTMLDataListElement { HTMLDataListElement {
htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLDataListElement::new_inherited(localName, document); let element = HTMLDataListElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLDataListElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLDataListElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLDirectoryElementBinding; use dom::bindings::codegen::HTMLDirectoryElementBinding;
use dom::bindings::utils::DOMString;
use dom::bindings::utils::ErrorResult; use dom::bindings::utils::ErrorResult;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLDirectoryElementTypeId; use dom::element::HTMLDirectoryElementTypeId;
@ -14,13 +15,13 @@ pub struct HTMLDirectoryElement {
} }
impl HTMLDirectoryElement { impl HTMLDirectoryElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDirectoryElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDirectoryElement {
HTMLDirectoryElement { HTMLDirectoryElement {
htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLDirectoryElement::new_inherited(localName, document); let element = HTMLDirectoryElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLDirectoryElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLDirectoryElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLDivElement {
} }
impl HTMLDivElement { impl HTMLDivElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDivElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDivElement {
HTMLDivElement { HTMLDivElement {
htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLDivElement::new_inherited(localName, document); let element = HTMLDivElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLDivElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLDivElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLDListElement {
} }
impl HTMLDListElement { impl HTMLDListElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLDListElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLDListElement {
HTMLDListElement { HTMLDListElement {
htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLDListElement::new_inherited(localName, document); let element = HTMLDListElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLDListElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLDListElementBinding::Wrap)
} }

View file

@ -16,13 +16,13 @@ pub struct HTMLElement {
} }
impl HTMLElement { impl HTMLElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLElement { pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: AbstractDocument) -> HTMLElement {
HTMLElement { HTMLElement {
element: Element::new_inherited(type_id, tag_name, namespace::HTML, document) element: Element::new_inherited(type_id, tag_name, namespace::HTML, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document); let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document);
Node::reflect_node(@mut element, document, HTMLElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLEmbedElement {
} }
impl HTMLEmbedElement { impl HTMLEmbedElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLEmbedElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLEmbedElement {
HTMLEmbedElement { HTMLEmbedElement {
htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLEmbedElement::new_inherited(localName, document); let element = HTMLEmbedElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLEmbedElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLEmbedElementBinding::Wrap)
} }

View file

@ -16,13 +16,13 @@ pub struct HTMLFieldSetElement {
} }
impl HTMLFieldSetElement { impl HTMLFieldSetElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFieldSetElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFieldSetElement {
HTMLFieldSetElement { HTMLFieldSetElement {
htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLFieldSetElement::new_inherited(localName, document); let element = HTMLFieldSetElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLFieldSetElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLFieldSetElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLFontElement {
} }
impl HTMLFontElement { impl HTMLFontElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFontElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFontElement {
HTMLFontElement { HTMLFontElement {
htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLFontElement::new_inherited(localName, document); let element = HTMLFontElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLFontElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLFontElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct HTMLFormElement {
} }
impl HTMLFormElement { impl HTMLFormElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFormElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFormElement {
HTMLFormElement { HTMLFormElement {
htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLFormElement::new_inherited(localName, document); let element = HTMLFormElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLFormElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLFormElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct HTMLFrameElement {
} }
impl HTMLFrameElement { impl HTMLFrameElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFrameElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFrameElement {
HTMLFrameElement { HTMLFrameElement {
htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLFrameElement::new_inherited(localName, document); let element = HTMLFrameElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLFrameElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLFrameElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLFrameSetElement {
} }
impl HTMLFrameSetElement { impl HTMLFrameSetElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFrameSetElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLFrameSetElement {
HTMLFrameSetElement { HTMLFrameSetElement {
htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLFrameSetElement::new_inherited(localName, document); let element = HTMLFrameSetElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLFrameSetElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLFrameSetElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLHeadElementBinding; use dom::bindings::codegen::HTMLHeadElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLHeadElementTypeId; use dom::element::HTMLHeadElementTypeId;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -13,13 +14,13 @@ pub struct HTMLHeadElement {
} }
impl HTMLHeadElement { impl HTMLHeadElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLHeadElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLHeadElement {
HTMLHeadElement { HTMLHeadElement {
htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLHeadElement::new_inherited(localName, document); let element = HTMLHeadElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLHeadElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLHeadElementBinding::Wrap)
} }

View file

@ -24,14 +24,14 @@ pub struct HTMLHeadingElement {
} }
impl HTMLHeadingElement { impl HTMLHeadingElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument, level: HeadingLevel) -> HTMLHeadingElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument, level: HeadingLevel) -> HTMLHeadingElement {
HTMLHeadingElement { HTMLHeadingElement {
htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, document), htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, document),
level: level, level: level,
} }
} }
pub fn new(localName: ~str, document: AbstractDocument, level: HeadingLevel) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument, level: HeadingLevel) -> AbstractNode {
let element = HTMLHeadingElement::new_inherited(localName, document, level); let element = HTMLHeadingElement::new_inherited(localName, document, level);
Node::reflect_node(@mut element, document, HTMLHeadingElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLHeadingElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLHRElement {
} }
impl HTMLHRElement { impl HTMLHRElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLHRElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLHRElement {
HTMLHRElement { HTMLHRElement {
htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLHRElement::new_inherited(localName, document); let element = HTMLHRElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLHRElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLHRElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLHtmlElement {
} }
impl HTMLHtmlElement { impl HTMLHtmlElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLHtmlElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLHtmlElement {
HTMLHtmlElement { HTMLHtmlElement {
htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLHtmlElement::new_inherited(localName, document); let element = HTMLHtmlElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLHtmlElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLHtmlElementBinding::Wrap)
} }

View file

@ -43,7 +43,7 @@ impl HTMLIFrameElement {
} }
impl HTMLIFrameElement { impl HTMLIFrameElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLIFrameElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLIFrameElement {
HTMLIFrameElement { HTMLIFrameElement {
htmlelement: HTMLElement::new_inherited(HTMLIframeElementTypeId, localName, document), htmlelement: HTMLElement::new_inherited(HTMLIframeElementTypeId, localName, document),
frame: None, frame: None,
@ -52,7 +52,7 @@ impl HTMLIFrameElement {
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLIFrameElement::new_inherited(localName, document); let element = HTMLIFrameElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLIFrameElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLIFrameElementBinding::Wrap)
} }

View file

@ -22,14 +22,14 @@ pub struct HTMLImageElement {
} }
impl HTMLImageElement { impl HTMLImageElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLImageElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLImageElement {
HTMLImageElement { HTMLImageElement {
htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, document), htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, document),
image: None, image: None,
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLImageElement::new_inherited(localName, document); let element = HTMLImageElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLImageElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLImageElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLInputElement {
} }
impl HTMLInputElement { impl HTMLInputElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLInputElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLInputElement {
HTMLInputElement { HTMLInputElement {
htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLInputElement::new_inherited(localName, document); let element = HTMLInputElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLInputElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLInputElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLLabelElement {
} }
impl HTMLLabelElement { impl HTMLLabelElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLabelElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLabelElement {
HTMLLabelElement { HTMLLabelElement {
htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLLabelElement::new_inherited(localName, document); let element = HTMLLabelElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLLabelElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLLabelElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLLegendElement {
} }
impl HTMLLegendElement { impl HTMLLegendElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLegendElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLegendElement {
HTMLLegendElement { HTMLLegendElement {
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLLegendElement::new_inherited(localName, document); let element = HTMLLegendElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLLegendElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLLegendElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLLIElement {
} }
impl HTMLLIElement { impl HTMLLIElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLIElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLIElement {
HTMLLIElement { HTMLLIElement {
htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLLIElement::new_inherited(localName, document); let element = HTMLLIElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLLIElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLLIElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLLinkElement {
} }
impl HTMLLinkElement { impl HTMLLinkElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLLinkElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLLinkElement {
HTMLLinkElement { HTMLLinkElement {
htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLLinkElement::new_inherited(localName, document); let element = HTMLLinkElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLLinkElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLLinkElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLMainElementBinding; use dom::bindings::codegen::HTMLMainElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLMainElementTypeId; use dom::element::HTMLMainElementTypeId;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -13,13 +14,13 @@ pub struct HTMLMainElement {
} }
impl HTMLMainElement { impl HTMLMainElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMainElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMainElement {
HTMLMainElement { HTMLMainElement {
htmlelement: HTMLElement::new_inherited(HTMLMainElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLMainElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLMainElement::new_inherited(localName, document); let element = HTMLMainElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLMainElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLMainElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct HTMLMapElement {
} }
impl HTMLMapElement { impl HTMLMapElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMapElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMapElement {
HTMLMapElement { HTMLMapElement {
htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLMapElement::new_inherited(localName, document); let element = HTMLMapElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLMapElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLMapElementBinding::Wrap)
} }

View file

@ -12,7 +12,7 @@ pub struct HTMLMediaElement {
} }
impl HTMLMediaElement { impl HTMLMediaElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLMediaElement { pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: AbstractDocument) -> HTMLMediaElement {
HTMLMediaElement { HTMLMediaElement {
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document) htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLMetaElement {
} }
impl HTMLMetaElement { impl HTMLMetaElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMetaElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMetaElement {
HTMLMetaElement { HTMLMetaElement {
htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLMetaElement::new_inherited(localName, document); let element = HTMLMetaElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLMetaElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLMetaElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLMeterElementBinding; use dom::bindings::codegen::HTMLMeterElementBinding;
use dom::bindings::utils::DOMString;
use dom::bindings::utils::ErrorResult; use dom::bindings::utils::ErrorResult;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLMeterElementTypeId; use dom::element::HTMLMeterElementTypeId;
@ -14,13 +15,13 @@ pub struct HTMLMeterElement {
} }
impl HTMLMeterElement { impl HTMLMeterElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLMeterElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLMeterElement {
HTMLMeterElement { HTMLMeterElement {
htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLMeterElement::new_inherited(localName, document); let element = HTMLMeterElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLMeterElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLMeterElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLModElement {
} }
impl HTMLModElement { impl HTMLModElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLModElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLModElement {
HTMLModElement { HTMLModElement {
htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLModElement::new_inherited(localName, document); let element = HTMLModElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLModElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLModElementBinding::Wrap)
} }

View file

@ -16,13 +16,13 @@ pub struct HTMLObjectElement {
} }
impl HTMLObjectElement { impl HTMLObjectElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLObjectElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLObjectElement {
HTMLObjectElement { HTMLObjectElement {
htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLObjectElement::new_inherited(localName, document); let element = HTMLObjectElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLObjectElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLObjectElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLOListElement {
} }
impl HTMLOListElement { impl HTMLOListElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOListElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOListElement {
HTMLOListElement { HTMLOListElement {
htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLOListElement::new_inherited(localName, document); let element = HTMLOListElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLOListElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLOListElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLOptGroupElement {
} }
impl HTMLOptGroupElement { impl HTMLOptGroupElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOptGroupElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOptGroupElement {
HTMLOptGroupElement { HTMLOptGroupElement {
htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLOptGroupElement::new_inherited(localName, document); let element = HTMLOptGroupElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLOptGroupElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLOptGroupElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLOptionElement {
} }
impl HTMLOptionElement { impl HTMLOptionElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOptionElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOptionElement {
HTMLOptionElement { HTMLOptionElement {
htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLOptionElement::new_inherited(localName, document); let element = HTMLOptionElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLOptionElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLOptionElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct HTMLOutputElement {
} }
impl HTMLOutputElement { impl HTMLOutputElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLOutputElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLOutputElement {
HTMLOutputElement { HTMLOutputElement {
htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLOutputElement::new_inherited(localName, document); let element = HTMLOutputElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLOutputElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLOutputElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLParagraphElement {
} }
impl HTMLParagraphElement { impl HTMLParagraphElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParagraphElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLParagraphElement {
HTMLParagraphElement { HTMLParagraphElement {
htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLParagraphElement::new_inherited(localName, document); let element = HTMLParagraphElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLParagraphElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLParagraphElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLParamElement {
} }
impl HTMLParamElement { impl HTMLParamElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParamElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLParamElement {
HTMLParamElement { HTMLParamElement {
htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLParamElement::new_inherited(localName, document); let element = HTMLParamElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLParamElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLParamElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLPreElementBinding; use dom::bindings::codegen::HTMLPreElementBinding;
use dom::bindings::utils::DOMString;
use dom::bindings::utils::{ErrorResult}; use dom::bindings::utils::{ErrorResult};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLPreElementTypeId; use dom::element::HTMLPreElementTypeId;
@ -14,13 +15,13 @@ pub struct HTMLPreElement {
} }
impl HTMLPreElement { impl HTMLPreElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLPreElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLPreElement {
HTMLPreElement { HTMLPreElement {
htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLPreElement::new_inherited(localName, document); let element = HTMLPreElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLPreElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLPreElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLProgressElementBinding; use dom::bindings::codegen::HTMLProgressElementBinding;
use dom::bindings::utils::DOMString;
use dom::bindings::utils::{ErrorResult, Fallible}; use dom::bindings::utils::{ErrorResult, Fallible};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLProgressElementTypeId; use dom::element::HTMLProgressElementTypeId;
@ -14,13 +15,13 @@ pub struct HTMLProgressElement {
} }
impl HTMLProgressElement { impl HTMLProgressElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLProgressElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLProgressElement {
HTMLProgressElement { HTMLProgressElement {
htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLProgressElement::new_inherited(localName, document); let element = HTMLProgressElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLProgressElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLProgressElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLQuoteElement {
} }
impl HTMLQuoteElement { impl HTMLQuoteElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLQuoteElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLQuoteElement {
HTMLQuoteElement { HTMLQuoteElement {
htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLQuoteElement::new_inherited(localName, document); let element = HTMLQuoteElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLQuoteElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLQuoteElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLScriptElement {
} }
impl HTMLScriptElement { impl HTMLScriptElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLScriptElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLScriptElement {
HTMLScriptElement { HTMLScriptElement {
htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLScriptElement::new_inherited(localName, document); let element = HTMLScriptElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLScriptElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLScriptElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct HTMLSelectElement {
} }
impl HTMLSelectElement { impl HTMLSelectElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSelectElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLSelectElement {
HTMLSelectElement { HTMLSelectElement {
htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLSelectElement::new_inherited(localName, document); let element = HTMLSelectElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLSelectElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLSelectElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLSourceElement {
} }
impl HTMLSourceElement { impl HTMLSourceElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSourceElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLSourceElement {
HTMLSourceElement { HTMLSourceElement {
htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLSourceElement::new_inherited(localName, document); let element = HTMLSourceElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLSourceElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLSourceElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLSpanElementBinding; use dom::bindings::codegen::HTMLSpanElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLSpanElementTypeId; use dom::element::HTMLSpanElementTypeId;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -13,13 +14,13 @@ pub struct HTMLSpanElement {
} }
impl HTMLSpanElement { impl HTMLSpanElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSpanElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLSpanElement {
HTMLSpanElement { HTMLSpanElement {
htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLSpanElement::new_inherited(localName, document); let element = HTMLSpanElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLSpanElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLSpanElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLStyleElement {
} }
impl HTMLStyleElement { impl HTMLStyleElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLStyleElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLStyleElement {
HTMLStyleElement { HTMLStyleElement {
htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLStyleElement::new_inherited(localName, document); let element = HTMLStyleElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLStyleElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLStyleElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTableCaptionElement {
} }
impl HTMLTableCaptionElement { impl HTMLTableCaptionElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableCaptionElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableCaptionElement {
HTMLTableCaptionElement { HTMLTableCaptionElement {
htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableCaptionElement::new_inherited(localName, document); let element = HTMLTableCaptionElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableCaptionElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableCaptionElementBinding::Wrap)
} }

View file

@ -12,7 +12,7 @@ pub struct HTMLTableCellElement {
} }
impl HTMLTableCellElement { impl HTMLTableCellElement {
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLTableCellElement { pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: AbstractDocument) -> HTMLTableCellElement {
HTMLTableCellElement { HTMLTableCellElement {
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document) htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTableColElement {
} }
impl HTMLTableColElement { impl HTMLTableColElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableColElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableColElement {
HTMLTableColElement { HTMLTableColElement {
htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableColElement::new_inherited(localName, document); let element = HTMLTableColElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableColElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableColElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLTableDataCellElementBinding; use dom::bindings::codegen::HTMLTableDataCellElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLTableDataCellElementTypeId; use dom::element::HTMLTableDataCellElementTypeId;
use dom::htmltablecellelement::HTMLTableCellElement; use dom::htmltablecellelement::HTMLTableCellElement;
@ -13,13 +14,13 @@ pub struct HTMLTableDataCellElement {
} }
impl HTMLTableDataCellElement { impl HTMLTableDataCellElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableDataCellElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableDataCellElement {
HTMLTableDataCellElement { HTMLTableDataCellElement {
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, document) htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableDataCellElement::new_inherited(localName, document); let element = HTMLTableDataCellElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableDataCellElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableDataCellElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTableElement {
} }
impl HTMLTableElement { impl HTMLTableElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableElement {
HTMLTableElement { HTMLTableElement {
htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableElement::new_inherited(localName, document); let element = HTMLTableElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLTableHeaderCellElementBinding; use dom::bindings::codegen::HTMLTableHeaderCellElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLTableHeaderCellElementTypeId; use dom::element::HTMLTableHeaderCellElementTypeId;
use dom::htmltablecellelement::HTMLTableCellElement; use dom::htmltablecellelement::HTMLTableCellElement;
@ -13,13 +14,13 @@ pub struct HTMLTableHeaderCellElement {
} }
impl HTMLTableHeaderCellElement { impl HTMLTableHeaderCellElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableHeaderCellElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableHeaderCellElement {
HTMLTableHeaderCellElement { HTMLTableHeaderCellElement {
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, document) htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableHeaderCellElement::new_inherited(localName, document); let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableHeaderCellElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableHeaderCellElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTableRowElement {
} }
impl HTMLTableRowElement { impl HTMLTableRowElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableRowElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableRowElement {
HTMLTableRowElement { HTMLTableRowElement {
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableRowElement::new_inherited(localName, document); let element = HTMLTableRowElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableRowElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableRowElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTableSectionElement {
} }
impl HTMLTableSectionElement { impl HTMLTableSectionElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableSectionElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTableSectionElement {
HTMLTableSectionElement { HTMLTableSectionElement {
htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTableSectionElement::new_inherited(localName, document); let element = HTMLTableSectionElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTableSectionElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTableSectionElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLTemplateElementBinding; use dom::bindings::codegen::HTMLTemplateElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLTemplateElementTypeId; use dom::element::HTMLTemplateElementTypeId;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -13,13 +14,13 @@ pub struct HTMLTemplateElement {
} }
impl HTMLTemplateElement { impl HTMLTemplateElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTemplateElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTemplateElement {
HTMLTemplateElement { HTMLTemplateElement {
htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTemplateElement::new_inherited(localName, document); let element = HTMLTemplateElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTemplateElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTemplateElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTextAreaElement {
} }
impl HTMLTextAreaElement { impl HTMLTextAreaElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTextAreaElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTextAreaElement {
HTMLTextAreaElement { HTMLTextAreaElement {
htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTextAreaElement::new_inherited(localName, document); let element = HTMLTextAreaElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTextAreaElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTextAreaElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTimeElement {
} }
impl HTMLTimeElement { impl HTMLTimeElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTimeElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTimeElement {
HTMLTimeElement { HTMLTimeElement {
htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTimeElement::new_inherited(localName, document); let element = HTMLTimeElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTimeElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTimeElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTitleElement {
} }
impl HTMLTitleElement { impl HTMLTitleElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTitleElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTitleElement {
HTMLTitleElement { HTMLTitleElement {
htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTitleElement::new_inherited(localName, document); let element = HTMLTitleElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTitleElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTitleElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLTrackElement {
} }
impl HTMLTrackElement { impl HTMLTrackElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTrackElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLTrackElement {
HTMLTrackElement { HTMLTrackElement {
htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLTrackElement::new_inherited(localName, document); let element = HTMLTrackElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLTrackElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLTrackElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLUListElement {
} }
impl HTMLUListElement { impl HTMLUListElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLUListElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLUListElement {
HTMLUListElement { HTMLUListElement {
htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLUListElement::new_inherited(localName, document); let element = HTMLUListElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLUListElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLUListElementBinding::Wrap)
} }

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLUnknownElementBinding; use dom::bindings::codegen::HTMLUnknownElementBinding;
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::HTMLUnknownElementTypeId; use dom::element::HTMLUnknownElementTypeId;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -13,13 +14,13 @@ pub struct HTMLUnknownElement {
} }
impl HTMLUnknownElement { impl HTMLUnknownElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLUnknownElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLUnknownElement {
HTMLUnknownElement { HTMLUnknownElement {
htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, document) htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLUnknownElement::new_inherited(localName, document); let element = HTMLUnknownElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLUnknownElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLUnknownElementBinding::Wrap)
} }

View file

@ -14,13 +14,13 @@ pub struct HTMLVideoElement {
} }
impl HTMLVideoElement { impl HTMLVideoElement {
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLVideoElement { pub fn new_inherited(localName: DOMString, document: AbstractDocument) -> HTMLVideoElement {
HTMLVideoElement { HTMLVideoElement {
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, document) htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, document)
} }
} }
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(localName: DOMString, document: AbstractDocument) -> AbstractNode {
let element = HTMLVideoElement::new_inherited(localName, document); let element = HTMLVideoElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLVideoElementBinding::Wrap) Node::reflect_node(@mut element, document, HTMLVideoElementBinding::Wrap)
} }

View file

@ -15,13 +15,13 @@ pub struct Text {
} }
impl Text { impl Text {
pub fn new_inherited(text: ~str, document: AbstractDocument) -> Text { pub fn new_inherited(text: DOMString, document: AbstractDocument) -> Text {
Text { Text {
element: CharacterData::new_inherited(TextNodeTypeId, text, document) element: CharacterData::new_inherited(TextNodeTypeId, text, document)
} }
} }
pub fn new(text: ~str, document: AbstractDocument) -> AbstractNode { pub fn new(text: DOMString, document: AbstractDocument) -> AbstractNode {
let node = Text::new_inherited(text, document); let node = Text::new_inherited(text, document);
Node::reflect_node(@mut node, document, TextBinding::Wrap) Node::reflect_node(@mut node, document, TextBinding::Wrap)
} }

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::DOMString;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::element::{HTMLLinkElementTypeId, HTMLIframeElementTypeId, HTMLImageElementTypeId}; use dom::element::{HTMLLinkElementTypeId, HTMLIframeElementTypeId, HTMLImageElementTypeId};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -159,7 +160,7 @@ fn js_script_listener(to_parent: SharedChan<HtmlDiscoveryMessage>,
// Silly macros to handle constructing DOM nodes. This produces bad code and should be optimized // Silly macros to handle constructing DOM nodes. This produces bad code and should be optimized
// via atomization (issue #85). // via atomization (issue #85).
pub fn build_element_from_tag(tag: ~str, document: AbstractDocument) -> AbstractNode { pub fn build_element_from_tag(tag: DOMString, document: AbstractDocument) -> AbstractNode {
// TODO (Issue #85): use atoms // TODO (Issue #85): use atoms
handle_element!(document, tag, "a", HTMLAnchorElement); handle_element!(document, tag, "a", HTMLAnchorElement);
handle_element!(document, tag, "applet", HTMLAppletElement); handle_element!(document, tag, "applet", HTMLAppletElement);