Last Comment Bug 719092 - transform: scaleZ(0) makes everything vanish
: transform: scaleZ(0) makes everything vanish
Status: RESOLVED WONTFIX
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86 Linux
: -- minor (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-18 08:57 PST by :Aryeh Gregor (working until September 2)
Modified: 2012-06-01 01:52 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description :Aryeh Gregor (working until September 2) 2012-01-18 08:57:49 PST
Test-case:

data:text/html,<!doctype html>
<div style="background:blue;height:50px;width:100px;
-moz-transform: scaleZ(0)"></div>
<script>
var rect = document.querySelector("div").getBoundingClientRect(); document.body.appendChild(document.createTextNode(
rect.top + " " + rect.right + " " + rect.bottom + " " + rect.left));
</script>

In Firefox 12.0a1 (2012-01-17), this outputs "-35791396 0 0 -35791396" and there's no visible box.  In Chrome 17 dev, adjusted for prefixing, it outputs "8 108 58 8" and the box appears just as though there were no transform applied.  WebKit seems clearly correct -- scaleZ(0) by itself should do nothing visible, because no point on the x-y plane gets moved.  3D transforms that collapse everything to a plane shouldn't stop anything from rendering, as long as that plane isn't perpendicular to the x-y plane.  Only transforms that collapse everything to a line or point should make things disappear.

I wasn't able to test in IE10, so I don't know what it does.
Comment 1 :Aryeh Gregor (working until September 2) 2012-02-06 11:28:18 PST
IE10 Developer Preview behaves like Gecko, but I don't see why that should be correct . . .
Comment 2 :Aryeh Gregor (working until September 2) 2012-02-08 09:25:14 PST
The 2012-02-07 nightly seems to have getBoundingClientRect() correct, although the box still doesn't display.
Comment 3 :Aryeh Gregor (working until September 2) 2012-03-14 14:24:59 PDT
I'm no longer sure the requested behavior is actually desired: https://www.w3.org/Bugs/Public/show_bug.cgi?id=16377
Comment 4 :Aryeh Gregor (working until September 2) 2012-06-01 01:51:55 PDT
The editors decided that Gecko is correct, all invertible matrices cause the content to vanish.
Comment 5 :Aryeh Gregor (working until September 2) 2012-06-01 01:52:21 PDT
(I mean *non*-invertible, obviously)

Note You need to log in before you can comment on or make changes to this bug.