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

@ -49,9 +49,9 @@ impl Text {
}
}
impl<'a> TextMethods for &'a Text {
impl TextMethods for Text {
// https://dom.spec.whatwg.org/#dom-text-splittextoffset
fn SplitText(self, offset: u32) -> Fallible<Root<Text>> {
fn SplitText(&self, offset: u32) -> Fallible<Root<Text>> {
let cdata = CharacterDataCast::from_ref(self);
// Step 1.
let length = cdata.Length();
@ -87,7 +87,7 @@ impl<'a> TextMethods for &'a Text {
}
// https://dom.spec.whatwg.org/#dom-text-wholetext
fn WholeText(self) -> DOMString {
fn WholeText(&self) -> DOMString {
let first = NodeCast::from_ref(self).inclusively_preceding_siblings()
.take_while(|node| node.r().is_text())
.last().unwrap();