Use Finite<T> for our dom code (excluding CanvasRenderingContext2D)

This commit is contained in:
Tetsuharu OHZEKI 2015-03-25 01:16:08 +09:00
parent 4c96732077
commit 9cd1b2c158
4 changed files with 24 additions and 17 deletions

View file

@ -87,7 +87,9 @@ pub fn handle_get_layout(page: &Rc<Page>, pipeline: PipelineId, node_id: String,
let node = find_node_by_unique_id(&*page, pipeline, node_id).root();
let elem: JSRef<Element> = ElementCast::to_ref(node.r()).expect("should be getting layout of element");
let rect = elem.GetBoundingClientRect().root();
reply.send((rect.r().Width(), rect.r().Height())).unwrap();
let width = *rect.r().Width();
let height = *rect.r().Height();
reply.send((width, height)).unwrap();
}
pub fn handle_modify_attribute(page: &Rc<Page>, pipeline: PipelineId, node_id: String, modifications: Vec<Modification>) {