Bug 232128 - Make transform a proper presentational attribute
Summary: Make transform a proper presentational attribute
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-21 19:51 PDT by Simon Fraser (smfr)
Modified: 2023-11-20 00:32 PST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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