Bug 1573831 - Use more reliable text rendering for MathML reftests. r=emilio
authorFrédéric Wang <fwang@igalia.com>
Wed, 14 Aug 2019 18:55:16 +0000
changeset 488187 52aec1da83945cfef108316fc233e0bfd5f622ee
parent 488186 e3ec23ebfc2d1065967a7b45a89b700c94cfb31f
child 488188 4b4feec0a4e28887f61a53ec5e5d423db2cfb251
push id36437
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:33:18 +0000
treeherdermozilla-central@44aac6fc3352 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1573831
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1573831 - Use more reliable text rendering for MathML reftests. r=emilio Do this for a few MathML tests that are marked random: * Use the Ahem font for text rendering. * Replace single-char mi with other token elements that don't use italic characters from the Mathematical Alphanumeric Symbols. Additionally, this fixes invalid markup for maction-dynamic-embellished-op ; the MathML3 spec says the actiontype attribute is required and tests seem to assume actiontype="toggle". https://www.w3.org/TR/MathML3/chapter3.html#presm.maction mtable-align-whitespace.html Differential Revision: https://phabricator.services.mozilla.com/D41958
layout/reftests/mathml/displaystyle-1-ref.html
layout/reftests/mathml/displaystyle-1.html
layout/reftests/mathml/displaystyle-2-ref.html
layout/reftests/mathml/displaystyle-2.html
layout/reftests/mathml/displaystyle-3-ref.html
layout/reftests/mathml/displaystyle-3.html
layout/reftests/mathml/displaystyle-4-ref.html
layout/reftests/mathml/displaystyle-4.html
layout/reftests/mathml/maction-dynamic-embellished-op-ref.html
layout/reftests/mathml/maction-dynamic-embellished-op.html
layout/reftests/mathml/mfrac-linethickness-1-ref.xhtml
layout/reftests/mathml/mfrac-linethickness-1.xhtml
layout/reftests/mathml/mfrac-linethickness-2-ref.xhtml
layout/reftests/mathml/mfrac-linethickness-2.xhtml
layout/reftests/mathml/mfrac-linethickness-3-ref.xhtml
layout/reftests/mathml/mfrac-linethickness-3.xhtml
layout/reftests/mathml/mtable-align-whitespace-ref.html
layout/reftests/mathml/mtable-align-whitespace.html
layout/reftests/mathml/reftest.list
layout/reftests/mathml/semantics-1-ref.xhtml
layout/reftests/mathml/semantics-1.xhtml
--- a/layout/reftests/mathml/displaystyle-1-ref.html
+++ b/layout/reftests/mathml/displaystyle-1-ref.html
@@ -1,13 +1,23 @@
 <!DOCTYPE html>
 <html>
   <head>
     <title>displaystyle</title>
     <meta charset="utf-8"/>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test displaystyle on mstyle -->
     <math>
       <mstyle displaystyle="true">
         <munder><mo>O</mo><mo>O</mo></munder>
       </mstyle>
--- a/layout/reftests/mathml/displaystyle-1.html
+++ b/layout/reftests/mathml/displaystyle-1.html
@@ -1,13 +1,23 @@
 <!DOCTYPE html>
 <html>
   <head>
     <title>displaystyle</title>
     <meta charset="utf-8"/>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test displaystyle on mstyle -->
     <math>
       <mstyle displaystyle="true">
         <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
       </mstyle>
--- a/layout/reftests/mathml/displaystyle-2-ref.html
+++ b/layout/reftests/mathml/displaystyle-2-ref.html
@@ -1,13 +1,23 @@
 <!DOCTYPE html>
 <html>
   <head>
     <title>displaystyle</title>
     <meta charset="utf-8"/>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test the effect of displaystyle on munder, mover and munderover -->
     <math>
       <mstyle displaystyle="true">
         <munder><mo>O</mo><mo>O</mo></munder>
         <mover><mo>O</mo><mo>O</mo></mover>
--- a/layout/reftests/mathml/displaystyle-2.html
+++ b/layout/reftests/mathml/displaystyle-2.html
@@ -1,13 +1,23 @@
 <!DOCTYPE html>
 <html>
   <head>
     <title>displaystyle</title>
     <meta charset="utf-8"/>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test the effect of displaystyle on munder, mover and munderover -->
     <math>
       <mstyle displaystyle="true">
         <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
         <mover><mo movablelimits="true">O</mo><mo>O</mo></mover>
--- a/layout/reftests/mathml/displaystyle-3-ref.html
+++ b/layout/reftests/mathml/displaystyle-3-ref.html
@@ -1,52 +1,62 @@
 <!DOCTYPE html>
 <html>
   <head>
     <title>displaystyle</title>
     <meta charset="utf-8"/>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test dynamic change of displaystyle -->
     <math id="m1" displaystyle="true">
       <munder><mo>O</mo><mo>O</mo></munder>
-      <mfrac><mi>x</mi><mi>y</mi></mfrac>
+      <mfrac><mn>1</mn><mn>2</mn></mfrac>
     </math>
     <math>
       <mstyle id="m2" displaystyle="true">
         <munder><mo>O</mo><mo>O</mo></munder>
-        <mfrac><mi>x</mi><mi>y</mi></mfrac>
+        <mfrac><mn>1</mn><mn>2</mn></mfrac>
       </mstyle>
     </math>
     <math>
       <mtable id="m3" displaystyle="true">
         <mtr>
           <mtd>
             <munder><mo>O</mo><mo>O</mo></munder>
-            <mfrac><mi>x</mi><mi>y</mi></mfrac>
+            <mfrac><mn>1</mn><mn>2</mn></mfrac>
           </mtd>
         </mtr>
       </mtable>
     </math>
     <math id="m4" displaystyle="false">
       <msub><mo>O</mo><mo>O</mo></msub>
-      <mfrac><mi>x</mi><mi>y</mi></mfrac>
+      <mfrac><mn>1</mn><mn>2</mn></mfrac>
     </math>
     <math>
       <mstyle id="m5" displaystyle="false">
         <msub><mo>O</mo><mo>O</mo></msub>
-        <mfrac><mi>x</mi><mi>y</mi></mfrac>
+        <mfrac><mn>1</mn><mn>2</mn></mfrac>
       </mstyle>
     </math>
     <math>
       <mtable id="m6" displaystyle="false">
         <mtr>
           <mtd>
             <msub><mo>O</mo><mo>O</mo></msub>
-            <mfrac><mi>x</mi><mi>y</mi></mfrac>
+            <mfrac><mn>1</mn><mn>2</mn></mfrac>
           </mtd>
         </mtr>
       </mtable>
     </math>
 
   </body>
 </html>
--- a/layout/reftests/mathml/displaystyle-3.html
+++ b/layout/reftests/mathml/displaystyle-3.html
@@ -10,55 +10,65 @@
         document.getElementById("m3").setAttribute("displaystyle", "true");
         document.getElementById("m4").removeAttribute("displaystyle");
         document.getElementById("m5").removeAttribute("displaystyle");
         document.getElementById("m6").removeAttribute("displaystyle");
         document.documentElement.removeAttribute("class");
       }
       window.addEventListener("MozReftestInvalidate", doTest);
     </script>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test dynamic change of displaystyle -->
     <math id="m1">
       <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
-      <mfrac><mi>x</mi><mi>y</mi></mfrac>
+      <mfrac><mn>1</mn><mn>2</mn></mfrac>
     </math>
     <math>
       <mstyle id="m2">
         <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
-        <mfrac><mi>x</mi><mi>y</mi></mfrac>
+        <mfrac><mn>1</mn><mn>2</mn></mfrac>
       </mstyle>
     </math>
     <math>
       <mtable id="m3">
         <mtr>
           <mtd>
             <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
-            <mfrac><mi>x</mi><mi>y</mi></mfrac>
+            <mfrac><mn>1</mn><mn>2</mn></mfrac>
           </mtd>
         </mtr>
       </mtable>
     </math>
     <math id="m4" displaystyle="true">
       <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
-      <mfrac><mi>x</mi><mi>y</mi></mfrac>
+      <mfrac><mn>1</mn><mn>2</mn></mfrac>
     </math>
     <math>
       <mstyle id="m5" displaystyle="true">
         <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
-        <mfrac><mi>x</mi><mi>y</mi></mfrac>
+        <mfrac><mn>1</mn><mn>2</mn></mfrac>
       </mstyle>
     </math>
     <math>
       <mtable id="m6" displaystyle="true">
         <mtr>
           <mtd>
             <munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
-            <mfrac><mi>x</mi><mi>y</mi></mfrac>
+            <mfrac><mn>1</mn><mn>2</mn></mfrac>
           </mtd>
         </mtr>
       </mtable>
     </math>
 
   </body>
 </html>
--- a/layout/reftests/mathml/displaystyle-4-ref.html
+++ b/layout/reftests/mathml/displaystyle-4-ref.html
@@ -1,29 +1,39 @@
 <!DOCTYPE html>
 <html>
   <head>
     <title>displaystyle</title>
     <meta charset="utf-8"/>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test dynamic change (see bug 832800) -->
     <math>
       <mstyle displaystyle="true">
         <mfrac>
           <mrow>
-            <mi>X</mi>
+            <mn>X</mn>
             <mo id="mathOperator" mathbackground="red">+</mo>
             <mfrac>
-              <mrow><mi>X</mi></mrow>
-              <mrow><mi>X</mi></mrow>
+              <mrow><mn>X</mn></mrow>
+              <mrow><mn>X</mn></mrow>
             </mfrac>
           </mrow>
           <mrow>
-            <mi>X</mi>
+            <mn>X</mn>
           </mrow>
         </mfrac>
       </mstyle>
     </math>
 
   </body>
 </html>
--- a/layout/reftests/mathml/displaystyle-4.html
+++ b/layout/reftests/mathml/displaystyle-4.html
@@ -6,32 +6,42 @@
     <script type="text/javascript">
       function doTest() {
         document.getElementById('mathOperator').
                  setAttribute('mathbackground', 'red');
         document.documentElement.removeAttribute("class");
       }
       window.addEventListener("MozReftestInvalidate", doTest);
     </script>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
   </head>
   <body>
 
     <!-- Test dynamic change (see bug 832800) -->
     <math>
       <mstyle displaystyle="true">
         <mfrac>
           <mrow>
-            <mi>X</mi>
+            <mn>X</mn>
             <mo id="mathOperator">+</mo>
             <mfrac>
-              <mrow><mi>X</mi></mrow>
-              <mrow><mi>X</mi></mrow>
+              <mrow><mn>X</mn></mrow>
+              <mrow><mn>X</mn></mrow>
             </mfrac>
           </mrow>
           <mrow>
-            <mi>X</mi>
+            <mn>X</mn>
           </mrow>
         </mfrac>
       </mstyle>
     </math>
 
   </body>
 </html>
--- a/layout/reftests/mathml/maction-dynamic-embellished-op-ref.html
+++ b/layout/reftests/mathml/maction-dynamic-embellished-op-ref.html
@@ -1,31 +1,41 @@
 <!DOCTYPE html>
 <html>
 
 <head>
 <title>dynamic maction and embellished op</title>
+<style>
+  @font-face
+  {
+      font-family: Ahem;
+      src: url(../fonts/Ahem.ttf);
+  }
+  p, math {
+      font: 25px Ahem;
+  }
+</style>
 </head>
 
 <body>
 
-  <p>'<math><maction id="m1" selection="2"><mi>a</mi><mo>b</mo></maction></math>'</p>
-  <p>'<math><maction id="m2" selection="2"><mo>b</mo><mi>a</mi></maction></math>'</p>
+  <p>É<math><maction actiontype="toggle" id="m1" selection="2"><mn>X</mn><mo>p</mo></maction></math>É</p>
+  <p>É<math><maction actiontype="toggle" id="m2" selection="2"><mo>p</mo><mn>X</mn></maction></math>É</p>
  
-  <p>"<math><maction id="m3"><mo>b</mo></maction></math>"</p>
-  <p>"<math><maction id="m3bis"><mi>a</mi><mo>b</mo></maction></math>"</p>
+  <p>É<math><maction actiontype="toggle" id="m3"><mo>p</mo></maction></math>É</p>
+  <p>É<math><maction actiontype="toggle" id="m3bis"><mn>X</mn><mo>p</mo></maction></math>É</p>
 
-  <p>{<math><maction id="m4"><mi>a</mi></maction></math>}</p>
-  <p>{<math><maction id="m4bis"><mo>b</mo><mi>a</mi></maction></math>}</p>
+  <p>{<math><maction actiontype="toggle" id="m4"><mn>X</mn></maction></math>}</p>
+  <p>{<math><maction actiontype="toggle" id="m4bis"><mo>p</mo><mn>X</mn></maction></math>}</p>
 
  
   <p>[<math>
-    <mstyle id="m5" selection="2"><maction><mi>a</mi><mo>b</mo></maction></mstyle>
+    <mstyle id="m5" selection="2"><maction actiontype="toggle"><mn>X</mn><mo>p</mo></maction></mstyle>
   </math>]</p>
   <p>[<math>
-    <mstyle id="m6" selection="2"><maction><mo>b</mo><mi>a</mi></maction></mstyle>
+    <mstyle id="m6" selection="2"><maction actiontype="toggle"><mo>p</mo><mn>X</mn></maction></mstyle>
   </math>]</p>
 
-  <p>(<math id="m7" selection="2"><maction><mi>a</mi><mo>b</mo></maction></math>)</p>
-  <p>(<math id="m8" selection="2"><maction><mo>b</mo><mi>a</mi></maction></math>)</p>
+  <p>(<math id="m7" selection="2"><maction actiontype="toggle"><mn>X</mn><mo>p</mo></maction></math>)</p>
+  <p>(<math id="m8" selection="2"><maction actiontype="toggle"><mo>p</mo><mn>X</mn></maction></math>)</p>
 
 </body>
 </html>
--- a/layout/reftests/mathml/maction-dynamic-embellished-op.html
+++ b/layout/reftests/mathml/maction-dynamic-embellished-op.html
@@ -1,36 +1,46 @@
 <!DOCTYPE html>
 <html class="reftest-wait">
 
 <head>
 <title>dynamic maction and embellished op</title>
+<style>
+  @font-face
+  {
+      font-family: Ahem;
+      src: url(../fonts/Ahem.ttf);
+  }
+  p, math {
+      font: 25px Ahem;
+  }
+</style>
 </head>
 
 <body>
 
-  <p>'<math><maction id="m1"><mi>a</mi><mo>b</mo></maction></math>'</p>
-  <p>'<math><maction id="m2"><mo>b</mo><mi>a</mi></maction></math>'</p>
+  <p>É<math><maction actiontype="toggle" id="m1"><mn>X</mn><mo>p</mo></maction></math>É</p>
+  <p>É<math><maction actiontype="toggle" id="m2"><mo>p</mo><mn>X</mn></maction></math>É</p>
  
-  <p>"<math><maction id="m3"><mi>a</mi><mo>b</mo></maction></math>"</p>
-  <p>"<math><maction id="m3bis"><mo>b</mo></maction></math>"</p>
+  <p>É<math><maction actiontype="toggle" id="m3"><mn>X</mn><mo>p</mo></maction></math>É</p>
+  <p>É<math><maction actiontype="toggle" id="m3bis"><mo>p</mo></maction></math>É</p>
 
-  <p>{<math><maction id="m4"><mo>b</mo><mi>a</mi></maction></math>}</p>
-  <p>{<math><maction id="m4bis"><mi>a</mi></maction></math>}</p>
+  <p>{<math><maction actiontype="toggle" id="m4"><mo>p</mo><mn>X</mn></maction></math>}</p>
+  <p>{<math><maction actiontype="toggle" id="m4bis"><mn>X</mn></maction></math>}</p>
 
  
   <p>[<math>
-    <mstyle id="m5"><maction><mi>a</mi><mo>b</mo></maction></mstyle>
+    <mstyle id="m5"><maction actiontype="toggle"><mn>X</mn><mo>p</mo></maction></mstyle>
   </math>]</p>
   <p>[<math>
-    <mstyle id="m6"><maction><mo>b</mo><mi>a</mi></maction></mstyle>
+    <mstyle id="m6"><maction actiontype="toggle"><mo>p</mo><mn>X</mn></maction></mstyle>
   </math>]</p>
 
-  <p>(<math id="m7"><maction><mi>a</mi><mo>b</mo></maction></math>)</p>
-  <p>(<math id="m8"><maction><mo>b</mo><mi>a</mi></maction></math>)</p>
+  <p>(<math id="m7"><maction actiontype="toggle"><mn>X</mn><mo>p</mo></maction></math>)</p>
+  <p>(<math id="m8"><maction actiontype="toggle"><mo>p</mo><mn>X</mn></maction></math>)</p>
 
 <script>
 function doTest()
 {
   document.getElementById("m1").setAttribute("selection", "2");
   document.getElementById("m2").setAttribute("selection", "2");
 
   var m3 = document.getElementById("m3");
--- a/layout/reftests/mathml/mfrac-linethickness-1-ref.xhtml
+++ b/layout/reftests/mathml/mfrac-linethickness-1-ref.xhtml
@@ -1,20 +1,32 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
 <body>
   <math xmlns="http://www.w3.org/1998/Math/MathML">
     <mfrac linethickness="medium">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac linethickness="1">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac linethickness="medium">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
   </math>
 </body>
 </html>
--- a/layout/reftests/mathml/mfrac-linethickness-1.xhtml
+++ b/layout/reftests/mathml/mfrac-linethickness-1.xhtml
@@ -1,20 +1,32 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
 <body>
   <math xmlns="http://www.w3.org/1998/Math/MathML">
     <mfrac>
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac>
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac linethickness="1">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
   </math>
 </body>
 </html>
--- a/layout/reftests/mathml/mfrac-linethickness-2-ref.xhtml
+++ b/layout/reftests/mathml/mfrac-linethickness-2-ref.xhtml
@@ -1,10 +1,22 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
 <body>
   <math xmlns="http://www.w3.org/1998/Math/MathML">
     <mfrac linethickness="200%">
-      <mi>x</mi>
+      <mn>1</mn>
       <mn>2</mn>
     </mfrac>
   </math>
 </body>
 </html>
--- a/layout/reftests/mathml/mfrac-linethickness-2.xhtml
+++ b/layout/reftests/mathml/mfrac-linethickness-2.xhtml
@@ -1,10 +1,22 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
 <body>
   <math xmlns="http://www.w3.org/1998/Math/MathML">
     <mfrac linethickness="2">
-      <mi>x</mi>
+      <mn>1</mn>
       <mn>2</mn>
     </mfrac>
   </math>
 </body>
 </html>
--- a/layout/reftests/mathml/mfrac-linethickness-3-ref.xhtml
+++ b/layout/reftests/mathml/mfrac-linethickness-3-ref.xhtml
@@ -1,25 +1,37 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
 <body>
   <math xmlns="http://www.w3.org/1998/Math/MathML">
     <mfrac>
-      <mi>x</mi>
+      <mn>1</mn>
       <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac>
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac>
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac>
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
   </math>
 </body>
 </html>
--- a/layout/reftests/mathml/mfrac-linethickness-3.xhtml
+++ b/layout/reftests/mathml/mfrac-linethickness-3.xhtml
@@ -1,25 +1,37 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
 <body>
   <math xmlns="http://www.w3.org/1998/Math/MathML">
     <mfrac linethickness="2km">
-      <mi>x</mi>
+      <mn>1</mn>
       <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac linethickness = "cat">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac linethickness = "-2px">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
     <mo>=</mo>
     <mfrac linethickness="1">
-      <mi>a</mi>
-      <mi>b</mi>
+      <mn>1</mn>
+      <mn>2</mn>
     </mfrac>
   </math>
 </body>
 </html>
--- a/layout/reftests/mathml/mtable-align-whitespace-ref.html
+++ b/layout/reftests/mathml/mtable-align-whitespace-ref.html
@@ -1,336 +1,346 @@
 <!DOCTYPE html>
 <head>
 <title>mtable align : WhiteSpace Check</title>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
 </head>
 
 <body>
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math> 
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>   
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-   <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+   <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math> 
- 
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
+
 <br><br><br>
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 
 
 
 </body>
 
 </html>
--- a/layout/reftests/mathml/mtable-align-whitespace.html
+++ b/layout/reftests/mathml/mtable-align-whitespace.html
@@ -1,332 +1,342 @@
 <!DOCTYPE html>
 <head>
 <title>mtable align : WhiteSpace Check</title>
+    <style>
+      @font-face
+      {
+          font-family: Ahem;
+          src: url(../fonts/Ahem.ttf);
+      }
+      math {
+          font: 25px Ahem;
+      }
+    </style>
 </head>
 
 <body>
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center-3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center-3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center-3  ">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center-3  ">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="  center-3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math> 
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="  center-3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="  center-3  ">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>   
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="  center-3  ">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-   <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="  center   -3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+   <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="  center   -3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center  -3  ">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center  -3  ">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="  center  -3  ">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="  center  -3  ">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 
 <br><br><br>
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="&#xA&#xD;&#x20;center&#xA&#xD;&#x20;-3&#xA&#xD;&#x9;">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="&#xA&#xD;&#x20;center&#xA&#xD;&#x20;-3&#xA&#xD;&#x9;">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center&#xA&#xD;&#x9;&#x20;-3&#xA&#xD;&#x9;&#x20;">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center&#xA&#xD;&#x9;&#x20;-3&#xA&#xD;&#x9;&#x20;">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center-3&#xA&#xD;&#x9;&#x20;">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center-3&#xA&#xD;&#x9;&#x20;">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center-3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center-3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center-3&#xA&#xD;&#x9;&#x20;">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center-3&#xA&#xD;&#x9;&#x20;">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center&#xA&#xD;&#x9;&#x20;-3">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="&#xA&#xD;&#x9;&#x20;center&#xA&#xD;&#x9;&#x20;-3">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
-    <math>  
-          
-        <mi>X</mi>  
-        <mo>=</mo>  
-        <mtable frame="solid" align="center&#xA&#xD;&#x9;&#x20;-3&#xA&#xD;&#x9;&#x20;">  
-            <mtr>  
-                 <mtd><mi>A</mi></mtd>  
-                 <mtd><mi>B</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>C</mi></mtd>  
-                 <mtd><mi>D</mi></mtd>  
-            </mtr>  
-            <mtr>  
-                 <mtd><mi>E</mi></mtd>  
-                 <mtd><mi>F</mi></mtd>  
-            </mtr>  
-        </mtable>  
-      
-    </math>  
+    <math>
+
+        <mtext>X</mtext>
+        <mo>=</mo>
+        <mtable frame="solid" align="center&#xA&#xD;&#x9;&#x20;-3&#xA&#xD;&#x9;&#x20;">
+            <mtr>
+                 <mtd><mtext>A</mtext></mtd>
+                 <mtd><mtext>B</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>C</mtext></mtd>
+                 <mtd><mtext>D</mtext></mtd>
+            </mtr>
+            <mtr>
+                 <mtd><mtext>E</mtext></mtd>
+                 <mtd><mtext>F</mtext></mtd>
+            </mtr>
+        </mtable>
+
+    </math>
 
 </body>
 </html>
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -2,20 +2,20 @@
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == dir-2.html dir-2-ref.html # Bug 1392106
 random-if(gtkWidget) == dir-3.html dir-3-ref.html # bug 1309426
 == dir-4.html dir-4-ref.html
 == dir-5.html dir-5-ref.html
 fuzzy-if(cocoaWidget,0-135,0-56) == dir-6a.html dir-6a-ref.html
 == css-spacing-1.html css-spacing-1-ref.html
 pref(mathml.disabled,true) == disabled-scriptlevel-1.html disabled-scriptlevel-1-ref.html
 pref(mathml.disabled,true) == disabled-scriptlevel-1.xhtml disabled-scriptlevel-1-ref.xhtml
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-1.html displaystyle-1-ref.html # Bug 1392106
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-2.html displaystyle-2-ref.html # Bug 1392106
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-3.html displaystyle-3-ref.html # Bug 1392106
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-4.html displaystyle-4-ref.html # Bug 1392106
+== displaystyle-1.html displaystyle-1-ref.html
+== displaystyle-2.html displaystyle-2-ref.html
+== displaystyle-3.html displaystyle-3-ref.html
+== displaystyle-4.html displaystyle-4-ref.html
 random-if(smallScreen&&Android) fuzzy(0-255,0-200) fuzzy-if(webrender&&winWidget,114-255,265-304) fuzzy-if(webrender&&OSX,87-87,242-242) == mirror-op-1.html mirror-op-1-ref.html
 != mirror-op-2.html mirror-op-2-ref.html
 != mirror-op-3.html mirror-op-3-ref.html
 != mirror-op-4.html mirror-op-4-ref.html
 == dynamic-mi.xhtml dynamic-mi-ref.xhtml
 == mphantom-1.html mphantom-1-ref.html
 == mphantom-2.html mphantom-2-ref.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mfenced-1.xhtml mfenced-1-ref.xhtml # Bug 1392106
@@ -103,17 +103,17 @@ fails == stretchy-mover-2a.html stretchy
 != embellished-op-3-3.html embellished-op-3-3-ref.html
 != embellished-op-3-4.html embellished-op-3-4-ref.html
 != embellished-op-3-5.html embellished-op-3-5-ref.html
 == embellished-op-4-1.html embellished-op-4-1-ref.html
 == embellished-op-4-2.html embellished-op-4-2-ref.html
 == embellished-op-4-3.html embellished-op-4-3-ref.html
 == embellished-op-5-1.html embellished-op-5-ref.html
 == embellished-op-5-2.html embellished-op-5-ref.html
-fails-if(gtkWidget||Android) random-if(winWidget) == semantics-1.xhtml semantics-1-ref.xhtml # bug 1309429, bug 1328771
+== semantics-1.xhtml semantics-1-ref.xhtml # bug 1309429
 == semantics-2.html semantics-2-ref.html
 == semantics-3.html semantics-3-ref.html
 == semantics-4.html semantics-4-ref.html
 != mathcolor-1.xml mathcolor-1-ref.xml
 != mathcolor-2.xml mathcolor-2-ref.xml
 != mathcolor-3.xml mathcolor-3-ref.xml
 != mathcolor-4.xml mathcolor-4-ref.xml
 != mathbackground-1.xml mathbackground-1-ref.xml
@@ -144,25 +144,25 @@ random-if(gtkWidget) == mpadded-8.html m
 random-if(gtkWidget) == mpadded-9.html mpadded-9-ref.html # bug 1309430
 == math-display.html math-display-ref.html
 == scriptlevel-1.html scriptlevel-1-ref.html
 == scriptlevel-movablelimits-1.html scriptlevel-movablelimits-1-ref.html
 == munderover-align-accent-false.html munderover-align-accent-false-ref.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == munderover-align-accent-true.html munderover-align-accent-true-ref.html # Bug 1392106
 == munder-mover-align-accent-true.html munder-mover-align-accent-true-ref.html
 == munder-mover-align-accent-false.html munder-mover-align-accent-false-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mfrac-linethickness-1.xhtml mfrac-linethickness-1-ref.xhtml # Bug 1392106
+== mfrac-linethickness-1.xhtml mfrac-linethickness-1-ref.xhtml
 == mfrac-linethickness-2.xhtml mfrac-linethickness-2-ref.xhtml
 == mfrac-linethickness-3.xhtml mfrac-linethickness-3-ref.xhtml
 == mathml-negativespace.html mathml-negativespace-ref.html
 == negative-mspace-1.html negative-mspace-1-ref.html
 != link-1.xhtml link-ref.xhtml
 == munderover-empty-scripts.html munderover-empty-scripts-ref.html
 == positive-namedspace.html positive-namedspace-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mtable-align-whitespace.html mtable-align-whitespace-ref.html # Bug 1392106
+== mtable-align-whitespace.html mtable-align-whitespace-ref.html
 == mtable-width.html mtable-width-ref.html
 == mtable-rowlines-single-mtable-dynamic.html mtable-rowlines-single-ref.html
 == mtable-rowlines-multi-mtable-dynamic.html mtable-rowlines-multi-ref.html
 == mtable-rowalign-single-mtr.html mtable-rowalign-single-ref.html
 == mtable-rowalign-single-mtr-dynamic.html mtable-rowalign-single-ref.html
 == mtable-rowalign-single-mtable.html mtable-rowalign-single-ref.html
 == mtable-rowalign-single-mtable-dynamic.html mtable-rowalign-single-ref.html
 == mtable-rowalign-multi-mtable.html mtable-rowalign-multi-ref.html
@@ -173,17 +173,17 @@ random-if(/^Windows\x20NT\x206\.1/.test(
 == mtable-columnalign-single-mtr-dynamic.html mtable-columnalign-single-ref.html
 == mtable-columnalign-single-mtable.html mtable-columnalign-single-ref.html
 == mtable-columnalign-single-mtable-dynamic.html mtable-columnalign-single-ref.html
 == mtable-columnalign-multi-mtr.html mtable-columnalign-multi-ref.html
 == mtable-columnalign-multi-mtr-dynamic.html mtable-columnalign-multi-ref.html
 == mtable-columnalign-multi-mtable.html mtable-columnalign-multi-ref.html
 == mtable-columnalign-multi-mtable-dynamic.html mtable-columnalign-multi-ref.html
 == maction-selection.html maction-selection-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == maction-dynamic-embellished-op.html maction-dynamic-embellished-op-ref.html # Bug 1392106
+== maction-dynamic-embellished-op.html maction-dynamic-embellished-op-ref.html
 == maction-dynamic-1.html maction-dynamic-1-ref.html # bug 773482
 == maction-dynamic-2.html maction-dynamic-2-ref.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace.html mo-lspace-rspace-ref.html # Bug 1392106
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-2.html mo-lspace-rspace-2-ref.html # Bug 1392106
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-3.html mo-lspace-rspace-3-ref.html # Bug 1392106
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-4.html mo-lspace-rspace-4-ref.html # Bug 1392106
 == mo-invisibleoperators.html mo-invisibleoperators-ref.html
 == mo-invisibleoperators-2.html mo-invisibleoperators-2-ref.html
--- a/layout/reftests/mathml/semantics-1-ref.xhtml
+++ b/layout/reftests/mathml/semantics-1-ref.xhtml
@@ -1,85 +1,95 @@
 <?xml version="1.0" encoding="utf-8"?>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <meta http-equiv="content-type"
   content="application/xhtml+xml; charset=utf-8" />
   <title>Various tests for semantics</title>
+  <style>
+    @font-face
+    {
+        font-family: Ahem;
+        src: url(../fonts/Ahem.ttf);
+    }
+    math, p {
+        font: 25px Ahem;
+    }
+  </style>
 </head>
 
 <body>
 <!-- displaystyle (bug 468059) -->
 <p><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
   <semantics>
     <mstyle displaystyle="true">
       <munderover>
-        <mo movablelimits="true">□■□</mo>
-        <mtext>■□■□■□</mtext>
-        <mtext>■□■□■□</mtext>
+        <mo movablelimits="true">pXp</mo>
+        <mtext>XpXpXp</mtext>
+        <mtext>XpXpXp</mtext>
       </munderover>
     </mstyle>
   </semantics>
 </math></p>
 
 <!-- embellished operator (bug 21479) -->
 <p><math xmlns="http://www.w3.org/1998/Math/MathML">
   <mover>
     <mspace width="300px" height="10px" mathbackground="black"></mspace>
     <mo>&#xaf;</mo>
   </mover>
 </math></p>
 
 <!-- unwanted whitespace (bug 512418) -->
-<p>■□■□■□<math xmlns="http://www.w3.org/1998/Math/MathML">
+<p>XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML">
     <mrow>
       <mrow>
         <mo>lcm</mo>
         <mo>(</mo>
-        <mi>a</mi>
+        <mn>a</mn>
         <mo>,</mo>
-        <mi>b</mi>
+        <mn>b</mn>
         <mo>)</mo>
       </mrow>
       <mo>=</mo>
       <mfrac>
         <mrow>
           <mo>(</mo>
-          <mi>a</mi>
+          <mn>a</mn>
           <mo>&#x2062;</mo>
-          <mi>b</mi>
+          <mn>b</mn>
           <mo>)</mo>
         </mrow>
         <mrow>
           <mo>gcd</mo>
           <mo>(</mo>
-          <mi>a</mi>
+          <mn>a</mn>
           <mo>,</mo>
-          <mi>b</mi>
+          <mn>b</mn>
           <mo>)</mo>
         </mrow>
       </mfrac>
     </mrow>
-</math>■□■□■□</p>
+</math>XpXpXp</p>
 
 <!-- maction and semantics (bug 523037) -->
-<p>■□■□■□<math xmlns="http://www.w3.org/1998/Math/MathML">
+<p>XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML">
   <maction actiontype="toggle" selection="3">
     <mn>1</mn>
     <mn>2</mn>
     <mn>3</mn>
     <mn>4</mn>
     <mn>5</mn>
   </maction>
-</math>■□■□■□</p>
+</math>XpXpXp</p>
 
 <!-- maction and semantics (bug 523045) -->
-<p>■□■□■□<math xmlns="http://www.w3.org/1998/Math/MathML">
+<p>XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML">
   <maction actiontype="toggle" selection="4">
     <mn>1</mn>
     <mn>2</mn>
     <mn>3</mn>
     <mn>4</mn>
     <mn>5</mn>
   </maction>
-</math>■□■□■□</p>
+</math>XpXpXp</p>
 </body>
 </html>
--- a/layout/reftests/mathml/semantics-1.xhtml
+++ b/layout/reftests/mathml/semantics-1.xhtml
@@ -1,97 +1,107 @@
 <?xml version="1.0" encoding="utf-8"?>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <meta http-equiv="content-type"
   content="application/xhtml+xml; charset=utf-8" />
   <title>Various tests for semantics</title>
+  <style>
+    @font-face
+    {
+        font-family: Ahem;
+        src: url(../fonts/Ahem.ttf);
+    }
+    math, p {
+        font: 25px Ahem;
+    }
+</style>
 </head>
 
 <body>
 <!-- displaystyle (bug 468059) -->
 <p><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
     <semantics>
       <munderover>
-        <mo movablelimits="true">□■□</mo>
-        <mtext>■□■□■□</mtext>
-        <mtext>■□■□■□</mtext>
+        <mo movablelimits="true">pXp</mo>
+        <mtext>XpXpXp</mtext>
+        <mtext>XpXpXp</mtext>
       </munderover>
     </semantics>
 </math></p>
 
 <!-- embellished operator (bug 21479) -->
 <p><math xmlns="http://www.w3.org/1998/Math/MathML">
   <mover>
     <mspace width="300px" height="10px" mathbackground="black"></mspace>
     <semantics><mo>&#xaf;</mo></semantics>
   </mover>
 </math></p>
 
 <!-- unwanted whitespace (bug 512418) -->
-<p>■□■□■□<math xmlns="http://www.w3.org/1998/Math/MathML">
+<p>XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML">
   <semantics>
     <mrow>
       <mrow>
         <mo>lcm</mo>
         <mo>(</mo>
-        <mi>a</mi>
+        <mn>a</mn>
         <mo>,</mo>
-        <mi>b</mi>
+        <mn>b</mn>
         <mo>)</mo>
       </mrow>
       <mo>=</mo>
       <mfrac>
         <mrow>
           <mo>(</mo>
-          <mi>a</mi>
+          <mn>a</mn>
           <mo>&#x2062;</mo>
-          <mi>b</mi>
+          <mn>b</mn>
           <mo>)</mo>
         </mrow>
         <mrow>
           <mo>gcd</mo>
           <mo>(</mo>
-          <mi>a</mi>
+          <mn>a</mn>
           <mo>,</mo>
-          <mi>b</mi>
+          <mn>b</mn>
           <mo>)</mo>
         </mrow>
       </mfrac>
     </mrow>
   </semantics>
-</math>■□■□■□</p>
+</math>XpXpXp</p>
 
 <!-- maction and semantics (bug 523037) -->
-<p>■□■□■□<math xmlns="http://www.w3.org/1998/Math/MathML">
+<p>XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML">
   <maction actiontype="toggle" selection="3">
     <mn>1</mn>
     <mn>2</mn>
     <semantics>
       <mn>3</mn>
       <annotation encoding="text">three</annotation>
     </semantics>
     <semantics>
       <mn>4</mn>
       <annotation encoding="text">four</annotation>
     </semantics>
     <mn>5</mn>
   </maction>
-</math>■□■□■□</p>
+</math>XpXpXp</p>
 
 <!-- maction and semantics (bug 523045) -->
-<p>■□■□■□<math xmlns="http://www.w3.org/1998/Math/MathML">
+<p>XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML">
   <maction actiontype="toggle" selection="4">
     <mn>1</mn>
     <mn>2</mn>
     <semantics>
       <mn>3</mn>
       <annotation encoding="text">three</annotation>
     </semantics>
     <semantics>
       <mn>4</mn>
       <annotation encoding="text">four</annotation>
     </semantics>
     <mn>5</mn>
   </maction>
-</math>■□■□■□</p>
+</math>XpXpXp</p>
 </body>
 </html>