Closed
Bug 752583
Opened 13 years ago
Closed 13 years ago
svg elements uniform scaling in html container changed
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 736431
People
(Reporter: laaglu, Unassigned)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120420145725
Steps to reproduce:
Hi,
I write video games in SVG and I noticed the behavior of FF has changed since FF10 or 11 (rendering my games unplayable). I create all my SVGs with just a viewBox (no width and height DOM attribute) and I set the dimensions with CSS styles (usually to 100% in both width and height).
Actual results:
The image is not scaled as it used to be before. Before, the image was scaled according to the xMidYMid default value. Now if the browser window has a width > height, the image is scaled to height x height and a slider is displayed (see sample .html file). In a pure svg document, the scaling still works as expected.
Expected results:
The svg element should be scaled like the equivalent svg element in the pure svg document.
Reporter | ||
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Reporter | ||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
There were recent spec changes in terms of SVG sizing. Not sure which release the corresponding code changes went into...
Component: DOM: CSS Object Model → SVG
QA Contact: style-system → general
Comment 5•13 years ago
|
||
Does adding width/height of 100% to the svg elements fix it.
Comment 6•13 years ago
|
||
Things changed in Firefox 11 when bug 611099 landed.
Reporter | ||
Comment 7•13 years ago
|
||
Yes, adding width="100%" height="100%" to the svg element does the trick. Thanks for the quick reply, you can mark the problem fixed as far as I am concerned.
Updated•13 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•