Make the traits for the IDL interfaces take &self

This commit is contained in:
Anthony Ramine 2015-08-27 22:15:54 +02:00
parent 856fda7f2e
commit 709d347872
99 changed files with 1192 additions and 1192 deletions

View file

@ -79,21 +79,21 @@ impl VirtualMethods for HTMLAnchorElement {
}
}
impl<'a> HTMLAnchorElementMethods for &'a HTMLAnchorElement {
impl HTMLAnchorElementMethods for HTMLAnchorElement {
// https://html.spec.whatwg.org/multipage/#dom-a-text
fn Text(self) -> DOMString {
fn Text(&self) -> DOMString {
let node = NodeCast::from_ref(self);
node.GetTextContent().unwrap()
}
// https://html.spec.whatwg.org/multipage/#dom-a-text
fn SetText(self, value: DOMString) {
fn SetText(&self, value: DOMString) {
let node = NodeCast::from_ref(self);
node.SetTextContent(Some(value))
}
// https://html.spec.whatwg.org/multipage/#dom-a-rellist
fn RelList(self) -> Root<DOMTokenList> {
fn RelList(&self) -> Root<DOMTokenList> {
self.rel_list.or_init(|| {
DOMTokenList::new(ElementCast::from_ref(self), &atom!("rel"))
})