Bug 64578 - translate values without units don't work
Summary: translate values without units don't work
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2011-07-14 17:50 PDT by Julien Chaffraix
Modified: 2011-08-18 12:55 PDT (History)
4 users (show)

See Also:


Attachments
Reduction (1.03 KB, text/html)
2011-07-14 17:50 PDT, Julien Chaffraix
no flags Details
Reduction without deps on repaint.js (1.44 KB, text/html)
2011-08-17 11:31 PDT, Julien Chaffraix
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 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.
Comment 1 Kulanthaivel Palanichamy 2011-08-17 11:26:24 PDT
Looks like the reduced test works fine.
Could you please attach the correct test?
Comment 2 Julien Chaffraix 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!
Comment 3 Simon Fraser (smfr) 2011-08-18 10:45:50 PDT
I think this is correct behavior for HTML.
Comment 4 Kulanthaivel Palanichamy 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.
Comment 5 Dean Jackson 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.