RESOLVED INVALID 64578
translate values without units don't work
https://bugs.webkit.org/show_bug.cgi?id=64578
Summary translate values without units don't work
Julien Chaffraix
Reported 2011-07-14 17:50:49 PDT
Created attachment 100904 [details] Reduction FF and Opera apply the transformation where WebKit uses the top / left information and ignores the transformation. Attached is a reduction.
Attachments
Reduction (1.03 KB, text/html)
2011-07-14 17:50 PDT, Julien Chaffraix
no flags
Reduction without deps on repaint.js (1.44 KB, text/html)
2011-08-17 11:31 PDT, Julien Chaffraix
no flags
Kulanthaivel Palanichamy
Comment 1 2011-08-17 11:26:24 PDT
Looks like the reduced test works fine. Could you please attach the correct test?
Julien Chaffraix
Comment 2 2011-08-17 11:31:18 PDT
Created attachment 104201 [details] Reduction without deps on repaint.js > Could you please attach the correct test? There was a dependency on repaint.js in the previous one. The new one does not have that (it was meant to be a repaint test in the first place). Thanks for noticing!
Simon Fraser (smfr)
Comment 3 2011-08-18 10:45:50 PDT
I think this is correct behavior for HTML.
Kulanthaivel Palanichamy
Comment 4 2011-08-18 11:00:07 PDT
The given test fails because of missing unit identifier (px) in '-webkit-transform: translate(100, 100);' property. FF and Opera have no problem in assuming 'px' in case of missing unit identifier in transform property. The CSS3 spec http://www.w3.org/TR/css3-2d-transforms/#transform-values says <translation-value> is defined as a <length> or <percentage> value, and the <angle> type is defined by CSS Values and Units. and in http://www.w3.org/TR/css3-values/#lengths The format of a length value (denoted by <length>) is a <number> immediately followed by a unit identifier (e.g., 'px', 'gd'). After the '0' length, the unit identifier is optional. There is no default assumption specified in case of missing unit identifier in the spec. I think WebKit follows the spec correctly but FF and Opera are not.
Dean Jackson
Comment 5 2011-08-18 12:55:01 PDT
Yes, this is correct behaviour. Without the unit the transform is invalid. There is a plan to eventually promote SVG's transform to a property in which case we'll have to allow unitless values, but it still might not apply to HTML.
Note You need to log in before you can comment on or make changes to this bug.