servo: Merge #3433 - More progress in the &JSRef -> JSRef conversion (from zwarich:jsref-self-helpers)

Source-Repo: https://github.com/servo/servo
Source-Revision: d6ba37c68c34a3748a789caeca225083275757e5
This commit is contained in:
Cameron Zwarich
2014-09-20 12:55:21 -07:00
parent d7823bb187
commit 60b0bd5f8d
69 changed files with 1014 additions and 1017 deletions

View File

@@ -53,23 +53,22 @@ impl DocumentFragment {
impl<'a> DocumentFragmentMethods for JSRef<'a, DocumentFragment> {
// http://dom.spec.whatwg.org/#dom-parentnode-children
fn Children(&self) -> Temporary<HTMLCollection> {
let window = window_from_node(*self).root();
HTMLCollection::children(*window, NodeCast::from_ref(*self))
fn Children(self) -> Temporary<HTMLCollection> {
let window = window_from_node(self).root();
HTMLCollection::children(*window, NodeCast::from_ref(self))
}
// http://dom.spec.whatwg.org/#dom-parentnode-queryselector
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>> {
let root: JSRef<Node> = NodeCast::from_ref(*self);
fn QuerySelector(self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>> {
let root: JSRef<Node> = NodeCast::from_ref(self);
root.query_selector(selectors)
}
// http://dom.spec.whatwg.org/#dom-parentnode-queryselectorall
fn QuerySelectorAll(&self, selectors: DOMString) -> Fallible<Temporary<NodeList>> {
let root: JSRef<Node> = NodeCast::from_ref(*self);
fn QuerySelectorAll(self, selectors: DOMString) -> Fallible<Temporary<NodeList>> {
let root: JSRef<Node> = NodeCast::from_ref(self);
root.query_selector_all(selectors)
}
}
impl Reflectable for DocumentFragment {