tor-browser

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

setTransform-001.https.html (899B)


      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        let m = ctx.getTransform();
     26        m.a = 2;
     27        m.d = 2;
     28        ctx.setTransform(m);
     29        ctx.fillRect(0, 0, 50, 50);
     30    }
     31 });
     32 </script>
     33 
     34 <script>
     35    importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
     36 </script>
     37 </body>
     38 </html>