WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
5175
Missing image for SVG embedded in <object> tag in HTML document
https://bugs.webkit.org/show_bug.cgi?id=5175
Summary
Missing image for SVG embedded in <object> tag in HTML document
Kyle Rove
Reported
2005-09-28 17:41:17 PDT
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
Attachments
patch that makes Webkit+svg render <object> tags with image/svg+xml type
(924 bytes, patch)
2005-10-04 19:54 PDT
,
Julien Palmas
eric
: review-
Details
Formatted Diff
Diff
An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs
(758 bytes, patch)
2005-10-05 00:30 PDT
,
Eric Seidel (no email)
mjs
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2005-10-03 01:28:00 PDT
Can you point me to an example? Or a reduced test case? Thanks.
Eric Seidel (no email)
Comment 2
2005-10-03 14:51:20 PDT
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
Julien Palmas
Comment 3
2005-10-04 19:54:39 PDT
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()
Eric Seidel (no email)
Comment 4
2005-10-04 22:13:45 PDT
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.
Eric Seidel (no email)
Comment 5
2005-10-05 00:30:45 PDT
Created
attachment 4206
[details]
An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs
Eric Seidel (no email)
Comment 6
2005-10-05 00:33:26 PDT
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.
Maciej Stachowiak
Comment 7
2005-10-05 01:11:50 PDT
Comment on
attachment 4206
[details]
An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs r=me
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug