Bug 823939 - <mmultiscripts> now doesnt consider base followed by only <mprescripts> and no (presubscript presuperscript) pair as invalid-markup. r=fredw, r=Pike

This commit is contained in:
Mohit Gahlot 2013-01-28 00:00:25 +05:30
Родитель 1528b2d529
Коммит 8b93ca050f
8 изменённых файлов: 71 добавлений и 5 удалений

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

@ -4,7 +4,8 @@
ChildCountIncorrect=Invalid markup: Incorrect number of children for <%1$S/> tag.
DuplicateMprescripts=Invalid markup: More than one <mprescripts/> in <mmultiscripts/>.
NoSubSup=Invalid markup: Expected at least one subscript/superscript pair in <mmultiscripts/>. Found none.
# LOCALIZATION NOTE: The first child of <mmultiscript/> is the base, that is the element to which scripts are attached.
NoBase=Invalid markup: Expected exactly one Base element in <mmultiscripts/>. Found none.
SubSupMismatch=Invalid markup: Incomplete subscript/superscript pair in <mmultiscripts/>.
# LOCALIZATION NOTE: When localizing the single quotes ('), follow the conventions in css.properties for your target locale.

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

@ -359,11 +359,11 @@ nsMathMLmmultiscriptsFrame::Place(nsRenderingContext& aRenderingContext,
childFrame = childFrame->GetNextSibling();
}
// note: width=0 if all sup-sub pairs match correctly
if ((0 != width) || !baseFrame || !subScriptFrame || !supScriptFrame) {
if ((0 != width) || !baseFrame) {
// report an error, encourage people to get their markups in order
if (aPlaceOrigin) {
if (count <= 1 || (count == 2 && mprescriptsFrame)) {
ReportErrorToConsole("NoSubSup");
if (!baseFrame) {
ReportErrorToConsole("NoBase");
} else {
ReportErrorToConsole("SubSupMismatch");
}

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

@ -62,7 +62,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=553917
<math><mmultiscripts><mi>x</mi><mi>y</mi></mmultiscripts></math>*/
MMultiscriptsErrors: {
status: [false, false, false],
args: ["DuplicateMprescripts", "NoSubSup", "SubSupMismatch"]
args: ["NoBase","DuplicateMprescripts", "SubSupMismatch"]
},
/*<math><mo minsize="2">+</mo></math>*/
UnitlessValuesAreDeprecated : {

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

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>mmultiscript with only base</title>
</head>
<body>
<math>
<mmultiscripts>
<mtext>base</mtext>
</mmultiscripts>
</math>
</body>
</html>

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

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>mmultiscript with only base and none as placeholder</title>
</head>
<body>
<math>
<mmultiscripts>
<mtext>base</mtext>
<none/>
<none/>
</mmultiscripts>
</math>
</body>
</html>

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

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>mmultiscript with mprescripts without none</title>
</head>
<body>
<math>
<mmultiscripts>
<mtext>base</mtext>
<mprescripts/>
</mmultiscripts>
</math>
</body>
</html>

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

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>mmultiscript with mprescripts with none as placeholders</title>
</head>
<body>
<math>
<mmultiscripts>
<mtext>base</mtext>
<none/>
<none/>
<mprescripts/>
</mmultiscripts>
</math>
</body>
</html>

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

@ -116,3 +116,5 @@ fails == whitespace-trim-4.html whitespace-trim-4-ref.html # Bug 787215
== operator-1.xhtml operator-1-ref.xhtml
== scriptshift-1.xhtml scriptshift-1-ref.xhtml
== number-size-1.xhtml number-size-1-ref.xhtml
== mathml-mmultiscript-base.html mathml-mmultiscript-base-ref.html
== mathml-mmultiscript-mprescript.html mathml-mmultiscript-mprescript-ref.html