Bug 232128

Summary: Make transform a proper presentational attribute
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: heycam, karlcow, nmouchtaris, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=263712

Description Simon Fraser (smfr) 2021-10-21 19:51:08 PDT
Our SVG code currently does not treat `transform` as a presentational attribute. `transform-origin` is partially done (see the FIXME in createAttributeNameToCSSPropertyIDMap()). This all needs cleaning up.
Comment 1 Cameron McCormack (:heycam) 2021-10-21 20:17:32 PDT
One tricky thing will be to make SVGTransformableElement.transform.{baseVal,animVal} do the right thing.

https://drafts.csswg.org/css-transforms-1/#transform-attribute-dom
Comment 2 Radar WebKit Bug Importer 2021-10-28 19:52:16 PDT
<rdar://problem/84790424>
Comment 3 Nikolas Zimmermann 2023-11-20 00:07:14 PST
Good catch Karl. Indeed this is the „lazy SVG attribute synchronization“ that apparently exposes this bug. We probably fail to unmap properly..
Comment 4 Nikolas Zimmermann 2023-11-20 00:32:48 PST
Oops ignore the last comment, wrong bug report.

Notes that I tried this two years ago, but it was really hard to beat the speed of SVGTransformList parsing - even when adding multiple of fast paths for certain transformations as CSSParserFastPaths.

But we should repeat the experiment.
The only thing missing is rotation center support for rotate().
If there is interest, I can look up my code from a while ago