Bug 174285
| Summary: | SVG element's transform and transform-origin computed values are incorrect | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Dima Voytenko <dvoytenko> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | bfulgham |
| Priority: | P2 | ||
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Dima Voytenko
An SVG element styled with `transform` and `transform-origin` renders correctly, but returns wrong computed values.
See http://jsbin.com/yuhoxum/edit?html,js,output
It styles an SVG rect shape with `transform-origin: 50% 50%; transform: scale(0.5)`. The rendering appears to be fully correct. However, reading styles and computed values yields:
computed transform: none
computed origin: 0px 0px
style transform: scale(0.5)
style origin: 50% 50%
Styles are correct, but computed value for origin = `0px 0px` and transform = `none` are both wrong.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Dima Voytenko
It appears, per transform-box spec, the current rendering is also incorrect. The implied transform-origin should be referenced against SVG's viewbox and not the element's border-box. See https://developer.mozilla.org/en-US/docs/Web/CSS/transform-box
Brent Fulgham
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.