tor-browser

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

geometry-with-float-size.https.html (897B)


      1 <!DOCTYPE html>
      2 <html class=reftest-wait>
      3 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
      4 <link rel="match" href="geometry-with-float-size-ref.html">
      5 <style>
      6 .container {
      7  width: 100.5px;
      8  height: 200.5px;
      9 }
     10 #canvas-geometry {
     11  background-image: paint(geometry);
     12 }
     13 </style>
     14 <script src="/common/reftest-wait.js"></script>
     15 <script src="/common/worklet-reftest.js"></script>
     16 <body>
     17 <div id="canvas-geometry" class="container"></div>
     18 
     19 <script id="code" type="text/worklet">
     20 registerPaint('geometry', class {
     21    paint(ctx, geom) {
     22        if (geom.width == 101 && geom.height == 201)
     23            ctx.fillStyle = 'green';
     24        else
     25            ctx.fillStyle = 'red';
     26        ctx.fillRect(0, 0, 50, 50);
     27    }
     28 });
     29 </script>
     30 
     31 <script>
     32    importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
     33 </script>
     34 </body>
     35 </html>