content/canvas/test/test_2d.isPointInPath.winding.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <title>Canvas test: 2d.isPointInPath.winding</title>
     3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
     4 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
     5 <body>
     6 <canvas id="c" width="100" height="100"><p class="fallback">FAIL (fallback content)</p></canvas>
     7 <script>
     8 SimpleTest.waitForExplicitFinish();
     9 addLoadEvent(function () {
    11 var canvas = document.getElementById('c');
    12 var ctx = canvas.getContext('2d');
    14 ctx.beginPath();
    15 ctx.rect(0, 0, 100, 100);
    16 ctx.rect(25, 25, 50, 50);
    17 ok(ctx.isPointInPath(50, 50));
    19 ctx.beginPath();
    20 ctx.rect(0, 0, 100, 100);
    21 ctx.rect(25, 25, 50, 50);
    22 ok(ctx.isPointInPath(50, 50, 'evenodd') == false);
    24 SimpleTest.finish();
    26 });
    27 </script>

mercurial