Bug 1573575 - Remove duplicate MathML tests for OpenType parameters. r=emilio

* All but the last parameter of test_opentype-limits.html are verified by
  mathml/presentation-markup/scripts/underover-parameters-1.html
* test_opentype-fraction.html is equivalent to
  mathml/presentation-markup/fractions/frac-parameters-1.html
  (however, fraction-1.otf is used by other tests).
* mathml/tests/test_opentype-radical.html is equivalent to
  mathml/presentation-markup/radicals/root-parameters-1.html
* test_opentype-scripts.html is equivalent to
  mathml/presentation-markup/scripts/subsup-parameters-1.html
* mathml/tests/test_opentype-stack.html is equivalent to
  mathml/presentation-markup/fractions/frac-parameters-2.html

Differential Revision: https://phabricator.services.mozilla.com/D41783

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Frédéric Wang 2019-08-13 19:29:26 +00:00
Родитель b36d695f93
Коммит a8ca8b2301
42 изменённых файлов: 0 добавлений и 1170 удалений

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

@ -10,10 +10,5 @@ support-files =
[test_bug975681.html]
[test_disabled.html]
[test_opentype-axis-height.html]
[test_opentype-fraction.html]
[test_opentype-limits.html]
skip-if = os == "win" # Fails on WinXP
[test_opentype-radical.html]
skip-if = os == "win" # Fails on WinXP
[test_opentype-scripts.html]
[test_opentype-stack.html]

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

@ -1,185 +0,0 @@
<!doctype html>
<html>
<head>
<title>Open Type MATH - fraction</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta charset="utf-8"/>
<style type="text/css">
math {
font-size: 10px;
}
@font-face {
font-family: fraction-1;
src: url(/tests/fonts/math/fraction-1.otf);
}
@font-face {
font-family: fraction-2;
src: url(/tests/fonts/math/fraction-2.otf);
}
@font-face {
font-family: fraction-3;
src: url(/tests/fonts/math/fraction-3.otf);
}
@font-face {
font-family: fraction-4;
src: url(/tests/fonts/math/fraction-4.otf);
}
@font-face {
font-family: fraction-5;
src: url(/tests/fonts/math/fraction-5.otf);
}
@font-face {
font-family: fraction-6;
src: url(/tests/fonts/math/fraction-6.otf);
}
@font-face {
font-family: fraction-7;
src: url(/tests/fonts/math/fraction-7.otf);
}
@font-face {
font-family: fraction-8;
src: url(/tests/fonts/math/fraction-8.otf);
}
@font-face {
font-family: fraction-9;
src: url(/tests/fonts/math/fraction-9.otf);
}
</style>
<script type="text/javascript">
var epsilon = 5;
function almostEqual(x, y) { return Math.abs(x - y) < epsilon; }
function getBox(aId) {
return document.getElementById(aId).getBoundingClientRect();
}
function doTest() {
/* inline style */
var ref = getBox("ref").height;
ok(almostEqual(getBox("d1").top - getBox("n1").bottom, ref * 20),
"Bad FractionRuleThickness");
ok(almostEqual(getBox("n1").top, getBox("n2").top) &&
almostEqual(getBox("d2").top - getBox("n2").bottom, ref * 10.5),
"Bad FractionNumeratorGapMin");
ok(almostEqual(getBox("d1").bottom, getBox("d3").bottom) &&
almostEqual(getBox("d3").top - getBox("n3").bottom, ref * 10.5),
"Bad FractionDenominatorGapMin");
ok(almostEqual(getBox("ref").top - getBox("n4").top, ref*3),
"Bad FractionNumeratorShiftUp");
ok(almostEqual(getBox("d5").bottom - getBox("ref").bottom, ref*3),
"Bad FractionDenominatorShiftDown");
/* display style */
ref = getBox("dref").height;
ok(almostEqual(getBox("dd1").top - getBox("dn1").bottom, ref * 20),
"Bad FractionRuleThickness");
ok(almostEqual(getBox("dn1").top, getBox("n6").top) &&
almostEqual(getBox("d6").top - getBox("n6").bottom, ref * 10.5),
"Bad FractionNumeratorDisplayStyleGapMin");
ok(almostEqual(getBox("dd1").bottom, getBox("d7").bottom) &&
almostEqual(getBox("d7").top - getBox("n7").bottom, ref * 10.5),
"Bad FractionDenominatorDisplayStyleGapMin");
ok(almostEqual(getBox("dref").top - getBox("n8").top, ref*3),
"Bad FractionNumeratorDisplayStyleShiftUp");
ok(almostEqual(getBox("d9").bottom - getBox("dref").bottom, ref*3),
"Bad FractionDenominatorDisplayStyleShiftDown");
SimpleTest.finish();
}
</script>
</head>
<body onload="doTest()">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365">
Mozilla Bug 961365
</a>
<p id="display"></p>
<p>
<math>
<mspace id="ref" height="1em" width="1em" mathbackground="green"/>
</math>
<math style="font-family: fraction-1;">
<mfrac>
<mspace id="n1" height="1em" width="1em" mathbackground="red"/>
<mspace id="d1" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math style="font-family: fraction-2;">
<mfrac>
<mspace id="n2" height="1em" width="1em" mathbackground="red"/>
<mspace id="d2" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math style="font-family: fraction-3;">
<mfrac>
<mspace id="n3" height="1em" width="1em" mathbackground="red"/>
<mspace id="d3" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math style="font-family: fraction-4;">
<mfrac>
<mspace id="n4" height="1em" width="1em" mathbackground="red"/>
<mspace id="d4" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math style="font-family: fraction-5;">
<mfrac>
<mspace id="n5" height="1em" width="1em" mathbackground="red"/>
<mspace id="d5" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
</p>
<p>
<math displaystyle="true">
<mspace id="dref" height="1em" width="1em" mathbackground="green"/>
</math>
<math displaystyle="true" style="font-family: fraction-1;">
<mfrac>
<mspace id="dn1" height="1em" width="1em" mathbackground="red"/>
<mspace id="dd1" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math displaystyle="true" style="font-family: fraction-6;">
<mfrac>
<mspace id="n6" height="1em" width="1em" mathbackground="red"/>
<mspace id="d6" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math displaystyle="true" style="font-family: fraction-7;">
<mfrac>
<mspace id="n7" height="1em" width="1em" mathbackground="red"/>
<mspace id="d7" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math displaystyle="true" style="font-family: fraction-8;">
<mfrac>
<mspace id="n8" height="1em" width="1em" mathbackground="red"/>
<mspace id="d8" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math displaystyle="true" style="font-family: fraction-9;">
<mfrac>
<mspace id="n9" height="1em" width="1em" mathbackground="red"/>
<mspace id="d9" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
</p>
</body>
</html>

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

@ -10,22 +10,6 @@
math {
font-size: 10px;
}
@font-face {
font-family: limits-1;
src: url(/tests/fonts/math/limits-1.otf);
}
@font-face {
font-family: limits-2;
src: url(/tests/fonts/math/limits-2.otf);
}
@font-face {
font-family: limits-3;
src: url(/tests/fonts/math/limits-3.otf);
}
@font-face {
font-family: limits-4;
src: url(/tests/fonts/math/limits-4.otf);
}
@font-face {
font-family: limits-5;
src: url(/tests/fonts/math/limits-5.otf);
@ -42,22 +26,6 @@
}
function doTest() {
ok(almostEqual(getBox("base1").top - getBox("over1").bottom, 7 * 10) &&
almostEqual(getBox("base2").top - getBox("over2").bottom, 7 * 10),
"Bad UpperLimitGapMin");
ok(almostEqual(getBox("under3").top - getBox("base3").bottom, 5 * 10) &&
almostEqual(getBox("under4").top - getBox("base4").bottom, 5 * 10),
"Bad LowerLimitGapMin");
ok(almostEqual(getBox("ref3").top - getBox("over5").bottom, 9 * 10) &&
almostEqual(getBox("ref3").top - getBox("over6").bottom, 9 * 10),
"UpperLimitBaselineRiseMin");
ok(almostEqual(getBox("under7").top - getBox("ref4").bottom, 2 * 10) &&
almostEqual(getBox("under8").top - getBox("ref4").bottom, 2 * 10),
"LowerLimitBaselineDropMin");
ok(almostEqual(getBox("base9").top - getBox("over9").bottom,
(6 - 2) * 10) &&
almostEqual(getBox("base10").top - getBox("over10").bottom,
@ -77,76 +45,6 @@
<p id="display"></p>
<p>
<math style="font-family: limits-1;" displaystyle="true">
<mover>
<mo id="base1"></mo>
<mspace id="over1" height="1em" width="1em" mathbackground="red"/>
</mover>
</math>
<math style="font-family: limits-1;" displaystyle="true">
<munderover>
<mo id="base2"></mo>
<mspace id="under2" height="1em" width="1em" mathbackground="red"/>
<mspace id="over2" height="1em" width="1em" mathbackground="red"/>
</munderover>
</math>
</p>
<p>
<math style="font-family: limits-2;" displaystyle="true">
<munder>
<mo id="base3"></mo>
<mspace id="under3" height="1em" width="1em" mathbackground="red"/>
</munder>
</math>
<math style="font-family: limits-2;" displaystyle="true">
<munderover>
<mo id="base4"></mo>
<mspace id="under4" height="1em" width="1em" mathbackground="red"/>
<mspace id="over4" height="1em" width="1em" mathbackground="red"/>
</munderover>
</math>
</p>
<p>
<math style="font-family: limits-3;" displaystyle="true">
<mspace id="ref3" height="1em" width="1em" mathbackground="green"/>
</math>
<math style="font-family: limits-3;" displaystyle="true">
<mover>
<mo id="base5"></mo>
<mspace id="over5" height="1em" width="1em" mathbackground="red"/>
</mover>
</math>
<math style="font-family: limits-3;" displaystyle="true">
<munderover>
<mo id="base6"></mo>
<mspace id="under6" height="1em" width="1em" mathbackground="red"/>
<mspace id="over6" height="1em" width="1em" mathbackground="red"/>
</munderover>
</math>
</p>
<p>
<math style="font-family: limits-4;" displaystyle="true">
<mspace id="ref4" height="1em" width="1em" mathbackground="green"/>
</math>
<math style="font-family: limits-4;" displaystyle="true">
<munder>
<mo id="base7"></mo>
<mspace id="under7" height="1em" width="1em" mathbackground="red"/>
</munder>
</math>
<math style="font-family: limits-4;" displaystyle="true">
<munderover>
<mo id="base8"></mo>
<mspace id="under8" height="1em" width="1em" mathbackground="red"/>
<mspace id="over8" height="1em" width="1em" mathbackground="red"/>
</munderover>
</math>
</p>
<p>
<math style="font-family: limits-5;" displaystyle="true">
<mspace id="ref5" height="1em" width="1em" mathbackground="green"/>

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

@ -1,194 +0,0 @@
<!doctype html>
<html>
<head>
<title>Open Type MATH - radical</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta charset="utf-8"/>
<style type="text/css">
math {
font-size: 10px;
}
@font-face {
font-family: radical-1;
src: url(/tests/fonts/math/radical-1.otf);
}
@font-face {
font-family: radical-2;
src: url(/tests/fonts/math/radical-2.otf);
}
@font-face {
font-family: radical-3;
src: url(/tests/fonts/math/radical-3.otf);
}
@font-face {
font-family: radical-4;
src: url(/tests/fonts/math/radical-4.otf);
}
@font-face {
font-family: radical-5;
src: url(/tests/fonts/math/radical-5.otf);
}
@font-face {
font-family: radical-6;
src: url(/tests/fonts/math/radical-6.otf);
}
@font-face {
font-family: radical-7;
src: url(/tests/fonts/math/radical-7.otf);
}
</style>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
var epsilon = 5;
function almostEqual(x, y) { return Math.abs(x - y) < epsilon; }
function getBox(aId) {
return document.getElementById(aId).getBoundingClientRect();
}
function doTest() {
ok(almostEqual(getBox("inner1").top -
getBox("outer1").top, 5*10) &&
almostEqual(getBox("inner2").top -
getBox("outer2").top, 5*10) &&
almostEqual(getBox("inner3").top -
getBox("outer3").top, 5*10),
"Bad RadicalRuleThickness");
ok(almostEqual(getBox("inner4").top -
getBox("outer4").top, (7+1)*10) &&
almostEqual(getBox("inner5").top -
getBox("outer5").top, (7+1)*10) &&
almostEqual(getBox("inner6").top -
getBox("outer6").top, (7+1)*10),
"Bad RadicalExtraAscender");
ok(almostEqual(getBox("inner7").top -
getBox("outer7").top, (3+1)*10) &&
almostEqual(getBox("inner7").top -
getBox("outer8").top, (3+1)*10) &&
almostEqual(getBox("inner8").top -
getBox("outer9").top, (3+1)*10),
"Bad RadicalVerticalGap");
ok(almostEqual(getBox("inner10").top -
getBox("outer10").top, (9+1)*10) &&
almostEqual(getBox("inner11").top -
getBox("outer11").top, (9+1)*10) &&
almostEqual(getBox("inner12").top -
getBox("outer12").top, (9+1)*10),
"Bad RadicalDisplayStyleVerticalGap");
ok(almostEqual(getBox("base5").bottom - getBox("index5").bottom,
(getBox("base5").bottom - getBox("root5").top) * .25),
"Bad RadicalDegreeBottomRaisePercent")
ok(almostEqual(getBox("index6").left - getBox("root6").left, 10 * 5),
"Bad RadicalKernBeforeDegree")
ok(almostEqual(getBox("base7").left -
getBox("index7").right, 10 * (7+1)),
"Bad RadicalKernAfterDegree")
SimpleTest.finish();
}
</script>
</head>
<body onload="doTest()">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365">
Mozilla Bug 961365
</a>
<p id="display"></p>
<p>
<math style="font-family: radical-1;">
<msqrt id="outer1" mathbackground="green">
<mspace id="inner1" width="1em" height="1em" mathbackground="red"/>
</msqrt>
<menclose id="outer2" notation="radical" mathbackground="green">
<mspace id="inner2" width="1em" height="1em" mathbackground="red"/>
</menclose>
<mroot id="outer3" mathbackground="green">
<mspace id="inner3" width="1em" height="1em" mathbackground="red"/>
<mspace/>
</mroot>
</math>
</p>
<p>
<math style="font-family: radical-2;">
<msqrt id="outer4" mathbackground="green">
<mspace id="inner4" width="1em" height="1em" mathbackground="red"/>
</msqrt>
<menclose id="outer5" notation="radical" mathbackground="green">
<mspace id="inner5" width="1em" height="1em" mathbackground="red"/>
</menclose>
<mroot id="outer6" mathbackground="green">
<mspace id="inner6" width="1em" height="1em" mathbackground="red"/>
<mspace/>
</mroot>
</math>
</p>
<p>
<math style="font-family: radical-3;">
<msqrt id="outer7" mathbackground="green">
<mspace id="inner7" width="1em" height="1em" mathbackground="red"/>
</msqrt>
<menclose id="outer8" notation="radical" mathbackground="green">
<mspace id="inner8" width="1em" height="1em" mathbackground="red"/>
</menclose>
<mroot id="outer9" mathbackground="green">
<mspace id="inner9" width="1em" height="1em" mathbackground="red"/>
<mspace/>
</mroot>
</math>
</p>
<p>
<math style="font-family: radical-4;" displaystyle="true">
<msqrt id="outer10" mathbackground="green">
<mspace id="inner10" width="1em" height="1em" mathbackground="red"/>
</msqrt>
<menclose id="outer11" notation="radical" mathbackground="green">
<mspace id="inner11" width="1em" height="1em" mathbackground="red"/>
</menclose>
<mroot id="outer12" mathbackground="green">
<mspace id="inner12" width="1em" height="1em" mathbackground="red"/>
<mspace/>
</mroot>
</math>
</p>
<p>
<math style="font-family: radical-5;">
<mroot id="root5" mathbackground="green">
<mspace id="base5" width="1em" height="10em" mathbackground="red"/>
<mspace id="index5" width="1em" height="1em" mathbackground="blue"/>
</mroot>
</math>
</p>
<p>
<math style="font-family: radical-6;">
<mroot id="root6" mathbackground="green">
<mspace id="base6" width="1em" height="10em" mathbackground="red"/>
<mspace id="index6" width="1em" height="1em" mathbackground="blue"/>
</mroot>
</math>
</p>
<p>
<math style="font-family: radical-7;">
<mroot id="root7" mathbackground="green">
<mspace id="base7" width="1em" height="10em" mathbackground="red"/>
<mspace id="index7" width="1em" height="1em" mathbackground="blue"/>
</mroot>
</math>
</p>
</body>
</html>

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

@ -1,290 +0,0 @@
<!doctype html>
<html>
<head>
<title>Open Type MATH - scripts</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta charset="utf-8"/>
<style type="text/css">
math, mspace {
font-size: 10px;
}
@font-face {
font-family: scripts-1;
src: url(/tests/fonts/math/scripts-1.otf);
}
@font-face {
font-family: scripts-2;
src: url(/tests/fonts/math/scripts-2.otf);
}
@font-face {
font-family: scripts-3;
src: url(/tests/fonts/math/scripts-3.otf);
}
@font-face {
font-family: scripts-4;
src: url(/tests/fonts/math/scripts-4.otf);
}
@font-face {
font-family: scripts-5;
src: url(/tests/fonts/math/scripts-5.otf);
}
@font-face {
font-family: scripts-6;
src: url(/tests/fonts/math/scripts-6.otf);
}
@font-face {
font-family: scripts-7;
src: url(/tests/fonts/math/scripts-7.otf);
}
@font-face {
font-family: scripts-8;
src: url(/tests/fonts/math/scripts-8.otf);
}
@font-face {
font-family: scripts-9;
src: url(/tests/fonts/math/scripts-9.otf);
}
</style>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
function doTest() {
var epsilon = 5;
function almostEqual(x, y) { return Math.abs(x - y) < epsilon; }
function getBox(aId) {
return document.getElementById(aId).getBoundingClientRect();
}
ok(almostEqual(getBox("ref1").left - getBox("sub1").right, 3*10) &&
almostEqual(getBox("ref2").left - getBox("sup2").right, 3*10) &&
almostEqual(getBox("sup32").left - getBox("sup31").right, 3*10) &&
almostEqual(getBox("ref3").left - getBox("sup32").right, 3*10),
"SpaceAfterScript");
ok(almostEqual(getBox("ref4").bottom -
getBox("sup41").bottom, 7 * 10) &&
almostEqual(getBox("ref4").bottom -
getBox("sup42").bottom, 7 * 10) &&
almostEqual(getBox("ref4").bottom -
getBox("sup43").bottom, 7 * 10) &&
almostEqual(getBox("ref4").bottom -
getBox("sup44").bottom, 7 * 10),
"Bad SuperscriptShiftUp")
ok(almostEqual(getBox("ref5").bottom -
getBox("sup51").bottom, 5 * 10) &&
almostEqual(getBox("ref5").bottom -
getBox("sup52").bottom, 5 * 10) &&
almostEqual(getBox("ref5").bottom -
getBox("sup53").bottom, 5 * 10) &&
almostEqual(getBox("ref5").bottom -
getBox("sup54").bottom, 5 * 10),
"Bad SuperscriptShiftUpCramped")
ok(almostEqual(getBox("ref6").bottom -
getBox("sub61").bottom, -6 * 10) &&
almostEqual(getBox("ref6").bottom -
getBox("sub62").bottom, -6 * 10) &&
almostEqual(getBox("ref6").bottom -
getBox("sub63").bottom, -6 * 10) &&
almostEqual(getBox("ref6").bottom -
getBox("sub64").bottom, -6 * 10),
"Bad SubscriptShiftDown")
ok(almostEqual(getBox("sub7").top -
getBox("sup7").bottom, 11 * 10),
"Bad SubSuperscriptGapMin");
ok(almostEqual(getBox("sub8").top -
getBox("sup8").bottom, 11 * 10) &&
almostEqual(getBox("ref8").bottom -
getBox("sup8").bottom, 3 * 10),
"Bad SuperscriptBottomMaxWithSubscript");
ok(almostEqual(getBox("ref9").top, getBox("sub9").top),
"Bad SubscriptTopMax");
ok(almostEqual(getBox("ref10").bottom - getBox("sup10").bottom, 9 * 10),
"Bad SuperscriptBottomMin");
ok(almostEqual(getBox("base11").bottom + 3 * 10,
getBox("sub11").top),
"Bad SubscriptBaselineDrop");
ok(almostEqual(getBox("base11").top + 5 * 10,
getBox("sup11").bottom),
"Bad SuperscriptBaselineDrop");
SimpleTest.finish();
}
</script>
</head>
<body onload="doTest()">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365">
Mozilla Bug 961365
</a>
<p id="display"></p>
<p>
<math style="font-family: scripts-1;">
<msub>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub1" height="1em" width="1em" mathbackground="red"/>
</msub>
<mspace id="ref1" height="1em" width="1em" mathbackground="green"/>
</math>
<math style="font-family: scripts-1;">
<msup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sup2" height="1em" width="1em" mathbackground="red"/>
</msup>
<mspace id="ref2" height="1em" width="1em" mathbackground="green"/>
</math>
<math style="font-family: scripts-1;">
<mmultiscripts>
<mspace height="2em" width="2em" mathbackground="blue"/>
<none/>
<mspace id="sup31" height="1em" width="1em" mathbackground="red"/>
<none/>
<mspace id="sup32" height="1em" width="1em" mathbackground="red"/>
</mmultiscripts>
<mspace id="ref3" height="1em" width="1em" mathbackground="green"/>
</math>
</p>
<p>
<math style="font-family: scripts-2;">
<mspace id="ref4" height="1em" width="1em" mathbackground="green"/>
<msup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sup41" height="1em" width="1em" mathbackground="red"/>
</msup>
<msubsup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace height="1em" width="1em" mathbackground="red"/>
<mspace id="sup42" height="1em" width="1em" mathbackground="red"/>
</msubsup>
<mmultiscripts>
<mspace height="2em" width="2em" mathbackground="blue"/>
<none/>
<mspace id="sup43" height="1em" width="1em" mathbackground="red"/>
<none/>
<mspace id="sup44" height="1em" width="1em" mathbackground="red"/>
</mmultiscripts>
</math>
</p>
<p>
<math style="font-family: scripts-3;">
<msqrt>
<mspace id="ref5" height="1em" width="1em" mathbackground="green"/>
<msup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sup51" height="1em" width="1em" mathbackground="red"/>
</msup>
<msubsup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace height="1em" width="1em" mathbackground="red"/>
<mspace id="sup52" height="1em" width="1em" mathbackground="red"/>
</msubsup>
<mmultiscripts>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace height="1em" width="1em" mathbackground="red"/>
<mspace id="sup53" height="1em" width="1em" mathbackground="red"/>
<mspace height="1em" width="1em" mathbackground="red"/>
<mspace id="sup54" height="1em" width="1em" mathbackground="red"/>
</mmultiscripts>
</msqrt>
</math>
</p>
<p>
<math style="font-family: scripts-4;">
<mspace id="ref6" height="1em" width="1em" mathbackground="green"/>
<msub>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub61" height="1em" width="1em" mathbackground="red"/>
</msub>
<msubsup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub62" height="1em" width="1em" mathbackground="red"/>
<mspace height="1em" width="1em" mathbackground="red"/>
</msubsup>
<mmultiscripts>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub63" height="1em" width="1em" mathbackground="red"/>
<mspace height="1em" width="1em" mathbackground="red"/>
<mspace id="sub64" height="1em" width="1em" mathbackground="red"/>
<mspace height="1em" width="1em" mathbackground="red"/>
</mmultiscripts>
</math>
</p>
<p>
<math style="font-family: scripts-5;">
<msubsup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub7" height="1em" width="1em" mathbackground="red"/>
<mspace id="sup7" height="1em" width="1em" mathbackground="red"/>
</msubsup>
</math>
</p>
<p>
<math style="font-family: scripts-6;">
<mspace id="ref8" height="1em" width="1em" mathbackground="green"/>
<msubsup>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub8" height="1em" width="1em" mathbackground="red"/>
<mspace id="sup8" height="1em" width="1em" mathbackground="red"/>
</msubsup>
</math>
</p>
<p>
<math style="font-family: scripts-7;">
<msub>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="ref9" height="5em"
width="1em" mathbackground="green"/>
</msub>
<msub>
<mspace height="2em" width="2em" mathbackground="blue"/>
<mspace id="sub9" height="9em"
width="1em" mathbackground="red"/>
</msub>
</math>
</p>
<p>
<math style="font-family: scripts-8;">
<mspace id="ref10" height="1em"
width="1em" mathbackground="green"/>
<msup>
<mspace id="base10" height="2em"
width="2em" mathbackground="blue"/>
<mspace id="sup10" height="1em"
width="1em" mathbackground="red"/>
</msup>
</math>
</p>
<p>
<math style="font-family: scripts-9;">
<msubsup>
<mspace id="base11" height="10em" depth="10em"
width="1em" mathbackground="red"/>
<mspace id="sub11"
height="0em" depth="1em" width="1em" mathbackground="green"/>
<mspace id="sup11"
height="1em" depth="0em" width="1em" mathbackground="blue"/>
</msubsup>
</math>
</p>
</body>
</html>

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

@ -1,135 +0,0 @@
<!doctype html>
<html>
<head>
<title>Open Type MATH - stack</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta charset="utf-8"/>
<style type="text/css">
math {
font-size: 10px;
}
@font-face {
font-family: stack-1;
src: url(/tests/fonts/math/stack-1.otf);
}
@font-face {
font-family: stack-2;
src: url(/tests/fonts/math/stack-2.otf);
}
@font-face {
font-family: stack-3;
src: url(/tests/fonts/math/stack-3.otf);
}
@font-face {
font-family: stack-4;
src: url(/tests/fonts/math/stack-4.otf);
}
@font-face {
font-family: stack-5;
src: url(/tests/fonts/math/stack-5.otf);
}
@font-face {
font-family: stack-6;
src: url(/tests/fonts/math/stack-6.otf);
}
</style>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
function doTest() {
var epsilon = 5;
function almostEqual(x, y) { return Math.abs(x - y) < epsilon; }
function getBox(aId) {
return document.getElementById(aId).getBoundingClientRect();
}
/* inline style */
var ref = getBox("ref").height;
ok(almostEqual(getBox("d1").top - getBox("n1").bottom, ref * 20),
"Bad StackGapMin");
ok(almostEqual(getBox("ref").top - getBox("n2").top, ref*3),
"Bad StackTopShiftMin");
ok(almostEqual(getBox("d3").bottom - getBox("ref").bottom, ref*3),
"Bad StackBottomShiftDown");
/* display style */
ref = getBox("ref").height;
ok(almostEqual(getBox("d4").top - getBox("n4").bottom, ref * 20),
"Bad StackGapDisplayStyleMin");
ok(almostEqual(getBox("dref").top - getBox("n5").top, ref*3),
"Bad StackTopDisplayStyleShiftMin");
ok(almostEqual(getBox("d6").bottom - getBox("dref").bottom, ref*3),
"Bad StackDisplayStyleBottomShiftDown");
SimpleTest.finish();
}
</script>
</head>
<body onload="doTest()">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365">
Mozilla Bug 961365
</a>
<p id="display"></p>
<p>
<math>
<mspace id="ref" height="1em" width="1em" mathbackground="green"/>
</math>
<math style="font-family: stack-1;">
<mfrac linethickness="0">
<mspace id="n1" height="1em" width="1em" mathbackground="red"/>
<mspace id="d1" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math style="font-family: stack-2;">
<mfrac linethickness="0">
<mspace id="n2" height="1em" width="1em" mathbackground="red"/>
<mspace id="d2" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math style="font-family: stack-3;">
<mfrac linethickness="0">
<mspace id="n3" height="1em" width="1em" mathbackground="red"/>
<mspace id="d3" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
</p>
<p>
<math displaystyle="true">
<mspace id="dref" height="1em" width="1em" mathbackground="green"/>
</math>
<math displaystyle="true" style="font-family: stack-4;">
<mfrac linethickness="0">
<mspace id="n4" height="1em" width="1em" mathbackground="red"/>
<mspace id="d4" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math displaystyle="true" style="font-family: stack-5;">
<mfrac linethickness="0">
<mspace id="n5" height="1em" width="1em" mathbackground="red"/>
<mspace id="d5" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
<math displaystyle="true" style="font-family: stack-6;">
<mfrac linethickness="0">
<mspace id="n6" height="1em" width="1em" mathbackground="red"/>
<mspace id="d6" height="1em" width="1em" mathbackground="red"/>
</mfrac>
</math>
</p>
</body>
</html>

Двоичные данные
layout/reftests/fonts/math/fraction-2.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-3.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-4.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-5.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-6.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-7.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-8.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/fraction-9.otf

Двоичный файл не отображается.

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

@ -291,233 +291,8 @@ f.math.FractionNumeratorDisplayStyleGapMin = 0
f.math.FractionDenominatorDisplayStyleGapMin = 0
saveMathFont(f)
f = newMathFont("fraction-2")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorShiftUp = 0
f.math.FractionDenominatorShiftDown = 0
f.math.FractionNumeratorGapMin = 9.5 * em
f.math.FractionDenominatorGapMin = 0
saveMathFont(f)
f = newMathFont("fraction-3")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorShiftUp = 0
f.math.FractionDenominatorShiftDown = 0
f.math.FractionNumeratorGapMin = 0
f.math.FractionDenominatorGapMin = 9.5 * em
saveMathFont(f)
f = newMathFont("fraction-4")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorShiftUp = 3 * em
f.math.FractionDenominatorShiftDown = 0
f.math.FractionNumeratorGapMin = 0
f.math.FractionDenominatorGapMin = 0
saveMathFont(f)
f = newMathFont("fraction-5")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorShiftUp = 0
f.math.FractionDenominatorShiftDown = 3 * em
f.math.FractionNumeratorGapMin = 0
f.math.FractionDenominatorGapMin = 0
saveMathFont(f)
f = newMathFont("fraction-6")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorDisplayStyleShiftUp = 0
f.math.FractionDenominatorDisplayStyleShiftDown = 0
f.math.FractionNumeratorDisplayStyleGapMin = 9.5 * em
f.math.FractionDenominatorDisplayStyleGapMin = 0
saveMathFont(f)
f = newMathFont("fraction-7")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorDisplayStyleShiftUp = 0
f.math.FractionDenominatorDisplayStyleShiftDown = 0
f.math.FractionNumeratorDisplayStyleGapMin = 0
f.math.FractionDenominatorDisplayStyleGapMin = 9.5 * em
saveMathFont(f)
f = newMathFont("fraction-8")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorDisplayStyleShiftUp = 3 * em
f.math.FractionDenominatorDisplayStyleShiftDown = 0
f.math.FractionNumeratorDisplayStyleGapMin = 0
f.math.FractionDenominatorDisplayStyleGapMin = 0
saveMathFont(f)
f = newMathFont("fraction-9")
f.math.FractionRuleThickness = 1 * em
f.math.FractionNumeratorDisplayStyleShiftUp = 0
f.math.FractionDenominatorDisplayStyleShiftDown = 3 * em
f.math.FractionNumeratorDisplayStyleGapMin = 0
f.math.FractionDenominatorDisplayStyleGapMin = 0
saveMathFont(f)
################################################################################
# Testing Stack Parameters
f = newMathFont("stack-1")
f.math.StackTopShiftUp = 0
f.math.StackBottomShiftDown = 0
f.math.StackGapMin = 20 * em
saveMathFont(f)
f = newMathFont("stack-2")
f.math.StackTopShiftUp = 3 * em
f.math.StackBottomShiftDown = 0
f.math.StackGapMin = 0
saveMathFont(f)
f = newMathFont("stack-3")
f.math.StackTopShiftUp = 0
f.math.StackBottomShiftDown = 3 * em
f.math.StackGapMin = 0
saveMathFont(f)
f = newMathFont("stack-4")
f.math.StackTopDisplayStyleShiftUp = 0
f.math.StackBottomDisplayStyleShiftDown = 0
f.math.StackDisplayStyleGapMin = 20 * em
saveMathFont(f)
f = newMathFont("stack-5")
f.math.StackTopDisplayStyleShiftUp = 3 * em
f.math.StackBottomDisplayStyleShiftDown = 0
f.math.StackDisplayStyleGapMin = 0
saveMathFont(f)
f = newMathFont("stack-6")
f.math.StackTopDisplayStyleShiftUp = 0
f.math.StackBottomDisplayStyleShiftDown = 3 * em
f.math.StackDisplayStyleGapMin = 0
saveMathFont(f)
################################################################################
# Testing Radical Parameters
f = newMathFont("radical-1")
f.math.RadicalExtraAscender = 0
f.math.RadicalRuleThickness = 5 * em
f.math.RadicalVerticalGap = 0
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("radical-2")
f.math.RadicalExtraAscender = 7 * em
f.math.RadicalRuleThickness = 1 * em
f.math.RadicalVerticalGap = 0
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("radical-3")
f.math.RadicalExtraAscender = 0
f.math.RadicalRuleThickness = 1 * em
f.math.RadicalVerticalGap = 3 * em
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("radical-4")
f.math.RadicalExtraAscender = 0
f.math.RadicalRuleThickness = 1 * em
f.math.RadicalDisplayStyleVerticalGap = 9 * em
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("radical-5")
f.math.RadicalExtraAscender = 0
f.math.RadicalRuleThickness = 1 * em
f.math.RadicalVerticalGap = 0
f.math.RadicalDegreeBottomRaisePercent = 25
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("radical-6")
f.math.RadicalKernBeforeDegree = 5 * em
f.math.RadicalKernAfterDegree = 0
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("radical-7")
f.math.RadicalKernBeforeDegree = 0
f.math.RadicalKernAfterDegree = 7 * em
createSquareGlyph(f, 0x221a)
saveMathFont(f)
################################################################################
# Testing Scripts Parameters
f = newMathFont("scripts-1")
f.math.SpaceAfterScript = 3 * em
saveMathFont(f)
f = newMathFont("scripts-2")
f.math.SuperscriptShiftUp = 7 * em
saveMathFont(f)
f = newMathFont("scripts-3")
f.math.SuperscriptShiftUpCramped = 5 * em
createSquareGlyph(f, 0x221a)
saveMathFont(f)
f = newMathFont("scripts-4")
f.math.SubscriptShiftDown = 6 * em
saveMathFont(f)
f = newMathFont("scripts-5")
f.math.SubSuperscriptGapMin = 11 * em
saveMathFont(f)
f = newMathFont("scripts-6")
f.math.SubSuperscriptGapMin = 11 * em
f.math.SuperscriptBottomMaxWithSubscript = 3 * em
saveMathFont(f)
f = newMathFont("scripts-7")
f.math.SubscriptTopMax = 5 * em
saveMathFont(f)
f = newMathFont("scripts-8")
f.math.SuperscriptBottomMin = 9 * em
saveMathFont(f)
f = newMathFont("scripts-9")
f.math.SubscriptBaselineDropMin = 3 * em
f.math.SuperscriptBaselineDropMax = 5 * em
saveMathFont(f)
################################################################################
# Testing Limits Parameters
f = newMathFont("limits-1")
f.math.UpperLimitGapMin = 7 * em
f.math.UpperLimitBaselineRiseMin = 0
f.math.LowerLimitGapMin = 0
f.math.LowerLimitBaselineDropMin = 0
createSquareGlyph(f, 0x2211)
saveMathFont(f)
f = newMathFont("limits-2")
f.math.UpperLimitGapMin = 0
f.math.UpperLimitBaselineRiseMin = 0
f.math.LowerLimitGapMin = 5 * em
f.math.LowerLimitBaselineDropMin = 0
createSquareGlyph(f, 0x2211)
saveMathFont(f)
f = newMathFont("limits-3")
f.math.UpperLimitGapMin = 0
f.math.UpperLimitBaselineRiseMin = 9 * em
f.math.LowerLimitGapMin = 0
f.math.LowerLimitBaselineDropMin = 0
createSquareGlyph(f, 0x2211)
saveMathFont(f)
f = newMathFont("limits-4")
f.math.UpperLimitGapMin = 0
f.math.UpperLimitBaselineRiseMin = 0
f.math.LowerLimitGapMin = 0
f.math.LowerLimitBaselineDropMin = 2 * em
createSquareGlyph(f, 0x2211)
saveMathFont(f)
f = newMathFont("limits-5")
f.math.UpperLimitGapMin = 0
f.math.UpperLimitBaselineRiseMin = 0

Двоичные данные
layout/reftests/fonts/math/limits-1.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/limits-2.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/limits-3.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/limits-4.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-1.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-2.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-3.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-4.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-5.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-6.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/radical-7.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-1.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-2.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-3.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-4.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-5.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-6.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-7.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-8.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/scripts-9.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/stack-1.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/stack-2.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/stack-3.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/stack-4.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/stack-5.otf

Двоичный файл не отображается.

Двоичные данные
layout/reftests/fonts/math/stack-6.otf

Двоичный файл не отображается.

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

@ -8,41 +8,7 @@ TEST_HARNESS_FILES.testing.mochitest.tests.fonts.math += [
'fonts/math/axis-height-1.otf',
'fonts/math/axis-height-2.otf',
'fonts/math/fraction-1.otf',
'fonts/math/fraction-2.otf',
'fonts/math/fraction-3.otf',
'fonts/math/fraction-4.otf',
'fonts/math/fraction-5.otf',
'fonts/math/fraction-6.otf',
'fonts/math/fraction-7.otf',
'fonts/math/fraction-8.otf',
'fonts/math/fraction-9.otf',
'fonts/math/limits-1.otf',
'fonts/math/limits-2.otf',
'fonts/math/limits-3.otf',
'fonts/math/limits-4.otf',
'fonts/math/limits-5.otf',
'fonts/math/radical-1.otf',
'fonts/math/radical-2.otf',
'fonts/math/radical-3.otf',
'fonts/math/radical-4.otf',
'fonts/math/radical-5.otf',
'fonts/math/radical-6.otf',
'fonts/math/radical-7.otf',
'fonts/math/scripts-1.otf',
'fonts/math/scripts-2.otf',
'fonts/math/scripts-3.otf',
'fonts/math/scripts-4.otf',
'fonts/math/scripts-5.otf',
'fonts/math/scripts-6.otf',
'fonts/math/scripts-7.otf',
'fonts/math/scripts-8.otf',
'fonts/math/scripts-9.otf',
'fonts/math/stack-1.otf',
'fonts/math/stack-2.otf',
'fonts/math/stack-3.otf',
'fonts/math/stack-4.otf',
'fonts/math/stack-5.otf',
'fonts/math/stack-6.otf',
]
TEST_HARNESS_FILES.testing.mochitest.tests.fonts.mplus += [