layout/reftests/canvas/transformed-gradient-ref.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <html>
     2 <body>
     3   <canvas width="500" height="500"></canvas>
     4 <script>
     5   var canvas = document.getElementsByTagName('canvas')[0];
     6   var ctx = canvas.getContext('2d');
     8   var lineargradient = ctx.createLinearGradient(000,000,500,500);
     9   lineargradient.addColorStop(0,'red');
    10   lineargradient.addColorStop(1,'black');
    11   ctx.fillStyle = lineargradient;
    12   ctx.beginPath();
    13   ctx.rect(00, 00, 250, 250);
    14   ctx.fill();
    15 </script>
    16 </body>
    17 </html>

mercurial