Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 <!DOCTYPE>
2 <html class="reftest-wait">
3 <head>
4 <title>Test MathML rowalign</title>
5 <script type="text/javascript">
6 function doTest()
7 {
8 var table1 = document.getElementById("table1");
9 var table2 = document.getElementById("table2");
10 var table3 = document.getElementById("table3");
11 var rows = undefined;
13 // Table 1 setup
14 rows = table1.getElementsByTagName("mtr");
15 for(var i = 0; i < rows.length; i++)
16 rows[i].setAttribute("rowalign", "top");
18 // Table 2 setup
19 rows = table2.getElementsByTagName("mtr");
20 for(var i = 0; i < rows.length; i++)
21 rows[i].setAttribute("rowalign", "center");
23 // Table 3 setup
24 rows = table3.getElementsByTagName("mtr");
25 for(var i = 0; i < rows.length; i++)
26 rows[i].setAttribute("rowalign", "bottom");
28 document.documentElement.removeAttribute("class");
29 }
30 window.addEventListener("MozReftestInvalidate", doTest, false);
31 </script>
32 </head>
33 <body>
34 <b>rowalign="top"</b> <br/>
35 <math>
36 <mstyle>
37 <mtable id="table1">
38 <mtr>
39 <mtd>
40 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
41 </mtd>
42 <mtd>
43 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
44 </mtd>
45 <mtd>
46 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
47 </mtd>
48 </mtr>
49 <mtr>
50 <mtd>
51 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
52 </mtd>
53 <mtd>
54 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
55 </mtd>
56 <mtd>
57 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
58 </mtd>
59 </mtr>
60 <mtr>
61 <mtd>
62 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
63 </mtd>
64 <mtd>
65 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
66 </mtd>
67 <mtd>
68 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
69 </mtd>
70 </mtr>
71 </mtable>
72 </mstyle>
73 </math> <br />
74 <b>rowalign="center"</b> <br />
75 <math>
76 <mstyle>
77 <mtable id="table2">
78 <mtr>
79 <mtd>
80 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
81 </mtd>
82 <mtd>
83 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
84 </mtd>
85 <mtd>
86 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
87 </mtd>
88 </mtr>
89 <mtr>
90 <mtd>
91 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
92 </mtd>
93 <mtd>
94 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
95 </mtd>
96 <mtd>
97 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
98 </mtd>
99 </mtr>
100 <mtr>
101 <mtd>
102 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
103 </mtd>
104 <mtd>
105 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
106 </mtd>
107 <mtd>
108 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
109 </mtd>
110 </mtr>
111 </mtable>
112 </mstyle>
113 </math> <br />
114 <b>rowalign="bottom"</b> <br />
115 <math>
116 <mstyle>
117 <mtable id="table3">
118 <mtr>
119 <mtd>
120 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
121 </mtd>
122 <mtd>
123 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
124 </mtd>
125 <mtd>
126 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
127 </mtd>
128 </mtr>
129 <mtr>
130 <mtd>
131 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
132 </mtd>
133 <mtd>
134 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
135 </mtd>
136 <mtd>
137 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
138 </mtd>
139 </mtr>
140 <mtr>
141 <mtd>
142 <mspace width="10px" depth="5px" height="5px" mathbackground="red"></mspace>
143 </mtd>
144 <mtd>
145 <mspace width="10px" depth="10px" height="10px" mathbackground="green"></mspace>
146 </mtd>
147 <mtd>
148 <mspace width="10px" depth="15px" height="15px" mathbackground="blue"></mspace>
149 </mtd>
150 </mtr>
151 </mtable>
152 </mstyle>
153 </math>
154 </body>
155 </html>