Skip to content

Commit

Permalink
Auto merge of #6628 - michaelwu:slim-domrectlist, r=jdm
Browse files Browse the repository at this point in the history
Remove window field from domrectlist

Nothing uses this field AFAICT.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6628)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Jul 15, 2015
2 parents 8fa6e0a + c90be8e commit b6b9508
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/script/dom/domrectlist.rs
Expand Up @@ -14,22 +14,20 @@ use dom::window::Window;
pub struct DOMRectList {
reflector_: Reflector,
rects: Vec<JS<DOMRect>>,
window: JS<Window>,
}

impl DOMRectList {
fn new_inherited<T>(window: &Window, rects: T) -> DOMRectList
fn new_inherited<T>(rects: T) -> DOMRectList
where T: Iterator<Item=Root<DOMRect>> {
DOMRectList {
reflector_: Reflector::new(),
rects: rects.map(|r| JS::from_rooted(&r)).collect(),
window: JS::from_ref(window),
}
}

pub fn new<T>(window: &Window, rects: T) -> Root<DOMRectList>
where T: Iterator<Item=Root<DOMRect>> {
reflect_dom_object(box DOMRectList::new_inherited(window, rects),
reflect_dom_object(box DOMRectList::new_inherited(rects),
GlobalRef::Window(window), DOMRectListBinding::Wrap)
}
}
Expand Down

0 comments on commit b6b9508

Please sign in to comment.