mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
Update to euclid 0.8
This commit is contained in:
parent
b7facf41cb
commit
6259df5e2d
56 changed files with 538 additions and 558 deletions
|
@ -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"}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue