Move all methods on T to JSRef<T> or JS<T> as appropriate.

This commit is contained in:
Josh Matthews 2014-04-11 14:46:34 -04:00
parent 7daa97c7e5
commit 109410900c
15 changed files with 574 additions and 521 deletions

View file

@ -12,7 +12,7 @@ use dom::element::{Element, HTMLSelectElementTypeId};
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
use dom::htmlelement::HTMLElement;
use dom::htmlformelement::HTMLFormElement;
use dom::node::{Node, ElementNodeTypeId};
use dom::node::{Node, ElementNodeTypeId, window_from_node};
use dom::htmloptionelement::HTMLOptionElement;
use dom::validitystate::ValidityState;
use servo_util::str::DOMString;
@ -193,8 +193,7 @@ impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
fn Validity(&self) -> Unrooted<ValidityState> {
let roots = RootCollection::new();
let doc = self.htmlelement.element.node.owner_doc().root(&roots);
let window = doc.deref().window.root(&roots);
let window = window_from_node(self).root(&roots);
ValidityState::new(&*window)
}