mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Replace old transform code with new generic code
This commit is contained in:
parent
5ce2966bda
commit
6631594e28
10 changed files with 210 additions and 1268 deletions
|
@ -291,7 +291,7 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
|
|||
}
|
||||
|
||||
if !self.as_block().fragment.establishes_stacking_context() ||
|
||||
self.as_block().fragment.style.get_box().transform.0.is_none() {
|
||||
self.as_block().fragment.style.get_box().transform.0.is_empty() {
|
||||
overflow.translate(&position.origin.to_vector());
|
||||
return overflow;
|
||||
}
|
||||
|
|
|
@ -2500,7 +2500,7 @@ impl Fragment {
|
|||
|
||||
/// Returns true if this fragment has a filter, transform, or perspective property set.
|
||||
pub fn has_filter_transform_or_perspective(&self) -> bool {
|
||||
self.style().get_box().transform.0.is_some() ||
|
||||
!self.style().get_box().transform.0.is_empty() ||
|
||||
!self.style().get_effects().filter.0.is_empty() ||
|
||||
self.style().get_box().perspective != Either::Second(values::None_)
|
||||
}
|
||||
|
@ -2560,7 +2560,7 @@ impl Fragment {
|
|||
_ => return self.style().get_position().z_index.integer_or(0),
|
||||
}
|
||||
|
||||
if self.style().get_box().transform.0.is_some() {
|
||||
if !self.style().get_box().transform.0.is_empty() {
|
||||
return self.style().get_position().z_index.integer_or(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue