[Webkit-unassigned] [Bug 68995] Height of SVG element is incorrectly calculated when svg when width of containing element is set as a percentage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 9 22:26:25 PDT 2012


--- Comment #8 from Dirk Schulze <krit at webkit.org>  2012-07-09 22:26:25 PST ---
(In reply to comment #2)
> I am having the same problem in regards to SVG and height.
> Expected Behavior:
> An SVG element with a viewBox attribute should responsively scale to fit the div element it is within, and the div element should accurately scale based on the aspect ratio of the viewBox.  In firefox this behavior is accurate and consistent.

It is consistent, but definitely not accurate since it does not take the default value for preserveAspectRatio into account.

Just open your black SVG example snippets as standalone in any browser, then resize the window. You'll see that the black rect won't fit into the whole window, what it should following your assumptions on the pasted test.

It doesn't because of the default value of preserveAspectRatio. Therefore WebKit is correct and Firefox and Opera are wrong on this particular part of the test.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list