aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmloutputelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmloutputelement.rs')
-rw-r--r--src/components/script/dom/htmloutputelement.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/components/script/dom/htmloutputelement.rs b/src/components/script/dom/htmloutputelement.rs
index 4f5dae6d8c0..a72d9410d20 100644
--- a/src/components/script/dom/htmloutputelement.rs
+++ b/src/components/script/dom/htmloutputelement.rs
@@ -4,7 +4,7 @@
use dom::bindings::codegen::BindingDeclarations::HTMLOutputElementBinding;
use dom::bindings::codegen::InheritTypes::HTMLOutputElementDerived;
-use dom::bindings::js::{JS, JSRef, RootCollection};
+use dom::bindings::js::{JS, JSRef, RootCollection, Unrooted};
use dom::bindings::error::ErrorResult;
use dom::document::Document;
use dom::element::HTMLOutputElementTypeId;
@@ -36,14 +36,14 @@ impl HTMLOutputElement {
}
}
- pub fn new(localName: DOMString, document: &JSRef<Document>) -> JS<HTMLOutputElement> {
+ pub fn new(localName: DOMString, document: &JSRef<Document>) -> Unrooted<HTMLOutputElement> {
let element = HTMLOutputElement::new_inherited(localName, document.unrooted());
Node::reflect_node(~element, document, HTMLOutputElementBinding::Wrap)
}
}
impl HTMLOutputElement {
- pub fn GetForm(&self) -> Option<JS<HTMLFormElement>> {
+ pub fn GetForm(&self) -> Option<Unrooted<HTMLFormElement>> {
None
}
@@ -82,12 +82,11 @@ impl HTMLOutputElement {
pub fn SetWillValidate(&mut self, _will_validate: bool) {
}
- pub fn Validity(&self) -> JS<ValidityState> {
+ pub fn Validity(&self) -> Unrooted<ValidityState> {
let roots = RootCollection::new();
- let doc = self.htmlelement.element.node.owner_doc();
- let doc = doc.get();
- let window = doc.window.root(&roots);
- ValidityState::new(&window.root_ref())
+ let doc = self.htmlelement.element.node.owner_doc().root(&roots);
+ let window = doc.deref().window.root(&roots);
+ ValidityState::new(&*window)
}
pub fn SetValidity(&mut self, _validity: JS<ValidityState>) {