auto merge of #1125 : Ms2ger/servo/ClientRectList, r=jdm

This commit is contained in:
bors-servo 2013-10-24 07:42:59 -07:00
commit b1c068b203
2 changed files with 22 additions and 25 deletions

View file

@ -284,24 +284,21 @@ impl Element {
let node = abstract_self;
assert!(node.is_element());
let (port, chan) = comm::stream();
let (rects, cx, scope) =
let rects =
match win.page.query_layout(ContentBoxesQuery(node, chan), port) {
ContentBoxesResponse(rects) => {
let cx = win.get_cx();
let scope = win.reflector().get_jsobject();
let rects = do rects.map |r| {
do rects.map |r| {
ClientRect::new(
win,
r.origin.y.to_f32().unwrap(),
(r.origin.y + r.size.height).to_f32().unwrap(),
r.origin.x.to_f32().unwrap(),
(r.origin.x + r.size.width).to_f32().unwrap())
};
(rects, cx, scope)
}
},
};
ClientRectList::new(rects, cx, scope)
ClientRectList::new(win, rects)
}
pub fn GetBoundingClientRect(&self, abstract_self: AbstractNode<ScriptView>) -> @mut ClientRect {