Use #[must_root] for HTMLElements

This commit is contained in:
Manish Goregaokar 2014-09-17 01:00:59 +05:30
parent 30014c3919
commit f5087e1490
70 changed files with 138 additions and 5 deletions

View file

@ -24,6 +24,7 @@ use servo_util::namespace::Null;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLAnchorElement { pub struct HTMLAnchorElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -41,6 +42,7 @@ impl HTMLAnchorElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAnchorElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAnchorElement> {
let element = HTMLAnchorElement::new_inherited(localName, document); let element = HTMLAnchorElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap) Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLAppletElement { pub struct HTMLAppletElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLAppletElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAppletElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAppletElement> {
let element = HTMLAppletElement::new_inherited(localName, document); let element = HTMLAppletElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap) Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap)

View file

@ -18,6 +18,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLAreaElement { pub struct HTMLAreaElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -35,6 +36,7 @@ impl HTMLAreaElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAreaElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAreaElement> {
let element = HTMLAreaElement::new_inherited(localName, document); let element = HTMLAreaElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap) Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLAudioElement { pub struct HTMLAudioElement {
pub htmlmediaelement: HTMLMediaElement pub htmlmediaelement: HTMLMediaElement
} }
@ -31,6 +32,7 @@ impl HTMLAudioElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAudioElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAudioElement> {
let element = HTMLAudioElement::new_inherited(localName, document); let element = HTMLAudioElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap) Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLBaseElement { pub struct HTMLBaseElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLBaseElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBaseElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBaseElement> {
let element = HTMLBaseElement::new_inherited(localName, document); let element = HTMLBaseElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap) Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)

View file

@ -21,6 +21,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLBodyElement { pub struct HTMLBodyElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -38,6 +39,7 @@ impl HTMLBodyElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBodyElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBodyElement> {
let element = HTMLBodyElement::new_inherited(localName, document); let element = HTMLBodyElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap) Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLBRElement { pub struct HTMLBRElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLBRElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBRElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBRElement> {
let element = HTMLBRElement::new_inherited(localName, document); let element = HTMLBRElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap) Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap)

View file

@ -20,6 +20,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLButtonElement { pub struct HTMLButtonElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -37,6 +38,7 @@ impl HTMLButtonElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLButtonElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLButtonElement> {
let element = HTMLButtonElement::new_inherited(localName, document); let element = HTMLButtonElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap) Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)

View file

@ -29,6 +29,7 @@ static DefaultWidth: u32 = 300;
static DefaultHeight: u32 = 150; static DefaultHeight: u32 = 150;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLCanvasElement { pub struct HTMLCanvasElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
context: Traceable<Cell<Option<JS<CanvasRenderingContext2D>>>>, context: Traceable<Cell<Option<JS<CanvasRenderingContext2D>>>>,
@ -52,6 +53,7 @@ impl HTMLCanvasElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLCanvasElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLCanvasElement> {
let element = HTMLCanvasElement::new_inherited(localName, document); let element = HTMLCanvasElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap) Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLDataElement { pub struct HTMLDataElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLDataElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataElement> {
let element = HTMLDataElement::new_inherited(localName, document); let element = HTMLDataElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap) Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap)

View file

@ -17,6 +17,7 @@ use dom::node::{Node, ElementNodeTypeId, window_from_node};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLDataListElement { pub struct HTMLDataListElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -34,6 +35,7 @@ impl HTMLDataListElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataListElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataListElement> {
let element = HTMLDataListElement::new_inherited(localName, document); let element = HTMLDataListElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap) Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLDirectoryElement { pub struct HTMLDirectoryElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLDirectoryElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDirectoryElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
let element = HTMLDirectoryElement::new_inherited(localName, document); let element = HTMLDirectoryElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap) Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLDivElement { pub struct HTMLDivElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLDivElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDivElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDivElement> {
let element = HTMLDivElement::new_inherited(localName, document); let element = HTMLDivElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap) Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLDListElement { pub struct HTMLDListElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLDListElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDListElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDListElement> {
let element = HTMLDListElement::new_inherited(localName, document); let element = HTMLDListElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap) Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap)

View file

@ -22,7 +22,7 @@ use servo_util::namespace;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[allow(unrooted_must_root)] #[must_root]
pub struct HTMLElement { pub struct HTMLElement {
pub element: Element pub element: Element
} }
@ -44,6 +44,7 @@ impl HTMLElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLElement> {
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document); let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document);
Node::reflect_node(box element, document, HTMLElementBinding::Wrap) Node::reflect_node(box element, document, HTMLElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLEmbedElement { pub struct HTMLEmbedElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLEmbedElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLEmbedElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLEmbedElement> {
let element = HTMLEmbedElement::new_inherited(localName, document); let element = HTMLEmbedElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap) Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap)

View file

@ -22,6 +22,7 @@ use servo_util::atom::Atom;
use servo_util::str::{DOMString, StaticStringVec}; use servo_util::str::{DOMString, StaticStringVec};
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLFieldSetElement { pub struct HTMLFieldSetElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -39,6 +40,7 @@ impl HTMLFieldSetElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFieldSetElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
let element = HTMLFieldSetElement::new_inherited(localName, document); let element = HTMLFieldSetElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap) Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLFontElement { pub struct HTMLFontElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLFontElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFontElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFontElement> {
let element = HTMLFontElement::new_inherited(localName, document); let element = HTMLFontElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap) Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLFormElement { pub struct HTMLFormElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLFormElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFormElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFormElement> {
let element = HTMLFormElement::new_inherited(localName, document); let element = HTMLFormElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap) Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLFrameElement { pub struct HTMLFrameElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLFrameElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameElement> {
let element = HTMLFrameElement::new_inherited(localName, document); let element = HTMLFrameElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap) Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLFrameSetElement { pub struct HTMLFrameSetElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLFrameSetElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameSetElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
let element = HTMLFrameSetElement::new_inherited(localName, document); let element = HTMLFrameSetElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap) Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLHeadElement { pub struct HTMLHeadElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLHeadElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHeadElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHeadElement> {
let element = HTMLHeadElement::new_inherited(localName, document); let element = HTMLHeadElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap) Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap)

View file

@ -24,6 +24,7 @@ pub enum HeadingLevel {
} }
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLHeadingElement { pub struct HTMLHeadingElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
pub level: HeadingLevel, pub level: HeadingLevel,
@ -43,6 +44,7 @@ impl HTMLHeadingElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> { pub fn new(localName: DOMString, document: &JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
let element = HTMLHeadingElement::new_inherited(localName, document, level); let element = HTMLHeadingElement::new_inherited(localName, document, level);
Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap) Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLHRElement { pub struct HTMLHRElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLHRElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHRElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHRElement> {
let element = HTMLHRElement::new_inherited(localName, document); let element = HTMLHRElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap) Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLHtmlElement { pub struct HTMLHtmlElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLHtmlElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHtmlElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHtmlElement> {
let element = HTMLHtmlElement::new_inherited(localName, document); let element = HTMLHtmlElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap) Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap)

View file

@ -42,6 +42,7 @@ enum SandboxAllowance {
} }
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLIFrameElement { pub struct HTMLIFrameElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
pub size: Traceable<Cell<Option<IFrameSize>>>, pub size: Traceable<Cell<Option<IFrameSize>>>,
@ -117,6 +118,7 @@ impl HTMLIFrameElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLIFrameElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLIFrameElement> {
let element = HTMLIFrameElement::new_inherited(localName, document); let element = HTMLIFrameElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap) Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)

View file

@ -26,6 +26,7 @@ use url::{Url, UrlParser};
use std::cell::RefCell; use std::cell::RefCell;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLImageElement { pub struct HTMLImageElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
image: Untraceable<RefCell<Option<Url>>>, image: Untraceable<RefCell<Option<Url>>>,
@ -78,6 +79,7 @@ impl HTMLImageElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLImageElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLImageElement> {
let element = HTMLImageElement::new_inherited(localName, document); let element = HTMLImageElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap) Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)

View file

@ -19,6 +19,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLInputElement { pub struct HTMLInputElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -36,6 +37,7 @@ impl HTMLInputElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLInputElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLInputElement> {
let element = HTMLInputElement::new_inherited(localName, document); let element = HTMLInputElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap) Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLLabelElement { pub struct HTMLLabelElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLLabelElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLabelElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLabelElement> {
let element = HTMLLabelElement::new_inherited(localName, document); let element = HTMLLabelElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap) Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLLegendElement { pub struct HTMLLegendElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLLegendElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLegendElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLegendElement> {
let element = HTMLLegendElement::new_inherited(localName, document); let element = HTMLLegendElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap) Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLLIElement { pub struct HTMLLIElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLLIElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLIElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLIElement> {
let element = HTMLLIElement::new_inherited(localName, document); let element = HTMLLIElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap) Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap)

View file

@ -18,6 +18,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLLinkElement { pub struct HTMLLinkElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -35,6 +36,7 @@ impl HTMLLinkElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLinkElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLinkElement> {
let element = HTMLLinkElement::new_inherited(localName, document); let element = HTMLLinkElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap) Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLMapElement { pub struct HTMLMapElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLMapElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMapElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMapElement> {
let element = HTMLMapElement::new_inherited(localName, document); let element = HTMLMapElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap) Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap)

View file

@ -13,6 +13,7 @@ use dom::node::ElementNodeTypeId;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLMediaElement { pub struct HTMLMediaElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLMetaElement { pub struct HTMLMetaElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLMetaElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMetaElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMetaElement> {
let element = HTMLMetaElement::new_inherited(localName, document); let element = HTMLMetaElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap) Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLMeterElement { pub struct HTMLMeterElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLMeterElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMeterElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMeterElement> {
let element = HTMLMeterElement::new_inherited(localName, document); let element = HTMLMeterElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap) Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLModElement { pub struct HTMLModElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLModElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLModElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLModElement> {
let element = HTMLModElement::new_inherited(localName, document); let element = HTMLModElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLModElementBinding::Wrap) Node::reflect_node(box element, document, HTMLModElementBinding::Wrap)

View file

@ -27,6 +27,7 @@ use servo_util::str::DOMString;
use url::Url; use url::Url;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLObjectElement { pub struct HTMLObjectElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -44,6 +45,7 @@ impl HTMLObjectElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLObjectElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLObjectElement> {
let element = HTMLObjectElement::new_inherited(localName, document); let element = HTMLObjectElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap) Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLOListElement { pub struct HTMLOListElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLOListElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOListElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOListElement> {
let element = HTMLOListElement::new_inherited(localName, document); let element = HTMLOListElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap) Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap)

View file

@ -19,6 +19,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLOptGroupElement { pub struct HTMLOptGroupElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -36,6 +37,7 @@ impl HTMLOptGroupElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptGroupElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
let element = HTMLOptGroupElement::new_inherited(localName, document); let element = HTMLOptGroupElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap) Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap)

View file

@ -19,6 +19,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLOptionElement { pub struct HTMLOptionElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -36,6 +37,7 @@ impl HTMLOptionElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptionElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptionElement> {
let element = HTMLOptionElement::new_inherited(localName, document); let element = HTMLOptionElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap) Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap)

View file

@ -16,6 +16,7 @@ use dom::validitystate::ValidityState;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLOutputElement { pub struct HTMLOutputElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -33,6 +34,7 @@ impl HTMLOutputElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOutputElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOutputElement> {
let element = HTMLOutputElement::new_inherited(localName, document); let element = HTMLOutputElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap) Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLParagraphElement { pub struct HTMLParagraphElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLParagraphElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParagraphElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParagraphElement> {
let element = HTMLParagraphElement::new_inherited(localName, document); let element = HTMLParagraphElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap) Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLParamElement { pub struct HTMLParamElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLParamElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParamElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParamElement> {
let element = HTMLParamElement::new_inherited(localName, document); let element = HTMLParamElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap) Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLPreElement { pub struct HTMLPreElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLPreElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLPreElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLPreElement> {
let element = HTMLPreElement::new_inherited(localName, document); let element = HTMLPreElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap) Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLProgressElement { pub struct HTMLProgressElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLProgressElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLProgressElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLProgressElement> {
let element = HTMLProgressElement::new_inherited(localName, document); let element = HTMLProgressElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap) Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLQuoteElement { pub struct HTMLQuoteElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLQuoteElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLQuoteElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLQuoteElement> {
let element = HTMLQuoteElement::new_inherited(localName, document); let element = HTMLQuoteElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap) Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap)

View file

@ -20,6 +20,7 @@ use servo_util::namespace::Null;
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec}; use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec};
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLScriptElement { pub struct HTMLScriptElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -37,6 +38,7 @@ impl HTMLScriptElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLScriptElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLScriptElement> {
let element = HTMLScriptElement::new_inherited(localName, document); let element = HTMLScriptElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap) Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap)

View file

@ -22,6 +22,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLSelectElement { pub struct HTMLSelectElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -39,6 +40,7 @@ impl HTMLSelectElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSelectElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSelectElement> {
let element = HTMLSelectElement::new_inherited(localName, document); let element = HTMLSelectElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap) Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLSourceElement { pub struct HTMLSourceElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLSourceElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSourceElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSourceElement> {
let element = HTMLSourceElement::new_inherited(localName, document); let element = HTMLSourceElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap) Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLSpanElement { pub struct HTMLSpanElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLSpanElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSpanElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSpanElement> {
let element = HTMLSpanElement::new_inherited(localName, document); let element = HTMLSpanElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap) Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap)

View file

@ -18,6 +18,7 @@ use layout_interface::{AddStylesheetMsg, LayoutChan};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLStyleElement { pub struct HTMLStyleElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -35,6 +36,7 @@ impl HTMLStyleElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLStyleElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLStyleElement> {
let element = HTMLStyleElement::new_inherited(localName, document); let element = HTMLStyleElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap) Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableCaptionElement { pub struct HTMLTableCaptionElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLTableCaptionElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableCaptionElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
let element = HTMLTableCaptionElement::new_inherited(localName, document); let element = HTMLTableCaptionElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap)

View file

@ -13,6 +13,7 @@ use dom::node::ElementNodeTypeId;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableCellElement { pub struct HTMLTableCellElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableColElement { pub struct HTMLTableColElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLTableColElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableColElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableColElement> {
let element = HTMLTableColElement::new_inherited(localName, document); let element = HTMLTableColElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableDataCellElement { pub struct HTMLTableDataCellElement {
pub htmltablecellelement: HTMLTableCellElement, pub htmltablecellelement: HTMLTableCellElement,
} }
@ -31,6 +32,7 @@ impl HTMLTableDataCellElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableDataCellElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
let element = HTMLTableDataCellElement::new_inherited(localName, document); let element = HTMLTableDataCellElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap)

View file

@ -18,6 +18,7 @@ use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableElement { pub struct HTMLTableElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -35,6 +36,7 @@ impl HTMLTableElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableElement> {
let element = HTMLTableElement::new_inherited(localName, document); let element = HTMLTableElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableHeaderCellElement { pub struct HTMLTableHeaderCellElement {
pub htmltablecellelement: HTMLTableCellElement, pub htmltablecellelement: HTMLTableCellElement,
} }
@ -31,6 +32,7 @@ impl HTMLTableHeaderCellElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
let element = HTMLTableHeaderCellElement::new_inherited(localName, document); let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableRowElement { pub struct HTMLTableRowElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLTableRowElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableRowElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableRowElement> {
let element = HTMLTableRowElement::new_inherited(localName, document); let element = HTMLTableRowElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTableSectionElement { pub struct HTMLTableSectionElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLTableSectionElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableSectionElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
let element = HTMLTableSectionElement::new_inherited(localName, document); let element = HTMLTableSectionElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTemplateElement { pub struct HTMLTemplateElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLTemplateElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTemplateElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTemplateElement> {
let element = HTMLTemplateElement::new_inherited(localName, document); let element = HTMLTemplateElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap)

View file

@ -19,6 +19,7 @@ use servo_util::atom::Atom;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTextAreaElement { pub struct HTMLTextAreaElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -36,6 +37,7 @@ impl HTMLTextAreaElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTextAreaElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
let element = HTMLTextAreaElement::new_inherited(localName, document); let element = HTMLTextAreaElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTimeElement { pub struct HTMLTimeElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLTimeElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTimeElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTimeElement> {
let element = HTMLTimeElement::new_inherited(localName, document); let element = HTMLTimeElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap)

View file

@ -17,6 +17,7 @@ use dom::text::Text;
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTitleElement { pub struct HTMLTitleElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -34,6 +35,7 @@ impl HTMLTitleElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTitleElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTitleElement> {
let element = HTMLTitleElement::new_inherited(localName, document); let element = HTMLTitleElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLTrackElement { pub struct HTMLTrackElement {
pub htmlelement: HTMLElement, pub htmlelement: HTMLElement,
} }
@ -31,6 +32,7 @@ impl HTMLTrackElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTrackElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTrackElement> {
let element = HTMLTrackElement::new_inherited(localName, document); let element = HTMLTrackElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap) Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLUListElement { pub struct HTMLUListElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLUListElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUListElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUListElement> {
let element = HTMLUListElement::new_inherited(localName, document); let element = HTMLUListElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap) Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLUnknownElement { pub struct HTMLUnknownElement {
pub htmlelement: HTMLElement pub htmlelement: HTMLElement
} }
@ -31,6 +32,7 @@ impl HTMLUnknownElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUnknownElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUnknownElement> {
let element = HTMLUnknownElement::new_inherited(localName, document); let element = HTMLUnknownElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap) Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap)

View file

@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
use servo_util::str::DOMString; use servo_util::str::DOMString;
#[deriving(Encodable)] #[deriving(Encodable)]
#[must_root]
pub struct HTMLVideoElement { pub struct HTMLVideoElement {
pub htmlmediaelement: HTMLMediaElement pub htmlmediaelement: HTMLMediaElement
} }
@ -31,6 +32,7 @@ impl HTMLVideoElement {
} }
} }
#[allow(unrooted_must_root)]
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLVideoElement> { pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLVideoElement> {
let element = HTMLVideoElement::new_inherited(localName, document); let element = HTMLVideoElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLVideoElementBinding::Wrap) Node::reflect_node(box element, document, HTMLVideoElementBinding::Wrap)

View file

@ -36,8 +36,8 @@ impl ProcessingInstruction {
} }
pub fn new(target: DOMString, data: DOMString, document: &JSRef<Document>) -> Temporary<ProcessingInstruction> { pub fn new(target: DOMString, data: DOMString, document: &JSRef<Document>) -> Temporary<ProcessingInstruction> {
let node = ProcessingInstruction::new_inherited(target, data, document); Node::reflect_node(box ProcessingInstruction::new_inherited(target, data, document),
Node::reflect_node(box node, document, ProcessingInstructionBinding::Wrap) document, ProcessingInstructionBinding::Wrap)
} }
} }

View file

@ -36,8 +36,8 @@ impl Text {
} }
pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Text> { pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Text> {
let node = Text::new_inherited(text, document); Node::reflect_node(box Text::new_inherited(text, document),
Node::reflect_node(box node, document, TextBinding::Wrap) document, TextBinding::Wrap)
} }
pub fn Constructor(global: &GlobalRef, text: DOMString) -> Fallible<Temporary<Text>> { pub fn Constructor(global: &GlobalRef, text: DOMString) -> Fallible<Temporary<Text>> {