diff --git a/Cargo.lock b/Cargo.lock index b1e23405138..814337eed4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1930,6 +1930,7 @@ dependencies = [ "malloc_size_of 0.0.1", "msg 0.0.1", "net_traits 0.0.1", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 9a960b51305..06de13c951f 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -29,6 +29,7 @@ log = "0.4" malloc_size_of = { path = "../malloc_size_of" } msg = {path = "../msg"} net_traits = {path = "../net_traits"} +num-traits = "0.2" ordered-float = "1.0" parking_lot = "0.6" profile_traits = {path = "../profile_traits"} diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 4bf7622636c..b25d3ba028d 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -49,6 +49,7 @@ use crate::table_wrapper::TableWrapperFlow; use euclid::{Point2D, Rect, Size2D, Vector2D}; use gfx_traits::print_tree::PrintTree; use gfx_traits::StackingContextId; +use num_traits::cast::FromPrimitive; use serde::ser::{Serialize, SerializeStruct, Serializer}; use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect}; use std::fmt;