W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: webkit-transform translate values clipped to integers?

From: Simon Fraser <smfr@me.com>
Date: Mon, 07 Feb 2011 08:50:20 -0800
Cc: "www-style@w3.org" <www-style@w3.org>
Message-id: <B84178A9-612F-40E0-9592-B7DD354471F3@me.com>
To: Dan Clark <dclark@adobe.com>
On Jan 13, 2011, at 12:34 am, Dan Clark wrote:

>  We have observed that -webkit-transform: translate(14.95px, -12.95px) clips to integers. It is equivalent to -webkit-transform: translate(14px, -12px).
> Is this expected? Is there any way top get translate to not clip the values? Is there any documentation on this behavior? Would using something besides px help?
>  I can work around this issue by changing translate(14.95px, -12.95px) to matrix(1, 0, 0, 1, 14.95, -12.95). This gives us correct behavior.
>  Some may argue that this is only a subpixel positioning issue but this translate may get concat'ed with a subsequent scaling matrix casing the clipping error to be greatly magnified.
> I could provide a simple example if requested.

This is a bug in WebKit, and we're aware of it <https://bugs.webkit.org/show_bug.cgi?id=52699>.

There have been previous discussions on the issue of whether matrix() should take Lengths, which is related to the difference in behavior between translate() and matrix(). [If we fixed webkit to take Lengths in matrix(), that would round too unless we fixed the above bug.]

Received on Monday, 7 February 2011 16:51:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:56 UTC