Bug 15943

Summary: -webkit-transform matrix does not work
Product: WebKit Reporter: Erik Arvidsson <erik.arvidsson>
Component: CSSAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: mitz
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 15670    
Description Flags
Rotates a div 30 deg using the matrix value
Parse matrix() arguments as numbers mjs: review+

Description Erik Arvidsson 2007-11-11 18:05:22 PST
The matrix value for -webkit-tranform seems broken. The following value, which means rotate 30 degrees is broken does .

matrix(0.866025px, 0.5px, -0.5px, 0.866025px, 0, 0)

This value works fine with SVG transforms and IE matrix filter so I'm pretty sure my math is correct.

I've tried without px and with and with commas... The px is really confusing. An affine transformation matrix should not have a unit. It seems fine to have units for the dx and dy but not for the ohter 4 elements.

I've verified that this happens both on Windows and on Mac OS X 10.4
Comment 1 Erik Arvidsson 2007-11-11 18:06:24 PST
Created attachment 17191 [details]
Rotates a div 30 deg using the matrix value
Comment 2 mitz 2007-11-11 18:42:45 PST
Yeah, the values are rounded to integers which makes no sense for the first 4 entries
Comment 3 Dave Hyatt 2007-11-11 20:52:52 PST
Yeah should probably just do numbers in all six spots.
Comment 4 mitz 2007-11-22 10:22:57 PST
Created attachment 17444 [details]
Parse matrix() arguments as numbers

The proposed spec says all six entries are numbers...
Comment 5 Maciej Stachowiak 2007-11-22 19:34:41 PST
Comment on attachment 17444 [details]
Parse matrix() arguments as numbers

Comment 6 mitz 2007-11-22 20:11:38 PST
Fixed in <http://trac.webkit.org/projects/webkit/changeset/27978>.