<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:david+webkit&#64;limnu.com" title="David &lt;david+webkit&#64;limnu.com&gt;"> <span class="fn">David</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Changing canvas height immediately after page load does not relayout canvas"
   href="https://bugs.webkit.org/show_bug.cgi?id=156097">bug 156097</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>david+webkit&#64;limnu.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Changing canvas height immediately after page load does not relayout canvas"
   href="https://bugs.webkit.org/show_bug.cgi?id=156097#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Changing canvas height immediately after page load does not relayout canvas"
   href="https://bugs.webkit.org/show_bug.cgi?id=156097">bug 156097</a>
              from <span class="vcard"><a class="email" href="mailto:david+webkit&#64;limnu.com" title="David &lt;david+webkit&#64;limnu.com&gt;"> <span class="fn">David</span></a>
</span></b>
        <pre>I believe this is not a bug, but the expected &amp; correct behavior.

See these articles for details:

<a href="http://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html">http://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html</a>
<a href="https://www.khronos.org/webgl/wiki/HandlingHighDPI">https://www.khronos.org/webgl/wiki/HandlingHighDPI</a>
<a href="http://www.html5rocks.com/en/tutorials/canvas/hidpi/">http://www.html5rocks.com/en/tutorials/canvas/hidpi/</a>

You can get what you want in your test code by changing the line:

canvas.height = 1000;

to:

canvas.style.height = &quot;1000px&quot;;</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>