Take the prefix from createElementNS into account for HTML elements

Fixes #3139
This commit is contained in:
Gilles Leblanc 2014-10-06 22:49:49 -04:00
parent 0549ed3c67
commit 3a5a66d54e
73 changed files with 405 additions and 477 deletions

View file

@ -26,15 +26,15 @@ impl HTMLLegendElementDerived for EventTarget {
}
impl HTMLLegendElement {
fn new_inherited(localName: DOMString, document: JSRef<Document>) -> HTMLLegendElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLLegendElement {
HTMLLegendElement {
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, document)
htmlelement: HTMLElement::new_inherited(HTMLLegendElementTypeId, localName, prefix, document)
}
}
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: JSRef<Document>) -> Temporary<HTMLLegendElement> {
let element = HTMLLegendElement::new_inherited(localName, document);
pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLLegendElement> {
let element = HTMLLegendElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)
}
}