mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add spec links
This commit is contained in:
parent
f039827dcd
commit
233a769c67
61 changed files with 284 additions and 87 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue