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:
Martin Robinson 2023-11-13 10:09:25 +01:00 committed by GitHub
parent 1915032f66
commit 72cb34dc3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 17 deletions

View file

@ -1573,7 +1573,7 @@ impl Fragment {
}
// If this fragment takes up no space, we don't need to build any display items for it.
if self.has_non_invertible_transform() {
if self.has_non_invertible_transform_or_zero_scale() {
return;
}
@ -2419,7 +2419,7 @@ impl BlockFlow {
flags: StackingContextCollectionFlags,
) {
// This block flow produces no stacking contexts if it takes up no space.
if self.has_non_invertible_transform() {
if self.has_non_invertible_transform_or_zero_scale() {
return;
}