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

@ -42,6 +42,7 @@ enum SandboxAllowance {
}
#[deriving(Encodable)]
#[must_root]
pub struct HTMLIFrameElement {
pub htmlelement: HTMLElement,
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> {
let element = HTMLIFrameElement::new_inherited(localName, document);
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)