Files
sousa-gecko/testing/web-platform/tests/css/css-transforms/animation/singular-scale-nested-ref.html
T
Nicolas LI b919327dfb Bug 2014025 [wpt PR 57510] - cc: Fix singular transform handling in ChunkToLayerMapper and PaintChunksToCcLayer, a=testonly
Automatic update from web-platform-tests
cc: Fix singular transform handling in ChunkToLayerMapper and
PaintChunksToCcLayer

Prior to this CL, ChunkToLayerMapper and PaintChunksToCcLayer did
not correctly detect when GeometryMapper::SourceToDestinationProjection
failed (e.g., due to a singular transform like scale(0)). This resulted
in using an identity matrix (the fallback return value) instead of
handling the invalid projection, causing incorrect visual rect mappings
(non-empty rects) and potential rendering issues.This CL addresses the
issue by:
1. Adding a SourceToDestinationProjection overload to GeometryMapper
   that returns a success boolean to explicitly signal projection
   failure.
2. Updating ChunkToLayerMapper and PaintChunksToCcLayer to check this
   success status.
3. In PaintChunksToCcLayer, handling invalid projections by pushing an
   empty ClipRectOp.Note on the implementation choice:

A previous iteration attempted to fallback to a slow path or use a
Scale(0) matrix. However, passing a singular matrix (like Scale(0)) to
Graphite backend causes assertions/crashes because Graphite requires
invertible transforms. Therefore, emitting an explicit empty clip
(ClipRectOp) is used to safely and effectively hide the content for
singular/non-invertible transforms.

Bug: 441128445
Test: external/wpt/css/css-transforms/animation/
singular-scale-nested.html

Change-Id: I811db66a7eea48e4fffbef54da504a65faa9a283
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7510168
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1578529}

--

wpt-commits: 47d349dc5566a40e3d1d096b6ddee951d5804a4d
wpt-pr: 57510
2026-02-05 18:16:05 +00:00

17 lines
292 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Reference for Issue 441128445: Nested Scale(0) transforms should not show content</title>
<style>
.container {
width: 100px;
}
</style>
</head>
<body>
<div>Should not see a red FAIL if success!</div>
<div class="container">
</div>
</body>
</html>