<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>5175</bug_id>
          
          <creation_ts>2005-09-28 17:41:17 -0700</creation_ts>
          <short_desc>Missing image for SVG embedded in &lt;object&gt; tag in HTML document</short_desc>
          <delta_ts>2005-10-06 04:40:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.sensoryoutput.com/freshview/index_svg.php</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kyle Rove">krove</reporter>
          <assigned_to name="Eric Seidel (no email)">eric</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20879</commentid>
    <comment_count>0</comment_count>
    <who name="Kyle Rove">krove</who>
    <bug_when>2005-09-28 17:41:17 -0700</bug_when>
    <thetext>Overview Description:

HTML document with &lt;object&gt; tags referencing SVG do not show the SVG content, instead displaying 
the missing image icon. HTML pages with the &lt;embed&gt; 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 &lt;object&gt; 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 &amp; Platform: WebKit+SVG nightly build 2005-09-28</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21257</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-03 01:28:00 -0700</bug_when>
    <thetext>Can you point me to an example?  Or a reduced test case?  Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21299</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-03 14:51:20 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21374</commentid>
    <comment_count>3</comment_count>
      <attachid>4202</attachid>
    <who name="Julien Palmas">julien.palmas</who>
    <bug_when>2005-10-04 19:54:39 -0700</bug_when>
    <thetext>Created attachment 4202
patch that makes Webkit+svg render &lt;object&gt; tags with image/svg+xml type

Hack to render html pages with svg in &lt;object&gt; tags.

The problem comes from KWQPixmap.mm, canRenderImageType methods that returns
yes for the serviceType &quot;image/svg+xml&quot;. 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()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21379</commentid>
    <comment_count>4</comment_count>
      <attachid>4202</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-04 22:13:45 -0700</bug_when>
    <thetext>Comment on attachment 4202
patch that makes Webkit+svg render &lt;object&gt; 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&apos;t need any comments on this type of change. 
It would be better to investigate why WebCoreImageRendererFactory allows this
as a MIME type though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21386</commentid>
    <comment_count>5</comment_count>
      <attachid>4206</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-05 00:30:45 -0700</bug_when>
    <thetext>Created attachment 4206
An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21387</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-05 00:33:26 -0700</bug_when>
    <thetext>Thank you Julien for all your hard work on this bug!    I&apos;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&apos;t.

This patch makes it so that WebCore will always default to it&apos;s own SVG rendering for &lt;object&gt; tags (and 
only for object tags), even if the image system says it supports them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21390</commentid>
    <comment_count>7</comment_count>
      <attachid>4206</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-10-05 01:11:50 -0700</bug_when>
    <thetext>Comment on attachment 4206
An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs

r=me</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4202</attachid>
            <date>2005-10-04 19:54:39 -0700</date>
            <delta_ts>2005-10-05 00:30:45 -0700</delta_ts>
            <desc>patch that makes Webkit+svg render &lt;object&gt; tags with image/svg+xml type</desc>
            <filename>patch_for_object_tag</filename>
            <type>text/plain</type>
            <size>924</size>
            <attacher name="Julien Palmas">julien.palmas</attacher>
            
              <data encoding="base64">SW5kZXg6IGt3cS9LV1FQaXhtYXAubW0KPT09PT09PT09PT09PT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IHNoYXJlZEZhY3RvcnldIHN1cHBv
cnRlZE1JTUVUeXBlc10gY29udGFpbnNPYmplY3Q6c2VydmljZVR5cGVdOwogfQogCiBRUGl4bWFw
OjpRUGl4bWFwKCkK
</data>
<flag name="review"
          id="681"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4206</attachid>
            <date>2005-10-05 00:30:45 -0700</date>
            <delta_ts>2005-10-05 01:11:50 -0700</delta_ts>
            <desc>An alternative patch, which fixes HTMLObjectElementImpl to not use image mode for SVGs</desc>
            <filename>object-fix.patch</filename>
            <type>text/plain</type>
            <size>758</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">SW5kZXg6IGh0bWwvaHRtbF9vYmplY3RpbXBsLmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvY3Zz
L3Jvb3QvV2ViQ29yZS9raHRtbC9odG1sL2h0bWxfb2JqZWN0aW1wbC5jcHAsdgpyZXRyaWV2aW5n
IHJldmlzaW9uIDEuODAKZGlmZiAtcCAtdSAtcjEuODAgaHRtbC9odG1sX29iamVjdGltcGwuY3Bw
Ci0tLSBodG1sL2h0bWxfb2JqZWN0aW1wbC5jcHAJMyBPY3QgMjAwNSAyMToxMjoyOSAtMDAwMAkx
LjgwCisrKyBodG1sL2h0bWxfb2JqZWN0aW1wbC5jcHAJNSBPY3QgMjAwNSAwNzozMjowMiAtMDAw
MApAQCAtODM5LDYgKzgzOSwxMiBAQCBib29sIEhUTUxPYmplY3RFbGVtZW50SW1wbDo6aXNJbWFn
ZVR5cGUoCiAgICAgICAgICAgICAgICAgc2VydmljZVR5cGUgPSAidGV4dC9wbGFpbiI7IC8vIERh
dGEgVVJMcyB3aXRoIG5vIE1JTUUgdHlwZSBhcmUgY29uc2lkZXJlZCB0ZXh0L3BsYWluLgogICAg
ICAgICB9CiAgICAgfQorICAgIAorI2lmIFNWR19TVVBQT1JUCisgICAgLy8gRXZlbiBpZiB0aGUg
aW1hZ2Ugc3lzdGVtIHN1cHBvcnRzIGl0LCB3ZSBkb24ndCB3YW50IHRvIHJlbmRlciBTVkdzIGFz
IGltYWdlcy4KKyAgICBpZiAoc2VydmljZVR5cGUgPT0gImltYWdlL3N2Zyt4bWwiKQorICAgICAg
ICByZXR1cm4gZmFsc2U7CisjZW5kaWYKIAogICAgIHJldHVybiBjYW5SZW5kZXJJbWFnZVR5cGUo
c2VydmljZVR5cGUpOwogfQo=
</data>
<flag name="review"
          id="684"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>