Bug 234078 - `transform-origin` on SVG elements does not take into account the transform reference box origin
Summary: `transform-origin` on SVG elements does not take into account the transform r...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-09 05:46 PST by Martin Robinson
Modified: 2021-12-13 02:31 PST (History)
11 users (show)

See Also:


Attachments
Patch (7.50 KB, patch)
2021-12-09 05:50 PST, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2021-12-09 05:46:15 PST
When setting the transform-origin attribute on SVG elements, the resulting origin is not properly taking into account the transform reference box origin. Instead only the size is taken into account, which means that the origin is often wrong.
Comment 1 Martin Robinson 2021-12-09 05:50:49 PST
Created attachment 446531 [details]
Patch
Comment 2 Nikolas Zimmermann 2021-12-10 02:31:01 PST
Comment on attachment 446531 [details]
Patch

Thanks Martin, looks good: unofficial, r=me - given that there is sufficient test coverage (percentage transform-origin, transform-origin + various transform-box modes etc. -- this I did not check).

This is all handled in LBSE as well, I expect these testcases to pass as well with the new SVG engine.
Comment 3 EWS 2021-12-13 02:30:48 PST
Committed r286942 (245167@main): <https://commits.webkit.org/245167@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446531 [details].
Comment 4 Radar WebKit Bug Importer 2021-12-13 02:31:59 PST
<rdar://problem/86403608>