mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Improve implementation of DOMRect and implement DOMRectReadOnly
Passes most tests from test-css.
This commit is contained in:
parent
499a847141
commit
4c1c05fac6
11 changed files with 198 additions and 184 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue