Bug 234078

Summary: `transform-origin` on SVG elements does not take into account the transform reference box origin
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: SVGAssignee: Martin Robinson <mrobinson>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, ews-watchlist, fmalita, gyuyoung.kim, pdr, rbuis, sabouhallawa, schenney, sergio, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>