mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -32,14 +32,14 @@ impl DOMRectList {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DOMRectListMethods for &'a DOMRectList {
|
||||
impl DOMRectListMethods for DOMRectList {
|
||||
// https://drafts.fxtf.org/geometry/#dom-domrectlist-length
|
||||
fn Length(self) -> u32 {
|
||||
fn Length(&self) -> u32 {
|
||||
self.rects.len() as u32
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#dom-domrectlist-item
|
||||
fn Item(self, index: u32) -> Option<Root<DOMRect>> {
|
||||
fn Item(&self, index: u32) -> Option<Root<DOMRect>> {
|
||||
let rects = &self.rects;
|
||||
if index < rects.len() as u32 {
|
||||
Some(rects[index as usize].root())
|
||||
|
@ -49,7 +49,7 @@ impl<'a> DOMRectListMethods for &'a DOMRectList {
|
|||
}
|
||||
|
||||
// check-tidy: no specs after this line
|
||||
fn IndexedGetter(self, index: u32, found: &mut bool) -> Option<Root<DOMRect>> {
|
||||
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<DOMRect>> {
|
||||
*found = index < self.rects.len() as u32;
|
||||
self.Item(index)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue