diff options
author | Till Schneidereit <till@tillschneidereit.net> | 2015-09-02 14:16:34 +0200 |
---|---|---|
committer | Till Schneidereit <till@tillschneidereit.net> | 2015-10-17 22:47:01 +0200 |
commit | 4c1c05fac67903ca5e1d06a1e5be04a90a1766e2 (patch) | |
tree | 0f8dbc8e4872457c9582a70d3d0cfd082c6cb267 /components/script/devtools.rs | |
parent | 499a84714139a351e8ac9c08b5a8e26440c77209 (diff) | |
download | servo-4c1c05fac67903ca5e1d06a1e5be04a90a1766e2.tar.gz servo-4c1c05fac67903ca5e1d06a1e5be04a90a1766e2.zip |
Improve implementation of DOMRect and implement DOMRectReadOnly
Passes most tests from test-css.
Diffstat (limited to 'components/script/devtools.rs')
-rw-r--r-- | components/script/devtools.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/devtools.rs b/components/script/devtools.rs index 0e892f32e6a..2356a4896f9 100644 --- a/components/script/devtools.rs +++ b/components/script/devtools.rs @@ -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(); } |