Last Comment Bug 719446 - getComputedStyle().MozTransform shouldn't have "px" in it
: getComputedStyle().MozTransform shouldn't have "px" in it
Product: Core
Classification: Components
Component: DOM: CSS Object Model (show other bugs)
: Trunk
: x86 Linux
: -- enhancement (vote)
: mozilla13
Assigned To: Aryeh Gregor (:ayg) (next working March 28-April 26)
: Andrew Overholt [:overholt]
Depends on:
Blocks: 435293
  Show dependency treegraph
Reported: 2012-01-19 08:16 PST by Aryeh Gregor (:ayg) (next working March 28-April 26)
Modified: 2012-02-10 19:19 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (22.48 KB, patch)
2012-02-09 08:04 PST, Aryeh Gregor (:ayg) (next working March 28-April 26)
roc: review+
Details | Diff | Splinter Review

Description Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-01-19 08:16:13 PST
Test case:

data:text/html,<!doctype html>
<body style=-moz-transform:scale(1)>
document.body.textContent =

Firefox 12.0a1 (2012-01-17) outputs "matrix(1, 0, 0, 1, 0px, 0px)".  All other browsers (IE9, Chrome 17 dev, Opera Next 12.00 alpha) omit the "px" part.  See <>.  Other browsers omit the "px", of course, because they don't support it (bug 719054, <>).  But even if bug 719054 winds up WONTFIX, I still think "px" should be omitted from computed styles:

* The matrix works in all browsers without "px", including Gecko, but only in Gecko with "px".
* A length or percentage is always resolved to "px" anyway, so the length unit never adds anything.  It's not like Gecko outputs things like "50%" in the last entries, where you'd lose information by converting to pixels.
* Without "px" it's shorter.
* All other browsers omit "px" already, so if we want interop, the no-"px" behavior is easiest to converge on.

I can see the advantages to *accepting* length units in these entries, but not *outputting* them.
Comment 1 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-02-09 08:04:55 PST
Created attachment 595748 [details] [diff] [review]
Patch v1

David Baron said in bug 719054 comment 1 that <length>/<percentage> should still be accepted in matrix()/matrix3d() until we unprefix.  But even if that's the case, I don't see any reason why it should be output in getComputedStyle().
Comment 2 Mozilla RelEng Bot 2012-02-09 08:08:26 PST
Autoland Patchset:
	Patches: 595748
	Branch: mozilla-central => try
Try run started, revision a88990c581cb. To cancel or monitor the job, see:
Comment 3 Mozilla RelEng Bot 2012-02-09 13:31:06 PST
Try run for a88990c581cb is complete.
Detailed breakdown of the results available here:
Results (out of 211 total builds):
    success: 178
    warnings: 19
    failure: 14
Builds (or logs if builds failed) available at:
Comment 5 Ed Morley [:emorley] 2012-02-10 19:19:38 PST

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