mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use Finite<T> for our dom code (excluding CanvasRenderingContext2D)
This commit is contained in:
parent
4c96732077
commit
9cd1b2c158
4 changed files with 24 additions and 17 deletions
|
@ -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>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue