diff options
author | Martin Robinson <mrobinson@igalia.com> | 2016-08-11 00:29:19 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-08-12 03:12:06 +0200 |
commit | 6259df5e2da6574f3d5951a7df2cb511d263697a (patch) | |
tree | f68cc95e507fc7e208a3c04de637c0914bcd9d60 /components/layout | |
parent | b7facf41cbc7ba727666e95fd0c390d432d862fa (diff) | |
download | servo-6259df5e2da6574f3d5951a7df2cb511d263697a.tar.gz servo-6259df5e2da6574f3d5951a7df2cb511d263697a.zip |
Update to euclid 0.8
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/Cargo.toml | 2 | ||||
-rw-r--r-- | components/layout/block.rs | 6 | ||||
-rw-r--r-- | components/layout/model.rs | 11 | ||||
-rw-r--r-- | components/layout/multicol.rs | 3 |
4 files changed, 11 insertions, 11 deletions
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index a3a3431b912..6ad730473ad 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -15,7 +15,7 @@ azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} bitflags = "0.7" canvas_traits = {path = "../canvas_traits"} cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} -euclid = "0.7.1" +euclid = "0.8.2" fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} diff --git a/components/layout/block.rs b/components/layout/block.rs index 62365478d2f..1dcadb8325b 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -61,7 +61,7 @@ use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMod use style::properties::ServoComputedValues; use style::values::computed::{LengthOrNone, LengthOrPercentageOrNone}; use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto}; -use util::geometry::MAX_RECT; +use util::geometry::max_rect; /// The number of screens of data we're allowed to generate display lists for in each direction. const DISPLAY_PORT_SIZE_FACTOR: i32 = 8; @@ -1842,7 +1842,7 @@ impl Flow for BlockFlow { if self.is_root() { self.base.clip = ClippingRegion::max(); - self.base.stacking_relative_position_of_display_port = MAX_RECT; + self.base.stacking_relative_position_of_display_port = max_rect(); } let transform_style = self.fragment.style().get_used_transform_style(); @@ -1855,7 +1855,7 @@ impl Flow for BlockFlow { (overflow_x::T::auto, _) | (overflow_x::T::scroll, _) | (_, overflow_x::T::auto) | (_, overflow_x::T::scroll) => { self.base.clip = ClippingRegion::max(); - self.base.stacking_relative_position_of_display_port = MAX_RECT; + self.base.stacking_relative_position_of_display_port = max_rect(); } _ => {} } diff --git a/components/layout/model.rs b/components/layout/model.rs index f988ef370dd..c74ced72d20 100644 --- a/components/layout/model.rs +++ b/components/layout/model.rs @@ -493,12 +493,11 @@ pub trait ToGfxMatrix { impl ToGfxMatrix for ComputedMatrix { fn to_gfx_matrix(&self) -> Matrix4D<f32> { - Matrix4D { - m11: self.m11 as f32, m12: self.m12 as f32, m13: self.m13 as f32, m14: self.m14 as f32, - m21: self.m21 as f32, m22: self.m22 as f32, m23: self.m23 as f32, m24: self.m24 as f32, - m31: self.m31 as f32, m32: self.m32 as f32, m33: self.m33 as f32, m34: self.m34 as f32, - m41: self.m41 as f32, m42: self.m42 as f32, m43: self.m43 as f32, m44: self.m44 as f32 - } + Matrix4D::new( + self.m11 as f32, self.m12 as f32, self.m13 as f32, self.m14 as f32, + self.m21 as f32, self.m22 as f32, self.m23 as f32, self.m24 as f32, + self.m31 as f32, self.m32 as f32, self.m33 as f32, self.m34 as f32, + self.m41 as f32, self.m42 as f32, self.m43 as f32, self.m44 as f32) } } diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs index f440fdb34b3..555e83e129d 100644 --- a/components/layout/multicol.rs +++ b/components/layout/multicol.rs @@ -11,6 +11,7 @@ use block::BlockFlow; use context::LayoutContext; use display_list_builder::DisplayListBuildState; use euclid::Point2D; +use euclid::Size2D; use floats::FloatKind; use flow::{Flow, FlowClass, OpaqueFlow, mut_base, FragmentationContext}; use flow_ref::{self, FlowRef}; @@ -168,7 +169,7 @@ impl Flow for MulticolFlow { let pitch = pitch.to_physical(self.block_flow.base.writing_mode); for (i, child) in self.block_flow.base.children.iter_mut().enumerate() { let point = &mut mut_base(child).stacking_relative_position; - *point = *point + pitch * i as i32; + *point = *point + Size2D::new(pitch.width * i as i32, pitch.height * i as i32); } } |