Add spec links

This commit is contained in:
Bogdan Cuza 2015-07-21 18:53:01 +03:00 committed by Bogdan
parent f039827dcd
commit 233a769c67
61 changed files with 284 additions and 87 deletions

View file

@ -33,10 +33,12 @@ impl DOMRectList {
}
impl<'a> DOMRectListMethods for &'a DOMRectList {
// https://drafts.fxtf.org/geometry/#dom-domrectlist-length
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>> {
let rects = &self.rects;
if index < rects.len() as u32 {
@ -46,6 +48,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>> {
*found = index < self.rects.len() as u32;
self.Item(index)