Bug 442637 - Add ssty related tests. r=fredw
authorJames Kitchener <jkitch.bug@gmail.com>
Wed, 15 Jan 2014 09:49:41 -0500
changeset 163591 b595ecfe81171d3e8535b82034a71c7517b50fe2
parent 163590 10b9624cde2b998f9083dfd736d1cf1968b21154
child 163592 b5fd65e0f0d68d33706b5b1a0a043c57063e7637
push idunknown
push userunknown
push dateunknown
reviewersfredw
bugs442637
milestone29.0a1
Bug 442637 - Add ssty related tests. r=fredw
layout/reftests/mathml/reftest.list
layout/reftests/mathml/ssty-1-ref.html
layout/reftests/mathml/ssty-1.html
layout/reftests/mathml/ssty-2-ref.html
layout/reftests/mathml/ssty-2.html
layout/reftests/mathml/ssty-3-ref.html
layout/reftests/mathml/ssty-3.html
layout/reftests/mathml/ssty-4-ref.html
layout/reftests/mathml/ssty-4.html
layout/reftests/mathml/ssty.woff
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -158,8 +158,12 @@ fails == whitespace-trim-4.html whitespa
 == mathvariant-1a.html mathvariant-1a-ref.html
 == mathvariant-1b.html mathvariant-1b-ref.html
 == mathvariant-1c.html mathvariant-1c-ref.html
 == mathvariant-1d.html mathvariant-1d-ref.html
 == mathvariant-2.html mathvariant-2-ref.html
 == mathvariant-3.html mathvariant-3-ref.html
 == mathvariant-4.html mathvariant-4-ref.html
 == mathvariant-5.html mathvariant-5-ref.html
+== ssty-1.html ssty-1-ref.html
+== ssty-2.html ssty-2-ref.html
+== ssty-3.html ssty-3-ref.html
+== ssty-4.html ssty-4-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-1-ref.html
@@ -0,0 +1,337 @@
+<!doctype html>
+<head>
+
+  <!-- This font only has glyphs defined for 'A', 'B', 'C' and 'D', and is
+       designed purely for testing ssty functionality 
+       The glyphs for 'A' and 'D' are identical, the difference between them is
+       that 'A' supports the ssty font feature. 
+       'A' with ssty = 1 maps to 'B'
+       'A' with ssty = 2 maps to 'C'-->
+  <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+</head>
+<body>
+
+  <!-- Test whether the ssty font feature setting is used appropriately for
+       supscripts et al. 
+       Assumes NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER is 0.71-->
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <msup>
+        <mo>D</mo>
+        <msup>
+          <mo>B</mo>
+          <msup>
+            <mo>C</mo>
+            <mo>C</mo> <!-- ssty value capped at 2 -->
+          </msup>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>D</mo>
+        <msub>
+          <mo>B</mo>
+          <msub>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msub>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>D</mo>
+        <msubsup>
+          <mo>B</mo>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+        </msubsup>
+        <msubsup>
+          <mo>B</mo>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>D</mo>
+        <mmultiscripts>
+          <mo>B</mo>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>B</mo>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <!-- Automatically set ssty ignores user set scriptlevel -->
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptlevel="-3">
+      <msup>
+        <mo>D</mo>
+        <msup>
+          <mo>B</mo>
+          <msup>
+            <mo>C</mo>
+            <mo>C</mo> <!-- ssty value capped at 2 -->
+          </msup>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>D</mo>
+        <msub>
+          <mo>B</mo>
+          <msub>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msub>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>D</mo>
+        <msubsup>
+          <mo>B</mo>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+        </msubsup>
+        <msubsup>
+          <mo>B</mo>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>D</mo>
+        <mmultiscripts>
+          <mo>B</mo>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>B</mo>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <!-- Automatically set ssty ignores user set scriptlevel -->
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptlevel="1">
+      <msup>
+        <mo>D</mo>
+        <msup>
+          <mo>B</mo>
+          <msup>
+            <mo>C</mo>
+            <mo>C</mo> <!-- ssty value capped at 2 -->
+          </msup>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>D</mo>
+        <msub>
+          <mo>B</mo>
+          <msub>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msub>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>D</mo>
+        <msubsup>
+          <mo>B</mo>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+        </msubsup>
+        <msubsup>
+          <mo>B</mo>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+          <msubsup>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </msubsup>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>D</mo>
+        <mmultiscripts>
+          <mo>B</mo>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>B</mo>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>C</mo>
+            <mo>C</mo>
+            <mo>C</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <!-- User set ssty font feature setting overrides automatically set ssty, but
+       only for affected elements -->
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <msup>
+        <mo>D</mo>
+        <msup>
+          <mo>D</mo>
+          <mo>C</mo>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>D</mo>
+        <msub>
+          <mo>D</mo>
+          <mo>C</mo>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>D</mo>
+        <msubsup>
+          <mo>D</mo>
+          <mo>C</mo>
+          <mo>C</mo>
+        </msubsup>
+        <msubsup>
+          <mo>D</mo>
+          <mo>C</mo>
+          <mo>C</mo>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>D</mo>
+        <mmultiscripts>
+          <mo>D</mo>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>D</mo>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-1.html
@@ -0,0 +1,324 @@
+<!doctype html>
+<head>
+  <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+</head>
+<body>
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <msup>
+        <mo>A</mo>
+        <msup>
+          <mo>A</mo>
+          <msup>
+            <mo>A</mo>
+            <mo>A</mo> <!-- ssty value capped at 2 -->
+          </msup>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>A</mo>
+        <msub>
+          <mo>A</mo>
+          <msub>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msub>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>A</mo>
+        <msubsup>
+          <mo>A</mo>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+        </msubsup>
+        <msubsup>
+          <mo>A</mo>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>A</mo>
+        <mmultiscripts>
+          <mo>A</mo>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>A</mo>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <!-- Automatically set ssty ignores scriptlevel -->
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptlevel="-3">
+      <msup>
+        <mo>A</mo>
+        <msup>
+          <mo>A</mo>
+          <msup>
+            <mo>A</mo>
+            <mo>A</mo> <!-- ssty value capped at 2 -->
+          </msup>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>A</mo>
+        <msub>
+          <mo>A</mo>
+          <msub>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msub>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>A</mo>
+        <msubsup>
+          <mo>A</mo>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+        </msubsup>
+        <msubsup>
+          <mo>A</mo>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>A</mo>
+        <mmultiscripts>
+          <mo>A</mo>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>A</mo>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <!-- Automatically set ssty ignores scriptlevel -->
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptlevel="1">
+      <msup>
+        <mo>A</mo>
+        <msup>
+          <mo>A</mo>
+          <msup>
+            <mo>A</mo>
+            <mo>A</mo> <!-- ssty value capped at 2 -->
+          </msup>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>A</mo>
+        <msub>
+          <mo>A</mo>
+          <msub>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msub>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>A</mo>
+        <msubsup>
+          <mo>A</mo>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+        </msubsup>
+        <msubsup>
+          <mo>A</mo>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+          <msubsup>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </msubsup>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>A</mo>
+        <mmultiscripts>
+          <mo>A</mo>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo>A</mo>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+          <mmultiscripts>
+            <mo>A</mo>
+            <mo>A</mo>
+            <mo>A</mo>
+          </mmultiscripts>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <!-- User set ssty font feature setting overrides automatically set ssty -->
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <msup>
+        <mo>A</mo>
+        <msup>
+          <mo style="-moz-font-feature-settings: 'ssty' 0">A</mo>
+          <mo>A</mo>
+        </msup>
+      </msup>
+
+      <msub>
+        <mo>A</mo>
+        <msub>
+          <mo style="-moz-font-feature-settings: 'ssty' 0">A</mo>
+          <mo>A</mo>
+        </msub>
+      </msub>
+
+      <msubsup>
+        <mo>A</mo>
+        <msubsup>
+          <mo style="-moz-font-feature-settings: 'ssty' 0">A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </msubsup>
+        <msubsup>
+          <mo style="-moz-font-feature-settings: 'ssty' 0">A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </msubsup>
+      </msubsup>
+
+      <mmultiscripts>
+        <mo>A</mo>
+        <mmultiscripts>
+          <mo style="-moz-font-feature-settings: 'ssty' 0">A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mmultiscripts>
+        <mmultiscripts>
+          <mo style="-moz-font-feature-settings: 'ssty' 0">A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mmultiscripts>
+      </mmultiscripts>
+    </mstyle>
+  </math>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-2-ref.html
@@ -0,0 +1,275 @@
+<!doctype html>
+<head>
+  <!-- See ssty-1-ref.html for an explanation of this font -->
+  <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+</head>
+<body>
+  <!-- Test whether the ssty font feature setting is used appropriately for
+       mroot, mfrac, munderover et al. 
+       Assumes NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER is 0.71-->
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mroot>
+        <mo>D</mo>
+        <mo>C</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>B</mo>
+        <mo>B</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mfrac>
+        <mfrac>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mfrac>
+      </mfrac>
+
+    <mfrac>
+      <mroot>
+        <mo>B</mo>
+        <mo>C</mo>
+      </mroot>
+      <mo>B</mo>
+    </mfrac>
+
+    <mover>
+      <mo>D</mo>
+      <mover>
+        <mo>B</mo>
+        <mo>C</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>D</mo>
+      <munder>
+        <mo>B</mo>
+        <mo>C</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>D</mo>
+      <munderover>
+        <mo>B</mo>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munderover>
+      <munderover>
+        <mo>B</mo>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munderover>
+    </munderover>
+
+    </mstyle>
+  </math>
+
+  <p>
+  <!-- ssty font feature not set on mfrac et al when displaystyle is
+       set (still allowed on mroot, mover et al.)-->
+  <math>
+    <mstyle style="font-family: 'sstyfont';" displaystyle="true">
+      <mroot>
+        <mo>D</mo>
+        <mo>C</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>D</mo>
+        <mo>D</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <!-- ssty gets set as script level incremented because displaystyle
+               is now false -->
+          <mo>B</mo>
+          <mo>B</mo>
+        </mfrac>
+        <mfrac>
+          <mo>B</mo>
+          <mo>B</mo>
+        </mfrac>
+      </mfrac>
+
+    <mfrac>
+      <mroot>
+        <mo>D</mo>
+        <mo>C</mo>
+      </mroot>
+      <mo>D</mo>
+    </mfrac>
+
+    <mover>
+      <mo>D</mo>
+      <mover>
+        <mo>B</mo>
+        <mo>C</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>D</mo>
+      <munder>
+        <mo>B</mo>
+        <mo>C</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>D</mo>
+      <munderover>
+        <mo>B</mo>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munderover>
+      <munderover>
+        <mo>B</mo>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munderover>
+    </munderover>
+    </mstyle>
+  </math>
+
+      <p>
+
+  <math>
+    <!-- scriptlevel is not incremented when accent for overframes and
+         accentunder for underframes are true, so there shouldn't be a
+         change in the ssty value -->
+    <mstyle style="font-family: 'sstyfont';">
+      <mover accent="true">
+        <mo>D</mo>
+        <mover accent="true">
+          <mo>D</mo>
+          <mo>D</mo>
+        </mover>
+      </mover>
+
+      <munder accentunder="true">
+        <mo>D</mo>
+        <munder accentunder="true">
+          <mo>D</mo>
+          <mo>D</mo>
+        </munder>
+      </munder>
+
+      <munderover accentunder="true" accent="true">
+        <mo>D</mo>
+        <munderover accentunder="true" accent="true">
+          <mo>D</mo>
+          <mo>D</mo>
+          <mo>D</mo>
+        </munderover>
+        <munderover accentunder="true" accent="true">
+          <mo>D</mo>
+          <mo>D</mo>
+          <mo>D</mo>
+        </munderover>
+      </munderover>
+
+      <mover accent="true">
+        <mo>D</mo>
+        <mover accent="false">
+          <mo>D</mo>
+          <mo>B</mo>
+        </mover>
+      </mover>
+
+      <munder accentunder="true">
+        <mo>D</mo>
+        <munder accentunder="false">
+          <mo>D</mo>
+          <mo>B</mo>
+        </munder>
+      </munder>
+
+      <munderover accentunder="true" accent="true">
+        <mo>D</mo>
+        <munderover accentunder="false" accent="false">
+          <mo>D</mo>
+          <mo>B</mo>
+          <mo>B</mo>
+        </munderover>
+        <munderover accentunder="false" accent="false">
+          <mo>D</mo>
+          <mo>B</mo>
+          <mo>B</mo>
+        </munderover>
+      </munderover>
+
+      <mover accentunder="false" accent="false">
+        <mo>D</mo>
+        <mover accentunder="true" accent="true">
+          <mo>B</mo>
+          <mo>B</mo>
+        </mover>
+      </mover>
+
+      <munder accentunder="false" accent="false">
+        <mo>D</mo>
+        <munder accentunder="true" accent="true">
+          <mo>B</mo>
+          <mo>B</mo>
+        </munder>
+      </munder>
+
+      <munderover accentunder="false" accent="false">
+        <mo>D</mo>
+        <munderover accentunder="true" accent="true">
+          <mo>B</mo>
+          <mo>B</mo>
+          <mo>B</mo>
+        </munderover>
+        <munderover accentunder="true" accent="true">
+          <mo>B</mo>
+          <mo>B</mo>
+          <mo>B</mo>
+        </munderover>
+      </munderover>
+
+      <munderover accentunder="false" accent="true">
+        <mo>D</mo>
+        <munderover accentunder="false" accent="true">
+          <mo>B</mo>
+          <mo>C</mo>
+          <mo>B</mo>
+        </munderover>
+        <munderover accentunder="false" accent="true">
+          <mo>D</mo>
+          <mo>B</mo>
+          <mo>D</mo>
+        </munderover>
+      </munderover>
+
+      <munderover accentunder="true" accent="false">
+        <mo>D</mo>
+        <munderover accentunder="true" accent="false">
+          <mo>D</mo>
+          <mo>D</mo>
+          <mo>B</mo>
+        </munderover>
+        <munderover accentunder="true" accent="false">
+          <mo>B</mo>
+          <mo>B</mo>
+          <mo>C</mo>
+        </munderover>
+      </munderover>
+
+    </mstyle>
+  </math>
+
+</body>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-2.html
@@ -0,0 +1,267 @@
+<!doctype html>
+<head>
+  <!-- See ssty-1-ref.html for an explanation of this font -->
+  <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+</head>
+<body>
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+      </mfrac>
+
+    <mfrac>
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+      <mo>A</mo>
+    </mfrac>
+
+    <mover>
+      <mo>A</mo>
+      <mover>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>A</mo>
+      <munder>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>A</mo>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+    </munderover>
+
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';" displaystyle="true">
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+      </mfrac>
+
+    <mfrac>
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+      <mo>A</mo>
+    </mfrac>
+
+    <mover>
+      <mo>A</mo>
+      <mover>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>A</mo>
+      <munder>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>A</mo>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+    </munderover>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+
+      <mover accent="true">
+        <mo>A</mo>
+        <mover accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+        </mover>
+      </mover>
+
+      <munder accentunder="true">
+        <mo>A</mo>
+        <munder accentunder="true">
+          <mo>A</mo>
+          <mo>A</mo>
+        </munder>
+      </munder>
+
+      <munderover accentunder="true" accent="true">
+        <mo>A</mo>
+        <munderover accentunder="true" accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+        <munderover accentunder="true" accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+      </munderover>
+
+      <mover accentunder="true" accent="true">
+        <mo>A</mo>
+        <mover accentunder="false" accent="false">
+          <mo>A</mo>
+          <mo>A</mo>
+        </mover>
+      </mover>
+
+      <munder accentunder="true" accent="true">
+        <mo>A</mo>
+        <munder accentunder="false" accent="false">
+          <mo>A</mo>
+          <mo>A</mo>
+        </munder>
+      </munder>
+
+      <munderover accentunder="true" accent="true">
+        <mo>A</mo>
+        <munderover accentunder="false" accent="false">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+        <munderover accentunder="false" accent="false">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+      </munderover>
+
+      <mover accent="false">
+        <mo>A</mo>
+        <mover accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+        </mover>
+      </mover>
+
+      <munder accentunder="false">
+        <mo>A</mo>
+        <munder accentunder="true">
+          <mo>A</mo>
+          <mo>A</mo>
+        </munder>
+      </munder>
+
+      <munderover accentunder="false" accent="false">
+        <mo>A</mo>
+        <munderover accentunder="true" accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+        <munderover accentunder="true" accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+      </munderover>
+
+      <munderover accentunder="false" accent="true">
+        <mo>A</mo>
+        <munderover accentunder="false" accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+        <munderover accentunder="false" accent="true">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+      </munderover>
+
+      <munderover accentunder="true" accent="false">
+        <mo>A</mo>
+        <munderover accentunder="true" accent="false">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+        <munderover accentunder="true" accent="false">
+          <mo>A</mo>
+          <mo>A</mo>
+          <mo>A</mo>
+        </munderover>
+      </munderover>
+
+    </mstyle>
+  </math>
+
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-3-ref.html
@@ -0,0 +1,219 @@
+<!doctype html>
+<head>
+  <!-- See ssty-1-ref.html for an explanation of this font -->
+  <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+</head>
+<body>
+
+  <!-- Test changes of scriptsizemultiplier on setting of ssty font feature -->
+
+  <math>
+    <!-- No changes with scriptsizemultipliers that make things bigger -->
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="1.2">
+      <mroot>
+        <mo>D</mo>
+        <mo>D</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>D</mo>
+        <mo>D</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>D</mo>
+          <mo>D</mo>
+        </mfrac>
+        <mfrac>
+          <mo>D</mo>
+          <mo>D</mo>
+        </mfrac>
+      </mfrac>
+
+    <mfrac>
+      <mroot>
+        <mo>D</mo>
+        <mo>D</mo>
+      </mroot>
+      <mo>D</mo>
+    </mfrac>
+
+    <mover>
+      <mo>D</mo>
+      <mover>
+        <mo>D</mo>
+        <mo>D</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>D</mo>
+      <munder>
+        <mo>D</mo>
+        <mo>D</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>D</mo>
+      <munderover>
+        <mo>D</mo>
+        <mo>D</mo>
+        <mo>D</mo>
+      </munderover>
+      <munderover>
+        <mo>D</mo>
+        <mo>D</mo>
+        <mo>D</mo>
+      </munderover>
+    </munderover>
+
+  </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+   <!-- A slower increase in ssty setting.
+        scriptlevel=1 corresponds to ssty=0
+        scriptlevel=2 corresponds to ssty=1
+        scriptlevel=3 corresponds to ssty=2 -->
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="0.8">
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+      </mfrac>
+
+      <mfrac>
+        <mroot>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mroot>
+        <mo>A</mo>
+      </mfrac>
+
+    <mover>
+      <mo>A</mo>
+      <mover>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>A</mo>
+      <munder>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>A</mo>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+    </munderover>
+
+  </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <!-- A faster increase in ssty setting.
+         scriptlevel=1 corresponds to ssty=2
+         scriptlevel=2 corresponds to ssty=2
+         scriptlevel=3 corresponds to ssty=2 -->
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="0.5">
+      <mroot>
+        <mo>D</mo>
+        <mo>C</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>C</mo>
+        <mo>C</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mfrac>
+        <mfrac>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mfrac>
+      </mfrac>
+
+      <mfrac>
+        <mroot>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mroot>
+        <mo>C</mo>
+      </mfrac>
+
+    <mover>
+      <mo>D</mo>
+      <mover>
+        <mo>C</mo>
+        <mo>C</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>D</mo>
+      <munder>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>D</mo>
+      <munderover>
+        <mo>C</mo>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munderover>
+      <munderover>
+        <mo>C</mo>
+        <mo>C</mo>
+        <mo>C</mo>
+      </munderover>
+    </munderover>
+
+  </mstyle>
+  </math>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-3.html
@@ -0,0 +1,207 @@
+<!doctype html>
+<head>
+  <!-- See ssty-1-ref.html for an explanation of this font -->
+  <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+</head>
+<body>
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="1.2">
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+      </mfrac>
+
+      <mfrac>
+        <mroot>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mroot>
+        <mo>A</mo>
+      </mfrac>
+
+    <mover>
+      <mo>A</mo>
+      <mover>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>A</mo>
+      <munder>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>A</mo>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+    </munderover>
+
+  </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="0.8">
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+      </mfrac>
+
+      <mfrac>
+        <mroot>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mroot>
+        <mo>A</mo>
+      </mfrac>
+
+    <mover>
+      <mo>A</mo>
+      <mover>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>A</mo>
+      <munder>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>A</mo>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+    </munderover>
+
+  </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="0.5">
+      <mroot>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mroot>
+
+      <mfrac>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mfrac>
+
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+      </mfrac>
+
+      <mfrac>
+        <mroot>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mroot>
+        <mo>A</mo>
+      </mfrac>
+
+    <mover>
+      <mo>A</mo>
+      <mover>
+        <mo>A</mo>
+        <mo>A</mo>
+      </mover>
+    </mover>
+
+    <munder>
+      <mo>A</mo>
+      <munder>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munder>
+    </munder>
+
+    <munderover>
+      <mo>A</mo>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+      <munderover>
+        <mo>A</mo>
+        <mo>A</mo>
+        <mo>A</mo>
+      </munderover>
+    </munderover>
+
+  </mstyle>
+  </math>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-4-ref.html
@@ -0,0 +1,156 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Dynamic ssty tests</title>
+    <!-- See ssty-1-ref.html for an explanation of this font -->
+    <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+  </head>
+  <body>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>B</mo>
+        <mo>B</mo>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>B</mo>
+        <mo>B</mo>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>B</mo>
+        <!-- deliberately invalid -->
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mo>D</mo>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+           <mo>A</mo>
+           <mo>A</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="1.2">
+      <mfrac>
+        <mfrac>
+          <mo>D</mo>
+          <mo>D</mo>
+        </mfrac>
+        <mfrac>
+           <mo>D</mo>
+           <mo>D</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';" scriptsizemultiplier="0.8">
+      <mfrac>
+        <mfrac>
+          <mo>B</mo>
+          <mo>B</mo>
+        </mfrac>
+        <mfrac>
+           <mo>B</mo>
+           <mo>B</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>B</mo>
+        <mrow>
+          <mrow>
+            <mrow>
+              <mo>B</mo>
+            </mrow>
+          </mrow>
+        </mrow>
+      </mfrac>
+    </mstyle>
+  </math>
+
+ <p>
+
+  <math>
+    <mstyle style ="font-family: 'sstyfont';">
+      <mfrac>
+        <mfrac>
+          <mo>C</mo>
+          <mo>C</mo>
+        </mfrac>
+        <mfrac>
+           <mo>C</mo>
+           <mo>C</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle id="mstyle5" style ="font-family: 'sstyfont';  -moz-font-feature-settings: 'ssty' 0">
+      <mfrac>
+        <mfrac>
+          <mo>D</mo>
+          <mo>D</mo>
+        </mfrac>
+        <mfrac>
+           <mo>D</mo>
+           <mo>D</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/ssty-4.html
@@ -0,0 +1,186 @@
+<!doctype html>
+<html class="reftest-wait">
+  <head>
+    <title>Dynamic ssty tests</title>
+    <!-- See ssty-1-ref.html for an explanation of this font -->
+    <style type="text/css" media="screen, print">
+    @font-face {
+      font-family: "sstyfont";
+      src: url("ssty.woff");
+    }
+  </style>
+  </head>
+  <body>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac id="mfrac0">
+        <mo>A</mo>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>A</mo>
+        <mo id="mo0"></mo>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>A</mo>
+        <mo id="mo1">A</mo>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';" id="mstyle0">
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle id="mstyle1">
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+           <mo>A</mo>
+           <mo>A</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle id="mstyle2" style="font-family: 'sstyfont';">
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+           <mo>A</mo>
+           <mo>A</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle id="mstyle3" style="font-family: 'sstyfont';">
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+           <mo>A</mo>
+           <mo>A</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle style="font-family: 'sstyfont';">
+      <mfrac>
+        <mo>A</mo>
+        <mrow>
+          <mrow>
+            <mrow id="mrow0">
+            </mrow>
+          </mrow>
+        </mrow>
+      </mfrac>
+    </mstyle>
+  </math>
+
+ <p>
+
+  <math>
+    <mstyle id="mstyle4" style ="font-family: 'sstyfont'; -moz-font-feature-settings: 'ssty' 0">
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+           <mo>A</mo>
+           <mo>A</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+  <p>
+
+  <math>
+    <mstyle id="mstyle5" style ="font-family: 'sstyfont';">
+      <mfrac>
+        <mfrac>
+          <mo>A</mo>
+          <mo>A</mo>
+        </mfrac>
+        <mfrac>
+           <mo>A</mo>
+           <mo>A</mo>
+        </mfrac>
+      </mfrac>
+    </mstyle>
+  </math>
+
+    <script>
+      function doTest()
+      {
+        var mo = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo");
+        mo.innerHTML = "A";
+        // An added child gets ssty font feature
+        document.getElementById("mfrac0").appendChild(mo);
+        // A child with changed text gets ssty font feature
+        document.getElementById("mo0").innerHTML = "A";
+        // A relocated child loses ssty font feature setting
+        document.getElementById("mstyle0").appendChild(document.getElementById("mo1"));
+        // A change in style
+        document.getElementById("mstyle1").setAttribute("style", "font-family: 'sstyfont';");
+        // Changes in script size multiplier affect ssty setting
+        document.getElementById("mstyle2").setAttribute("scriptsizemultiplier", "1.2");
+        document.getElementById("mstyle3").setAttribute("scriptsizemultiplier", "0.8");
+
+        // ssty gets added to descendants as well
+        var mo1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo");
+        mo1.innerHTML = "A";
+        document.getElementById("mrow0").appendChild(mo1);
+        // removing explicit ssty setting works
+        document.getElementById("mstyle4").setAttribute(
+          "style", "font-family: 'sstyfont';")
+        // setting an explicit ssty font feature 
+        document.getElementById("mstyle5").setAttribute(
+          "style" , "font-family: 'sstyfont'; -moz-font-feature-settings: 'ssty' 0")
+
+        document.documentElement.removeAttribute("class");
+      }
+      window.addEventListener("MozReftestInvalidate", doTest, false);
+    </script>
+  </body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..19312c713d4137d6e24c8522b56943959cebdafb
GIT binary patch
literal 1412
zc${ri4NOy46uz&N2Zbkef>KnZ40MVGOUoD}NEy|l6)0LzV8ULZR7B8%X4HsHRVWMu
zidztr3C^GsVQXYVm;wdLlwXmu3ED};S*Jq;S`-7=T_l<;*-5^4^L_8jJ@=e<?#tkD
zIJ}4m9suT9U<rU>aT6fme}m28Pys;b5IZ2mIoUTWIh=@400>#|^{NHztI4GXZ{EUz
zS|#Kz5bJ<9a0?FS@u8-MoCZN}Fg3gl=0^rWZ31%W2XP(^v|Jv4BLe_4U&y%-cvNfx
zDIrxLhT1|77R(z&Afx{zB?^R4Ti6et2l#+z@y<z5gqjg@CkQtSgjkZ4dRPJg(H?S}
z1z6rdNT~t|+>hu6Ir<Lf;oyKEH4$p?Y)Ak+lW?qY^IGx2Lx*8sQlMu!1l4pBcuUF?
zgt$O}3x$7K^={~-b#4pw65_&mTsSe?dS`-tb}|Rk*hcG}M`@e<Po>+ImCQXAlvwXE
zR^)6c%s*a73u(ErvQH-%xi`OIa<9!*tUXNXh@yz2oPC0UB{NRN1z|l@W~k#BMf+X;
zPP^?p`SxAR?F@VEl!2?A${*k_J7vV|y%}7tRgH04Bl~_Ibw|^vchk+mrJ)TE$c040
z8Z;4IhDM^hIGi<_+gkbfF&5#K*Z70i26ce`SbU37nlgL&R{cv}-QPvBicj7Wm4^92
z+TOW71D|i4J;8EfVbYmvQ=4YXT<^a*ciourIHURHS0gV(QpVfbC*#Hk6G!*FKKC*p
zdgP39YW`a!`Ous7uF0gq=>wduqU2pEocXgK4|v1`m@fB(`1pD1_f?yY_})0u@G9-a
z<441{nu>CE7v{fU6_G*adAa4{XuX@b9*6XVg|+V|`T2M2lcLqI-?$LRb!PD-)STL>
zR#|4zaBS3zP7k63(h!J-zW1K^enEc%o}OkP33T1tXq^cP97pn)b0%9iG7V1d`7Vq7
zAG~y2`Co7RqW2Cs9V}ulcQ_Nl5X++Qo;DSB$xl{l8^T0fm<o7FxE`c$7IVTem}^sY
zsZ`$i&oDDHHY-b%*@3HXBld~-W1$S;pl)P^{%o6A)>_<}Jv`Im#l|$#rbf$8L!2<H
zz}uGKNZJyI#l3J`B*Pt14oX%cQ<T=s<*?dbLKd~T+hhtHm^7J87M1Rflwk@UGKIL>
zF|Dga7%VC0qQ!^$!RVMPQZhN`^QB`$G$l}{)kq_KQ+rgZ%#vrQqPtZ^Txt%eu2%1R
z`fDG(%tfA!5KHec=!{CjTCjPTZ~^v{2mlj80@xr9K4FBzYp{?fTfquzr&BsAW_fv8
z<mV*+3k>xye7XDns%xsP4wtxTD=wanxN>#%@eRr}MBUay8uI;U<CRE~%iX9q%@q}_
z7JqY<-$NI%<i|-$6tyi_XM@gIX*;SE$B*W!*}4Ev^&uTH{aILEoI3XI!{jJD_nykB
z{1H>^aDB!`+a9hZj<c;+N&@H2nS;uxwmOkwsJ+;FVAV2ix@Lck#Irc?^SUD6M~yyP
zz4Tq}Dbn)Dq4di?#5~`vs;S?8klC2gtT0p?4b^ecW$QeGvtOS(?B91qUr=4&=wAD@
zcJ`0@uYW#Zwt`!gAx&kD#$NRsn@|_@Y76IEwChJ&N-X}w^GbhLt}XW|?H}9SAF-Mh
z=A#)Z^}Q=fcYk^!rq_A&e$r`uK~wTkJ8SDN4#q}uYYPTqy6xmFCM&UN@jHpYNz)SS
Rx4^t&1paN;twF8>@GnoHC}jWu