| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can you put this behind an enabled-by-default runtime enabled feature?
Can you help me understand why only 2 of the 3 calls to IsHitCandiateForDepthOrder are updated?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can you put this behind an enabled-by-default runtime enabled feature?
Can you help me understand why only 2 of the 3 calls to IsHitCandiateForDepthOrder are updated?
The three calls serve two distinct purposes.
1. The two updated calls compute the z-offset of the current layer itself. `local_transform_state` was wrong here because `CreateLocalTransformState` either calls `Flatten()` (resetting z to 0) or adds a 2D paint offset
(introducing floating-point rounding differences). Since a layer's z in a preserve-3d context is determined solely by its transform container's accumulated transform, `container_transform_state` is correct.
2. The third call (in `HitTestChildren`) compares a child layer's z (already written into `*z_offset` by the child's own recursion) against the calling layer's z. This call doesn't need updating because
`local_transform_state` and `container_transform_state` always yield the same `ComputeZOffset` result here: either the calling layer has a CSS transform and `local_transform_state == container_transform_state` by
definition (line 1373), or it has no CSS transform and the two states differ only by a 2D paint offset which doesn't affect z.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Runtime feature is added, please take a look again, thanks.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Fix hit-test z-offset computation for layers without CSS transforms in preserve-3d
When computing z-offset for depth ordering in a preserve-3d context,
IsHitCandidateForDepthOrder was called with local_transform_state, which
is derived from container_transform_state by applying the layer's local
2D paint offset. This caused two problems:
1. For layers that are not direct children of the transform container
element, CreateLocalTransformState calls Flatten(), which resets
accumulated_transform_ to identity, causing ComputeZOffset to return
0 instead of the correct z value.
2. For direct children, the extra 2D translate operations added to
local_transform_state introduce floating-point rounding differences
compared to sibling layers that went through Flatten(), causing
incorrect depth ordering between coplanar descendants.
The correct transform state for computing a layer's z-depth relative to
its containing flattening layer is container_transform_state itself,
since layers without their own CSS transforms are coplanar with the
transform container and their z-depth is fully determined by the
container's accumulated transform.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/58344
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |