Improve implementation of DOMRect and implement DOMRectReadOnly

Passes most tests from test-css.
This commit is contained in:
Till Schneidereit 2015-09-02 14:16:34 +02:00
parent 499a847141
commit 4c1c05fac6
11 changed files with 198 additions and 184 deletions

View file

@ -102,8 +102,8 @@ pub fn handle_get_layout(page: &Rc<Page>,
let node = find_node_by_unique_id(&*page, pipeline, node_id);
let elem = ElementCast::to_ref(node.r()).expect("should be getting layout of element");
let rect = elem.GetBoundingClientRect();
let width = *rect.r().Width();
let height = *rect.r().Height();
let width = rect.Width() as f32;
let height = rect.Height() as f32;
reply.send(ComputedNodeLayout { width: width, height: height }).unwrap();
}