<?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>97223</bug_id>
          
          <creation_ts>2012-09-20 08:54:01 -0700</creation_ts>
          <short_desc>Images not loading when the SVG document is embedded via &lt;img&gt;</short_desc>
          <delta_ts>2012-09-21 10:20:21 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>15443</dup_id>
          
          <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="Florin Malita">fmalita</reporter>
          <assigned_to name="Florin Malita">fmalita</assigned_to>
          <cc>krit</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>724551</commentid>
    <comment_count>0</comment_count>
      <attachid>164928</attachid>
    <who name="Florin Malita">fmalita</who>
    <bug_when>2012-09-20 08:54:01 -0700</bug_when>
    <thetext>Created attachment 164928
PNG image (green rect) not loaded

When embedding SVG content via SVGImage, SVGImageElements are not loaded.

Chromium issue: http://code.google.com/p/chromium/issues/detail?id=149180</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>724555</commentid>
    <comment_count>1</comment_count>
    <who name="Florin Malita">fmalita</who>
    <bug_when>2012-09-20 09:04:47 -0700</bug_when>
    <thetext>Seems to be caused by the SVGImage resource loader not having autoLoadImages set (because the page settings are default-initialized). I believe it&apos;s safe to enable it. 

There is a warning in SVGImage::dataChanged() regarding self-referencing SVGImages:

        // FIXME: If this SVG ends up loading itself, we might leak the world.
        // The Cache code does not know about CachedImages holding Frames and
        // won&apos;t know to break the cycle.
        // This will become an issue when SVGImage will be able to load other
        // SVGImage objects, but we&apos;re safe now, because SVGImage can only be
        // loaded by a top-level document.

Some quick testing indicates that even with autoLoadImages enabled, the above still holds: because the SVGImage document doesn&apos;t have a baseURL, any attempt to resolve the URL for nested SVGImages returns &quot;&quot;, effectively limiting the recursion to one level. We can always add a test to catch any future breakage in this area.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>724949</commentid>
    <comment_count>2</comment_count>
    <who name="Florin Malita">fmalita</who>
    <bug_when>2012-09-20 16:06:01 -0700</bug_when>
    <thetext>Unfortunately, things are not quite as simple for non-Chromium platforms because they require a valid networking context/frame loader client (which SVGImage::dataChanged does not provide). So flipping the auto load bit is not enough...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>725616</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-09-21 10:20:21 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 15443 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>164928</attachid>
            <date>2012-09-20 08:54:01 -0700</date>
            <delta_ts>2012-09-20 08:54:01 -0700</delta_ts>
            <desc>PNG image (green rect) not loaded</desc>
            <filename>svg-image-test.html</filename>
            <type>text/html</type>
            <size>658</size>
            <attacher name="Florin Malita">fmalita</attacher>
            
              <data encoding="base64">PGh0bWw+PGJvZHk+CiAgPGltZyBzcmM9ImRhdGE6aW1hZ2Uvc3ZnK3htbCwKICAgIDxzdmcgeG1s
bnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53
My5vcmcvMTk5OS94bGluayc+CiAgICAgIDxpbWFnZSB3aWR0aD0nMTAwJyBoZWlnaHQ9JzEwMCcg
eGxpbms6aHJlZj0nZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdB
QUFHUUFBQUJrQ0FJQUFBRC9nQUlEQUFBQUFYTlNSMElBcnM0YzZRQUFBQWx3U0ZsekFBQUxFd0FB
Q3hNQkFKcWNHQUFBQUFkMFNVMUZCOXdKRkE4aE1qUlgxeE1BQUFBWmRFVllkRU52YlcxbGJuUUFR
M0psWVhSbFpDQjNhWFJvSUVkSlRWQlhnUTRYQUFBQW9FbEVRVlI0MnUzUU1RRUFBQWdEb0duL0VF
YTFncDhQUktBeTRhZ1Z5SklsUzVZc1dRcGt5WklsUzVZc0JiSmt5WklsUzVZQ1diSmt5WklsUzRF
c1diSmt5WktsUUpZc1diSmt5VklnUzVZc1diSmtLWkFsUzVZc1diSVV5SklsUzVZc1dRcGt5Wkls
UzVZc0JiSmt5WklsUzVZQ1diSmt5WklsUzRFc1diSmt5WktsUUpZc1diSmt5VklnUzVZc1diSmtL
WkFsUzVZc1diSVV5SkwxYlFIbG5RRm8wTXhCUUFBQUFBQkpSVTVFcmtKZ2dnPT0nLz4KICAgIDwv
c3ZnPgogICI+PC9pbWc+CjwvYm9keT48L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>