tor-browser

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

scale-composition.html (2369B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>scale composition</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#propdef-scale">
      5 <meta name="assert" content="scale supports animation.">
      6 
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="/css/support/interpolation-testcommon.js"></script>
     10 
     11 <body>
     12 <script>
     13 test_composition({
     14  property: 'scale',
     15  underlying: '2 1',
     16  addFrom: '3 1',
     17  addTo: '4 1',
     18 }, [
     19  {at: -0.5, expect: '5 1'},
     20  {at: 0, expect: '6 1'},
     21  {at: 0.25, expect: '6.5 1'},
     22  {at: 0.5, expect: '7 1'},
     23  {at: 0.75, expect: '7.5 1'},
     24  {at: 1, expect: '8 1'},
     25  {at: 1.5, expect: '9 1'},
     26 ]);
     27 
     28 test_composition({
     29  property: 'scale',
     30  underlying: '1 2 3',
     31  addFrom: '4 5 6',
     32  replaceTo: '7 8 9',
     33 }, [
     34  {at: -0.5, expect: '2.5 11 22.5'},
     35  {at: 0, expect: '4 10 18'},
     36  {at: 0.25, expect: '4.75 9.5 15.75'},
     37  {at: 0.5, expect: '5.5 9 13.5'},
     38  {at: 0.75, expect: '6.25 8.5 11.25'},
     39  {at: 1, expect: '7 8 9'},
     40  {at: 1.5, expect: '8.5 7 4.5'},
     41 ]);
     42 
     43 test_composition({
     44  property: 'scale',
     45  underlying: 'none',
     46  addFrom: 'none',
     47  replaceTo: '1.5 1',
     48 }, [
     49  {at: -1, expect: '0.5 1'},
     50  {at: 0, expect: '1'},
     51  {at: 0.25, expect: '1.125 1'},
     52  {at: 0.75, expect: '1.375 1'},
     53  {at: 1, expect: '1.5 1'},
     54  {at: 2, expect: '2 1'},
     55 ]);
     56 
     57 test_composition({
     58  property: 'scale',
     59  underlying: 'none',
     60  addFrom: '4 5 6',
     61  replaceTo: 'none',
     62 }, [
     63  {at: -1, expect: '7 9 11'},
     64  {at: 0, expect: '4 5 6'},
     65  {at: 0.25, expect: '3.25 4 4.75'},
     66  {at: 0.75, expect: '1.75 2 2.25'},
     67  {at: 1, expect: '1'},
     68  {at: 2, expect: '-2 -3 -4'},
     69 ]);
     70 
     71 test_composition({
     72  property: 'scale',
     73  underlying: '1 2 3',
     74  addFrom: 'none',
     75  replaceTo: '7 8 9',
     76 }, [
     77  {at: -0.5, expect: '-2 -1 0'},
     78  {at: 0, expect: '1 2 3'},
     79  {at: 0.25, expect: '2.5 3.5 4.5'},
     80  {at: 0.5, expect: '4 5 6'},
     81  {at: 0.75, expect: '5.5 6.5 7.5'},
     82  {at: 1, expect: '7 8 9'},
     83  {at: 1.5, expect: '10 11 12'},
     84 ]);
     85 
     86 test_composition({
     87  property: 'scale',
     88  underlying: '1 2 3',
     89  addFrom: '4 5 6',
     90  replaceTo: 'none',
     91 }, [
     92  {at: -0.5, expect: '5.5 14.5 26.5'},
     93  {at: 0, expect: '4 10 18'},
     94  {at: 0.25, expect: '3.25 7.75 13.75'},
     95  {at: 0.5, expect: '2.5 5.5 9.5'},
     96  {at: 0.75, expect: '1.75 3.25 5.25'},
     97  {at: 1, expect: '1'},
     98  {at: 1.5, expect: '-0.5 -3.5 -7.5'},
     99 ]);
    100 </script>
    101 </body>