summaryrefslogtreecommitdiffstats
path: root/layout/reftests/mathml/subscript-italic-correction.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/mathml/subscript-italic-correction.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/mathml/subscript-italic-correction.html')
-rw-r--r--layout/reftests/mathml/subscript-italic-correction.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/layout/reftests/mathml/subscript-italic-correction.html b/layout/reftests/mathml/subscript-italic-correction.html
new file mode 100644
index 000000000..3d6b935cd
--- /dev/null
+++ b/layout/reftests/mathml/subscript-italic-correction.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>subscript</title>
+ <meta charset="utf-8"/>
+ <script type="text/javascript">
+ function verifyItalicCorrections()
+ {
+ var epsilon = 2;
+ for (var i = 0; i < 8; i += 2) {
+ var sub = document.getElementById("s" + i);
+ var sup = document.getElementById("s" + (i+1));
+ var italicCorrection =
+ sup.getBoundingClientRect().left - sub.getBoundingClientRect().left;
+ if (italicCorrection < epsilon) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function doTest()
+ {
+ if (verifyItalicCorrections()) {
+ document.body.style.background = "#5f5";
+ }
+ document.documentElement.removeAttribute("class");
+ }
+ window.addEventListener("MozReftestInvalidate", doTest, false);
+ </script>
+ </head>
+ <body style="background: #f00; font-size: 50px;">
+
+ <div>
+ <math>
+ <msubsup>
+ <mi mathbackground="#5f5">f</mi>
+ <mspace id="s0" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s1" width="50px" height="50px" mathbackground="blue"/>
+ </msubsup>
+ </math>
+ </div>
+
+ <br/>
+
+ <div>
+ <math>
+ <mmultiscripts>
+ <mi mathbackground="#5f5">f</mi>
+ <mspace id="s2" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s3" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s4" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s5" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s6" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s7" width="50px" height="50px" mathbackground="blue"/>
+ </mmultiscripts>
+ </math>
+ </div>
+
+ </body>
+</html>