[Webkit-unassigned] [Bug 70025] Merge CSS and SVG 2D Transforms according to FX 2D Transforms

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 13 15:05:14 PDT 2011


Dean Jackson <dino at apple.com> changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1

--- Comment #4 from Dean Jackson <dino at apple.com>  2011-10-13 15:05:13 PST ---
There is general consensus to move the SVG transform attribute to a CSS property. The spec hasn't been updated yet, but everyone agrees.

I've been talking to the folks at Adobe and we've come up with the following plan:

1. Have the SVG renderer use the RenderStyle::transform() rather than the transform attribute, in the case where the RenderStyle's transform is not null. This means no existing SVG content should break. People will be able to use CSS transforms on SVG through the -webkit-transform property (only via a style sheet). Note that the CSS property requires units (so you won't be simply able to copy an SVG transform attribute to a CSS property). This should also mean that CSS animations/transitions work.

2. Update the SVG DOM so that SVGTransformable (or whatever its called) reflects the CSS value if present (this might just work after step 1... sorry, haven't looked that deep in the code).

3. Now start to merge the transform attribute into a presentational attribute. As Dirk says, there are syntax differences, so maybe we'll still need two code paths - one to parse the property when specified as an attribute, and the existing CSS parser. Obviously we can't break existing content. We could also update the CSS parser to have a special mode when in the context of SVG, but I don't think that's a good idea. Or, we could add "px" in the right places in the attribute string before we pass it over to the CSS parser.

4. Support transform origin in SVG?

What happens when we get a 3D transform? There is a helper function that tells you, given a particular transform, if it is 3d or not. For now we could throw out any property value that isn't 3d in SVG. (It's a bigger project to rewrite the SVG renderer to use "layers" that can be composited and thus work with 3d)


Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list