RESOLVED DUPLICATE of bug 1544397223
Images not loading when the SVG document is embedded via <img>
https://bugs.webkit.org/show_bug.cgi?id=97223
Summary Images not loading when the SVG document is embedded via <img>
Florin Malita
Reported 2012-09-20 08:54:01 PDT
Created attachment 164928 [details] PNG image (green rect) not loaded When embedding SVG content via SVGImage, SVGImageElements are not loaded. Chromium issue: http://code.google.com/p/chromium/issues/detail?id=149180
Attachments
PNG image (green rect) not loaded (658 bytes, text/html)
2012-09-20 08:54 PDT, Florin Malita
no flags
Florin Malita
Comment 1 2012-09-20 09:04:47 PDT
Seems to be caused by the SVGImage resource loader not having autoLoadImages set (because the page settings are default-initialized). I believe it's safe to enable it. There is a warning in SVGImage::dataChanged() regarding self-referencing SVGImages: // FIXME: If this SVG ends up loading itself, we might leak the world. // The Cache code does not know about CachedImages holding Frames and // won't know to break the cycle. // This will become an issue when SVGImage will be able to load other // SVGImage objects, but we're safe now, because SVGImage can only be // loaded by a top-level document. Some quick testing indicates that even with autoLoadImages enabled, the above still holds: because the SVGImage document doesn't have a baseURL, any attempt to resolve the URL for nested SVGImages returns "", effectively limiting the recursion to one level. We can always add a test to catch any future breakage in this area.
Florin Malita
Comment 2 2012-09-20 16:06:01 PDT
Unfortunately, things are not quite as simple for non-Chromium platforms because they require a valid networking context/frame loader client (which SVGImage::dataChanged does not provide). So flipping the auto load bit is not enough...
Alexey Proskuryakov
Comment 3 2012-09-21 10:20:21 PDT
*** This bug has been marked as a duplicate of bug 15443 ***
Note You need to log in before you can comment on or make changes to this bug.