| <html> |
| <head> |
| <title>inferred mrows</title> |
| <meta charset="utf-8"> |
| <script type="text/javascript"> |
| function test() |
| { |
| var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose"]; |
| var result = ""; |
| for (var i in tags) { |
| var tag = tags[i]; |
| var x = document.getElementById("above" + tag).getBoundingClientRect(); |
| var y = document.getElementById("below" + tag).getBoundingClientRect(); |
| result += tag + ": " + (x.bottom == y.top ? "PASS" : "FAIL") + "\n"; |
| } |
| document.getElementById("result").innerText = result; |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| |
| <p>This test passes if rectangles are correctly aligned with respect to the baseline.</p> |
| |
| <p> |
| <math><mrow><mspace id="aboveMrow" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMrow" width="10px" depth="30px" mathbackground="blue"></mspace></mrow></math> |
| |
| <math><msqrt><mspace id="aboveSqrt" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowSqrt" width="10px" depth="30px" mathbackground="blue"></mspace></msqrt></math> |
| |
| <math><mstyle><mspace id="aboveStyle" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowStyle" width="10px" depth="30px" mathbackground="blue"></mspace></mstyle></math> |
| |
| <math><merror><mspace id="aboveError" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowError" width="10px" depth="30px" mathbackground="blue"></mspace></merror></math> |
| |
| <math><mphantom><mspace style="visibility: visible;" id="abovePhantom" width="10px" height="30px" mathbackground="red"></mspace><mspace style="visibility: visible;" id="belowPhantom" width="10px" depth="30px" mathbackground="blue"></mspace></mphantom></math> |
| |
| <math><mspace id="aboveMath" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMath" width="10px" depth="30px" mathbackground="blue"></mspace></math> |
| |
| <math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMenclose" width="10px" depth="30px" mathbackground="blue"></mspace></menclose></math> |
| </p> |
| |
| <div id="result"></div> |
| |
| </body> |
| </html> |