<?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>32307</bug_id>
          
          <creation_ts>2009-12-09 00:23:31 -0800</creation_ts>
          <short_desc>SVG (and other content) embedded via object tag cannot be loaded from application cache</short_desc>
          <delta_ts>2022-09-04 13:38:20 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></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="Koralewski Benoit">benoit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>michaeln</cc>
    
    <cc>rniwa</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>169920</commentid>
    <comment_count>0</comment_count>
    <who name="Koralewski Benoit">benoit</who>
    <bug_when>2009-12-09 00:23:31 -0800</bug_when>
    <thetext>An html file including a svg file in an object tag, a manifest with the two files.

index.html :
--------------------------------------------------------------
!DOCTYPE html&gt;
&lt;html manifest = &quot;test.manifest&quot;&gt;
&lt;body&gt;
&lt;object data=&quot;foo.svg&quot; type=&quot;image/svg+xml&quot; &gt;&lt;/object&gt;
&lt;/body&gt;
&lt;/html&gt;


foo.svg :
--------------------------------------------------------------
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;&gt;
      &lt;circle id=&quot;myCircle&quot;
              cx=&quot;100&quot; cy=&quot;75&quot; r=&quot;50&quot;
              fill=&quot;blue&quot;
              stroke=&quot;firebrick&quot;
              stroke-width=&quot;3&quot; /&gt;
      &lt;text x=&quot;60&quot; y=&quot;155&quot;&gt;Hello World&lt;/text&gt;
&lt;/svg&gt;

test.manifest :
--------------------------------------------------------------
CACHE MANIFEST
index.html
foo.svg

In offline mode the svg don&apos;t appear !

Ps: it works in firefox</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170541</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-12-10 15:03:12 -0800</bug_when>
    <thetext>One workaround is to use &lt;img&gt; instead of &lt;object&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170634</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-12-10 21:22:15 -0800</bug_when>
    <thetext>It&apos;s is broken due to this code in MainResourceLoader::continueAfterContentPolicy():

        if (status &lt; 200 || status &gt;= 300) {
            bool hostedByObject = frameLoader()-&gt;isHostedByObjectElement();

            frameLoader()-&gt;handleFallbackContent();
            // object elements are no longer rendered after we fallback, so don&apos;t
            // keep trying to process data from their load

            if (hostedByObject)
                cancel();
        }

A response generated in MainResourceLoader::handleDataLoadNow() from substitute data has status of 0, so the substitute data is not used for OBJECT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170635</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-12-10 21:29:13 -0800</bug_when>
    <thetext>This code was added in &lt;http://trac.webkit.org/changeset/13615&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>248979</commentid>
    <comment_count>4</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-07-09 07:17:02 -0700</bug_when>
    <thetext>Changed component to SVG, so it shows up in my all-svg-bugs search.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>249078</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-07-09 10:12:15 -0700</bug_when>
    <thetext>This is not really about SVG, it&apos;s a general issue with OBJECT and appcache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360408</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Nordman">michaeln</who>
    <bug_when>2011-03-01 17:06:57 -0800</bug_when>
    <thetext>This looks like it may be related to https://bugs.webkit.org/show_bug.cgi?id=55500</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>403613</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-05-13 09:52:26 -0700</bug_when>
    <thetext>This is related, but is not a duplicate. The additional problem here is that SubstituteData doesn&apos;t even have a field for response code, so we don&apos;t pass it from ApplicationCacheResource to MainResourceLoader.

This should be a very easy fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896039</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-03 10:31:08 -0700</bug_when>
    <thetext>I changed the test case from Comment 0 into JSFiddle:

Link - https://jsfiddle.net/2fmvz7da/

Only Firefox Nightly 106 show &quot;Image&quot; while other Chrome Canary 107, Safari 15.6.1 and Safari Technology Preview 152 does not show SVG inside object.

Just wanted to share updated testing results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896040</commentid>
    <comment_count>9</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-03 10:32:20 -0700</bug_when>
    <thetext>Just to update - my testing can be wrong because I didn&apos;t test it in offline mode. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896204</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-09-04 13:38:20 -0700</bug_when>
    <thetext>Once an appcache is saved, it intercepts loads even when online. So in a correct test,  the SVG will show up the very first time, but not after that.

This JSFiddle is not a correct test, as this issue is about subresources that are part of appcache, and are loaded separately from the main resource.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>