Implement the mmultiscripts tag

https://bugs.webkit.org/show_bug.cgi?id=99618

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-09-15
Reviewed by Chris Fleizach.

Source/WebCore:

Tests: mathml/invalid-scripts-crash.html
       mathml/presentation/multiscripts-equivalence.html
       mathml/presentation/multiscripts-noscripts.html
       mathml/presentation/multiscripts-positions.html
       mathml/presentation/scripts-base-alignment.html
       mathml/presentation/scripts-horizontal-alignment.html
       mathml/presentation/scripts-vertical-alignment.html
       mathml/scripts-addChild.html
       mathml/scripts-removeChild.html

This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathSubscriptSuperscript):
(WebCore::AccessibilityRenderObject::mathSuperscriptObject):
* css/mathml.css:
(mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
(mover > :last-child, munderover > :last-child):
(msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
(merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createRenderer):
* mathml/mathtags.in:
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::isRenderMathMLScripts):
(WebCore::RenderMathMLBlock::isRenderMathMLScriptsWrapper):
* rendering/mathml/RenderMathMLScripts.cpp: Added.
(WebCore::isMPrescripts):
(WebCore::RenderMathMLScripts::RenderMathMLScripts):
(WebCore::RenderMathMLScripts::base):
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
(WebCore::RenderMathMLScripts::fixAnonymousStyles):
(WebCore::RenderMathMLScripts::addChildInternal):
(WebCore::RenderMathMLScripts::removeChildInternal):
(WebCore::RenderMathMLScripts::addChild):
(WebCore::RenderMathMLScripts::removeChild):
(WebCore::RenderMathMLScripts::styleDidChange):
(WebCore::RenderMathMLScripts::unembellishedOperator):
(WebCore::RenderMathMLScripts::layout):
(WebCore::RenderMathMLScripts::firstLineBoxBaseline):
(WebCore::RenderMathMLScriptsWrapper::createAnonymousWrapper):
(WebCore::RenderMathMLScriptsWrapper::addChildInternal):
(WebCore::RenderMathMLScriptsWrapper::addChild):
(WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
(WebCore::RenderMathMLScriptsWrapper::removeChild):
* rendering/mathml/RenderMathMLScripts.h: Added.
(WebCore::RenderMathMLScriptsWrapper::RenderMathMLScriptsWrapper):
(WebCore::RenderMathMLScriptsWrapper::renderName):
(WebCore::RenderMathMLScriptsWrapper::isRenderMathMLScriptsWrapper):
(WebCore::toRenderMathMLScriptsWrapper):
(WebCore::RenderMathMLScripts::isRenderMathMLScripts):
(WebCore::RenderMathMLScripts::renderName):
(WebCore::toRenderMathMLScripts):
* rendering/mathml/RenderMathMLSubSup.cpp: Removed.
* rendering/mathml/RenderMathMLSubSup.h: Removed.

LayoutTests:

Add many tests for script msub/msup/msubsup/mmultiscripts:
- invalid markup
- equivalence between mmultiscripts without scripts and mrow
- equivalence between mmultiscripts and msub/msup/msubsup
- position of scripts in mmultiscripts
- baseline alignment of msub/msup/msubsup elements
- horizontal/vertical alignment of scripts
- adding/removing children with the DOM

* TestExpectations: Some remaining MathML pixel tests are broken by this patch.
* mathml/invalid-scripts-crash-expected.txt: Added.
* mathml/invalid-scripts-crash.html: Added.
* mathml/presentation/multiscripts-equivalence-expected.html: Added.
* mathml/presentation/multiscripts-equivalence.html: Added.
* mathml/presentation/multiscripts-noscripts-expected.html: Added.
* mathml/presentation/multiscripts-noscripts.html: Added.
* mathml/presentation/multiscripts-positions-expected.html: Added.
* mathml/presentation/multiscripts-positions.html: Added.
* mathml/presentation/scripts-base-alignment-expected.html: Added.
* mathml/presentation/scripts-base-alignment.html: Added.
* mathml/presentation/scripts-horizontal-alignment-expected.html: Added.
* mathml/presentation/scripts-horizontal-alignment.html: Added.
* mathml/presentation/scripts-vertical-alignment-expected.html: Added.
* mathml/presentation/scripts-vertical-alignment.html: Added.
* mathml/scripts-addChild-expected.html: Added.
* mathml/scripts-addChild.html: Added.
* mathml/scripts-removeChild-expected.html: Added.
* mathml/scripts-removeChild.html: Added.
* platform/mac/accessibility/mathml-multiscript-expected.txt: Reference updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 886b036c
2013-09-15 Frédéric Wang <fred.wang@free.fr>
Implement the mmultiscripts tag
https://bugs.webkit.org/show_bug.cgi?id=99618
Reviewed by Chris Fleizach.
Add many tests for script msub/msup/msubsup/mmultiscripts:
- invalid markup
- equivalence between mmultiscripts without scripts and mrow
- equivalence between mmultiscripts and msub/msup/msubsup
- position of scripts in mmultiscripts
- baseline alignment of msub/msup/msubsup elements
- horizontal/vertical alignment of scripts
- adding/removing children with the DOM
* TestExpectations: Some remaining MathML pixel tests are broken by this patch.
* mathml/invalid-scripts-crash-expected.txt: Added.
* mathml/invalid-scripts-crash.html: Added.
* mathml/presentation/multiscripts-equivalence-expected.html: Added.
* mathml/presentation/multiscripts-equivalence.html: Added.
* mathml/presentation/multiscripts-noscripts-expected.html: Added.
* mathml/presentation/multiscripts-noscripts.html: Added.
* mathml/presentation/multiscripts-positions-expected.html: Added.
* mathml/presentation/multiscripts-positions.html: Added.
* mathml/presentation/scripts-base-alignment-expected.html: Added.
* mathml/presentation/scripts-base-alignment.html: Added.
* mathml/presentation/scripts-horizontal-alignment-expected.html: Added.
* mathml/presentation/scripts-horizontal-alignment.html: Added.
* mathml/presentation/scripts-vertical-alignment-expected.html: Added.
* mathml/presentation/scripts-vertical-alignment.html: Added.
* mathml/scripts-addChild-expected.html: Added.
* mathml/scripts-addChild.html: Added.
* mathml/scripts-removeChild-expected.html: Added.
* mathml/scripts-removeChild.html: Added.
* platform/mac/accessibility/mathml-multiscript-expected.txt: Reference updated.
2013-09-14 Eric Carlson <eric.carlson@apple.com>
MediaStream API: Update RTCDataChannel
......@@ -16,6 +16,10 @@ webkit.org/b/116473 editing/selection/user-drag-element-and-user-select-none.htm
# media/W3C/video/networkState/networkState_during_progress.html is flaky
webkit.org/b/76280 media/W3C/video/networkState/networkState_during_progress.html [ Pass Failure ]
# MathML pixel tests
webkit.org/b/99618 mathml/presentation/roots.xhtml [ Failure ]
webkit.org/b/99618 mathml/presentation/mo-stretch.html [ Failure ]
# These conformace tests are no longer in sync with the latest specification
# and expect compareDocumentPosition() to return:
# DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | DOCUMENT_POSITION_DISCONNECTED
......
This test passes if it does not crash.
<!doctype html>
<html>
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<!-- This test contains various invalid msub/msup/msubsup/mmultiscripts elements. -->
<p>This test passes if it does not crash.</p>
<math>
<msub></msub>
<msub><mn></mn></msub>
<msub><mn></mn><mn></mn><mn></mn></msub>
<msub><mprescripts/></msub>
<msub><mn></mn><mprescripts/></msub>
<msub><mprescripts/><mn></mn></msub>
<msub><mn></mn><mn></mn><mn></mn><mprescripts/><mn></mn><mn></mn></msub>
</math>
<math>
<msup></msup>
<msup><mn></mn></msup>
<msup><mn></mn><mn></mn><mn></mn></msup>
<msup><mprescripts/></msup>
<msup><mn></mn><mprescripts/></msup>
<msup><mprescripts/><mn></mn></msup>
<msup><mn></mn><mn></mn><mn></mn><mprescripts/><mn></mn><mn></mn></msup>
</math>
<math>
<msubsup></msubsup>
<msubsup><mn></mn></msubsup>
<msubsup><mn></mn><mn></mn></msubsup>
<msubsup><mn></mn><mn></mn><mn></mn><mn></mn></msubsup>
<msubsup><mprescripts/></msubsup>
<msup><mn></mn><mprescripts/></msup>
<msup><mprescripts/><mn></mn></msup>
<msubsup><mn></mn><mn></mn><mprescripts/></msubsup>
<msubsup><mprescripts/><mn></mn><mn></mn></msubsup>
<msubsup><mn></mn><mn></mn><mn></mn><mprescripts/><mn></mn><mn></mn></msubsup>
</math>
<math>
<mmultiscripts></mmultiscripts>
<mmultiscripts><mn></mn><mn></mn></mmultiscripts>
<mmultiscripts><mn></mn><mn></mn><mn></mn><mn></mn></mmultiscripts>
<mmultiscripts><mprescripts/></mmultiscripts>
<mmultiscripts><mprescripts/><mn></mn><mn></mn></mmultiscripts>
<mmultiscripts><mprescripts/><mn></mn><mn></mn><mn></mn><mn></mn></mmultiscripts>
<mmultiscripts><mn></mn><mprescripts/><mn></mn></mmultiscripts>
<mmultiscripts><mn></mn><mprescripts/><mn></mn><mn></mn><mn></mn></mmultiscripts>
<mmultiscripts><mn></mn><mprescripts/><mn></mn><mn></mn><mprescripts/></mmultiscripts>
<mmultiscripts><mn></mn><mprescripts/><mn></mn><mn></mn><mprescripts/><mn></mn><mn></mn></mmultiscripts>
<mmultiscripts><mn></mn><mprescripts/><mn></mn><mn></mn><mprescripts/><mn></mn><mn></mn><mn></mn><mn></mn></mmultiscripts>
</math>
</body>
</html>
<!doctype html>
<html>
<head>
<title>mmultiscripts vs msub/msup/msubsup</title>
<meta charset="utf-8"/>
</head>
<body>
<p>
<math>
<msub>
<mn>0</mn>
<mn>1</mn>
</msub>
</math>
<math>
<msup>
<mn>0</mn>
<mn>1</mn>
</msup>
</math>
<math>
<msubsup>
<mn>0</mn>
<mn>1</mn>
<mn>2</mn>
</msubsup>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>mmultiscripts vs msub/msup/msubsup</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- This test compares the rendering of some <mmultiscripts> elements with equivalent msub/msup/msubsup constructions. -->
<p>
<math>
<mmultiscripts>
<mn>0</mn>
<mn>1</mn>
<none/>
</mmultiscripts>
</math>
<math>
<mmultiscripts>
<mn>0</mn>
<none/>
<mn>1</mn>
</mmultiscripts>
</math>
<math>
<mmultiscripts>
<mn>0</mn>
<mn>1</mn>
<mn>2</mn>
</mmultiscripts>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>No scripts</title>
<meta charset="utf-8"/>
</head>
<body>
<p>
<math>
<mrow>
<mn>1</mn>
</mrow>
</math>
</p>
<p>
<math>
<mrow>
<mn>2</mn>
</mrow>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>No scripts</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- These are valid <mmultiscripts> elements without scripts. They should render the same as an <mrow> element containing the base. -->
<p>
<math>
<mmultiscripts>
<mn>1</mn>
<mprescripts/>
</mmultiscripts>
</math>
</p>
<p>
<math>
<mmultiscripts>
<mn>2</mn>
</mmultiscripts>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>positions of scripts</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- Testing post subscript -->
<p style="position: absolute; left: 0; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mspace width="10px" height="10px" mathbackground="magenta"/>
<none/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 15px; top: 10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing post superscript -->
<p style="position: absolute; left: 100px; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<none/>
<mspace width="10px" height="10px" mathbackground="magenta"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 115px; top: -10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing pre subscript -->
<p style="position: absolute; left: 200px; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mprescripts/>
<mspace width="10px" height="10px" mathbackground="magenta"/>
<none/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 195px; top: +10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing pre postscript -->
<p style="position: absolute; left: 300px; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mprescripts/>
<none/>
<mspace width="10px" height="10px" mathbackground="magenta"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 295px; top: -10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing the leftmost pre subscript and rightmost post superscript -->
<p style="position: absolute; left: 0; top: 100px;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mspace width="10px" depth="10px" mathbackground="orange"/>
<mspace width="10px" height="10px" mathbackground="green"/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="magenta"/>
<mprescripts/>
<mspace width="10px" depth="10px" mathbackground="magenta"/>
<mspace width="10px" height="10px" mathbackground="green"/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="orange"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: -5px; top: 110px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<p style="position: absolute; left: 45px; top: 90px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing the leftmost pre superscript and rightmost post subscript -->
<p style="position: absolute; left: 100px; top: 100px;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="orange"/>
<mspace width="10px" depth="10px" mathbackground="magenta"/>
<mspace width="10px" height="10px" mathbackground="green"/>
<mprescripts/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="magenta"/>
<mspace width="10px" depth="10px" mathbackground="orange"/>
<mspace width="10px" height="10px" mathbackground="green"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 95px; top: 90px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<p style="position: absolute; left: 145px; top: 110px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>positions of scripts</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- This page contains several <mmultiscripts> elements. We place black squares at the position where we expect some red scripts to be. The reference page is the same with only the colors of these scripts changed. If the scripts are correctly placed, they will be covered by the black squares and thus the color difference is not perceptible. -->
<!-- Testing post subscript -->
<p style="position: absolute; left: 0; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mspace width="10px" height="10px" mathbackground="red"/>
<none/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 15px; top: 10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing post superscript -->
<p style="position: absolute; left: 100px; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<none/>
<mspace width="10px" height="10px" mathbackground="red"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 115px; top: -10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing pre subscript -->
<p style="position: absolute; left: 200px; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mprescripts/>
<mspace width="10px" height="10px" mathbackground="red"/>
<none/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 195px; top: +10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing pre postscript -->
<p style="position: absolute; left: 300px; top: 0;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mprescripts/>
<none/>
<mspace width="10px" height="10px" mathbackground="red"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 295px; top: -10px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing the leftmost pre subscript and rightmost post superscript -->
<p style="position: absolute; left: 0; top: 100px;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mspace width="10px" depth="10px" mathbackground="orange"/>
<mspace width="10px" height="10px" mathbackground="green"/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="red"/>
<mprescripts/>
<mspace width="10px" depth="10px" mathbackground="red"/>
<mspace width="10px" height="10px" mathbackground="green"/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="orange"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: -5px; top: 110px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<p style="position: absolute; left: 45px; top: 90px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<!-- Testing the leftmost pre superscript and rightmost post subscript -->
<p style="position: absolute; left: 100px; top: 100px;">
<math>
<mspace height="50px" depth="50px"/>
<mmultiscripts>
<mspace width="20px" height="10px" depth="10px" mathbackground="blue"/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="orange"/>
<mspace width="10px" depth="10px" mathbackground="red"/>
<mspace width="10px" height="10px" mathbackground="green"/>
<mprescripts/>
<mspace width="10px" depth="10px" mathbackground="green"/>
<mspace width="10px" height="10px" mathbackground="red"/>
<mspace width="10px" depth="10px" mathbackground="orange"/>
<mspace width="10px" height="10px" mathbackground="green"/>
</mmultiscripts>
</math>
</p>
<p style="position: absolute; left: 95px; top: 90px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
<p style="position: absolute; left: 145px; top: 110px;">
<math>
<mspace height="50px" depth="50px"/>
<mrow>
<mspace width="20px" height="10px" depth="10px" mathbackground="black"/>
</mrow>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>base alignment</title>
<meta charset="utf-8"/>
</head>
<body>
<p style="position: absolute;">
<math>
<mspace height="10em" depth="10em"/>
<mn mathcolor="red">0</mn>
<msup><mn mathcolor="red">0</mn><mn>1</mn></msup>
<msub><mn mathcolor="red">0</mn><mn>1</mn></msub>
<msubsup><mn mathcolor="red">0</mn><mn>1</mn><mn>2</mn></msubsup>
<mmultiscripts><mn mathcolor="red">0</mn><mn>1</mn><mn>2</mn><mn>3</mn><mn>4</mn><mprescripts/><mn>5</mn><mn>6</mn><mn>7</mn><mn>8</mn></mmultiscripts>
<mmultiscripts>
<mn mathcolor="red">0</mn>
<mmultiscripts><mn>1</mn><mn>2</mn><none/></mmultiscripts>
<none/>
</mmultiscripts>
<mmultiscripts>
<mn mathcolor="red">0</mn>
<none/>
<mmultiscripts><mn>1</mn><none/><mn>2</mn></mmultiscripts>
</mmultiscripts>
<mmultiscripts>
<mn mathcolor="red">0</mn>
<mprescripts/>
<mmultiscripts><mn>1</mn><mprescripts/><mn>2</mn><none/></mmultiscripts>
<none/>
</mmultiscripts>
<mmultiscripts>
<mn mathcolor="red">0</mn>
<mprescripts/>
<none/>
<mmultiscripts><mn>1</mn><mprescripts/><none/><mn>2</mn></mmultiscripts>
</mmultiscripts>
<mmultiscripts>
<mn mathcolor="red">0</mn>
<mmultiscripts>
<mn>0</mn>
<mn>1</mn><mn>2</mn>
<mn>3</mn><mn>4</mn>
<mprescripts/>
<mn>5</mn><mn>6</mn>
<mn>7</mn><mn>8</mn>
</mmultiscripts>
<mmultiscripts>
<mn>0</mn>
<mn>1</mn><mn>2</mn>
<mn>3</mn><mn>4</mn>
<mprescripts/>
<mn>5</mn><mn>6</mn>
<mn>7</mn><mn>8</mn>
</mmultiscripts>
<mprescripts/>
<mmultiscripts>
<mn>0</mn>
<mn>1</mn><mn>2</mn>
<mn>3</mn><mn>4</mn>
<mprescripts/>
<mn>5</mn><mn>6</mn>
<mn>7</mn><mn>8</mn>
</mmultiscripts>
<mmultiscripts>
<mn>0</mn>
<mn>1</mn><mn>2</mn>
<mn>3</mn><mn>4</mn>
<mprescripts/>
<mn>5</mn><mn>6</mn>
<mn>7</mn><mn>8</mn>
</mmultiscripts>
</mmultiscripts>
</math>
</p>
<p style="position: absolute;">
<math>
<mspace height="10em" depth="10em"/>
<mrow mathbackground="blue" style="border-top: blue solid 1px; border-bottom: blue solid 1px;">
<mphantom>
<mn>0000000000000000000000000000000000000000000</mn>
</mphantom>
</mrow>
</math>
</p>
</body>
</html>
<!doctype html>
<html>
<head>
<title>base alignment</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- The bases of the outermost <mmultiscripts> elements should all be aligned and so covered by the blue rectangle. -->
<p style="position: absolute;">
<math>
<mspace height="10em" depth="10em"/>
<mn>0</mn>
<msup><mn>0</mn><mn>1</mn></msup>