servo/components/layout/display_list
Oriol Brufau ac06b1cfcf
layout: Fix logic for transforms with non-invertible matrix (#37147)
When the the current transformation matrix of a box isn't invertible,
the box and its content shouldn't be displayed.

However, the logic was broken:
- It was only checking the `transform` property, but not individual
transform properties like `scale`.
- It was treating matrices with m₁₁=0 or m₂₂=0 and non-invertible, even
when they can still be invertible and have a visible outcome.
- When m₁₁=0 or m₂₂=0 weren't caused by `transform`, it was replacing
the matrix with the identity.

Testing: Adding new WPT
Fixes: #37146

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-05-27 18:36:33 +00:00
..
background.rs layout: Use the viewport size as the background-attachment: fixed positioning area (#37097) 2025-05-24 09:45:53 +00:00
clip.rs layout: Split stacking context and display list construction (#37047) 2025-05-20 13:42:39 +00:00
conversions.rs layout: Support wavy and double for text-decoration-line (#37079) 2025-05-22 17:42:50 +00:00
gradient.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
mod.rs Add support for static SVG images using resvg crate (#36721) 2025-05-27 11:02:40 +00:00
stacking_context.rs layout: Fix logic for transforms with non-invertible matrix (#37147) 2025-05-27 18:36:33 +00:00