New issue
Advanced search Search tips

Issue 231622 link

Starred by 7 users

Issue metadata

Status: Duplicate
Merged: issue 308992
Owner: ----
Closed: May 2014
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

SVG Inline content incorrectly sizes

Project Member Reported by schenney@chromium.org, Apr 15 2013

Issue description

Migrated from WebKit Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=82489
Originally reported 2012-03-28 11:18 PST by Stephen Chenney (schenney@chromium.org).


Description:
Created an attachment (id=134346) [https://bugs.webkit.org/attachment.cgi?id=134346] [details] [https://bugs.webkit.org/attachment.cgi?id=134346&action=edit]
Repro case

When svg is included inline with text in an html document with the width defined and a viewbox, it negotiates a 100% height. Other browsers set the height to preserve the given width and aspect ratio from the viewbox, as one would hope for.



Attachments:
2012-03-28 11:18 PST: Repro case [https://bugs.webkit.org/attachment.cgi?id=134346&action=prettypatch]



Comments:
================================

Comment #1
Posted on 2012-03-29 00:22:21 PST by Nikolas Zimmermann (zimmermann@kde.org)

As noted in the other bug report 82487, intrinsic sizing for inline SVG is just not implemented yet. Fortunately the framework for that is finished, it's just a matter of actually finishing it :-)

================================

Comment #2
Posted on 2012-09-27 15:18:58 PST by Zach Leatherman (zachleatherman@gmail.com)

Just a note for future visitors, I had luck setting max-height: 100% on the inline svg element as a workaround.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 20 2013

Labels: -WebKit-ID-82489 WebKit-ID-82489-NEW
https://bugs.webkit.org/show_bug.cgi?id=82489

Comment 2 by estell...@gmail.com, May 30 2013

Similar issue: chrome is defaulting to height 100% and width 100% even though the UA stylesheet does not specify this and even when set to display:inline or inline-block.

Test case:
http://dabblet.com/gist/5681165

because it is defaulting to height: 100%; width: 100%; <svg> within an html file is not observing the preserveAspectRatio attribute.
Can we please get an update on this? It's been over a year, and this family of bugs is still standing. Even IE10 gets SVG intrinsic sizing right. Webkit/Blink is now the holdout.

The key part of the 1.1 spec, from my point of view, is that when either/both height or width attributes are omitted, the intrinsic proportion gets derived from the viewBox, if specified:

http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing

This is the basic "responsive" use case. If the full framework you're referring to has foundered somehow, can we get a narrowly targeted patch?

Comment 4 by davve@opera.com, Oct 10 2013

I posted a related post to www-svg: http://lists.w3.org/Archives/Public/www-svg/2013Oct/0014.html to get some consensus what we should actually implement in Blink.

Comment 5 by davve@opera.com, May 27 2014

Mergedinto: 308992
Status: Duplicate
Fixed by the SVG sizing rewrite in  issue 308992 .

Sign in to add a comment