mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #6628 - michaelwu:slim-domrectlist, r=jdm
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 -->
This commit is contained in:
commit
b6b95085fb
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue