[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
Fri Oct 14 03:54:05 PDT 2011


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





--- Comment #6 from Dean Jackson <dino at apple.com>  2011-10-14 03:54:05 PST ---
(In reply to comment #5)

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

Yeah, I don't really think adding px to the string before sending it to CSS is a good idea. It's better to update the CSS side - adding the features to get on par with SVG (I think the big one is rotation origin).

> Also CSS Transforms support some functions that are not supported by SVGTransform. We need a way to reflect this somehow in SVG DOM.

I don't know if we have to address that until we want to support 3d.

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

I'm not very keen on this. I'd prefer to just ignore the property value, because it allows people to author their CSS in a manner that supports a fallback. In the future we'll support 3d in SVG, but for now people could write:

transform: scale(2) rotate(10deg);
transform: scale(2) rotateY(10deg);

This way they still get to control the effect when 3d is not available. Also, flattened 3d transforms look horrible :)

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

Do we have to worry about that yet? Only when SVG supports the transform-origin property - then we'll need code to test whether it is in SVG or CSS.

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