summaryrefslogtreecommitdiffstats
path: root/layout/reftests/mathml/tablespacing-4.html
blob: 1a5f2a6cd9882f71eef778213b8bd6dcb9952cc2 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html class="reftest-wait">
  <head>
    <title>Dynamic tests involving adding and removing elements</title>
    <meta charset="utf-8"/>
  </head>
  <body>
  <math>
    <mtable columnspacing="5em 7em" id="mtable0a">
      <mtr id="mtr0">
        <mtd>
          <mn>x</mn>
        </mtd>
        <mtd>
          <mn>y</mn>
        </mtd>
      </mtr>
    </mtable>
  </math>
  <p>
  <math>
    <mtable  columnspacing="5em 7em">
      <mtr id="mtr0a">
        <mtd>
          <mn>x</mn>
        </mtd>
        <mtd id="mtd0">
          <mn>y</mn>
        </mtd>
        <mtd>
          <mn>z</mn>
        </mtd>
      </mtr>
    </mtable>
  </math>
  <p>
  <math>
    <mtable rowspacing="2ex 4ex" id="mtable0">
      <mtr>
        <mtd>
          <mn>x</mn>
        </mtd>
      </mtr>
      <mtr>
        <mtd>
          <mn>y</mn>
        </mtd>
      </mtr>
    </mtable>
  </math>
  <p>
  <math>
    <mtable  rowspacing="2ex 4ex" id="mtable1">
      <mtr>
        <mtd>
          <mn>x</mn>
        </mtd>
      </mtr>
      <mtr id="mtr1">
        <mtd>
          <mn>y</mn>
        </mtd>
      </mtr>
      <mtr>
        <mtd>
          <mn>z</mn>
        </mtd>
      </mtr>
    </mtable>
  </math>
  <p>
  <math>
    <mtable  rowspacing="2ex 4ex" columnspacing="4em">
      <mtr id="mtr2">
        <mtd>
          <mn>x</mn>
        </mtd>
      </mtr>
      <mtr>
        <mtd>
          <mn>y</mn>
        </mtd>
      </mtr>
      <mtr>
        <mtd>
          <mn>z</mn>
        </mtd>
      </mtr>
    </mtable>
  </math>
  <script>
    function doTest() {
      // Add a table cell
      var mn0 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mn");
      mn0.innerHTML = 'z';
      var mtd0 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mtd");
      mtd0.appendChild(mn0);
      document.getElementById("mtr0").appendChild(mtd0);
      // Remove a table cell
      document.getElementById("mtr0a").removeChild(document.getElementById("mtd0"));
      // Add a table row
      var mn1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mn");
      mn1.innerHTML = 'z';
      var mtd1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mtd");
      mtd1.appendChild(mn1);
      var mtr1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mtr");
      mtr1.appendChild(mtd1);
      document.getElementById("mtable0").appendChild(mtr1);
      // Remove a table row
      document.getElementById("mtable1").removeChild(document.getElementById("mtr1"));
      // Add a table cell to a table containing several rows
      var mn2 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mn");
      mn2.innerHTML = 'w';
      var mtd2 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mtd");
      mtd2.appendChild(mn2);
      document.getElementById("mtr2").appendChild(mtd2);

      document.documentElement.removeAttribute("class");
    }
    window.addEventListener("MozReftestInvalidate", doTest);
  </script>
  </body>
</html>