mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
stylo: support transform
This commit is contained in:
parent
86a5682247
commit
bb5f351f4a
12 changed files with 2238 additions and 542 deletions
|
@ -1813,7 +1813,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
|
||||
fn transform_matrix(&self, stacking_relative_border_box: &Rect<Au>) -> Matrix4D<f32> {
|
||||
let mut transform = Matrix4D::identity();
|
||||
let operations = match self.style.get_effects().transform.0 {
|
||||
let operations = match self.style.get_box().transform.0 {
|
||||
None => return transform,
|
||||
Some(ref operations) => operations,
|
||||
};
|
||||
|
@ -2036,7 +2036,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
self.base.clip = self.base.clip.translate(&-stacking_relative_border_box.origin);
|
||||
|
||||
// Account for `transform`, if applicable.
|
||||
if self.fragment.style.get_effects().transform.0.is_none() {
|
||||
if self.fragment.style.get_box().transform.0.is_none() {
|
||||
return
|
||||
}
|
||||
let transform = match self.fragment
|
||||
|
|
|
@ -2584,7 +2584,7 @@ impl Fragment {
|
|||
if self.style().get_effects().mix_blend_mode != mix_blend_mode::T::normal {
|
||||
return true
|
||||
}
|
||||
if self.style().get_effects().transform.0.is_some() {
|
||||
if self.style().get_box().transform.0.is_some() {
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -2638,7 +2638,7 @@ impl Fragment {
|
|||
_ => return self.style().get_position().z_index.number_or_zero(),
|
||||
}
|
||||
|
||||
if self.style().get_effects().transform.0.is_some() {
|
||||
if self.style().get_box().transform.0.is_some() {
|
||||
return self.style().get_position().z_index.number_or_zero();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue