Visit the attached HTML file scale0.html with Chromium/Safari, both with gpu enabled and not enabled.
The box labelled "broken" has a style element "-webkit-transform: scale3d(0.8,0.8,0)" that is applied when the box is clicked. Two different behaviours are seen, depending on whether GPU acceleration is enabled in the browser or not.
With GPU enabled, clicking on the box labelled "broken" changes the DIV's transform in a way that makes it non-invertible, causing it to be subsequently is removed from hit-testing. After the initial click this element no longer receives mouse events.
With GPU disabled, clicking on the same box appears to work normally, partially because in non-gpu mode WebKit calls makeRenderable() which overrides the element's transform by making it affine (and in the process invertible).
In both cases though the element is rendered.
According to the CSS specs (http://www.w3.org/TR/css3-2d-transforms/), elements with non-invertible transforms should not be rendered:
"In some cases, an animation might cause a transformation matrix to be singular or non-invertible. For example, an animation in which scale moves from 1 to -1. At the time when the matrix is in such a state, the transformed element is not rendered."
This suggests that perhaps the correct behaviour would be to not render the element at all. In any case, it seems desirable that both code paths should produce the same result.
Created attachment 81087 [details]
Test case with style containing 0-scale.
Seems like we need to decide things like:
- does scale to 0 along any axis make something disappear?
- does scale to 0 along any axis make something invisible to events?
- should a Z scale do anything to a 2d-only scene?
- what should happen with rotateY(90deg) scale(0, 1) rotateY(-90deg)? ie. if you scale to 0 along an axis perpendicular to the plane you exist in, does that make you disappear?
Per spec, this should not be rendered at all: