<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#c6">Comment # 6</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 Chromium bug is a WONTFIX as the behaviour is as spec'd, see discussion in <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=625096">https://bugs.chromium.org/p/chromium/issues/detail?id=625096</a>. It looks like on WK2 we're doing the right thing, while on WK1 we're not, and not the other way around as previously thought.

Basically, when drawing an &lt;img&gt; which points to an SVG image in a &lt;canvas&gt;, the size of the &lt;img&gt; is irrelevant. If the &lt;svg&gt; element specifies width/height attributes, then those should be used as the source image size, otherwise the size should be computed based on the SVG image's aspect ratio based on the viewBox attribute and the size of the &lt;canvas&gt; image.

I'll do a pass through our tests to check that we're correctly implementing this.</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>