<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Drawing an &lt;img&gt; with an SVG source into a &lt;canvas&gt; has incorrect rendering if the SVG viewBox does not match the &lt;img&gt; metrics"
   href="https://bugs.webkit.org/show_bug.cgi?id=159340#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Drawing an &lt;img&gt; with an SVG source into a &lt;canvas&gt; has incorrect rendering if the SVG viewBox does not match the &lt;img&gt; metrics"
   href="https://bugs.webkit.org/show_bug.cgi?id=159340">bug 159340</a>
              from <span class="vcard"><a class="email" href="mailto:graouts&#64;webkit.org" title="Antoine Quint &lt;graouts&#64;webkit.org&gt;"> <span class="fn">Antoine Quint</span></a>
</span></b>
        <pre>The size of the container for the SVGImage is coming from this line in CanvasRenderingContext2D::drawImage(HTMLImageElement&amp;, const FloatRect&amp;, const FloatRect&amp;, const CompositeOperator&amp;, const BlendMode&amp;, ExceptionCode&amp;):

    FloatRect imageRect = FloatRect(FloatPoint(), size(imageElement, ImageSizeBeforeDevicePixelRatio));

In the WK1 case, when SVGImageCache::imageSizeForRenderer() is eventually called, it finds an `image` which has clearly already been laid out and has a 100x100 size, which is used to size the container.

In the WK2 case, SVGImageCache::imageSizeForRenderer() does not find an image and returns the intrinsic size instead, which is 200x200.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>