mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make the traits for the IDL interfaces take &self
This commit is contained in:
parent
856fda7f2e
commit
709d347872
99 changed files with 1192 additions and 1192 deletions
|
@ -35,9 +35,9 @@ impl NamedNodeMap {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
||||
impl NamedNodeMapMethods for NamedNodeMap {
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-length
|
||||
fn Length(self) -> u32 {
|
||||
fn Length(&self) -> u32 {
|
||||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let owner = owner.r();
|
||||
|
@ -46,7 +46,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-item
|
||||
fn Item(self, index: u32) -> Option<Root<Attr>> {
|
||||
fn Item(&self, index: u32) -> Option<Root<Attr>> {
|
||||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let owner = owner.r();
|
||||
|
@ -55,7 +55,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-getnameditem
|
||||
fn GetNamedItem(self, name: DOMString) -> Option<Root<Attr>> {
|
||||
fn GetNamedItem(&self, name: DOMString) -> Option<Root<Attr>> {
|
||||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let owner = owner.r();
|
||||
|
@ -63,7 +63,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-getnameditemns
|
||||
fn GetNamedItemNS(self, namespace: Option<DOMString>, local_name: DOMString)
|
||||
fn GetNamedItemNS(&self, namespace: Option<DOMString>, local_name: DOMString)
|
||||
-> Option<Root<Attr>> {
|
||||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
|
@ -73,7 +73,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem
|
||||
fn RemoveNamedItem(self, name: DOMString) -> Fallible<Root<Attr>> {
|
||||
fn RemoveNamedItem(&self, name: DOMString) -> Fallible<Root<Attr>> {
|
||||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let owner = owner.r();
|
||||
|
@ -82,7 +82,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns
|
||||
fn RemoveNamedItemNS(self, namespace: Option<DOMString>, local_name: DOMString)
|
||||
fn RemoveNamedItemNS(&self, namespace: Option<DOMString>, local_name: DOMString)
|
||||
-> Fallible<Root<Attr>> {
|
||||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
|
@ -92,20 +92,20 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-item
|
||||
fn IndexedGetter(self, index: u32, found: &mut bool) -> Option<Root<Attr>> {
|
||||
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<Attr>> {
|
||||
let item = self.Item(index);
|
||||
*found = item.is_some();
|
||||
item
|
||||
}
|
||||
|
||||
// check-tidy: no specs after this line
|
||||
fn NamedGetter(self, name: DOMString, found: &mut bool) -> Option<Root<Attr>> {
|
||||
fn NamedGetter(&self, name: DOMString, found: &mut bool) -> Option<Root<Attr>> {
|
||||
let item = self.GetNamedItem(name);
|
||||
*found = item.is_some();
|
||||
item
|
||||
}
|
||||
|
||||
fn SupportedPropertyNames(self) -> Vec<DOMString> {
|
||||
fn SupportedPropertyNames(&self) -> Vec<DOMString> {
|
||||
// FIXME: unimplemented (https://github.com/servo/servo/issues/7273)
|
||||
vec![]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue