svg elements uniform scaling in html container changed

RESOLVED DUPLICATE of bug 736431

Status

()

defect
RESOLVED DUPLICATE of bug 736431
7 years ago
7 years ago

People

(Reporter: laaglu, Unassigned)

Tracking

12 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

Reporter

Description

7 years ago
Posted file ffCssSizing.html
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

7 years ago
Reporter

Comment 2

7 years ago
Reporter

Comment 3

7 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
Does adding width/height of 100% to the svg elements fix it.
Things changed in Firefox 11 when bug 611099 landed.
Reporter

Comment 7

7 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.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 736431
You need to log in before you can comment on or make changes to this bug.