[Webkit-unassigned] [Bug 71309] Allow SVG elements to be transformed using webkit-transform

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 1 16:58:11 PDT 2011


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





--- Comment #5 from Dean Jackson <dino at apple.com>  2011-11-01 16:58:11 PST ---
(In reply to comment #4)
> (From update of attachment 113204 [details])
> You're missing the changelogs. Also, why haven't you changed SVGTextElement as well? r-
> 
> Even so, I disagree with the implementation in general. I'd implement 'transform' as a CSS property and the transform attribute would be mapped to the CSS property.

Hmmm.. this is the implementation I was thinking of. We can't make "transform" a CSS property at the moment since the spec isn't done - it needs to be prefixed. Given that, it makes sense to take the first step here, which is to use the existing -webkit-transform style if it is present.

This also has the guarantee that any existing content that breaks will clearly be doing something wrong :) 

Later on we'll move it to an unprefixed "transform".

> I don't believe that this solution would help us a lot. Of course this needs more harmonization with the CSS parser and SVG DOM. I'd start rather with the CSS parser than with a separate implementation of 'transform' attr and  '-webkit-transform'.

I disagree, but I might not be fully understanding the reasoning behind your position. The approach in the patch seems to be the nicest first step: Zero change to any existing SVG content. Prefixed property to use CSS. Uses all the existing code for parsing/setting -webkit-transform.

Dean

> Just see the following example to understand what I mean. The CSS property has the value of the attribute:
> 
> <svg xmlns="http://www.w3.org/2000/svg" onload="start()">
> <script type="text/ecmascript"><![CDATA[
> function start() {
> var e = document.getElementsByTagName('text')[0];
> var c = window.getComputedStyle(e, null);
> alert(c.getPropertyCSSValue('display').cssText);
> }
> ]]></script>
> <text x="40" y="40" display="none">ABC</text>
> </svg>

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