Bug 82288

Summary: nested image tags fail on svg's
Product: WebKit Reporter: Ezzy <edekleaner>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Critical CC: krit, rhodovan.u-szeged, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.7   
Attachments:
Description Flags
zip file of folder with example svg files none

Ezzy
Reported 2012-03-26 19:55:00 PDT
Created attachment 133964 [details] zip file of folder with example svg files using a svg that contains another svg (via image tag) that contains another svg (via image tag) fails. A variant is if each svg loads in own style sheet it kills style sheets for any previous svg's. (not demonstrated here) Interestingly, this works on OPERA... Fails in a different way on firefox (different visual representation) and fails on chrome and safari (with different visual sizes of rect) Included is a zip folder of files that demonstrate the problem. path.svg contains drawing commands image circle.svg circle.svg contains drawing commands image rect.svg rect.svg contains drawing commands path1.svg contains drawing commands image rect.svg image circle.svg path2.svg contains drawing commands image rect.svg file name and contents below (as well as zipped attachment) filename:circle.svg <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 100"> <title>Circle with image Rect SVG</title> <a xlink:href="rect.svg" xlink:title="Link to rect alone from circle"> <circle cx="50" cy="50" r="50" stroke="rgb(255,228,244)" stroke-width="5" stroke-dasharray="40,20" fill="none" /> <image x="0" y="0" xlink:href='rect.svg' width='100%' height='100%'/> </a> </svg> filename:path1.svg <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 100"> <title>Main Svg containing imaged circle containing imaged rect</title> <a xlink:href="path2.svg" xlink:title="Link to pathexample"> <path d="M 250 0 l -50 100 h 100z" fill="blue"/> <image x="0" y="0" xlink:href='rect.svg' width='100%' height='100%'/> <image x="0" y="0" xlink:href='circle.svg' width='100%' height='100%'/> </a> </svg> filename:path2.svg <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 100"> <title>Main Svg containing path containing imaged rect</title> <a xlink:href="path.svg" xlink:title="Link to nested path"> <path d="M 250 0 l -50 100 h 100z" fill="blue"/> <image x="0" y="0" xlink:href='rect.svg' width='100%' height='100%'/> </a> </svg> filename:path.svg <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 100"> <title>Main Svg containing imaged circle containing imaged rect</title> <a xlink:href="circle.svg" xlink:title="Link to circle"> <path d="M 250 0 l -50 100 h 100z" fill="blue"/> <image x="0" y="0" xlink:href='circle.svg' width='100%' height='100%'/> </a> </svg> filename:rect.svg <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 100"> <title>Rect with style sheet</title> <a xlink:href="path1.svg" xlink:title="Link to aggrigate containing path containting circle containing Rect)"> <rect x="100" y="0" width="150" height="100" fill="rgb(5,228,4)"/> </a> </svg>
Attachments
zip file of folder with example svg files (4.95 KB, application/octet-stream)
2012-03-26 19:55 PDT, Ezzy
no flags
Nikolas Zimmermann
Comment 1 2012-03-27 01:22:11 PDT
Thanks for the bug report, we don't support sub-resource loading in SVGImages at the moment. CC'ing Reni.
Ezzy
Comment 2 2012-03-27 10:25:20 PDT
(In reply to comment #1) > Thanks for the bug report, we don't support sub-resource loading in SVGImages at the moment. > CC'ing Reni. Actually one level of sub SVG works. I believe that this is a rather interesting problem, due to the fact that users are going to have to disassemble an SVG file to know how many nests are involved. Could this at least spit out a console error to let the user have a clue as to what is happening? Or keep on recursing to attempt to display the image? Thanks so. SVG MAIN <- DISPLAYS SVG FIRST NEST <- DISPLAYS without SVG IMAGE SVG SECOND NEST (IN SVG FIRST NEST) <- DOES NOT DISPLAY DISPLAYS
Dirk Schulze
Comment 3 2014-05-13 08:00:33 PDT
(In reply to comment #2) > (In reply to comment #1) > > Thanks for the bug report, we don't support sub-resource loading in SVGImages at the moment. > > CC'ing Reni. > > Actually one level of sub SVG works. It did but shouldn't anymore. > > I believe that this is a rather interesting problem, due to the fact that users are going to have to disassemble an SVG file to know how many nests are involved. Could this at least spit out a console error to let the user have a clue as to what is happening? Or keep on recursing to attempt to display the image? > > Thanks > > so. > > SVG MAIN <- DISPLAYS > SVG FIRST NEST <- DISPLAYS without SVG IMAGE > SVG SECOND NEST (IN SVG FIRST NEST) <- DOES NOT DISPLAY DISPLAYS Yes, there could be a console message warning the user that further external resources can not be loaded. dataURL should work but don't at the moment. We have a bug for that.
Note You need to log in before you can comment on or make changes to this bug.