tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

canvas-huge-min-max-sizes.html (1046B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Don't crash with canvas with big min or max sizes</title>
      4 <link rel="help" href="https://drafts.csswg.org/css2/visudet.html#min-max-widths">
      5 <link rel="help" href="https://github.com/servo/servo/issues/33961">
      6 <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
      7 
      8 <!--
      9 According to https://drafts.csswg.org/css2/visudet.html#min-max-widths,
     10 we need to check whether max-width/w ≤ max-height/h holds.
     11 Or equivalently we can check whether max-width*h ≤ max-height*w holds,
     12 but 100000 * 100001 = 10000200001 doesn't fit in a 32-bit integer.
     13 -->
     14 <canvas height="100001" width="100001" style="max-width: 100000px; max-height: 100000px;"></canvas>
     15 
     16 <!--
     17 Similarly, here we need to check whether min-width/w ≤ min-height/h holds.
     18 Or equivalently we can check whether min-width*h ≤ min-height*w holds,
     19 but again 100001 * 100000 = 10000200001 doesn't fit in a 32-bit integer.
     20 -->
     21 <canvas height="100000" width="100000" style="min-width: 100001px; min-height: 100001px;"></canvas>