Overview Description: HTML document with <object> tags referencing SVG do not show the SVG content, instead displaying the missing image icon. HTML pages with the <embed> tag, do properly show the SVG content, as in http://www.sensoryoutput.com/freshview/index_svg2.php Steps to Reproduce: 1) Create an HTML page with <object> tag referencing an SVG document. 2) View that HTML page. Actual Results: A missing image icon shows up in place of the expected SVG document. Expected Results: Should see SVG document. Build Date & Platform: WebKit+SVG nightly build 2005-09-28
Can you point me to an example? Or a reduced test case? Thanks.
Ok, now I notice the URL given is actually an example: http://www.sensoryoutput.com/freshview/index_svg.php but directly accessing the svg: http://www.sensoryoutput.com/mint/pepper/kylerove/freshview/caches/pastweek_graph.svg works. Definitely a bug, and different from http://bugzilla.opendarwin.org/show_bug.cgi?id=5246
Created attachment 4202 [details] patch that makes Webkit+svg render <object> tags with image/svg+xml type Hack to render html pages with svg in <object> tags. The problem comes from KWQPixmap.mm, canRenderImageType methods that returns yes for the serviceType "image/svg+xml". Is this a desired behaviour that WebCoreImageRendererFactory supports the svg MIME type ? If yes, the hack should not take place in canRenderImageType but rather in html_objectimpl.cpp, HTMLObjectElementImpl::attach()
Comment on attachment 4202 [details] patch that makes Webkit+svg render <object> tags with image/svg+xml type So a couple things. 1. We use spaces and not tabs, per: http://webkit.opendarwin.org/blog/?page_id=25 2. We would need any SVG specific changes to KWQ to be inside SVG_SUPPORT change blocks. Otherwise this looks OK. We don't need any comments on this type of change. It would be better to investigate why WebCoreImageRendererFactory allows this as a MIME type though.
Created attachment 4206 [details] An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs
Thank you Julien for all your hard work on this bug! I've gone ahead and adapted your patch and moved the code into HTMLObjectElementImpl. What was causing this was the fact that I created an NSSVGImageRep which registers with the NSImage system as able to support SVG images. Then, due to: http://bugzilla.opendarwin.org/show_bug.cgi?id=5270 WebKit thought it could support SVGs when it really couldn't. This patch makes it so that WebCore will always default to it's own SVG rendering for <object> tags (and only for object tags), even if the image system says it supports them.
Comment on attachment 4206 [details] An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs r=me