[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 23:26:17 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=70025





--- Comment #5 from Dirk Schulze <krit at webkit.org>  2011-10-13 23:26:17 PST ---
(In reply to comment #4)
> 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.
This is planned for SVG 2.0. The current spec won't be updated. Also consider that SMILAnimation code needs to get updated (but that shouldn't be that hard).

> 
> 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).
I suggested that on the telcon as well.

> 
> 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.
IIRC Simon agreed to add the missing functionality to CSS Transforms. To the units, if you add the units automatically, how can you reflect this with SVGTransform? In SVG we differ between unit less values and values with units (even if unit less and applying 'px' is the same). Also CSS Transforms support some functions that are not supported by SVGTransform. We need a way to reflect this somehow in SVG DOM.

> 
> 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)
I'd handle it like in HTML when HW acceleration is disabled. Means Ignore z-value in origin and transform 3dtransforms to 2dtransforms. Origin attribute will be supported in SVG 2.0.

Just another note: The origin default value differs between HTML and SVG. For SVG it needs to be (0%,0%) to the bounding box.

-- 
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