tor-browser

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

HTMLImageElement-x-and-y-ignore-transforms.html (934B)


      1 <!DOCTYPE html>
      2 <link rel="author" href="mailto:mrobinson@igalia.com.org">
      3 <link rel="help" href="https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlimageelement-interface">
      4 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1676952">
      5 <title>CSS OM View Test: HTMLImageElement's 'x' and 'y' property values should ignore transforms</title>
      6 
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 
     10 <style>
     11 .transformed {
     12    transform: translate(40px, 40px);
     13 }
     14 </style>
     15 
     16 <div id="container">
     17    <img id="image" src="/images/green.png">
     18 </div>
     19 
     20 <script>
     21  test(() => {
     22    const unTransformedX = image.x;
     23    const unTransformedY = image.y;
     24 
     25    container.classList.add("transformed");
     26 
     27    assert_equals(unTransformedX, image.x);
     28    assert_equals(unTransformedY, image.y);
     29  }, `HTMLImageElement's 'x' and 'y' property values ignore transforms`);
     30 </script>