diff options
author | Pyfisch <pyfisch@gmail.com> | 2018-02-10 21:29:46 +0100 |
---|---|---|
committer | Pyfisch <pyfisch@gmail.com> | 2018-02-24 10:36:10 +0100 |
commit | 279cda65edf1a21b2db196d7eec256e9603efffa (patch) | |
tree | b2752e83ae22e6de66da145e1724820f9ed0b203 /components/layout/flow.rs | |
parent | 615e38f1864ad228d8492e2c5a38f682e34783a8 (diff) | |
download | servo-279cda65edf1a21b2db196d7eec256e9603efffa.tar.gz servo-279cda65edf1a21b2db196d7eec256e9603efffa.zip |
Use typed transforms in stacking contexts
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r-- | components/layout/flow.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 399a21087c4..40a1b90972f 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -29,7 +29,7 @@ use app_units::Au; use block::{BlockFlow, FormattingContextType}; use context::LayoutContext; use display_list::{DisplayListBuildState, StackingContextCollectionState}; -use euclid::{Transform3D, Point2D, Vector2D, Rect, Size2D}; +use euclid::{Point2D, Vector2D, Rect, Size2D}; use flex::FlexFlow; use floats::{Floats, SpeculatedFloatPlacement}; use flow_list::{FlowList, FlowListIterator, MutFlowListIterator}; @@ -67,6 +67,7 @@ use table_colgroup::TableColGroupFlow; use table_row::TableRowFlow; use table_rowgroup::TableRowGroupFlow; use table_wrapper::TableWrapperFlow; +use webrender_api::LayoutTransform; /// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field /// is of type `BaseFlow` or some type that also implements this trait. @@ -335,8 +336,8 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static { let transform_2d = self.as_block() .fragment .transform_matrix(&position) - .unwrap_or(Transform3D::identity()) - .to_2d(); + .unwrap_or(LayoutTransform::identity()) + .to_2d().to_untyped(); let transformed_overflow = Overflow { paint: f32_rect_to_au_rect(transform_2d.transform_rect( &au_rect_to_f32_rect(overflow.paint))), |