Backed out changeset 1dccb45167d3 (bug 1574087) for causing reftest failures in 355548-3.xml

This commit is contained in:
Mihai Alexandru Michis 2019-08-15 15:29:09 +03:00
parent c6e9c9299c
commit 356b38ead4
8 changed files with 294 additions and 351 deletions

View File

@ -265,8 +265,6 @@ bool nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
// number)"
//
/* static */
// XXXfredw: Deprecate legacy MathML syntax and use the CSS parser instead.
// See https://github.com/mathml-refresh/mathml/issues/63
bool nsMathMLElement::ParseNumericValue(const nsString& aString,
nsCSSValue& aCSSValue, uint32_t aFlags,
Document* aDocument) {
@ -361,23 +359,23 @@ bool nsMathMLElement::ParseNumericValue(const nsString& aString,
} else if (unit.EqualsLiteral("%")) {
aCSSValue.SetPercentValue(floatValue / 100.0f);
return true;
} else if (unit.LowerCaseEqualsLiteral("em"))
} else if (unit.EqualsLiteral("em"))
cssUnit = eCSSUnit_EM;
else if (unit.LowerCaseEqualsLiteral("ex"))
else if (unit.EqualsLiteral("ex"))
cssUnit = eCSSUnit_XHeight;
else if (unit.LowerCaseEqualsLiteral("px"))
else if (unit.EqualsLiteral("px"))
cssUnit = eCSSUnit_Pixel;
else if (unit.LowerCaseEqualsLiteral("in"))
else if (unit.EqualsLiteral("in"))
cssUnit = eCSSUnit_Inch;
else if (unit.LowerCaseEqualsLiteral("cm"))
else if (unit.EqualsLiteral("cm"))
cssUnit = eCSSUnit_Centimeter;
else if (unit.LowerCaseEqualsLiteral("mm"))
else if (unit.EqualsLiteral("mm"))
cssUnit = eCSSUnit_Millimeter;
else if (unit.LowerCaseEqualsLiteral("pt"))
else if (unit.EqualsLiteral("pt"))
cssUnit = eCSSUnit_Point;
else if (unit.LowerCaseEqualsLiteral("pc"))
else if (unit.EqualsLiteral("pc"))
cssUnit = eCSSUnit_Pica;
else if (unit.LowerCaseEqualsLiteral("q"))
else if (unit.EqualsLiteral("q"))
cssUnit = eCSSUnit_Quarter;
else { // unexpected unit
if (!(aFlags & PARSE_SUPPRESS_WARNINGS)) {
@ -675,7 +673,7 @@ void nsMathMLElement::MapMathMLAttributesInto(
NS_MATHML_MATHVARIANT_LOOPED,
NS_MATHML_MATHVARIANT_STRETCHED};
for (uint32_t i = 0; i < ArrayLength(sizes); ++i) {
if (str.LowerCaseEqualsASCII(sizes[i])) {
if (str.EqualsASCII(sizes[i])) {
aDecls.SetKeywordValue(eCSSProperty__moz_math_variant, values[i]);
break;
}
@ -801,7 +799,7 @@ void nsMathMLElement::MapMathMLAttributesInto(
static const int32_t dirValues[MOZ_ARRAY_LENGTH(dirs)] = {
NS_STYLE_DIRECTION_LTR, NS_STYLE_DIRECTION_RTL};
for (uint32_t i = 0; i < ArrayLength(dirs); ++i) {
if (str.LowerCaseEqualsASCII(dirs[i])) {
if (str.EqualsASCII(dirs[i])) {
aDecls.SetKeywordValue(eCSSProperty_direction, dirValues[i]);
break;
}

View File

@ -28,19 +28,19 @@ math {
-moz-float-edge: margin-box;
-moz-math-display: inline;
}
math[display="block" i] {
math[display="block"] {
display: block;
text-align: -moz-center;
-moz-math-display: block;
}
math[display="inline" i] {
math[display="inline"] {
display: inline;
-moz-math-display: inline;
}
math[displaystyle="false" i] {
math[displaystyle="false"] {
-moz-math-display: inline;
}
math[displaystyle="true" i] {
math[displaystyle="true"] {
-moz-math-display: block;
}
@ -233,10 +233,10 @@ mtable[framespacing] > mtr > mtd {
/*
Map mstyle@displaystyle to -moz-math-display.
*/
mstyle[displaystyle="false" i] {
mstyle[displaystyle="false"] {
-moz-math-display: inline;
}
mstyle[displaystyle="true" i] {
mstyle[displaystyle="true"] {
-moz-math-display: block;
}
@ -316,7 +316,7 @@ munderover > :not(:first-child) {
mtable element sets displaystyle to "false" within the table elements.
*/
mtable { -moz-math-display: inline; }
mtable[displaystyle="true" i] { -moz-math-display: block; }
mtable[displaystyle="true"] { -moz-math-display: block; }
/*
The mscarries element sets displaystyle to "false", and increments

View File

@ -1,12 +1,196 @@
[attribute-mapping-001.html]
[mathsize on the msub element is mapped to CSS font-size]
expected: FAIL
[dir on the msup element is mapped to CSS direction]
expected: FAIL
[mathsize on the mstyle element is mapped to CSS font-size]
expected: FAIL
[dir on the math element is mapped to CSS direction]
expected: FAIL
[dir on the munder element is mapped to CSS direction]
expected: FAIL
[dir on the munderover element is mapped to CSS direction]
expected: FAIL
[mathsize on the maction element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mi element is mapped to CSS font-size]
expected: FAIL
[dir on the mover element is mapped to CSS direction]
expected: FAIL
[mathsize on the mtable element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mn element is mapped to CSS font-size]
expected: FAIL
[dir on the msqrt element is mapped to CSS direction]
expected: FAIL
[dir on the mtr element is mapped to CSS direction]
expected: FAIL
[mathsize on the msqrt element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mrow element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mfrac element is mapped to CSS font-size]
expected: FAIL
[mathsize on the munder element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mtr element is mapped to CSS font-size]
expected: FAIL
[mathsize on the annotation-xml element is mapped to CSS font-size]
expected: FAIL
[mathsize on the none element is mapped to CSS font-size]
expected: FAIL
[dir on the merror element is mapped to CSS direction]
expected: FAIL
[dir on the mfrac element is mapped to CSS direction]
expected: FAIL
[mathsize on the menclose element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mroot element is mapped to CSS font-size]
expected: FAIL
[mathsize on the munderover element is mapped to CSS font-size]
expected: FAIL
[mathcolor on the merror element is mapped to CSS color]
expected: FAIL
[mathsize on the msubsup element is mapped to CSS font-size]
expected: FAIL
[dir on the mtd element is mapped to CSS direction]
expected: FAIL
[mathsize on the mprescripts element is mapped to CSS font-size]
expected: FAIL
[dir on the maction element is mapped to CSS direction]
expected: FAIL
[dir on the annotation-xml element is mapped to CSS direction]
expected: FAIL
[mathsize on the ms element is mapped to CSS font-size]
expected: FAIL
[dir on the mstyle element is mapped to CSS direction]
expected: FAIL
[dir on the mtext element is mapped to CSS direction]
expected: FAIL
[dir on the mspace element is mapped to CSS direction]
expected: FAIL
[dir on the mphantom element is mapped to CSS direction]
expected: FAIL
[dir on the annotation element is mapped to CSS direction]
expected: FAIL
[dir on the none element is mapped to CSS direction]
expected: FAIL
[dir on the mrow element is mapped to CSS direction]
expected: FAIL
[dir on the menclose element is mapped to CSS direction]
expected: FAIL
[mathsize on the mspace element is mapped to CSS font-size]
expected: FAIL
[dir on the mroot element is mapped to CSS direction]
expected: FAIL
[dir on the mo element is mapped to CSS direction]
expected: FAIL
[dir on the mprescripts element is mapped to CSS direction]
expected: FAIL
[mathsize on the math element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mover element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mtd element is mapped to CSS font-size]
expected: FAIL
[mathsize on the merror element is mapped to CSS font-size]
expected: FAIL
[dir on the msub element is mapped to CSS direction]
expected: FAIL
[mathsize on the mmultiscripts element is mapped to CSS font-size]
expected: FAIL
[dir on the mmultiscripts element is mapped to CSS direction]
expected: FAIL
[dir on the mi element is mapped to CSS direction]
expected: FAIL
[dir on the mn element is mapped to CSS direction]
expected: FAIL
[mathsize on the msup element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mphantom element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mo element is mapped to CSS font-size]
expected: FAIL
[dir on the msubsup element is mapped to CSS direction]
expected: FAIL
[mathsize on the mtext element is mapped to CSS font-size]
expected: FAIL
[dir on the ms element is mapped to CSS direction]
expected: FAIL
[dir on the mpadded element is mapped to CSS direction]
expected: FAIL
[mathsize on the annotation element is mapped to CSS font-size]
expected: FAIL
[mathsize on the mpadded element is mapped to CSS font-size]
expected: FAIL
[dir on the mtable element is mapped to CSS direction]
expected: FAIL
[dir on the semantics element is mapped to CSS direction]
expected: FAIL
[mathsize on the semantics element is mapped to CSS font-size]
expected: FAIL

View File

@ -0,0 +1,73 @@
[displaystyle-1.html]
[mover element (alternate_case)]
expected: FAIL
[mover element (uppercase)]
expected: FAIL
[munder element (uppercase)]
expected: FAIL
[msub element (uppercase)]
expected: FAIL
[math element (explicit display, alternate_case)]
expected: FAIL
[munderover element (alternate_case)]
expected: FAIL
[mroot element (uppercase)]
expected: FAIL
[mstyle element (uppercase)]
expected: FAIL
[mroot element (alternate_case)]
expected: FAIL
[mtable element (alternate_case)]
expected: FAIL
[munder element (alternate_case)]
expected: FAIL
[msubsup element (alternate_case)]
expected: FAIL
[math element (explicit display, uppercase)]
expected: FAIL
[mstyle element (alternate_case)]
expected: FAIL
[math element (uppercase)]
expected: FAIL
[mfrac element (uppercase)]
expected: FAIL
[mtable element (uppercase)]
expected: FAIL
[msub element (alternate_case)]
expected: FAIL
[mfrac element (alternate_case)]
expected: FAIL
[munderover element (uppercase)]
expected: FAIL
[msubsup element (uppercase)]
expected: FAIL
[math element (alternate_case)]
expected: FAIL
[msup element (uppercase)]
expected: FAIL
[msup element (alternate_case)]
expected: FAIL

View File

@ -53,6 +53,9 @@
[mroot element (alternate_case)]
expected: FAIL
[mtable element (alternate_case)]
expected: FAIL
[munder element (alternate_case)]
expected: FAIL
@ -62,6 +65,12 @@
[msubsup element (alternate_case)]
expected: FAIL
[mfrac element (uppercase)]
expected: FAIL
[mtable element (uppercase)]
expected: FAIL
[msubsup element (lowercase)]
expected: FAIL
@ -71,6 +80,9 @@
[mover element (lowercase)]
expected: FAIL
[mfrac element (alternate_case)]
expected: FAIL
[munderover element (uppercase)]
expected: FAIL

View File

@ -0,0 +1,7 @@
[display-1.html]
[Test display math alternate_case]
expected: FAIL
[Test display math uppercase]
expected: FAIL

View File

@ -1,163 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>mathvariant case sensitivity</title>
<style>
@font-face {
font-family: mathvariant-bold-fraktur;
src: url("/fonts/math/mathvariant-bold-fraktur.woff");
}
@font-face {
font-family: mathvariant-bold;
src: url("/fonts/math/mathvariant-bold.woff");
}
@font-face {
font-family: mathvariant-bold-italic;
src: url("/fonts/math/mathvariant-bold-italic.woff");
}
@font-face {
font-family: mathvariant-bold-sans-serif;
src: url("/fonts/math/mathvariant-bold-sans-serif.woff");
}
@font-face {
font-family: mathvariant-bold-script;
src: url("/fonts/math/mathvariant-bold-script.woff");
}
@font-face {
font-family: mathvariant-double-struck;
src: url("/fonts/math/mathvariant-double-struck.woff");
}
@font-face {
font-family: mathvariant-fraktur;
src: url("/fonts/math/mathvariant-fraktur.woff");
}
@font-face {
font-family: mathvariant-initial;
src: url("/fonts/math/mathvariant-initial.woff");
}
@font-face {
font-family: mathvariant-italic;
src: url("/fonts/math/mathvariant-italic.woff");
}
@font-face {
font-family: mathvariant-looped;
src: url("/fonts/math/mathvariant-looped.woff");
}
@font-face {
font-family: mathvariant-monospace;
src: url("/fonts/math/mathvariant-monospace.woff");
}
@font-face {
font-family: mathvariant-sans-serif-bold-italic;
src: url("/fonts/math/mathvariant-sans-serif-bold-italic.woff");
}
@font-face {
font-family: mathvariant-sans-serif;
src: url("/fonts/math/mathvariant-sans-serif.woff");
}
@font-face {
font-family: mathvariant-sans-serif-italic;
src: url("/fonts/math/mathvariant-sans-serif-italic.woff");
}
@font-face {
font-family: mathvariant-script;
src: url("/fonts/math/mathvariant-script.woff");
}
@font-face {
font-family: mathvariant-stretched;
src: url("/fonts/math/mathvariant-stretched.woff");
}
@font-face {
font-family: mathvariant-tailed;
src: url("/fonts/math/mathvariant-tailed.woff");
}
</style>
<body>
<p>
<math style="font-family: mathvariant-bold-fraktur">
<mtext>&#x1D56C;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold">
<mtext>&#x1D400;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold-italic">
<mtext>&#x1D468;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold-sans-serif">
<mtext>&#x1D5D4;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold-script">
<mtext>&#x1D4D0;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-double-struck">
<mtext>&#x1D538;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-fraktur">
<mtext>&#x1D504;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-initial">
<mtext>&#x1EE30;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-italic">
<mtext>&#x1D434;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-looped">
<mtext>&#x1EE90;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-monospace">
<mtext>&#x1D670;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-sans-serif-bold-italic">
<mtext>&#x1D63C;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-sans-serif">
<mtext>&#x1D5A0;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-sans-serif-italic">
<mtext>&#x1D608;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-script">
<mtext>&#x1D49C;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-stretched">
<mtext>&#x1EE70;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-tailed">
<mtext>&#x1EE52;</mtext>
</math>
</p>
</body>
</html>

View File

@ -1,168 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>mathvariant case sensitivity</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
<link rel="match" href="mathvariant-case-sensitivity-ref.html"/>
<meta name="assert" content="Verify that mathvariant value is case insensitive">
<style>
@font-face {
font-family: mathvariant-bold-fraktur;
src: url("/fonts/math/mathvariant-bold-fraktur.woff");
}
@font-face {
font-family: mathvariant-bold;
src: url("/fonts/math/mathvariant-bold.woff");
}
@font-face {
font-family: mathvariant-bold-italic;
src: url("/fonts/math/mathvariant-bold-italic.woff");
}
@font-face {
font-family: mathvariant-bold-sans-serif;
src: url("/fonts/math/mathvariant-bold-sans-serif.woff");
}
@font-face {
font-family: mathvariant-bold-script;
src: url("/fonts/math/mathvariant-bold-script.woff");
}
@font-face {
font-family: mathvariant-double-struck;
src: url("/fonts/math/mathvariant-double-struck.woff");
}
@font-face {
font-family: mathvariant-fraktur;
src: url("/fonts/math/mathvariant-fraktur.woff");
}
@font-face {
font-family: mathvariant-initial;
src: url("/fonts/math/mathvariant-initial.woff");
}
@font-face {
font-family: mathvariant-italic;
src: url("/fonts/math/mathvariant-italic.woff");
}
@font-face {
font-family: mathvariant-looped;
src: url("/fonts/math/mathvariant-looped.woff");
}
@font-face {
font-family: mathvariant-monospace;
src: url("/fonts/math/mathvariant-monospace.woff");
}
@font-face {
font-family: mathvariant-sans-serif-bold-italic;
src: url("/fonts/math/mathvariant-sans-serif-bold-italic.woff");
}
@font-face {
font-family: mathvariant-sans-serif;
src: url("/fonts/math/mathvariant-sans-serif.woff");
}
@font-face {
font-family: mathvariant-sans-serif-italic;
src: url("/fonts/math/mathvariant-sans-serif-italic.woff");
}
@font-face {
font-family: mathvariant-script;
src: url("/fonts/math/mathvariant-script.woff");
}
@font-face {
font-family: mathvariant-stretched;
src: url("/fonts/math/mathvariant-stretched.woff");
}
@font-face {
font-family: mathvariant-tailed;
src: url("/fonts/math/mathvariant-tailed.woff");
}
</style>
<body>
<p>
<math style="font-family: mathvariant-bold-fraktur">
<mtext mathvariant="BoLd-fRaKtUr">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold">
<mtext mathvariant="BoLd">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold-italic">
<mtext mathvariant="BoLd-iTaLiC">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold-sans-serif">
<mtext mathvariant="BoLd-sAnS-SeRiF">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-bold-script">
<mtext mathvariant="BoLd-sCrIpT">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-double-struck">
<mtext mathvariant="DoUbLe-sTrUcK">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-fraktur">
<mtext mathvariant="FrAkTuR">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-initial">
<mtext mathvariant="InItIaL">&#x641;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-italic">
<mtext mathvariant="ItAlIc">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-looped">
<mtext mathvariant="LoOpEd">&#x641;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-monospace">
<mtext mathvariant="MoNoSpAcE">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-sans-serif-bold-italic">
<mtext mathvariant="SaNs-sErIf-bOlD-ItAlIc">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-sans-serif">
<mtext mathvariant="SaNs-sErIf">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-sans-serif-italic">
<mtext mathvariant="SaNs-sErIf-iTaLiC">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-script">
<mtext mathvariant="ScRiPt">&#x41;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-stretched">
<mtext mathvariant="StReTcHeD">&#x641;</mtext>
</math>
</p>
<p>
<math style="font-family: mathvariant-tailed">
<mtext mathvariant="TaIlEd">&#x642;</mtext>
</math>
</p>
</body>
</html>