RESOLVED FIXED Bug 11976
<object> tags should treat width/height on a referenced SVG as intrinsic width/height
https://bugs.webkit.org/show_bug.cgi?id=11976
Summary <object> tags should treat width/height on a referenced SVG as intrinsic widt...
Eric Seidel (no email)
Reported 2006-12-26 00:04:20 PST
<object> tags should treat width/height on a referenced SVG as intrinsic width/height This bug came out of the comments from: http://bugs.webkit.org/show_bug.cgi?id=10526 It might even be a duplicate of bug 10526, but it was hard for me to tell what exactly bug 10526 is about. Hyatt and I (and I think jwatt or tor was present as well) talked about treating <svg> specified width/height as intrinsic height when using an SVG image in an <img> tag or CSS background image. In the comments of bug 10526 it was suggested that we also do so for <object> tags. Making this work would be a nice step in the direction of having real SVG in <img> support.
Attachments
test case to demonstrate the desired behavior (899 bytes, application/xhtml+xml)
2006-12-26 00:15 PST, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2006-12-26 00:15:59 PST
Created attachment 12026 [details] test case to demonstrate the desired behavior I should note, that I know of no browser which behaves the way this test case expects it to be have. Opera does not seem to use width for intrinsic size (at least 9.01 does not). Opera does seem to use the height attribute on the SVG for intrinsic height however.
Eric Seidel (no email)
Comment 2 2007-06-12 10:37:48 PDT
Either way, this should be done after the SVGRenderRoot split, bug 12207.
Rob Buis
Comment 3 2007-06-13 22:31:25 PDT
(In reply to comment #1) > Created an attachment (id=12026) [edit] > test case to demonstrate the desired behavior > > I should note, that I know of no browser which behaves the way this test case > expects it to be have. Opera does not seem to use width for intrinsic size (at > least 9.01 does not). Opera does seem to use the height attribute on the SVG > for intrinsic height however. I am not sure this testcase is correct. Needs discussion with Eric I think. Cheers, Rob.
Eric Seidel (no email)
Comment 4 2007-06-14 09:55:23 PDT
I think this is basically the same bug as: http://bugs.webkit.org/show_bug.cgi?id=10526 One could probably be duped against the other.
Eric Seidel (no email)
Comment 5 2007-06-14 10:17:06 PDT
We discussed the test case. It's correct.
Eric Seidel (no email)
Comment 6 2007-09-29 15:45:25 PDT
void RenderHTMLCanvas::canvasSizeChanged() is a good example of how we could do this. It is called when <canvas> changes size. We just need to add a similar method to RenderPartObject and have SVGSVGElement call it appropriately.
Eric Seidel (no email)
Comment 7 2007-12-27 02:30:16 PST
The real way to fix this is bug 15849.
Pascal
Comment 8 2009-03-16 06:58:47 PDT
This bug is still not solved. I have hit the problem myself. Here is an example: http://pascal.parois.net/public/webkit/arbre.html Firefox 3 and opera 10 render it properly (not opera 9). I don't about IE with the appropriate plugin. This has been tested on the last nighty build : r41707 on linux. Cheers, Pascal
Nikolas Zimmermann
Comment 9 2011-05-27 05:39:53 PDT
The patch on bug 10526 fixes this bug.
Nikolas Zimmermann
Comment 10 2011-05-27 11:29:11 PDT
Fixed in r87526.
Levi Weintraub
Comment 11 2011-07-25 17:31:33 PDT
Re-opening because the fix that was originally landed is being reverted. See Bug 64974. Feel free to close this and open one of the many related ones if they do a better job describing the problem.
Nikolas Zimmermann
Comment 12 2012-05-19 08:33:55 PDT
Closing again, the test case works fine and is covered by tests in trunk.
Note You need to log in before you can comment on or make changes to this bug.