content/canvas/crashtests/896047-2.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE html>
     2 <html>
     3 <body>
     4 <canvas id="c" width="200" height="100">
     5 </canvas>
     6 <script>
     7 var ctx = document.getElementById("c").getContext("2d");
     8 ctx.save();
     9 ctx.mozFillRule = 'nonzero';
    10 ctx.save();
    11 ctx.mozFillRule = 'evenodd';
    12 ctx.rect(0,0, 1,1);
    13 ctx.restore();
    14 ctx.isPointInPath(0,0);
    15 ctx.restore();
    16 ctx.lineTo(10, 0);
    17 </script>
    18 </body>
    19 </html>

mercurial