This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15471 - Should resolved value of transform be "none" in some cases?
Summary: Should resolved value of transform be "none" in some cases?
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Simon Fraser
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 15:27 UTC by Aryeh Gregor
Modified: 2012-03-12 20:37 UTC (History)
6 users (show)

See Also:


Attachments

Description Aryeh Gregor 2012-01-09 15:27:34 UTC
"""
The transform property of the style object returned by getComputedStyle contains a DOMString of the form "matrix(a, b, c, d, e, f)" representing the 3x2 matrix that is the result of applying the individual functions listed in the transform property.
"""
http://dev.w3.org/csswg/css3-transforms/#dom-interfaces


Test case 1:

data:text/html,<!doctype html>
<script>alert(getComputedStyle(document.head).transform)</script>

With the property adjusted to msTransform/MozTransform/webkitTransform/OTransform as appropriate, this alerts "none" in all engines (IE9, Firefox 12.0a1, Chrome 17 dev, Opera next 12.00 alpha).

Test case 2:

data:text/html,<!doctype html>
<script>
document.head.style.transform = "none";
alert(getComputedStyle(document.head).transform);
</script>

In IE9, this alerts "matrix(1, 0, 0, 1, 0, 0)" per spec.  In Firefox 12.0a1, Chrome 17 dev, and Opera Next 12.00 alpha, it alerts "none".

Does the spec need to change here, or should browsers change?
Comment 1 Simon Fraser 2012-01-18 06:08:13 UTC
Looks like IE9 has incorrect behavior on the second test case. getComputedStyle().transform should return 'none' unless the element has a transform applied to it.
Comment 2 Aryeh Gregor 2012-01-18 15:19:01 UTC
I'm fine with that, but it's not what the spec currently says.
Comment 3 Simon Fraser 2012-01-25 18:15:41 UTC
I'm adding text like: 

              <p>The computed value of the transform property is a matrix() or matrix3d() value that describes the matrix that results from concatenating the individual transform functions. If the resulting matrix can be represented as a two-dimensional matrix with no loss of information, then a matrix() value is returned, otherwise a matrix3d() value. For elements with no transform applied, the computed value is 'none'.</p>
Comment 4 Aryeh Gregor 2012-03-12 20:37:32 UTC
It looks like this was fixed: http://dvcs.w3.org/hg/csswg/rev/69a97e82974d