aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/documentfragment.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:15:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:27:43 +0200
commit709d347872e37ab2358e057d24557b9977238ecd (patch)
tree89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/documentfragment.rs
parent856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff)
downloadservo-709d347872e37ab2358e057d24557b9977238ecd.tar.gz
servo-709d347872e37ab2358e057d24557b9977238ecd.zip
Make the traits for the IDL interfaces take &self
Diffstat (limited to 'components/script/dom/documentfragment.rs')
-rw-r--r--components/script/dom/documentfragment.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs
index 367628b669f..2f0ccecda5c 100644
--- a/components/script/dom/documentfragment.rs
+++ b/components/script/dom/documentfragment.rs
@@ -51,46 +51,46 @@ impl DocumentFragment {
}
}
-impl<'a> DocumentFragmentMethods for &'a DocumentFragment {
+impl DocumentFragmentMethods for DocumentFragment {
// https://dom.spec.whatwg.org/#dom-parentnode-children
- fn Children(self) -> Root<HTMLCollection> {
+ fn Children(&self) -> Root<HTMLCollection> {
let window = window_from_node(self);
HTMLCollection::children(window.r(), NodeCast::from_ref(self))
}
// https://dom.spec.whatwg.org/#dom-parentnode-firstelementchild
- fn GetFirstElementChild(self) -> Option<Root<Element>> {
+ fn GetFirstElementChild(&self) -> Option<Root<Element>> {
NodeCast::from_ref(self).child_elements().next()
}
// https://dom.spec.whatwg.org/#dom-parentnode-lastelementchild
- fn GetLastElementChild(self) -> Option<Root<Element>> {
+ fn GetLastElementChild(&self) -> Option<Root<Element>> {
NodeCast::from_ref(self).rev_children().filter_map(ElementCast::to_root).next()
}
// https://dom.spec.whatwg.org/#dom-parentnode-childelementcount
- fn ChildElementCount(self) -> u32 {
+ fn ChildElementCount(&self) -> u32 {
NodeCast::from_ref(self).child_elements().count() as u32
}
// https://dom.spec.whatwg.org/#dom-parentnode-prepend
- fn Prepend(self, nodes: Vec<NodeOrString>) -> ErrorResult {
+ fn Prepend(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
NodeCast::from_ref(self).prepend(nodes)
}
// https://dom.spec.whatwg.org/#dom-parentnode-append
- fn Append(self, nodes: Vec<NodeOrString>) -> ErrorResult {
+ fn Append(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
NodeCast::from_ref(self).append(nodes)
}
// https://dom.spec.whatwg.org/#dom-parentnode-queryselector
- fn QuerySelector(self, selectors: DOMString) -> Fallible<Option<Root<Element>>> {
+ fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Root<Element>>> {
let root = NodeCast::from_ref(self);
root.query_selector(selectors)
}
// https://dom.spec.whatwg.org/#dom-parentnode-queryselectorall
- fn QuerySelectorAll(self, selectors: DOMString) -> Fallible<Root<NodeList>> {
+ fn QuerySelectorAll(&self, selectors: DOMString) -> Fallible<Root<NodeList>> {
let root = NodeCast::from_ref(self);
root.query_selector_all(selectors)
}