mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix transform assertion failures in Layout 2013 and Layout 2020 (#30713)
Layout asserts that it never creates stacking contexts that have a zero scale, yet it doesn't prevent the creation of those stacking contexts. This change stops their creation at an earlier stage. Fixes #30118.
This commit is contained in:
parent
1915032f66
commit
72cb34dc3d
8 changed files with 19 additions and 17 deletions
|
@ -277,7 +277,7 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
|
|||
might_have_floats_in_or_out
|
||||
}
|
||||
|
||||
fn has_non_invertible_transform(&self) -> bool {
|
||||
fn has_non_invertible_transform_or_zero_scale(&self) -> bool {
|
||||
if !self.class().is_block_like() ||
|
||||
self.as_block()
|
||||
.fragment
|
||||
|
@ -290,7 +290,9 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
|
|||
return false;
|
||||
}
|
||||
|
||||
self.as_block().fragment.has_non_invertible_transform()
|
||||
self.as_block()
|
||||
.fragment
|
||||
.has_non_invertible_transform_or_zero_scale()
|
||||
}
|
||||
|
||||
fn get_overflow_in_parent_coordinates(&self) -> Overflow {
|
||||
|
@ -1176,7 +1178,7 @@ impl BaseFlow {
|
|||
state: &mut StackingContextCollectionState,
|
||||
) {
|
||||
for kid in self.children.iter_mut() {
|
||||
if !kid.has_non_invertible_transform() {
|
||||
if !kid.has_non_invertible_transform_or_zero_scale() {
|
||||
kid.collect_stacking_contexts(state);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue