Bug 82487 - SVG content in tables has sizing problems
Summary: SVG content in tables has sizing problems
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philip Rogers
URL: http://dbaron.org/log/20110225-blur-r...
Keywords:
: 95763 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-28 11:12 PDT by Stephen Chenney
Modified: 2014-05-13 08:08 PDT (History)
7 users (show)

See Also:


Attachments
SVG in table with no width height (651 bytes, text/html)
2012-03-28 11:13 PDT, Stephen Chenney
no flags Details
SVG in table with display:block (666 bytes, text/html)
2012-03-28 11:13 PDT, Stephen Chenney
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Chenney 2012-03-28 11:12:37 PDT
When svg is placed inside a table with no width and height on the svg element, one would expect it to pull the width and height from the table cell size, possibly modified for a viewbox aspect ratio.

We totally fail on this when no width or height is given for the svg element. See cr119708-no-width-height.html

We get it wrong, but less wrong, when we specify block display. See cr119708-display-block.html
Comment 1 Stephen Chenney 2012-03-28 11:13:08 PDT
Created attachment 134340 [details]
SVG in table with no width height
Comment 2 Stephen Chenney 2012-03-28 11:13:35 PDT
Created attachment 134341 [details]
SVG in table with display:block
Comment 3 Stephen Chenney 2012-03-28 11:15:13 PDT
The behavior for display:block seems to have improved recently (nothing was displayed at all in Chrome 18) but it is still not correct.
Comment 4 Nikolas Zimmermann 2012-03-29 00:19:31 PDT
(In reply to comment #3)
> The behavior for display:block seems to have improved recently (nothing was displayed at all in Chrome 18) but it is still not correct.
Verified, the same in trunk on Mac. A quick FYI: intrinsic sizing + inline SVG is the last TODO item, in the area of intrinsic sizing. Over the last months SVG in <object> / <embed> / <iframe> / <html:img> / <svg:image> and background-image/border-image/mask-image got implemented and now work as desired. Figuring out the correct size in inline SVG is not yet perfect.
Comment 5 Thomas Dybdahl Ahle 2012-09-05 20:27:33 PDT
The two testcases seam to work in Chrome 21.
However this one still doesn't: http://jsfiddle.net/eLVYJ/
Works fine in Firefox 15.
Comment 6 Philip Rogers 2012-09-12 10:26:18 PDT
*** Bug 95763 has been marked as a duplicate of this bug. ***
Comment 7 Dirk Schulze 2014-05-13 08:08:05 PDT
Fixed! Finally.