mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Take the prefix from createElementNS into account for HTML elements
Fixes #3139
This commit is contained in:
parent
0549ed3c67
commit
3a5a66d54e
73 changed files with 405 additions and 477 deletions
|
@ -486,7 +486,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
||||||
return Err(InvalidCharacter);
|
return Err(InvalidCharacter);
|
||||||
}
|
}
|
||||||
let local_name = local_name.as_slice().to_ascii_lower();
|
let local_name = local_name.as_slice().to_ascii_lower();
|
||||||
Ok(build_element_from_tag(local_name, ns!(HTML), self))
|
Ok(build_element_from_tag(local_name, ns!(HTML), None, self))
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-document-createelementns
|
// http://dom.spec.whatwg.org/#dom-document-createelementns
|
||||||
|
@ -530,7 +530,8 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ns == ns!(HTML) {
|
if ns == ns!(HTML) {
|
||||||
Ok(build_element_from_tag(local_name_from_qname.to_string(), ns, self))
|
Ok(build_element_from_tag(local_name_from_qname.to_string(), ns,
|
||||||
|
prefix_from_qname.map(|s| s.to_string()), self))
|
||||||
} else {
|
} else {
|
||||||
Ok(Element::new(local_name_from_qname.to_string(), ns,
|
Ok(Element::new(local_name_from_qname.to_string(), ns,
|
||||||
prefix_from_qname.map(|s| s.to_string()), self))
|
prefix_from_qname.map(|s| s.to_string()), self))
|
||||||
|
@ -679,7 +680,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
let new_title = HTMLTitleElement::new("title".to_string(), self).root();
|
let new_title = HTMLTitleElement::new("title".to_string(), None, self).root();
|
||||||
let new_title: JSRef<Node> = NodeCast::from_ref(*new_title);
|
let new_title: JSRef<Node> = NodeCast::from_ref(*new_title);
|
||||||
|
|
||||||
if !title.is_empty() {
|
if !title.is_empty() {
|
||||||
|
|
|
@ -131,13 +131,13 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
||||||
|
|
||||||
{
|
{
|
||||||
// Step 4.
|
// Step 4.
|
||||||
let doc_html: Root<Node> = NodeCast::from_temporary(HTMLHtmlElement::new("html".to_string(), *doc)).root();
|
let doc_html: Root<Node> = NodeCast::from_temporary(HTMLHtmlElement::new("html".to_string(), None, *doc)).root();
|
||||||
let doc_html = doc_html.deref();
|
let doc_html = doc_html.deref();
|
||||||
assert!(doc_node.AppendChild(*doc_html).is_ok());
|
assert!(doc_node.AppendChild(*doc_html).is_ok());
|
||||||
|
|
||||||
{
|
{
|
||||||
// Step 5.
|
// Step 5.
|
||||||
let doc_head: Root<Node> = NodeCast::from_temporary(HTMLHeadElement::new("head".to_string(), *doc)).root();
|
let doc_head: Root<Node> = NodeCast::from_temporary(HTMLHeadElement::new("head".to_string(), None, *doc)).root();
|
||||||
let doc_head = doc_head.deref();
|
let doc_head = doc_head.deref();
|
||||||
assert!(doc_html.AppendChild(*doc_head).is_ok());
|
assert!(doc_html.AppendChild(*doc_head).is_ok());
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
||||||
None => (),
|
None => (),
|
||||||
Some(title_str) => {
|
Some(title_str) => {
|
||||||
// Step 6.1.
|
// Step 6.1.
|
||||||
let doc_title: Root<Node> = NodeCast::from_temporary(HTMLTitleElement::new("title".to_string(), *doc)).root();
|
let doc_title: Root<Node> = NodeCast::from_temporary(HTMLTitleElement::new("title".to_string(), None, *doc)).root();
|
||||||
let doc_title = doc_title.deref();
|
let doc_title = doc_title.deref();
|
||||||
assert!(doc_head.AppendChild(*doc_title).is_ok());
|
assert!(doc_head.AppendChild(*doc_title).is_ok());
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 7.
|
// Step 7.
|
||||||
let doc_body: Root<HTMLBodyElement> = HTMLBodyElement::new("body".to_string(), *doc).root();
|
let doc_body: Root<HTMLBodyElement> = HTMLBodyElement::new("body".to_string(), None, *doc).root();
|
||||||
let doc_body = doc_body.deref();
|
let doc_body = doc_body.deref();
|
||||||
assert!(doc_html.AppendChild(NodeCast::from_ref(*doc_body)).is_ok());
|
assert!(doc_html.AppendChild(NodeCast::from_ref(*doc_body)).is_ok());
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,15 +34,15 @@ impl HTMLAnchorElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLAnchorElement {
|
impl HTMLAnchorElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAnchorElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAnchorElement {
|
||||||
HTMLAnchorElement {
|
HTMLAnchorElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLAnchorElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAnchorElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAnchorElement> {
|
||||||
let element = HTMLAnchorElement::new_inherited(localName, document);
|
let element = HTMLAnchorElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLAppletElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLAppletElement {
|
impl HTMLAppletElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAppletElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAppletElement {
|
||||||
HTMLAppletElement {
|
HTMLAppletElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLAppletElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAppletElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAppletElement> {
|
||||||
let element = HTMLAppletElement::new_inherited(localName, document);
|
let element = HTMLAppletElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,15 +27,15 @@ impl HTMLAreaElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLAreaElement {
|
impl HTMLAreaElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAreaElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAreaElement {
|
||||||
HTMLAreaElement {
|
HTMLAreaElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLAreaElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAreaElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAreaElement> {
|
||||||
let element = HTMLAreaElement::new_inherited(localName, document);
|
let element = HTMLAreaElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLAudioElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLAudioElement {
|
impl HTMLAudioElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLAudioElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLAudioElement {
|
||||||
HTMLAudioElement {
|
HTMLAudioElement {
|
||||||
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, document)
|
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLAudioElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLAudioElement> {
|
||||||
let element = HTMLAudioElement::new_inherited(localName, document);
|
let element = HTMLAudioElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLBaseElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLBaseElement {
|
impl HTMLBaseElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLBaseElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLBaseElement {
|
||||||
HTMLBaseElement {
|
HTMLBaseElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLBaseElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLBaseElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLBaseElement> {
|
||||||
let element = HTMLBaseElement::new_inherited(localName, document);
|
let element = HTMLBaseElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,15 +33,15 @@ impl HTMLBodyElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLBodyElement {
|
impl HTMLBodyElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLBodyElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLBodyElement {
|
||||||
HTMLBodyElement {
|
HTMLBodyElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLBodyElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLBodyElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLBodyElement> {
|
||||||
let element = HTMLBodyElement::new_inherited(localName, document);
|
let element = HTMLBodyElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLBRElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLBRElement {
|
impl HTMLBRElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLBRElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLBRElement {
|
||||||
HTMLBRElement {
|
HTMLBRElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLBRElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLBRElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLBRElement> {
|
||||||
let element = HTMLBRElement::new_inherited(localName, document);
|
let element = HTMLBRElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,15 +32,15 @@ impl HTMLButtonElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLButtonElement {
|
impl HTMLButtonElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLButtonElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLButtonElement {
|
||||||
HTMLButtonElement {
|
HTMLButtonElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLButtonElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLButtonElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLButtonElement> {
|
||||||
let element = HTMLButtonElement::new_inherited(localName, document);
|
let element = HTMLButtonElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,9 +44,9 @@ impl HTMLCanvasElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLCanvasElement {
|
impl HTMLCanvasElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLCanvasElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLCanvasElement {
|
||||||
HTMLCanvasElement {
|
HTMLCanvasElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, document),
|
htmlelement: HTMLElement::new_inherited(HTMLCanvasElementTypeId, localName, prefix, document),
|
||||||
context: Default::default(),
|
context: Default::default(),
|
||||||
width: Cell::new(DefaultWidth),
|
width: Cell::new(DefaultWidth),
|
||||||
height: Cell::new(DefaultHeight),
|
height: Cell::new(DefaultHeight),
|
||||||
|
@ -54,8 +54,8 @@ impl HTMLCanvasElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLCanvasElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLCanvasElement> {
|
||||||
let element = HTMLCanvasElement::new_inherited(localName, document);
|
let element = HTMLCanvasElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLDataElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLDataElement {
|
impl HTMLDataElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDataElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDataElement {
|
||||||
HTMLDataElement {
|
HTMLDataElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLDataElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDataElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDataElement> {
|
||||||
let element = HTMLDataElement::new_inherited(localName, document);
|
let element = HTMLDataElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,15 +29,15 @@ impl HTMLDataListElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLDataListElement {
|
impl HTMLDataListElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDataListElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDataListElement {
|
||||||
HTMLDataListElement {
|
HTMLDataListElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLDataListElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDataListElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDataListElement> {
|
||||||
let element = HTMLDataListElement::new_inherited(localName, document);
|
let element = HTMLDataListElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLDirectoryElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLDirectoryElement {
|
impl HTMLDirectoryElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDirectoryElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDirectoryElement {
|
||||||
HTMLDirectoryElement {
|
HTMLDirectoryElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLDirectoryElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
|
||||||
let element = HTMLDirectoryElement::new_inherited(localName, document);
|
let element = HTMLDirectoryElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLDivElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLDivElement {
|
impl HTMLDivElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDivElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDivElement {
|
||||||
HTMLDivElement {
|
HTMLDivElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLDivElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDivElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDivElement> {
|
||||||
let element = HTMLDivElement::new_inherited(localName, document);
|
let element = HTMLDivElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLDListElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLDListElement {
|
impl HTMLDListElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLDListElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLDListElement {
|
||||||
HTMLDListElement {
|
HTMLDListElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLDListElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLDListElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLDListElement> {
|
||||||
let element = HTMLDListElement::new_inherited(localName, document);
|
let element = HTMLDListElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,15 +37,15 @@ impl HTMLElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLElement {
|
impl HTMLElement {
|
||||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: JSRef<Document>) -> HTMLElement {
|
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLElement {
|
||||||
HTMLElement {
|
HTMLElement {
|
||||||
element: Element::new_inherited(type_id, tag_name, ns!(HTML), None, document)
|
element: Element::new_inherited(type_id, tag_name, ns!(HTML), prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLElement> {
|
||||||
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document);
|
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLEmbedElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLEmbedElement {
|
impl HTMLEmbedElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLEmbedElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLEmbedElement {
|
||||||
HTMLEmbedElement {
|
HTMLEmbedElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLEmbedElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLEmbedElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLEmbedElement> {
|
||||||
let element = HTMLEmbedElement::new_inherited(localName, document);
|
let element = HTMLEmbedElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,15 +34,15 @@ impl HTMLFieldSetElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLFieldSetElement {
|
impl HTMLFieldSetElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFieldSetElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFieldSetElement {
|
||||||
HTMLFieldSetElement {
|
HTMLFieldSetElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLFieldSetElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
|
||||||
let element = HTMLFieldSetElement::new_inherited(localName, document);
|
let element = HTMLFieldSetElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLFontElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLFontElement {
|
impl HTMLFontElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFontElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFontElement {
|
||||||
HTMLFontElement {
|
HTMLFontElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLFontElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFontElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFontElement> {
|
||||||
let element = HTMLFontElement::new_inherited(localName, document);
|
let element = HTMLFontElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLFormElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLFormElement {
|
impl HTMLFormElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFormElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFormElement {
|
||||||
HTMLFormElement {
|
HTMLFormElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLFormElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFormElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFormElement> {
|
||||||
let element = HTMLFormElement::new_inherited(localName, document);
|
let element = HTMLFormElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLFrameElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLFrameElement {
|
impl HTMLFrameElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFrameElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFrameElement {
|
||||||
HTMLFrameElement {
|
HTMLFrameElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLFrameElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFrameElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFrameElement> {
|
||||||
let element = HTMLFrameElement::new_inherited(localName, document);
|
let element = HTMLFrameElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLFrameSetElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLFrameSetElement {
|
impl HTMLFrameSetElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLFrameSetElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLFrameSetElement {
|
||||||
HTMLFrameSetElement {
|
HTMLFrameSetElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLFrameSetElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
|
||||||
let element = HTMLFrameSetElement::new_inherited(localName, document);
|
let element = HTMLFrameSetElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLHeadElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLHeadElement {
|
impl HTMLHeadElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLHeadElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLHeadElement {
|
||||||
HTMLHeadElement {
|
HTMLHeadElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLHeadElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLHeadElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLHeadElement> {
|
||||||
let element = HTMLHeadElement::new_inherited(localName, document);
|
let element = HTMLHeadElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,16 +37,16 @@ impl HTMLHeadingElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLHeadingElement {
|
impl HTMLHeadingElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>, level: HeadingLevel) -> HTMLHeadingElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>, level: HeadingLevel) -> HTMLHeadingElement {
|
||||||
HTMLHeadingElement {
|
HTMLHeadingElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, document),
|
htmlelement: HTMLElement::new_inherited(HTMLHeadingElementTypeId, localName, prefix, document),
|
||||||
level: level,
|
level: level,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
|
||||||
let element = HTMLHeadingElement::new_inherited(localName, document, level);
|
let element = HTMLHeadingElement::new_inherited(localName, prefix, document, level);
|
||||||
Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLHRElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLHRElement {
|
impl HTMLHRElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLHRElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLHRElement {
|
||||||
HTMLHRElement {
|
HTMLHRElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLHRElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLHRElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLHRElement> {
|
||||||
let element = HTMLHRElement::new_inherited(localName, document);
|
let element = HTMLHRElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLHtmlElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLHtmlElement {
|
impl HTMLHtmlElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLHtmlElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLHtmlElement {
|
||||||
HTMLHtmlElement {
|
HTMLHtmlElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLHtmlElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLHtmlElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLHtmlElement> {
|
||||||
let element = HTMLHtmlElement::new_inherited(localName, document);
|
let element = HTMLHtmlElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,17 +113,17 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLIFrameElement {
|
impl HTMLIFrameElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLIFrameElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLIFrameElement {
|
||||||
HTMLIFrameElement {
|
HTMLIFrameElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLIFrameElementTypeId, localName, document),
|
htmlelement: HTMLElement::new_inherited(HTMLIFrameElementTypeId, localName, prefix, document),
|
||||||
size: Cell::new(None),
|
size: Cell::new(None),
|
||||||
sandbox: Cell::new(None),
|
sandbox: Cell::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLIFrameElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLIFrameElement> {
|
||||||
let element = HTMLIFrameElement::new_inherited(localName, document);
|
let element = HTMLIFrameElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,16 +71,16 @@ impl<'a> PrivateHTMLImageElementHelpers for JSRef<'a, HTMLImageElement> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLImageElement {
|
impl HTMLImageElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLImageElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLImageElement {
|
||||||
HTMLImageElement {
|
HTMLImageElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, document),
|
htmlelement: HTMLElement::new_inherited(HTMLImageElementTypeId, localName, prefix, document),
|
||||||
image: RefCell::new(None),
|
image: RefCell::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLImageElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLImageElement> {
|
||||||
let element = HTMLImageElement::new_inherited(localName, document);
|
let element = HTMLImageElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,9 +62,9 @@ impl HTMLInputElementDerived for EventTarget {
|
||||||
static DEFAULT_INPUT_SIZE: u32 = 20;
|
static DEFAULT_INPUT_SIZE: u32 = 20;
|
||||||
|
|
||||||
impl HTMLInputElement {
|
impl HTMLInputElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLInputElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLInputElement {
|
||||||
HTMLInputElement {
|
HTMLInputElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, document),
|
htmlelement: HTMLElement::new_inherited(HTMLInputElementTypeId, localName, prefix, document),
|
||||||
input_type: Cell::new(InputText),
|
input_type: Cell::new(InputText),
|
||||||
checked: Cell::new(false),
|
checked: Cell::new(false),
|
||||||
uncommitted_value: RefCell::new(None),
|
uncommitted_value: RefCell::new(None),
|
||||||
|
@ -74,8 +74,8 @@ impl HTMLInputElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLInputElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLInputElement> {
|
||||||
let element = HTMLInputElement::new_inherited(localName, document);
|
let element = HTMLInputElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLLabelElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLLabelElement {
|
impl HTMLLabelElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLabelElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLabelElement {
|
||||||
HTMLLabelElement {
|
HTMLLabelElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLLabelElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLabelElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLabelElement> {
|
||||||
let element = HTMLLabelElement::new_inherited(localName, document);
|
let element = HTMLLabelElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLLegendElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLLegendElement {
|
impl HTMLLegendElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLegendElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLegendElement {
|
||||||
HTMLLegendElement {
|
HTMLLegendElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLegendElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLegendElement> {
|
||||||
let element = HTMLLegendElement::new_inherited(localName, document);
|
let element = HTMLLegendElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLLIElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLLIElement {
|
impl HTMLLIElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLIElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLIElement {
|
||||||
HTMLLIElement {
|
HTMLLIElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLLIElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLIElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLIElement> {
|
||||||
let element = HTMLLIElement::new_inherited(localName, document);
|
let element = HTMLLIElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,15 +34,15 @@ impl HTMLLinkElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLLinkElement {
|
impl HTMLLinkElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLinkElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLinkElement {
|
||||||
HTMLLinkElement {
|
HTMLLinkElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLLinkElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLinkElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLinkElement> {
|
||||||
let element = HTMLLinkElement::new_inherited(localName, document);
|
let element = HTMLLinkElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLMapElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLMapElement {
|
impl HTMLMapElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLMapElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMapElement {
|
||||||
HTMLMapElement {
|
HTMLMapElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLMapElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLMapElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLMapElement> {
|
||||||
let element = HTMLMapElement::new_inherited(localName, document);
|
let element = HTMLMapElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ impl HTMLMediaElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLMediaElement {
|
impl HTMLMediaElement {
|
||||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: JSRef<Document>) -> HTMLMediaElement {
|
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMediaElement {
|
||||||
HTMLMediaElement {
|
HTMLMediaElement {
|
||||||
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
|
htmlelement: HTMLElement::new_inherited(type_id, tag_name, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLMetaElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLMetaElement {
|
impl HTMLMetaElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLMetaElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMetaElement {
|
||||||
HTMLMetaElement {
|
HTMLMetaElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLMetaElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLMetaElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLMetaElement> {
|
||||||
let element = HTMLMetaElement::new_inherited(localName, document);
|
let element = HTMLMetaElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLMeterElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLMeterElement {
|
impl HTMLMeterElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLMeterElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMeterElement {
|
||||||
HTMLMeterElement {
|
HTMLMeterElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLMeterElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLMeterElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLMeterElement> {
|
||||||
let element = HTMLMeterElement::new_inherited(localName, document);
|
let element = HTMLMeterElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLModElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLModElement {
|
impl HTMLModElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLModElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLModElement {
|
||||||
HTMLModElement {
|
HTMLModElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLModElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLModElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLModElement> {
|
||||||
let element = HTMLModElement::new_inherited(localName, document);
|
let element = HTMLModElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLModElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLModElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,15 +38,15 @@ impl HTMLObjectElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLObjectElement {
|
impl HTMLObjectElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLObjectElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLObjectElement {
|
||||||
HTMLObjectElement {
|
HTMLObjectElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, document),
|
htmlelement: HTMLElement::new_inherited(HTMLObjectElementTypeId, localName, prefix, document),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLObjectElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLObjectElement> {
|
||||||
let element = HTMLObjectElement::new_inherited(localName, document);
|
let element = HTMLObjectElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLOListElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLOListElement {
|
impl HTMLOListElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOListElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOListElement {
|
||||||
HTMLOListElement {
|
HTMLOListElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLOListElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOListElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOListElement> {
|
||||||
let element = HTMLOListElement::new_inherited(localName, document);
|
let element = HTMLOListElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,15 @@ impl HTMLOptGroupElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLOptGroupElement {
|
impl HTMLOptGroupElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOptGroupElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOptGroupElement {
|
||||||
HTMLOptGroupElement {
|
HTMLOptGroupElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLOptGroupElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
|
||||||
let element = HTMLOptGroupElement::new_inherited(localName, document);
|
let element = HTMLOptGroupElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,15 +35,15 @@ impl HTMLOptionElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLOptionElement {
|
impl HTMLOptionElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOptionElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOptionElement {
|
||||||
HTMLOptionElement {
|
HTMLOptionElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLOptionElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOptionElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOptionElement> {
|
||||||
let element = HTMLOptionElement::new_inherited(localName, document);
|
let element = HTMLOptionElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,15 +28,15 @@ impl HTMLOutputElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLOutputElement {
|
impl HTMLOutputElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLOutputElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLOutputElement {
|
||||||
HTMLOutputElement {
|
HTMLOutputElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLOutputElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLOutputElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLOutputElement> {
|
||||||
let element = HTMLOutputElement::new_inherited(localName, document);
|
let element = HTMLOutputElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLParagraphElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLParagraphElement {
|
impl HTMLParagraphElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLParagraphElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLParagraphElement {
|
||||||
HTMLParagraphElement {
|
HTMLParagraphElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLParagraphElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLParagraphElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLParagraphElement> {
|
||||||
let element = HTMLParagraphElement::new_inherited(localName, document);
|
let element = HTMLParagraphElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLParamElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLParamElement {
|
impl HTMLParamElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLParamElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLParamElement {
|
||||||
HTMLParamElement {
|
HTMLParamElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLParamElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLParamElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLParamElement> {
|
||||||
let element = HTMLParamElement::new_inherited(localName, document);
|
let element = HTMLParamElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLPreElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLPreElement {
|
impl HTMLPreElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLPreElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLPreElement {
|
||||||
HTMLPreElement {
|
HTMLPreElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLPreElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLPreElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLPreElement> {
|
||||||
let element = HTMLPreElement::new_inherited(localName, document);
|
let element = HTMLPreElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLProgressElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLProgressElement {
|
impl HTMLProgressElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLProgressElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLProgressElement {
|
||||||
HTMLProgressElement {
|
HTMLProgressElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLProgressElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLProgressElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLProgressElement> {
|
||||||
let element = HTMLProgressElement::new_inherited(localName, document);
|
let element = HTMLProgressElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLQuoteElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLQuoteElement {
|
impl HTMLQuoteElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLQuoteElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLQuoteElement {
|
||||||
HTMLQuoteElement {
|
HTMLQuoteElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLQuoteElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLQuoteElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLQuoteElement> {
|
||||||
let element = HTMLQuoteElement::new_inherited(localName, document);
|
let element = HTMLQuoteElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,15 @@ impl HTMLScriptElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLScriptElement {
|
impl HTMLScriptElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLScriptElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLScriptElement {
|
||||||
HTMLScriptElement {
|
HTMLScriptElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLScriptElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLScriptElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLScriptElement> {
|
||||||
let element = HTMLScriptElement::new_inherited(localName, document);
|
let element = HTMLScriptElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,15 +34,15 @@ impl HTMLSelectElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLSelectElement {
|
impl HTMLSelectElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLSelectElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLSelectElement {
|
||||||
HTMLSelectElement {
|
HTMLSelectElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLSelectElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLSelectElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLSelectElement> {
|
||||||
let element = HTMLSelectElement::new_inherited(localName, document);
|
let element = HTMLSelectElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLSourceElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLSourceElement {
|
impl HTMLSourceElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLSourceElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLSourceElement {
|
||||||
HTMLSourceElement {
|
HTMLSourceElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLSourceElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLSourceElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLSourceElement> {
|
||||||
let element = HTMLSourceElement::new_inherited(localName, document);
|
let element = HTMLSourceElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLSpanElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLSpanElement {
|
impl HTMLSpanElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLSpanElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLSpanElement {
|
||||||
HTMLSpanElement {
|
HTMLSpanElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLSpanElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLSpanElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLSpanElement> {
|
||||||
let element = HTMLSpanElement::new_inherited(localName, document);
|
let element = HTMLSpanElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,15 +30,15 @@ impl HTMLStyleElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLStyleElement {
|
impl HTMLStyleElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLStyleElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLStyleElement {
|
||||||
HTMLStyleElement {
|
HTMLStyleElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLStyleElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLStyleElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLStyleElement> {
|
||||||
let element = HTMLStyleElement::new_inherited(localName, document);
|
let element = HTMLStyleElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTableCaptionElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableCaptionElement {
|
impl HTMLTableCaptionElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableCaptionElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableCaptionElement {
|
||||||
HTMLTableCaptionElement {
|
HTMLTableCaptionElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTableCaptionElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
|
||||||
let element = HTMLTableCaptionElement::new_inherited(localName, document);
|
let element = HTMLTableCaptionElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ impl HTMLTableCellElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableCellElement {
|
impl HTMLTableCellElement {
|
||||||
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, document: JSRef<Document>) -> HTMLTableCellElement {
|
pub fn new_inherited(type_id: ElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableCellElement {
|
||||||
HTMLTableCellElement {
|
HTMLTableCellElement {
|
||||||
htmlelement: HTMLElement::new_inherited(type_id, tag_name, document)
|
htmlelement: HTMLElement::new_inherited(type_id, tag_name, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTableColElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableColElement {
|
impl HTMLTableColElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableColElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableColElement {
|
||||||
HTMLTableColElement {
|
HTMLTableColElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTableColElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableColElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableColElement> {
|
||||||
let element = HTMLTableColElement::new_inherited(localName, document);
|
let element = HTMLTableColElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTableDataCellElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableDataCellElement {
|
impl HTMLTableDataCellElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableDataCellElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableDataCellElement {
|
||||||
HTMLTableDataCellElement {
|
HTMLTableDataCellElement {
|
||||||
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, document)
|
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
|
||||||
let element = HTMLTableDataCellElement::new_inherited(localName, document);
|
let element = HTMLTableDataCellElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,15 +30,15 @@ impl HTMLTableElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableElement {
|
impl HTMLTableElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableElement {
|
||||||
HTMLTableElement {
|
HTMLTableElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTableElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableElement> {
|
||||||
let element = HTMLTableElement::new_inherited(localName, document);
|
let element = HTMLTableElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTableHeaderCellElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableHeaderCellElement {
|
impl HTMLTableHeaderCellElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableHeaderCellElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableHeaderCellElement {
|
||||||
HTMLTableHeaderCellElement {
|
HTMLTableHeaderCellElement {
|
||||||
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, document)
|
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
|
||||||
let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
|
let element = HTMLTableHeaderCellElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTableRowElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableRowElement {
|
impl HTMLTableRowElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableRowElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableRowElement {
|
||||||
HTMLTableRowElement {
|
HTMLTableRowElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableRowElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableRowElement> {
|
||||||
let element = HTMLTableRowElement::new_inherited(localName, document);
|
let element = HTMLTableRowElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTableSectionElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableSectionElement {
|
impl HTMLTableSectionElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTableSectionElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTableSectionElement {
|
||||||
HTMLTableSectionElement {
|
HTMLTableSectionElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTableSectionElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
|
||||||
let element = HTMLTableSectionElement::new_inherited(localName, document);
|
let element = HTMLTableSectionElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTemplateElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTemplateElement {
|
impl HTMLTemplateElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTemplateElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTemplateElement {
|
||||||
HTMLTemplateElement {
|
HTMLTemplateElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTemplateElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTemplateElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTemplateElement> {
|
||||||
let element = HTMLTemplateElement::new_inherited(localName, document);
|
let element = HTMLTemplateElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,15 @@ impl HTMLTextAreaElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTextAreaElement {
|
impl HTMLTextAreaElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTextAreaElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTextAreaElement {
|
||||||
HTMLTextAreaElement {
|
HTMLTextAreaElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTextAreaElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
|
||||||
let element = HTMLTextAreaElement::new_inherited(localName, document);
|
let element = HTMLTextAreaElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTimeElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTimeElement {
|
impl HTMLTimeElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTimeElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTimeElement {
|
||||||
HTMLTimeElement {
|
HTMLTimeElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTimeElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTimeElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTimeElement> {
|
||||||
let element = HTMLTimeElement::new_inherited(localName, document);
|
let element = HTMLTimeElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,15 +29,15 @@ impl HTMLTitleElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTitleElement {
|
impl HTMLTitleElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTitleElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTitleElement {
|
||||||
HTMLTitleElement {
|
HTMLTitleElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTitleElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTitleElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTitleElement> {
|
||||||
let element = HTMLTitleElement::new_inherited(localName, document);
|
let element = HTMLTitleElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLTrackElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTrackElement {
|
impl HTMLTrackElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLTrackElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLTrackElement {
|
||||||
HTMLTrackElement {
|
HTMLTrackElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLTrackElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLTrackElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLTrackElement> {
|
||||||
let element = HTMLTrackElement::new_inherited(localName, document);
|
let element = HTMLTrackElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLUListElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLUListElement {
|
impl HTMLUListElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLUListElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLUListElement {
|
||||||
HTMLUListElement {
|
HTMLUListElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLUListElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLUListElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLUListElement> {
|
||||||
let element = HTMLUListElement::new_inherited(localName, document);
|
let element = HTMLUListElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLUnknownElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLUnknownElement {
|
impl HTMLUnknownElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLUnknownElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLUnknownElement {
|
||||||
HTMLUnknownElement {
|
HTMLUnknownElement {
|
||||||
htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, document)
|
htmlelement: HTMLElement::new_inherited(HTMLUnknownElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLUnknownElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLUnknownElement> {
|
||||||
let element = HTMLUnknownElement::new_inherited(localName, document);
|
let element = HTMLUnknownElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl HTMLVideoElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLVideoElement {
|
impl HTMLVideoElement {
|
||||||
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLVideoElement {
|
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLVideoElement {
|
||||||
HTMLVideoElement {
|
HTMLVideoElement {
|
||||||
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, document)
|
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, prefix, document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLVideoElement> {
|
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLVideoElement> {
|
||||||
let element = HTMLVideoElement::new_inherited(localName, document);
|
let element = HTMLVideoElement::new_inherited(localName, prefix, document);
|
||||||
Node::reflect_node(box element, document, HTMLVideoElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLVideoElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1382,7 +1382,7 @@ impl Node {
|
||||||
let element: JSRef<Element> = ElementCast::to_ref(node).unwrap();
|
let element: JSRef<Element> = ElementCast::to_ref(node).unwrap();
|
||||||
let element = element.deref();
|
let element = element.deref();
|
||||||
let element = build_element_from_tag(element.local_name.as_slice().to_string(),
|
let element = build_element_from_tag(element.local_name.as_slice().to_string(),
|
||||||
element.namespace.clone(), *document);
|
element.namespace.clone(), Some(element.prefix.as_slice().to_string()), *document);
|
||||||
NodeCast::from_temporary(element)
|
NodeCast::from_temporary(element)
|
||||||
},
|
},
|
||||||
TextNodeTypeId => {
|
TextNodeTypeId => {
|
||||||
|
|
|
@ -39,11 +39,12 @@ use string_cache::{Atom, Namespace};
|
||||||
macro_rules! handle_element(
|
macro_rules! handle_element(
|
||||||
($document: expr,
|
($document: expr,
|
||||||
$localName: expr,
|
$localName: expr,
|
||||||
|
$prefix: expr,
|
||||||
$string: expr,
|
$string: expr,
|
||||||
$ctor: ident
|
$ctor: ident
|
||||||
$(, $arg:expr )*) => (
|
$(, $arg:expr )*) => (
|
||||||
if $string == $localName.as_slice() {
|
if $string == $localName.as_slice() {
|
||||||
return ElementCast::from_temporary($ctor::new($localName, $document $(, $arg)*));
|
return ElementCast::from_temporary($ctor::new($localName, $prefix, $document $(, $arg)*));
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -150,136 +151,136 @@ fn parse_last_modified(timestamp: &str) -> String {
|
||||||
// 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: DOMString, ns: Namespace, document: JSRef<Document>) -> Temporary<Element> {
|
pub fn build_element_from_tag(tag: DOMString, ns: Namespace, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<Element> {
|
||||||
if ns != ns!(HTML) {
|
if ns != ns!(HTML) {
|
||||||
return Element::new(tag, ns, None, document);
|
return Element::new(tag, ns, prefix, document);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO (Issue #85): use atoms
|
// TODO (Issue #85): use atoms
|
||||||
handle_element!(document, tag, "a", HTMLAnchorElement);
|
handle_element!(document, tag, prefix, "a", HTMLAnchorElement);
|
||||||
handle_element!(document, tag, "abbr", HTMLElement);
|
handle_element!(document, tag, prefix, "abbr", HTMLElement);
|
||||||
handle_element!(document, tag, "acronym", HTMLElement);
|
handle_element!(document, tag, prefix, "acronym", HTMLElement);
|
||||||
handle_element!(document, tag, "address", HTMLElement);
|
handle_element!(document, tag, prefix, "address", HTMLElement);
|
||||||
handle_element!(document, tag, "applet", HTMLAppletElement);
|
handle_element!(document, tag, prefix, "applet", HTMLAppletElement);
|
||||||
handle_element!(document, tag, "area", HTMLAreaElement);
|
handle_element!(document, tag, prefix, "area", HTMLAreaElement);
|
||||||
handle_element!(document, tag, "article", HTMLElement);
|
handle_element!(document, tag, prefix, "article", HTMLElement);
|
||||||
handle_element!(document, tag, "aside", HTMLElement);
|
handle_element!(document, tag, prefix, "aside", HTMLElement);
|
||||||
handle_element!(document, tag, "audio", HTMLAudioElement);
|
handle_element!(document, tag, prefix, "audio", HTMLAudioElement);
|
||||||
handle_element!(document, tag, "b", HTMLElement);
|
handle_element!(document, tag, prefix, "b", HTMLElement);
|
||||||
handle_element!(document, tag, "base", HTMLBaseElement);
|
handle_element!(document, tag, prefix, "base", HTMLBaseElement);
|
||||||
handle_element!(document, tag, "bdi", HTMLElement);
|
handle_element!(document, tag, prefix, "bdi", HTMLElement);
|
||||||
handle_element!(document, tag, "bdo", HTMLElement);
|
handle_element!(document, tag, prefix, "bdo", HTMLElement);
|
||||||
handle_element!(document, tag, "bgsound", HTMLElement);
|
handle_element!(document, tag, prefix, "bgsound", HTMLElement);
|
||||||
handle_element!(document, tag, "big", HTMLElement);
|
handle_element!(document, tag, prefix, "big", HTMLElement);
|
||||||
handle_element!(document, tag, "blockquote",HTMLElement);
|
handle_element!(document, tag, prefix, "blockquote",HTMLElement);
|
||||||
handle_element!(document, tag, "body", HTMLBodyElement);
|
handle_element!(document, tag, prefix, "body", HTMLBodyElement);
|
||||||
handle_element!(document, tag, "br", HTMLBRElement);
|
handle_element!(document, tag, prefix, "br", HTMLBRElement);
|
||||||
handle_element!(document, tag, "button", HTMLButtonElement);
|
handle_element!(document, tag, prefix, "button", HTMLButtonElement);
|
||||||
handle_element!(document, tag, "canvas", HTMLCanvasElement);
|
handle_element!(document, tag, prefix, "canvas", HTMLCanvasElement);
|
||||||
handle_element!(document, tag, "caption", HTMLTableCaptionElement);
|
handle_element!(document, tag, prefix, "caption", HTMLTableCaptionElement);
|
||||||
handle_element!(document, tag, "center", HTMLElement);
|
handle_element!(document, tag, prefix, "center", HTMLElement);
|
||||||
handle_element!(document, tag, "cite", HTMLElement);
|
handle_element!(document, tag, prefix, "cite", HTMLElement);
|
||||||
handle_element!(document, tag, "code", HTMLElement);
|
handle_element!(document, tag, prefix, "code", HTMLElement);
|
||||||
handle_element!(document, tag, "col", HTMLTableColElement);
|
handle_element!(document, tag, prefix, "col", HTMLTableColElement);
|
||||||
handle_element!(document, tag, "colgroup", HTMLTableColElement);
|
handle_element!(document, tag, prefix, "colgroup", HTMLTableColElement);
|
||||||
handle_element!(document, tag, "data", HTMLDataElement);
|
handle_element!(document, tag, prefix, "data", HTMLDataElement);
|
||||||
handle_element!(document, tag, "datalist", HTMLDataListElement);
|
handle_element!(document, tag, prefix, "datalist", HTMLDataListElement);
|
||||||
handle_element!(document, tag, "dd", HTMLElement);
|
handle_element!(document, tag, prefix, "dd", HTMLElement);
|
||||||
handle_element!(document, tag, "del", HTMLModElement);
|
handle_element!(document, tag, prefix, "del", HTMLModElement);
|
||||||
handle_element!(document, tag, "details", HTMLElement);
|
handle_element!(document, tag, prefix, "details", HTMLElement);
|
||||||
handle_element!(document, tag, "dfn", HTMLElement);
|
handle_element!(document, tag, prefix, "dfn", HTMLElement);
|
||||||
handle_element!(document, tag, "dir", HTMLDirectoryElement);
|
handle_element!(document, tag, prefix, "dir", HTMLDirectoryElement);
|
||||||
handle_element!(document, tag, "div", HTMLDivElement);
|
handle_element!(document, tag, prefix, "div", HTMLDivElement);
|
||||||
handle_element!(document, tag, "dl", HTMLDListElement);
|
handle_element!(document, tag, prefix, "dl", HTMLDListElement);
|
||||||
handle_element!(document, tag, "dt", HTMLElement);
|
handle_element!(document, tag, prefix, "dt", HTMLElement);
|
||||||
handle_element!(document, tag, "em", HTMLElement);
|
handle_element!(document, tag, prefix, "em", HTMLElement);
|
||||||
handle_element!(document, tag, "embed", HTMLEmbedElement);
|
handle_element!(document, tag, prefix, "embed", HTMLEmbedElement);
|
||||||
handle_element!(document, tag, "fieldset", HTMLFieldSetElement);
|
handle_element!(document, tag, prefix, "fieldset", HTMLFieldSetElement);
|
||||||
handle_element!(document, tag, "figcaption",HTMLElement);
|
handle_element!(document, tag, prefix, "figcaption",HTMLElement);
|
||||||
handle_element!(document, tag, "figure", HTMLElement);
|
handle_element!(document, tag, prefix, "figure", HTMLElement);
|
||||||
handle_element!(document, tag, "font", HTMLFontElement);
|
handle_element!(document, tag, prefix, "font", HTMLFontElement);
|
||||||
handle_element!(document, tag, "footer", HTMLElement);
|
handle_element!(document, tag, prefix, "footer", HTMLElement);
|
||||||
handle_element!(document, tag, "form", HTMLFormElement);
|
handle_element!(document, tag, prefix, "form", HTMLFormElement);
|
||||||
handle_element!(document, tag, "frame", HTMLFrameElement);
|
handle_element!(document, tag, prefix, "frame", HTMLFrameElement);
|
||||||
handle_element!(document, tag, "frameset", HTMLFrameSetElement);
|
handle_element!(document, tag, prefix, "frameset", HTMLFrameSetElement);
|
||||||
handle_element!(document, tag, "h1", HTMLHeadingElement, Heading1);
|
handle_element!(document, tag, prefix, "h1", HTMLHeadingElement, Heading1);
|
||||||
handle_element!(document, tag, "h2", HTMLHeadingElement, Heading2);
|
handle_element!(document, tag, prefix, "h2", HTMLHeadingElement, Heading2);
|
||||||
handle_element!(document, tag, "h3", HTMLHeadingElement, Heading3);
|
handle_element!(document, tag, prefix, "h3", HTMLHeadingElement, Heading3);
|
||||||
handle_element!(document, tag, "h4", HTMLHeadingElement, Heading4);
|
handle_element!(document, tag, prefix, "h4", HTMLHeadingElement, Heading4);
|
||||||
handle_element!(document, tag, "h5", HTMLHeadingElement, Heading5);
|
handle_element!(document, tag, prefix, "h5", HTMLHeadingElement, Heading5);
|
||||||
handle_element!(document, tag, "h6", HTMLHeadingElement, Heading6);
|
handle_element!(document, tag, prefix, "h6", HTMLHeadingElement, Heading6);
|
||||||
handle_element!(document, tag, "head", HTMLHeadElement);
|
handle_element!(document, tag, prefix, "head", HTMLHeadElement);
|
||||||
handle_element!(document, tag, "header", HTMLElement);
|
handle_element!(document, tag, prefix, "header", HTMLElement);
|
||||||
handle_element!(document, tag, "hgroup", HTMLElement);
|
handle_element!(document, tag, prefix, "hgroup", HTMLElement);
|
||||||
handle_element!(document, tag, "hr", HTMLHRElement);
|
handle_element!(document, tag, prefix, "hr", HTMLHRElement);
|
||||||
handle_element!(document, tag, "html", HTMLHtmlElement);
|
handle_element!(document, tag, prefix, "html", HTMLHtmlElement);
|
||||||
handle_element!(document, tag, "i", HTMLElement);
|
handle_element!(document, tag, prefix, "i", HTMLElement);
|
||||||
handle_element!(document, tag, "iframe", HTMLIFrameElement);
|
handle_element!(document, tag, prefix, "iframe", HTMLIFrameElement);
|
||||||
handle_element!(document, tag, "img", HTMLImageElement);
|
handle_element!(document, tag, prefix, "img", HTMLImageElement);
|
||||||
handle_element!(document, tag, "input", HTMLInputElement);
|
handle_element!(document, tag, prefix, "input", HTMLInputElement);
|
||||||
handle_element!(document, tag, "ins", HTMLModElement);
|
handle_element!(document, tag, prefix, "ins", HTMLModElement);
|
||||||
handle_element!(document, tag, "isindex", HTMLElement);
|
handle_element!(document, tag, prefix, "isindex", HTMLElement);
|
||||||
handle_element!(document, tag, "kbd", HTMLElement);
|
handle_element!(document, tag, prefix, "kbd", HTMLElement);
|
||||||
handle_element!(document, tag, "label", HTMLLabelElement);
|
handle_element!(document, tag, prefix, "label", HTMLLabelElement);
|
||||||
handle_element!(document, tag, "legend", HTMLLegendElement);
|
handle_element!(document, tag, prefix, "legend", HTMLLegendElement);
|
||||||
handle_element!(document, tag, "li", HTMLLIElement);
|
handle_element!(document, tag, prefix, "li", HTMLLIElement);
|
||||||
handle_element!(document, tag, "link", HTMLLinkElement);
|
handle_element!(document, tag, prefix, "link", HTMLLinkElement);
|
||||||
handle_element!(document, tag, "main", HTMLElement);
|
handle_element!(document, tag, prefix, "main", HTMLElement);
|
||||||
handle_element!(document, tag, "map", HTMLMapElement);
|
handle_element!(document, tag, prefix, "map", HTMLMapElement);
|
||||||
handle_element!(document, tag, "mark", HTMLElement);
|
handle_element!(document, tag, prefix, "mark", HTMLElement);
|
||||||
handle_element!(document, tag, "marquee", HTMLElement);
|
handle_element!(document, tag, prefix, "marquee", HTMLElement);
|
||||||
handle_element!(document, tag, "meta", HTMLMetaElement);
|
handle_element!(document, tag, prefix, "meta", HTMLMetaElement);
|
||||||
handle_element!(document, tag, "meter", HTMLMeterElement);
|
handle_element!(document, tag, prefix, "meter", HTMLMeterElement);
|
||||||
handle_element!(document, tag, "nav", HTMLElement);
|
handle_element!(document, tag, prefix, "nav", HTMLElement);
|
||||||
handle_element!(document, tag, "nobr", HTMLElement);
|
handle_element!(document, tag, prefix, "nobr", HTMLElement);
|
||||||
handle_element!(document, tag, "noframes", HTMLElement);
|
handle_element!(document, tag, prefix, "noframes", HTMLElement);
|
||||||
handle_element!(document, tag, "noscript", HTMLElement);
|
handle_element!(document, tag, prefix, "noscript", HTMLElement);
|
||||||
handle_element!(document, tag, "object", HTMLObjectElement);
|
handle_element!(document, tag, prefix, "object", HTMLObjectElement);
|
||||||
handle_element!(document, tag, "ol", HTMLOListElement);
|
handle_element!(document, tag, prefix, "ol", HTMLOListElement);
|
||||||
handle_element!(document, tag, "optgroup", HTMLOptGroupElement);
|
handle_element!(document, tag, prefix, "optgroup", HTMLOptGroupElement);
|
||||||
handle_element!(document, tag, "option", HTMLOptionElement);
|
handle_element!(document, tag, prefix, "option", HTMLOptionElement);
|
||||||
handle_element!(document, tag, "output", HTMLOutputElement);
|
handle_element!(document, tag, prefix, "output", HTMLOutputElement);
|
||||||
handle_element!(document, tag, "p", HTMLParagraphElement);
|
handle_element!(document, tag, prefix, "p", HTMLParagraphElement);
|
||||||
handle_element!(document, tag, "param", HTMLParamElement);
|
handle_element!(document, tag, prefix, "param", HTMLParamElement);
|
||||||
handle_element!(document, tag, "pre", HTMLPreElement);
|
handle_element!(document, tag, prefix, "pre", HTMLPreElement);
|
||||||
handle_element!(document, tag, "progress", HTMLProgressElement);
|
handle_element!(document, tag, prefix, "progress", HTMLProgressElement);
|
||||||
handle_element!(document, tag, "q", HTMLQuoteElement);
|
handle_element!(document, tag, prefix, "q", HTMLQuoteElement);
|
||||||
handle_element!(document, tag, "rp", HTMLElement);
|
handle_element!(document, tag, prefix, "rp", HTMLElement);
|
||||||
handle_element!(document, tag, "rt", HTMLElement);
|
handle_element!(document, tag, prefix, "rt", HTMLElement);
|
||||||
handle_element!(document, tag, "ruby", HTMLElement);
|
handle_element!(document, tag, prefix, "ruby", HTMLElement);
|
||||||
handle_element!(document, tag, "s", HTMLElement);
|
handle_element!(document, tag, prefix, "s", HTMLElement);
|
||||||
handle_element!(document, tag, "samp", HTMLElement);
|
handle_element!(document, tag, prefix, "samp", HTMLElement);
|
||||||
handle_element!(document, tag, "script", HTMLScriptElement);
|
handle_element!(document, tag, prefix, "script", HTMLScriptElement);
|
||||||
handle_element!(document, tag, "section", HTMLElement);
|
handle_element!(document, tag, prefix, "section", HTMLElement);
|
||||||
handle_element!(document, tag, "select", HTMLSelectElement);
|
handle_element!(document, tag, prefix, "select", HTMLSelectElement);
|
||||||
handle_element!(document, tag, "small", HTMLElement);
|
handle_element!(document, tag, prefix, "small", HTMLElement);
|
||||||
handle_element!(document, tag, "source", HTMLSourceElement);
|
handle_element!(document, tag, prefix, "source", HTMLSourceElement);
|
||||||
handle_element!(document, tag, "spacer", HTMLElement);
|
handle_element!(document, tag, prefix, "spacer", HTMLElement);
|
||||||
handle_element!(document, tag, "span", HTMLSpanElement);
|
handle_element!(document, tag, prefix, "span", HTMLSpanElement);
|
||||||
handle_element!(document, tag, "strike", HTMLElement);
|
handle_element!(document, tag, prefix, "strike", HTMLElement);
|
||||||
handle_element!(document, tag, "strong", HTMLElement);
|
handle_element!(document, tag, prefix, "strong", HTMLElement);
|
||||||
handle_element!(document, tag, "style", HTMLStyleElement);
|
handle_element!(document, tag, prefix, "style", HTMLStyleElement);
|
||||||
handle_element!(document, tag, "sub", HTMLElement);
|
handle_element!(document, tag, prefix, "sub", HTMLElement);
|
||||||
handle_element!(document, tag, "summary", HTMLElement);
|
handle_element!(document, tag, prefix, "summary", HTMLElement);
|
||||||
handle_element!(document, tag, "sup", HTMLElement);
|
handle_element!(document, tag, prefix, "sup", HTMLElement);
|
||||||
handle_element!(document, tag, "table", HTMLTableElement);
|
handle_element!(document, tag, prefix, "table", HTMLTableElement);
|
||||||
handle_element!(document, tag, "tbody", HTMLTableSectionElement);
|
handle_element!(document, tag, prefix, "tbody", HTMLTableSectionElement);
|
||||||
handle_element!(document, tag, "td", HTMLTableDataCellElement);
|
handle_element!(document, tag, prefix, "td", HTMLTableDataCellElement);
|
||||||
handle_element!(document, tag, "template", HTMLTemplateElement);
|
handle_element!(document, tag, prefix, "template", HTMLTemplateElement);
|
||||||
handle_element!(document, tag, "textarea", HTMLTextAreaElement);
|
handle_element!(document, tag, prefix, "textarea", HTMLTextAreaElement);
|
||||||
handle_element!(document, tag, "th", HTMLTableHeaderCellElement);
|
handle_element!(document, tag, prefix, "th", HTMLTableHeaderCellElement);
|
||||||
handle_element!(document, tag, "time", HTMLTimeElement);
|
handle_element!(document, tag, prefix, "time", HTMLTimeElement);
|
||||||
handle_element!(document, tag, "title", HTMLTitleElement);
|
handle_element!(document, tag, prefix, "title", HTMLTitleElement);
|
||||||
handle_element!(document, tag, "tr", HTMLTableRowElement);
|
handle_element!(document, tag, prefix, "tr", HTMLTableRowElement);
|
||||||
handle_element!(document, tag, "tt", HTMLElement);
|
handle_element!(document, tag, prefix, "tt", HTMLElement);
|
||||||
handle_element!(document, tag, "track", HTMLTrackElement);
|
handle_element!(document, tag, prefix, "track", HTMLTrackElement);
|
||||||
handle_element!(document, tag, "u", HTMLElement);
|
handle_element!(document, tag, prefix, "u", HTMLElement);
|
||||||
handle_element!(document, tag, "ul", HTMLUListElement);
|
handle_element!(document, tag, prefix, "ul", HTMLUListElement);
|
||||||
handle_element!(document, tag, "var", HTMLElement);
|
handle_element!(document, tag, prefix, "var", HTMLElement);
|
||||||
handle_element!(document, tag, "video", HTMLVideoElement);
|
handle_element!(document, tag, prefix, "video", HTMLVideoElement);
|
||||||
handle_element!(document, tag, "wbr", HTMLElement);
|
handle_element!(document, tag, prefix, "wbr", HTMLElement);
|
||||||
|
|
||||||
return ElementCast::from_temporary(HTMLUnknownElement::new(tag, document));
|
return ElementCast::from_temporary(HTMLUnknownElement::new(tag, prefix, document));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_html(page: &Page,
|
pub fn parse_html(page: &Page,
|
||||||
|
@ -376,7 +377,7 @@ pub fn parse_html(page: &Page,
|
||||||
SvgNs => ns!(SVG),
|
SvgNs => ns!(SVG),
|
||||||
ns => fail!("Not expecting namespace {:?}", ns),
|
ns => fail!("Not expecting namespace {:?}", ns),
|
||||||
};
|
};
|
||||||
let element: Root<Element> = build_element_from_tag(tag.name.clone(), namespace, *tmp).root();
|
let element: Root<Element> = build_element_from_tag(tag.name.clone(), namespace, None, *tmp).root();
|
||||||
|
|
||||||
debug!("-- attach attrs");
|
debug!("-- attach attrs");
|
||||||
for attr in tag.attributes.iter() {
|
for attr in tag.attributes.iter() {
|
||||||
|
|
|
@ -1,77 +1,3 @@
|
||||||
[case.html]
|
[case.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,abc,abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,abc,Abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,abc,ABC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,abc,\xc3\xa4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,abc,\xc3\x84]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,Abc,abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,Abc,Abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,Abc,ABC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,Abc,\xc3\xa4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,Abc,\xc3\x84]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,ABC,abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,ABC,Abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,ABC,ABC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,ABC,\xc3\xa4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,ABC,\xc3\x84]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\xa4,abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\xa4,Abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\xa4,ABC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\xa4,\xc3\xa4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\xa4,\xc3\x84]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\x84,abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\x84,Abc]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\x84,ABC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\x84,\xc3\xa4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[createElementNS http://www.w3.org/1999/xhtml,\xc3\x84,\xc3\x84]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue