WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
53695
Style transform (-webkit-transform: scale3d) with 0-scale renders, but disables mouse events.
https://bugs.webkit.org/show_bug.cgi?id=53695
Summary
Style transform (-webkit-transform: scale3d) with 0-scale renders, but disabl...
W. James MacLean
Reported
2011-02-03 11:00:28 PST
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.
Attachments
Test case with style containing 0-scale.
(1.21 KB, text/html)
2011-02-03 11:01 PST
,
W. James MacLean
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
W. James MacLean
Comment 1
2011-02-03 11:01:21 PST
Created
attachment 81087
[details]
Test case with style containing 0-scale.
Dean Jackson
Comment 2
2011-02-03 11:31:20 PST
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?
Jet Villegas
Comment 3
2013-06-25 12:59:25 PDT
Per spec, this should not be rendered at all:
http://www.w3.org/TR/css3-transforms/#transform-function-lists
Brent Fulgham
Comment 4
2022-07-12 14:18:59 PDT
Firefox and Chrome agree on behavior. Safari fails.
Radar WebKit Bug Importer
Comment 5
2022-07-12 14:19:10 PDT
<
rdar://problem/96910006
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug