tor-browser

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

setTransform-002.https.html (840B)


      1 <!DOCTYPE html>
      2 <title>setTransform with DOMMatrix behaves correctly</title>
      3 <html class="reftest-wait">
      4 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
      5 <link rel="match" href="setTransform-ref.html">
      6 <style>
      7 .container {
      8  width: 200px;
      9  height: 200px;
     10 }
     11 
     12 #foo {
     13  background: paint(foo);
     14 }
     15 </style>
     16 <script src="/common/reftest-wait.js"></script>
     17 <script src="/common/worklet-reftest.js"></script>
     18 <body>
     19 <div id="foo" class="container"></div>
     20 
     21 <script id="code" type="text/worklet">
     22 registerPaint('foo', class {
     23    paint(ctx, geom) {
     24        ctx.fillStyle = 'green';
     25        ctx.setTransform({a: 2, d: 2});
     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>