mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use typed transforms in stacking contexts
This commit is contained in:
parent
615e38f186
commit
279cda65ed
6 changed files with 51 additions and 53 deletions
|
@ -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))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue