Bug 838506 - Part 5: Tests. r=roc

This commit is contained in:
Frédéric Wang 2014-01-14 09:39:50 -05:00
Родитель d4fd527968
Коммит f8e564d064
15 изменённых файлов: 925 добавлений и 13 удалений

Просмотреть файл

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>Crashtest bug 713606</title>
</head>
<body onload="document.querySelector('mstyle').setAttribute('scriptminsize', '0%');">
<math>
<msubsup>
<mtext>X</mtext>
<mtable displaystyle="true"></mstyle>
</mtext>Y</mtext>
</msubsup>
</math>
<math>
<msubsup>
<mtext>X</mtext>
<mstyle displaystyle="true"></mstyle>
</mtext>Y</mtext>
</msubsup>
</math>
<math><mfrac><mstyle displaystyle="true"></mstyle></mfrac></math>
</body>
</html>

Просмотреть файл

@ -56,4 +56,5 @@ load 541620-1.xhtml
load 557474-1.html
load 654928-1.html
load 655451-1.xhtml
load 713606-1.html
load 716349-1.html

Просмотреть файл

@ -0,0 +1,149 @@
<!doctype html>
<html>
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- Test displaystyle on mstyle -->
<math>
<mstyle displaystyle="true">
<munder><mo>O</mo><mo>O</mo></munder>
</mstyle>
<mstyle displaystyle="false">
<msub><mo>O</mo><mo>O</mo></munder>
</mstyle>
</math>
<!-- The mfrac element sets displaystyle to "false", or if it was already
false increments scriptlevel by 1, within numerator and denominator.
-->
<math>
<mstyle displaystyle="true">
<mfrac>
<msub><mo>O</mo><mo>O</mo></msub>
<msub><mo>O</mo><mo>O</mo></msub>
</mfrac>
</mstyle>
</math>
<!-- The mroot element increments scriptlevel by 2, and sets
displaystyle to "false", within index, but leaves both attributes
unchanged within base.
The msqrt element leaves both attributes unchanged within its
argument. -->
<math>
<mstyle displaystyle="true">
<mroot>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
</mroot>
<msqrt>
<munder><mo>O</mo><mo>O</mo></munder>
</msqrt>
</mstyle>
</math>
<!--
The msub element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within subscript, but leaves both attributes unchanged within base.
The msup element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within superscript, but leaves both attributes unchanged within
base.
The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
to "false", within subscript and superscript, but leaves both attributes
unchanged within base.
The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
to "false", within each of its arguments except base, but leaves both
attributes unchanged within base.
-->
<math>
<mstyle displaystyle="true">
<msub>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
</msub>
<msup>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
</msup>
<msubsup>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
<msub><mo>O</mo><mo>O</mo></msub>
</msubsup>
<mmultiscripts>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
<msub><mo>O</mo><mo>O</mo></msub>
<mprescripts/>
<msub><mo>O</mo><mo>O</mo></msub>
<msub><mo>O</mo><mo>O</mo></msub>
</mmultiscripts>
</mstyle>
</math>
<!--
The munder element [...] always sets displaystyle to "false" within the
underscript, but increments scriptlevel by 1 only when accentunder is
"false". Within base, it always leaves both attributes unchanged.
The mover element [...] always sets displaystyle to "false" within
overscript, but increments scriptlevel by 1 only when accent is "false".
Within base, it always leaves both attributes unchanged.
The munderover [..] always sets displaystyle to "false" within underscript
and overscript, but increments scriptlevel by 1 only when accentunder or
accent, respectively, are "false". Within base, it always leaves both
attributes unchanged.
-->
<math>
<mstyle displaystyle="true">
<munder>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
</munder>
<mover>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
</mover>
<munderover>
<munder><mo>O</mo><mo>O</mo></munder>
<msub><mo>O</mo><mo>O</mo></msub>
<msub><mo>O</mo><mo>O</mo></msub>
</munderover>
</mstyle>
</math>
<!--
The displaystyle attribute is allowed on the mtable element to set the
inherited value of the attribute. If the attribute is not present, the
mtable element sets displaystyle to "false" within the table elements.
-->
<math>
<mstyle displaystyle="false">
<mtable displaystyle="true">
<mtr>
<mtd>
<munder><mo>O</mo><mo>O</mo></munder>
</mtd>
</mtr>
</mtable>
</mstyle>
<mstyle displaystyle="true">
<mtable>
<mtr>
<mtd>
<msub><mo>O</mo><mo>O</mo></msub>
</mtd>
</mtr>
</mtable>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,149 @@
<!doctype html>
<html>
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- Test displaystyle on mstyle -->
<math>
<mstyle displaystyle="true">
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mstyle>
<mstyle displaystyle="false">
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mstyle>
</math>
<!-- The mfrac element sets displaystyle to "false", or if it was already
false increments scriptlevel by 1, within numerator and denominator.
-->
<math>
<mstyle displaystyle="true">
<mfrac>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mfrac>
</mstyle>
</math>
<!-- The mroot element increments scriptlevel by 2, and sets
displaystyle to "false", within index, but leaves both attributes
unchanged within base.
The msqrt element leaves both attributes unchanged within its
argument. -->
<math>
<mstyle displaystyle="true">
<mroot>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mroot>
<msqrt>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</msqrt>
</mstyle>
</math>
<!--
The msub element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within subscript, but leaves both attributes unchanged within base.
The msup element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within superscript, but leaves both attributes unchanged within
base.
The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
to "false", within subscript and superscript, but leaves both attributes
unchanged within base.
The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
to "false", within each of its arguments except base, but leaves both
attributes unchanged within base.
-->
<math>
<mstyle displaystyle="true">
<msub>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</msub>
<msup>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</msup>
<msubsup>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</msubsup>
<mmultiscripts>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<mprescripts/>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mmultiscripts>
</mstyle>
</math>
<!--
The munder element [...] always sets displaystyle to "false" within the
underscript, but increments scriptlevel by 1 only when accentunder is
"false". Within base, it always leaves both attributes unchanged.
The mover element [...] always sets displaystyle to "false" within
overscript, but increments scriptlevel by 1 only when accent is "false".
Within base, it always leaves both attributes unchanged.
The munderover [..] always sets displaystyle to "false" within underscript
and overscript, but increments scriptlevel by 1 only when accentunder or
accent, respectively, are "false". Within base, it always leaves both
attributes unchanged.
-->
<math>
<mstyle displaystyle="true">
<munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</munder>
<mover>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mover>
<munderover>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</munderover>
</mstyle>
</math>
<!--
The displaystyle attribute is allowed on the mtable element to set the
inherited value of the attribute. If the attribute is not present, the
mtable element sets displaystyle to "false" within the table elements.
-->
<math>
<mstyle displaystyle="false">
<mtable displaystyle="true">
<mtr>
<mtd>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mtd>
</mtr>
</mtable>
</mstyle>
<mstyle displaystyle="true">
<mtable>
<mtr>
<mtd>
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
</mtd>
</mtr>
</mtable>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
</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>
<munderover><mo>O</mo><mo>O</mo><mo>O</mo></munderover>
</mstyle>
<mstyle displaystyle="false">
<msub><mo>O</mo><mo>O</mo></msub>
<msup><mo>O</mo><mo>O</mo></msup>
<msubsup><mo>O</mo><mo>O</mo><mo>O</mo></msubsup>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
</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>
<munderover><mo movablelimits="true">O</mo><mo>O</mo><mo>O</mo></munderover>
</mstyle>
<mstyle displaystyle="false">
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<mover><mo movablelimits="true">O</mo><mo>O</mo></mover>
<munderover><mo movablelimits="true">O</mo><mo>O</mo><mo>O</mo></munderover>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
</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>
</math>
<math>
<mstyle id="m2" displaystyle="true">
<munder><mo>O</mo><mo>O</mo></munder>
<mfrac><mi>x</mi><mi>y</mi></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>
</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>
</math>
<math>
<mstyle id="m5" displaystyle="false">
<msub><mo>O</mo><mo>O</mo></msub>
<mfrac><mi>x</mi><mi>y</mi></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>
</mtd>
</mtr>
</mtable>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,64 @@
<!doctype html>
<html class="reftest-wait">
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
<script type="text/javascript">
function doTest() {
document.getElementById("m1").setAttribute("displaystyle", "true");
document.getElementById("m2").setAttribute("displaystyle", "true");
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, false);
</script>
</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>
</math>
<math>
<mstyle id="m2">
<munder><mo movablelimits="true">O</mo><mo>O</mo></munder>
<mfrac><mi>x</mi><mi>y</mi></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>
</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>
</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>
</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>
</mtd>
</mtr>
</mtable>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- Test dynamic change (see bug 832800) -->
<math>
<mstyle displaystyle="true">
<mfrac>
<mrow>
<mi>X</mi>
<mo id="mathOperator" mathbackground="red">+</mo>
<mfrac>
<mrow><mi>X</mi></mrow>
<mrow><mi>X</mi></mrow>
</mfrac>
</mrow>
<mrow>
<mi>X</mi>
</mrow>
</mfrac>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,37 @@
<!doctype html>
<html class="reftest-wait">
<head>
<title>displaystyle</title>
<meta charset="utf-8"/>
<script type="text/javascript">
function doTest() {
document.getElementById('mathOperator').
setAttribute('mathbackground', 'red');
document.documentElement.removeAttribute("class");
}
window.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</head>
<body>
<!-- Test dynamic change (see bug 832800) -->
<math>
<mstyle displaystyle="true">
<mfrac>
<mrow>
<mi>X</mi>
<mo id="mathOperator">+</mo>
<mfrac>
<mrow><mi>X</mi></mrow>
<mrow><mi>X</mi></mrow>
</mfrac>
</mrow>
<mrow>
<mi>X</mi>
</mrow>
</mfrac>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -1,13 +1,53 @@
<html>
<body>
<math>
<mstyle displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
<math displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
<math display="inline" displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
<math display="block" displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
<math displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
<math display="inline" displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
<math display="block" displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math>
</body>
</html>

Просмотреть файл

@ -1,11 +1,67 @@
<html>
<body>
<math displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
<math>
<mstyle displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
<math>
<mstyle displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
<math display="inline">
<mstyle displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
<math display="block">
<mstyle displaystyle="true">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
<math>
<mstyle displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
<math display="inline">
<mstyle displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
<math display="block">
<mstyle displaystyle="false">
<munderover>
<mo>&sum;</mo>
<mi>b</mi>
<mi>c</mi>
</munderover>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -8,6 +8,10 @@ fails == dir-6.html dir-6-ref.html
fails == dir-8.html dir-8-ref.html
fails == dir-9.html dir-9-ref.html # Bug 787215
== dir-10.html dir-10-ref.html
== 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
skip-if(B2G) fails-if(smallScreen&&Android) fuzzy(255,200) == 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
@ -98,6 +102,7 @@ fails == mstyle-5.xhtml mstyle-5-ref.xhtml # Bug 787215
== mpadded-8.html mpadded-8-ref.html
== mpadded-9.html mpadded-9-ref.html
== 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
== munderover-align-accent-true.html munderover-align-accent-true-ref.html

Просмотреть файл

@ -0,0 +1,129 @@
<!doctype html>
<html>
<head>
<title>scriptlevel</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- Test scriptlevel on mstyle -->
<math>
<mstyle>
<mtext>O</mtext>
<mstyle mathsize="200%"><mtext>O</mtext></mstyle>
</mstyle>
</math>
<!-- The mfrac element sets displaystyle to "false", or if it was already
false increments scriptlevel by 1, within numerator and denominator.
-->
<math>
<mstyle>
<mstyle displaystyle="false">
<mfrac>
<mtext mathsize="200%">O</mtext>
<mtext mathsize="200%">O</mtext>
</mfrac>
</mstyle>
<mstyle displaystyle="true">
<mfrac>
<mtext>O</mtext>
<mtext>O</mtext>
</mfrac>
</mstyle>
</mstyle>
</math>
<!-- The mroot element increments scriptlevel by 2, and sets
displaystyle to "false", within index, but leaves both attributes
unchanged within base.
The msqrt element leaves both attributes unchanged within its
argument. -->
<math>
<mstyle>
<mroot>
<mtext>O</mtext>
<mtext mathsize="400%">O</mtext>
</mroot>
<msqrt>
<mtext>O</mtext>
</msqrt>
</mstyle>
</math>
<!--
The msub element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within subscript, but leaves both attributes unchanged within base.
The msup element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within superscript, but leaves both attributes unchanged within
base.
The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
to "false", within subscript and superscript, but leaves both attributes
unchanged within base.
The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
to "false", within each of its arguments except base, but leaves both
attributes unchanged within base.
-->
<math>
<mstyle>
<msub>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
</msub>
<msup>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
</msup>
<msubsup>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
<mtext mathsize="200%">O</mtext>
</msubsup>
<mmultiscripts>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
<mtext mathsize="200%">O</mtext>
<mprescripts/>
<mtext mathsize="200%">O</mtext>
<mtext mathsize="200%">O</mtext>
</mmultiscripts>
</mstyle>
</math>
<!--
The munder element [...] always sets displaystyle to "false" within the
underscript, but increments scriptlevel by 1 only when accentunder is
"false". Within base, it always leaves both attributes unchanged.
The mover element [...] always sets displaystyle to "false" within
overscript, but increments scriptlevel by 1 only when accent is "false".
Within base, it always leaves both attributes unchanged.
The munderover [..] always sets displaystyle to "false" within underscript
and overscript, but increments scriptlevel by 1 only when accentunder or
accent, respectively, are "false". Within base, it always leaves both
attributes unchanged.
-->
<math>
<mstyle>
<munder>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
</munder>
<mover>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
</mover>
<munderover>
<mtext>O</mtext>
<mtext mathsize="200%">O</mtext>
<mtext mathsize="200%">O</mtext>
</munderover>
</mstyle>
</math>
</body>
</html>

Просмотреть файл

@ -0,0 +1,129 @@
<!doctype html>
<html>
<head>
<title>scriptlevel</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- Test scriptlevel on mstyle -->
<math>
<mstyle scriptsizemultiplier="2">
<mtext>O</mtext>
<mstyle scriptlevel="1"><mtext>O</mtext></mstyle>
</mstyle>
</math>
<!-- The mfrac element sets displaystyle to "false", or if it was already
false increments scriptlevel by 1, within numerator and denominator.
-->
<math>
<mstyle scriptsizemultiplier="2">
<mstyle displaystyle="false">
<mfrac>
<mtext>O</mtext>
<mtext>O</mtext>
</mfrac>
</mstyle>
<mstyle displaystyle="true">
<mfrac>
<mtext>O</mtext>
<mtext>O</mtext>
</mfrac>
</mstyle>
</mstyle>
</math>
<!-- The mroot element increments scriptlevel by 2, and sets
displaystyle to "false", within index, but leaves both attributes
unchanged within base.
The msqrt element leaves both attributes unchanged within its
argument. -->
<math>
<mstyle scriptsizemultiplier="2">
<mroot>
<mtext>O</mtext>
<mtext>O</mtext>
</mroot>
<msqrt>
<mtext>O</mtext>
</msqrt>
</mstyle>
</math>
<!--
The msub element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within subscript, but leaves both attributes unchanged within base.
The msup element [...] increments scriptlevel by 1, and sets displaystyle to
"false", within superscript, but leaves both attributes unchanged within
base.
The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
to "false", within subscript and superscript, but leaves both attributes
unchanged within base.
The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
to "false", within each of its arguments except base, but leaves both
attributes unchanged within base.
-->
<math>
<mstyle scriptsizemultiplier="2">
<msub>
<mtext>O</mtext>
<mtext>O</mtext>
</msub>
<msup>
<mtext>O</mtext>
<mtext>O</mtext>
</msup>
<msubsup>
<mtext>O</mtext>
<mtext>O</mtext>
<mtext>O</mtext>
</msubsup>
<mmultiscripts>
<mtext>O</mtext>
<mtext>O</mtext>
<mtext>O</mtext>
<mprescripts/>
<mtext>O</mtext>
<mtext>O</mtext>
</mmultiscripts>
</mstyle>
</math>
<!--
The munder element [...] always sets displaystyle to "false" within the
underscript, but increments scriptlevel by 1 only when accentunder is
"false". Within base, it always leaves both attributes unchanged.
The mover element [...] always sets displaystyle to "false" within
overscript, but increments scriptlevel by 1 only when accent is "false".
Within base, it always leaves both attributes unchanged.
The munderover [..] always sets displaystyle to "false" within underscript
and overscript, but increments scriptlevel by 1 only when accentunder or
accent, respectively, are "false". Within base, it always leaves both
attributes unchanged.
-->
<math>
<mstyle scriptsizemultiplier="2">
<munder>
<mtext>O</mtext>
<mtext>O</mtext>
</munder>
<mover>
<mtext>O</mtext>
<mtext>O</mtext>
</mover>
<munderover>
<mtext>O</mtext>
<mtext>O</mtext>
<mtext>O</mtext>
</munderover>
</mstyle>
</math>
</body>
</html>