summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/mathml/menclose/menclose-2-roundedbox.html
blob: f31e696ce139b65814bbfcc1e21f7c64d426864c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html class="reftest-wait">
  <head>
    <meta charset="utf-8"/>
    <title>menclose roundedbox</title>
    <link rel="match" href="menclose-2-roundedbox-ref.html"/>
    <link rel="stylesheet" href="/fonts/ahem.css" />
    <style>
      math, #box {
          font: 25px/1 Ahem;
      }
    </style>

    <script type="text/javascript">
      function doTest()
      {
          var box = document.getElementById("roundedbox").getBoundingClientRect();
          r = document.getElementById("box");
          r.style.left = `calc(${box.left}px - .25em)`;
          r.style.top = `calc(${box.top}px - .25em)`
          r.style.width = `calc(${box.width}px + .5em)`;
          r.style.height = `calc(${box.height}px + .5em)`;
          document.documentElement.removeAttribute("class");
      }
      document.documentElement.addEventListener("TestRendered",doTest);
    </script>
  </head>
  <body>
    <div style="position: absolute; left: 20px; top: 20px;">
      <math>
        <menclose id="roundedbox" notation="roundedbox">
          <mspace width="200px" height="100px"></mspace>
        </menclose>
      </math>
    </div>

    <div id="box" style="position: absolute; box-sizing: border-box; border:.5em solid green; border-radius: .5em;"></div>
</div>

</body>
</html>