Percentage values of transform-origin aren't respected for transforming SVG elements

RESOLVED DUPLICATE of bug 923193

Status

()

Core
SVG
RESOLVED DUPLICATE of bug 923193
4 years ago
3 years ago

People

(Reporter: tophtucker, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 772267 [details]
transformoriginbug.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36

Steps to reproduce:

Scaled down a group in an SVG graphic by transform:scale(x,y) and changed the transform-origin to 50% 100% (center bottom).

(I've tried in Firefox 22 and Aurora 24.0a2.)


Actual results:

Firefox appears to not heed any percentage values for transform-origin, only pixel values — even though in the inspector it claims to have the right values.

This also happens in Webkit, but is fixed (bizarrely) by "font-size: 100%;" being applied to a parent element of the graphic (html, body, or svg) in a linked stylesheet. http://tophtucker.com/icecreambug/


Expected results:

It should respect the percentage-valued transform-origin.

Updated

4 years ago
Attachment #772267 - Attachment mime type: text/plain → text/html

Comment 1

4 years ago
Issue with SVG display lists.
Setting svg.display-lists.painting.enabled=false fixes the bad rendering.

Regression range:
good=2012-08-02
bad=2012-08-03
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=588424024294&tochange=89dcadd42ec4

Jonathan Watt — Bug 776054 - Flip the prefs to enable the use of display lists for SVG painting and hit-testing. r=roc.
Blocks: 776054
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Version: 22 Branch → 17 Branch
Without SVG display lists we won't support CSS transforms on SVG at all. Does the testcase really work correctly in your "good" build, or did the behavior between "good" and "bad" just change? (Which would be expected.)

Comment 3

4 years ago
In the good build, I see that: http://i.imgur.com/KE9BbNc.jpg
I can see why you thought that this was a regression since at first that rendering may seem to be what you'd expect. That happens to be the rendering that you get if you completely remove the style rule though, which is what you'll get prior to bug 776054 when CSS transforms couldn't apply to SVG.

The actual difference between the Nightly rendering and what should be rendered is that the ice cream should be reduced in height by half, but the bottom should stay where it is rather than the top.

So this isn't a regression, but rather a buggy/incomplete feature. Thanks for checking old builds all the same, Loic.
No longer blocks: 776054
Keywords: regression
OS: Mac OS X → All
Hardware: x86 → All
Version: 17 Branch → Trunk
(Reporter)

Comment 5

4 years ago
Thanks for taking a look guys — sorry my test case didn't make it super clear what the "correct" rendering is, but Jonathan, that sounds right. Guess it's not a bug, just not implemented yet.

If it helps, here's Hans Muller's post on bringing CSS transform-origin to SVG on WebKit:
http://hansmuller-webkit.blogspot.com/2012/03/css-transform-origin-coming-to-svg.html
Thanks, that is a helpful link regarding the implementation decisions made for webkit.
Blocks: 779683

Updated

3 years ago
Depends on: 1013421

Updated

3 years ago
No longer depends on: 1013421

Comment 7

3 years ago
I assume that this issue is also causing the behavior here? http://jsfiddle.net/kMZnW/ ?
(Reporter)

Comment 8

3 years ago
Marking this as a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=923193, yeah?
Depends on: 923193

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 923193
You need to log in before you can comment on or make changes to this bug.