Last gardening after r177774
[WebKit-https.git] / LayoutTests / mathml / presentation / scripts-subsup.html
1 <!doctype html>
2 <html>
3   <head>
4     <title>scripts</title>
5     <meta charset="utf-8"/>
6     <style>
7       math {
8       padding: 0;
9       border: 0;
10       }
11       td {
12       border: 1px solid black;
13       text-align: center; width: 100px; height: 100px;
14       vertical-align: middle;
15       }
16       span {
17       display: inline-block;
18       background: black;
19       border: 0;
20       margin: 0;
21       }
22     </style>
23   </head>
24   <body>
25
26     <!-- The sub/sup scripts should be hidden by the black rectangles -->
27     <table style="position: absolute; top: 10px; left: 10px; font-family: Ahem;">
28       <tr>
29         <td style="text-align: left; vertical-align: top;">
30           <math style="font-family: Ahem;">
31             <msub>
32               <mtext>X</mtext>
33               <mtext>X</mtext>
34             </msub>
35           </math>
36         </td>
37         <td style="text-align: left;">
38           <math style="font-family: Ahem;">
39             <msubsup>
40               <mtext>X</mtext>
41               <mtext>X</mtext>
42               <mtext>X</mtext>
43             </msubsup>
44           </math>
45         </td>
46         <td style="text-align: left; vertical-align: bottom;">
47           <math style="font-family: Ahem;">
48             <msup>
49               <mtext>X</mtext>
50               <mtext>X</mtext>
51             </msup>
52           </math>
53         </td>
54       </tr>
55     </table>
56
57     <table style="position: absolute; top: 10px; left: 10px; font-family: Ahem;">
58       <tr>
59         <td style="text-align: left; vertical-align: top;">
60           <span style="visibility: hidden;">X</span><span style="vertical-align: -25%;">X</span>
61         </td>
62         <td style="text-align: left;">
63           <span style="visibility: hidden;">X</span><span>X<br/>X</span>
64         </td>
65         <td style="text-align: left; vertical-align: bottom;">
66           <span style="visibility: hidden;">X</span><span style="vertical-align: +50%;">X</span>
67         </td>
68       </tr>
69     </table>
70
71     <!-- The bases should be hidden by the black rectangles -->
72     <table style="position: absolute; top: 120px; left: 10px;">
73       <tr>
74         <td style="text-align: left; vertical-align: top;">
75           <math>
76             <msub>
77               <mtext>X</mtext>
78               <mtext>X</mtext>
79             </msub>
80           </math>
81         </td>
82         <td style="text-align: left;">
83           <math>
84             <msubsup>
85               <mtext>X</mtext>
86               <mtext>X</mtext>
87               <mtext>X</mtext>
88             </msubsup>
89           </math>
90         </td>
91         <td style="text-align: left; vertical-align: bottom;">
92           <math>
93             <msup>
94               <mtext>X</mtext>
95               <mtext>X</mtext>
96             </msup>
97           </math>
98         </td>
99       </tr>
100     </table>
101
102     <table style="position: absolute; top: 120px; left: 10px;">
103       <tr>
104         <td style="text-align: left; vertical-align: top;">
105           <span>X</span>
106         </td>
107         <td style="text-align: left;">
108           <span>X</span>
109         </td>
110         <td style="text-align: left; vertical-align: bottom;">
111           <span>X</span>
112         </td>
113       </tr>
114     </table>
115
116     <div style="position: absolute; top: 250px; left: 10px;">
117       <!-- This verifies that the scripts are drawn smaller. Note: WebKit does
118            not currently implement scriptlevel and only sets the size to
119            0.75em. See bug 118738. -->
120       <math>
121         <msub>
122           <mi>A</mi>
123           <mi style="font-size: 0.75em !important">B</mi>
124         </msub>
125         <msup>
126           <mi>A</mi>
127           <mi style="font-size: 0.75em !important">B</mi>
128         </msup>
129         <msubsup>
130           <mi>A</mi>
131           <mi style="font-size: 0.75em !important">B</mi>
132           <mi style="font-size: 0.75em !important">C</mi>
133         </msubsup>
134       </math>
135
136       <!-- This verifies that <msubsup> with an empty script is
137            equivalent to the corresponding constructions with only one script.
138         -->
139       <math>
140         <msubsup>
141           <mi>A</mi>
142           <mi>B</mi>
143           <mspace/>
144         </msubsup>
145         <msubsup>
146           <mi>A</mi>
147           <mspace/>
148           <mi>B</mi>
149         </msubsup>
150       </math>
151     </div>
152
153   </body>
154 </html>