<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202168] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202168">202168</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-06-17 09:30:03 -0700 (Fri, 17 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refactor RenderMathMLRoot layout function to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153987

Patch by Frederic Wang &lt;fwang@igalia.com&gt; on 2016-06-17
Reviewed by Brent Fulgham.

Source/WebCore:

No new tests, already covered by existing tests.
A case for RTL root has been added to roots.xhtml.

We reimplement RenderMathMLRoot without any flexbox or anonymous.
The anonymous RenderMathMLRadicalOperator used to draw the radical sign is replaced with
the MathOperator class introduced in bug 152244.
msqrt (row of children under a square root) is now implemented directly in RenderMathMLRoot,
so RenderMathMLSquareRoot is removed and RenderMathMLRoot now inherits from RenderMathMLRow.

* CMakeLists.txt: Remove files for RenderMathMLRadicalOperator and RenderMathMLSquareRoot.
* WebCore.xcodeproj/project.pbxproj: ditto.
* accessibility/AccessibilityRenderObject.cpp: Update code now that we do not use any
radical wrappers.
(WebCore::AccessibilityRenderObject::isMathRow): Now that RenderMathMLRoot inherits from
RenderMathMLRow, we must exclude MathRoot or otherwise some accessibility code may treat
roots as rows.
(WebCore::AccessibilityRenderObject::mathRadicandObject): Return the first child for
Root/SquareRoot or nullptr.
(WebCore::AccessibilityRenderObject::mathRootIndexObject): Return the second child for
Root and nullptr for SquareRoot.
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::childrenChanged): We no longer need a special case
for msqrt, it is treated as a normal RenderMathMLRow.
(WebCore::MathMLInlineContainerElement::createElementRenderer): Make msqrt create a
RenderMathMLRoot object.
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderMathMLRadicalOperator): Deleted.
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::mirrorIfNeeded): New function to mirror a child horizontal
offset according to the parent width.
(WebCore::RenderMathMLBlock::renderName):
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::mirrorIfNeeded): Moved from RenderMathMLScripts, just forward
call to the other mirrorIfNeeded function.
* rendering/mathml/RenderMathMLOperator.cpp: We no longer need this trailingSpaceError hack.
(WebCore::RenderMathMLOperator::trailingSpaceError): Deleted.
* rendering/mathml/RenderMathMLOperator.h: ditto.
* rendering/mathml/RenderMathMLRadicalOperator.cpp: Removed. The radical sign is now drawn
with a MathOperator.
* rendering/mathml/RenderMathMLRadicalOperator.h: Removed.
* rendering/mathml/RenderMathMLRoot.cpp: Complete refactoring to avoid using flexbox and
anonymous wrappers.
(WebCore::RenderMathMLRoot::RenderMathMLRoot): Set m_kind parameters to distinguish between
square root and general root and set the MathOperator member to draw the radical sign.
(WebCore::RenderMathMLRoot::isValid): Helper function to verify whether the child list is valid.
(WebCore::RenderMathMLRoot::getBase): Get the base of an mroot.
(WebCore::RenderMathMLRoot::getIndex): Get the index of an mroot.
(WebCore::RenderMathMLRoot::styleDidChange): Be sure to keep the style of the
MathOperator in sync with ours ; no need to skip empty roots.
(WebCore::RenderMathMLRoot::updateFromElement): Call the function from the new parent class ;
no need to skip empty roots.
(WebCore::RenderMathMLRoot::updateStyle): Remove the isEmpty ASSERT as it is valid to have
empty square root. Set the m_kernBeforeDegree, m_kernBeforeDegree members.
No need to set style for anonymous.
(WebCore::RenderMathMLRoot::computePreferredLogicalWidths): Implement this function.
(WebCore::RenderMathMLRoot::layoutBlock): Implement this function.
(WebCore::RenderMathMLRoot::paintChildren): Implement this function.
(WebCore::RenderMathMLRoot::paint): Remove the trailingSpaceError hack ;
paint the radical sign via MathOperator::paint
(WebCore::RenderMathMLRoot::baseWrapper): Deleted.
(WebCore::RenderMathMLRoot::radicalWrapper): Deleted.
(WebCore::RenderMathMLRoot::indexWrapper): Deleted.
(WebCore::RenderMathMLRoot::radicalOperator): Deleted.
(WebCore::RenderMathMLRoot::restructureWrappers): Deleted.
(WebCore::RenderMathMLRoot::addChild): Deleted.
(WebCore::RenderMathMLRoot::firstLineBaseline): Deleted.
(WebCore::RenderMathMLRoot::layout): Deleted.
(WebCore::RenderMathMLRootWrapper::createAnonymousWrapper): Deleted.
(WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring): Deleted.
(WebCore::RenderMathMLRootWrapper::removeChild): Deleted.
* rendering/mathml/RenderMathMLRoot.h: Make RenderMathMLRoot inherit from RenderMathMLRow.
Make RenderMathMLRoot support &lt;msqrt&gt;.
Remove all the anonymous wrapper stuff and instead use a MathOperator for the radical symbol.
Update function declaration to implement layout without flexbox and add some helper functions.
* rendering/mathml/RenderMathMLRow.cpp: Allow to get the exact metrics of the chid row,
for use in RenderMathMLRoot.
(WebCore::RenderMathMLRow::computeLineVerticalStretch): rename parameters.
(WebCore::RenderMathMLRow::layoutRowItems): Set parameters to the final ascent, descent and
logical width of the chid row. Set the temporary logical width for RenderMathRoot before
laying the children out.
(WebCore::RenderMathMLRow::layoutBlock): Rename parameters ; add a dummy logicalWidth
parameter.
* rendering/mathml/RenderMathMLRow.h: Make some functions accessible or overridable by
RenderMathMLRoot. Make layoutRowItems return the final ascent, descent and logical width
after the chid row is laid out.
* rendering/mathml/RenderMathMLScripts.cpp: Move mirrorIfNeeded to RenderMathMLBlock.
(WebCore::RenderMathMLScripts::mirrorIfNeeded): Deleted.
* rendering/mathml/RenderMathMLScripts.h: Move mirrorIfNeeded to RenderMathMLBlock.
* rendering/mathml/RenderMathMLSquareRoot.cpp: Removed.
* rendering/mathml/RenderMathMLSquareRoot.h: Removed.
* rendering/mathml/MathOperator.cpp:
(WebCore::MathOperator::paint): Apply a mirroring scale transform to radical symbol
in RTL direction.

LayoutTests:

Update expectations for some MathML tests containing radical operators.

* TestExpectations: mathml/roots-removeChild.html works as expected now
that we do not manage anonymous wrappers anymore.
* mathml/presentation/roots.xhtml: Add one test for RTL roots.
* platform/gtk/mathml/presentation/mo-stretch-expected.txt: Update expectation to
take into change in the render tree.
* platform/gtk/mathml/presentation/roots-expected.txt: Ditto.
* platform/gtk/mathml/presentation/roots-expected.png: Update expectation to take
into account small rendering changes.
* platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto.
* platform/gtk/mathml/radical-fallback-expected.txt: Ditto.
* platform/gtk/mathml/radical-fallback-expected.png: Ditto.
* platform/mac/mathml/radical-fallback-expected.txt: Ditto.
* platform/mac/mathml/radical-fallback-expected.png: Ditto.
* platform/ios-simulator/mathml/radical-fallback-expected.txt: Ditto.
* platform/ios-simulator/mathml/radical-fallback-expected.png: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationrootsxhtml">trunk/LayoutTests/mathml/presentation/roots.xhtml</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmathmlpresentationmostretchexpectedtxt">trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmathmlpresentationrootsexpectedpng">trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmathmlpresentationrootsexpectedtxt">trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmathmlradicalfallbackexpectedpng">trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformgtkmathmlradicalfallbackexpectedtxt">trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormathmlpresentationrootsexpectedtxt">trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormathmlradicalfallbackexpectedtxt">trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmathmlradicalfallbackexpectedpng">trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacmathmlradicalfallbackexpectedtxt">trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLInlineContainerElementcpp">trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLBlockcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLBlockh">trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRooth">trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRowcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLScriptsh">trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformiossimulatormathmlradicalfallbackexpectedpng">trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.png</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLSquareRootcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLSquareRooth">trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/ChangeLog        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-06-17  Frederic Wang  &lt;fwang@igalia.com&gt;
+
+        Refactor RenderMathMLRoot layout function to avoid using flexbox
+        https://bugs.webkit.org/show_bug.cgi?id=153987
+
+        Reviewed by Brent Fulgham.
+
+        Update expectations for some MathML tests containing radical operators.
+
+        * TestExpectations: mathml/roots-removeChild.html works as expected now
+        that we do not manage anonymous wrappers anymore.
+        * mathml/presentation/roots.xhtml: Add one test for RTL roots.
+        * platform/gtk/mathml/presentation/mo-stretch-expected.txt: Update expectation to
+        take into change in the render tree.
+        * platform/gtk/mathml/presentation/roots-expected.txt: Ditto.
+        * platform/gtk/mathml/presentation/roots-expected.png: Update expectation to take
+        into account small rendering changes.
+        * platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto.
+        * platform/gtk/mathml/radical-fallback-expected.txt: Ditto.
+        * platform/gtk/mathml/radical-fallback-expected.png: Ditto.
+        * platform/mac/mathml/radical-fallback-expected.txt: Ditto.
+        * platform/mac/mathml/radical-fallback-expected.png: Ditto.
+        * platform/ios-simulator/mathml/radical-fallback-expected.txt: Ditto.
+        * platform/ios-simulator/mathml/radical-fallback-expected.png: Added.
+
</ins><span class="cx"> 2016-06-17  Romain Bellessort  &lt;romain.bellessort@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         Update test-expected file for failing fullscreen test
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/TestExpectations        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -115,9 +115,6 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/127860 [ Debug ] js/function-apply-aliased.html [ Skip ]
</span><span class="cx"> 
</span><del>-# This test verifies dynamic manipulation of the mroot and msqrt elements.
-mathml/roots-removeChild.html [ ImageOnlyFailure ]
-
</del><span class="cx"> # For now we ignore margin/padding/border properties of MathML renderers.
</span><span class="cx"> mathml/presentation/bug97990.html [ Skip ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationrootsxhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/roots.xhtml (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/roots.xhtml        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/mathml/presentation/roots.xhtml        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -171,6 +171,70 @@
</span><span class="cx">   &lt;/mroot&gt;
</span><span class="cx"> &lt;/math&gt;
</span><span class="cx"> &lt;/p&gt;
</span><ins>+&lt;p id='t10'&gt;RTL roots:
+    &lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; dir=&quot;rtl&quot;&gt;
+  &lt;mroot&gt;
+    &lt;mrow&gt;
+        &lt;mn&gt;1&lt;/mn&gt;
+        &lt;mo&gt;+&lt;/mo&gt;
+        &lt;mroot&gt;
+          &lt;mrow&gt;
+            &lt;mn&gt;2&lt;/mn&gt;
+            &lt;mo&gt;+&lt;/mo&gt;
+            &lt;mroot&gt;
+              &lt;mrow&gt;
+                &lt;mn&gt;3&lt;/mn&gt;
+                &lt;mo&gt;+&lt;/mo&gt;
+                &lt;mroot&gt;
+                  &lt;mrow&gt;
+                    &lt;mn&gt;4&lt;/mn&gt;
+                    &lt;mo&gt;+&lt;/mo&gt;
+                    &lt;mroot&gt;
+                      &lt;mrow&gt;
+                        &lt;mn&gt;5&lt;/mn&gt;
+                        &lt;mo&gt;+&lt;/mo&gt;
+                        &lt;mroot&gt;
+                          &lt;mrow&gt;
+                            &lt;mn&gt;6&lt;/mn&gt;
+                            &lt;mo&gt;+&lt;/mo&gt;
+                            &lt;mroot&gt;
+                              &lt;mrow&gt;
+                                &lt;mn&gt;7&lt;/mn&gt;
+                                &lt;mo&gt;+&lt;/mo&gt;
+                                &lt;mroot&gt;
+                                  &lt;mi&gt;A&lt;/mi&gt;
+                                  &lt;mfrac&gt;
+                                    &lt;mrow&gt;
+                                      &lt;mi&gt;x&lt;/mi&gt;
+                                      &lt;mo&gt;+&lt;/mo&gt;
+                                      &lt;mi&gt;y&lt;/mi&gt;
+                                    &lt;/mrow&gt;
+                                    &lt;mi&gt;z&lt;/mi&gt;
+                                  &lt;/mfrac&gt;
+                                &lt;/mroot&gt;
+                              &lt;/mrow&gt;
+                              &lt;mn&gt;9&lt;/mn&gt;
+                            &lt;/mroot&gt;
+                          &lt;/mrow&gt;
+                          &lt;mn&gt;8&lt;/mn&gt;
+                        &lt;/mroot&gt;
+                      &lt;/mrow&gt;
+                      &lt;mn&gt;7&lt;/mn&gt;
+                    &lt;/mroot&gt;
+                  &lt;/mrow&gt;
+                  &lt;mn&gt;6&lt;/mn&gt;
+                &lt;/mroot&gt;
+              &lt;/mrow&gt;
+              &lt;mn&gt;5&lt;/mn&gt;
+            &lt;/mroot&gt;
+          &lt;/mrow&gt;
+          &lt;mn&gt;4&lt;/mn&gt;
+        &lt;/mroot&gt;
+      &lt;/mrow&gt;
+    &lt;mn&gt;3&lt;/mn&gt;
+  &lt;/mroot&gt;
+&lt;/math&gt;
+&lt;/p&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkmathmlpresentationmostretchexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -305,83 +305,76 @@
</span><span class="cx">         text run at (524,97) width 5: &quot; &quot;
</span><span class="cx">       RenderBR {BR} at (0,0) size 0x0
</span><span class="cx">       RenderMathMLMath {math} at (0,179) size 190x76 [padding: 0 1 0 1]
</span><del>-        RenderMathMLSquareRoot {msqrt} at (1,0) size 188x76
-          RenderMathMLBlock (anonymous, flex) at (0,0) size 17x76
-            RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x76
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 13x75
-                RenderBlock (anonymous) at (0,0) size 13x75
-                  RenderText at (0,-56) size 13x106
-                    text run at (0,-56) width 13: &quot;\x{221A}&quot;
-          RenderMathMLRootWrapper at (17,2) size 171x74
-            RenderMathMLOperator {mo} at (0,0) size 14x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
-                RenderBlock (anonymous) at (0,0) size 6x16
-                  RenderText at (0,-45) size 6x106
-                    text run at (0,-45) width 6: &quot;(&quot;
-            RenderMathMLOperator {mo} at (14,0) size 14x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
-                RenderBlock (anonymous) at (0,0) size 6x16
-                  RenderText at (0,-45) size 6x106
-                    text run at (0,-45) width 6: &quot;)&quot;
-            RenderMathMLOperator {mo} at (28,0) size 14x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
-                RenderBlock (anonymous) at (0,0) size 8x16
-                  RenderText at (0,-45) size 8x106
-                    text run at (0,-45) width 8: &quot;{&quot;
-            RenderMathMLOperator {mo} at (42,0) size 14x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
-                RenderBlock (anonymous) at (0,0) size 8x16
-                  RenderText at (0,-45) size 8x106
-                    text run at (0,-45) width 8: &quot;}&quot;
-            RenderMathMLOperator {mo} at (56,0) size 11x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
-                RenderBlock (anonymous) at (0,0) size 4x16
-                  RenderText at (0,-45) size 4x106
-                    text run at (0,-45) width 4: &quot;[&quot;
-            RenderMathMLOperator {mo} at (67,0) size 11x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
-                RenderBlock (anonymous) at (0,0) size 4x16
-                  RenderText at (0,-45) size 4x106
-                    text run at (0,-45) width 4: &quot;]&quot;
-            RenderMathMLOperator {mo} at (78,0) size 11x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
-                RenderBlock (anonymous) at (0,0) size 7x16
-                  RenderText at (0,-45) size 7x106
-                    text run at (0,-45) width 7: &quot;\x{2308}&quot;
-            RenderMathMLOperator {mo} at (89,0) size 11x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
-                RenderBlock (anonymous) at (0,0) size 7x16
-                  RenderText at (0,-45) size 7x106
-                    text run at (0,-45) width 7: &quot;\x{2309}&quot;
-            RenderMathMLOperator {mo} at (100,0) size 11x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
-                RenderBlock (anonymous) at (0,0) size 7x16
-                  RenderText at (0,-45) size 7x106
-                    text run at (0,-45) width 7: &quot;\x{230A}&quot;
-            RenderMathMLOperator {mo} at (111,0) size 11x73
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
-                RenderBlock (anonymous) at (0,0) size 7x16
-                  RenderText at (0,-45) size 7x106
-                    text run at (0,-45) width 7: &quot;\x{230B}&quot;
-            RenderMathMLOperator {mo} at (122,18) size 17x36
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 16x18
-                RenderBlock (anonymous) at (0,0) size 11x18
-                  RenderText at (0,-44) size 11x106
-                    text run at (0,-44) width 11: &quot;\x{222B}&quot;
-            RenderMathMLOperator {mo} at (138,0) size 9x73
-              RenderMathMLBlock (anonymous, flex) at (1,0) size 5x16
-                RenderBlock (anonymous) at (0,0) size 4x16
-                  RenderText at (0,-45) size 4x106
-                    text run at (0,-45) width 4: &quot;|&quot;
-            RenderMathMLOperator {mo} at (146,15) size 8x42
-              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x16
-                RenderBlock (anonymous) at (0,0) size 6x16
-                  RenderText at (0,-45) size 6x106
-                    text run at (0,-45) width 6: &quot;\x{2016}&quot;
-            RenderMathMLOperator {mo} at (153,15) size 18x42
-              RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
-                RenderBlock (anonymous) at (0,0) size 8x16
-                  RenderText at (0,-45) size 8x106
-                    text run at (0,-45) width 8: &quot;\x{2225}&quot;
-            RenderMathMLSpace {mspace} at (170,0) size 0x41
</del><ins>+        RenderMathMLRoot {msqrt} at (1,0) size 188x76
+          RenderMathMLOperator {mo} at (17,2) size 14x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
+              RenderBlock (anonymous) at (0,0) size 6x16
+                RenderText at (0,-45) size 6x106
+                  text run at (0,-45) width 6: &quot;(&quot;
+          RenderMathMLOperator {mo} at (31,2) size 14x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
+              RenderBlock (anonymous) at (0,0) size 6x16
+                RenderText at (0,-45) size 6x106
+                  text run at (0,-45) width 6: &quot;)&quot;
+          RenderMathMLOperator {mo} at (45,2) size 14x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
+              RenderBlock (anonymous) at (0,0) size 8x16
+                RenderText at (0,-45) size 8x106
+                  text run at (0,-45) width 8: &quot;{&quot;
+          RenderMathMLOperator {mo} at (59,2) size 14x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 14x16
+              RenderBlock (anonymous) at (0,0) size 8x16
+                RenderText at (0,-45) size 8x106
+                  text run at (0,-45) width 8: &quot;}&quot;
+          RenderMathMLOperator {mo} at (73,2) size 11x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
+              RenderBlock (anonymous) at (0,0) size 4x16
+                RenderText at (0,-45) size 4x106
+                  text run at (0,-45) width 4: &quot;[&quot;
+          RenderMathMLOperator {mo} at (84,2) size 11x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
+              RenderBlock (anonymous) at (0,0) size 4x16
+                RenderText at (0,-45) size 4x106
+                  text run at (0,-45) width 4: &quot;]&quot;
+          RenderMathMLOperator {mo} at (95,2) size 11x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
+              RenderBlock (anonymous) at (0,0) size 7x16
+                RenderText at (0,-45) size 7x106
+                  text run at (0,-45) width 7: &quot;\x{2308}&quot;
+          RenderMathMLOperator {mo} at (106,2) size 11x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
+              RenderBlock (anonymous) at (0,0) size 7x16
+                RenderText at (0,-45) size 7x106
+                  text run at (0,-45) width 7: &quot;\x{2309}&quot;
+          RenderMathMLOperator {mo} at (117,2) size 11x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
+              RenderBlock (anonymous) at (0,0) size 7x16
+                RenderText at (0,-45) size 7x106
+                  text run at (0,-45) width 7: &quot;\x{230A}&quot;
+          RenderMathMLOperator {mo} at (128,2) size 11x74
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x16
+              RenderBlock (anonymous) at (0,0) size 7x16
+                RenderText at (0,-45) size 7x106
+                  text run at (0,-45) width 7: &quot;\x{230B}&quot;
+          RenderMathMLOperator {mo} at (139,20) size 17x37
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 16x18
+              RenderBlock (anonymous) at (0,0) size 11x18
+                RenderText at (0,-44) size 11x106
+                  text run at (0,-44) width 11: &quot;\x{222B}&quot;
+          RenderMathMLOperator {mo} at (155,2) size 9x74
+            RenderMathMLBlock (anonymous, flex) at (1,0) size 5x16
+              RenderBlock (anonymous) at (0,0) size 4x16
+                RenderText at (0,-45) size 4x106
+                  text run at (0,-45) width 4: &quot;|&quot;
+          RenderMathMLOperator {mo} at (163,17) size 8x43
+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x16
+              RenderBlock (anonymous) at (0,0) size 6x16
+                RenderText at (0,-45) size 6x106
+                  text run at (0,-45) width 6: &quot;\x{2016}&quot;
+          RenderMathMLOperator {mo} at (170,17) size 18x43
+            RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
+              RenderBlock (anonymous) at (0,0) size 8x16
+                RenderText at (0,-45) size 8x106
+                  text run at (0,-45) width 8: &quot;\x{2225}&quot;
+          RenderMathMLSpace {mspace} at (187,2) size 0x42
</ins><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkmathmlpresentationrootsexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkmathmlpresentationrootsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,37 +1,71 @@
</span><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx">   RenderView at (0,0) size 800x600
</span><del>-layer at (0,0) size 800x491
-  RenderBlock {html} at (0,0) size 800x491
-    RenderBody {body} at (8,16) size 784x459
</del><ins>+layer at (0,0) size 800x563
+  RenderBlock {html} at (0,0) size 800x563
+    RenderBody {body} at (8,16) size 784x531
</ins><span class="cx">       RenderBlock {p} at (0,0) size 784x18
</span><span class="cx">         RenderText {#text} at (0,0) size 177x17
</span><span class="cx">           text run at (0,0) width 177: &quot;square root (should be red): &quot;
</span><span class="cx">         RenderMathMLMath {math} at (177,1) size 27x18 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,0) size 25x18 [color=#FF0000]
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x18
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                  RenderBlock (anonymous) at (0,0) size 13x17
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 8x16
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-46) size 8x106
-                      text run at (0,-46) width 8: &quot;2&quot;
</del><ins>+          RenderMathMLRoot {msqrt} at (1,0) size 21x18 [color=#FF0000]
+            RenderMathMLToken {mn} at (13,2) size 8x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-46) size 8x106
+                    text run at (0,-46) width 8: &quot;2&quot;
</ins><span class="cx">       RenderBlock {p} at (0,34) size 784x18
</span><span class="cx">         RenderText {#text} at (0,0) size 110x17
</span><span class="cx">           text run at (0,0) width 110: &quot;long square root: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (110,1) size 56x18 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,0) size 54x18
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x18
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                  RenderBlock (anonymous) at (0,0) size 13x17
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 37x16
</del><ins>+          RenderMathMLRoot {msqrt} at (1,0) size 50x18
+            RenderMathMLRow {mrow} at (13,2) size 37x14
+              RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
+                  RenderBlock (anonymous) at (0,0) size 8x8
+                    RenderText {#text} at (0,-50) size 8x106
+                      text run at (0,-50) width 8: &quot;x&quot;
+              RenderMathMLOperator {mo} at (9,1) size 20x12
+                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                  RenderBlock (anonymous) at (0,0) size 12x12
+                    RenderText at (0,-47) size 12x106
+                      text run at (0,-47) width 12: &quot;+&quot;
+              RenderMathMLToken {mn} at (28,0) size 9x12
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                  RenderBlock (anonymous) at (0,0) size 8x12
+                    RenderText {#text} at (0,-46) size 8x106
+                      text run at (0,-46) width 8: &quot;1&quot;
+      RenderBlock {p} at (0,68) size 784x19
+        RenderText {#text} at (0,2) size 222x17
+          text run at (0,2) width 222: &quot;long square root with implied row: &quot;
+        RenderMathMLMath {math} at (222,0) size 63x19 [padding: 0 1 0 1]
+          RenderMathMLRoot {msqrt} at (1,0) size 57x19
+            RenderMathMLScripts {msup} at (13,2) size 17x15
+              RenderMathMLToken {mi} at (0,6) size 10x9 [padding: 0 2 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
+                  RenderBlock (anonymous) at (0,0) size 8x8
+                    RenderText {#text} at (0,-50) size 8x106
+                      text run at (0,-50) width 8: &quot;x&quot;
+              RenderMathMLToken {mn} at (9,0) size 7x9
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 6x9
+                  RenderBlock (anonymous) at (0,0) size 6x9
+                    RenderText {#text} at (0,-35) size 6x80
+                      text run at (0,-35) width 6: &quot;2&quot;
+            RenderMathMLOperator {mo} at (29,6) size 20x13
+              RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                RenderBlock (anonymous) at (0,0) size 12x12
+                  RenderText at (0,-47) size 12x106
+                    text run at (0,-47) width 12: &quot;+&quot;
+            RenderMathMLToken {mn} at (48,5) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-46) size 8x106
+                    text run at (0,-46) width 8: &quot;1&quot;
+      RenderBlock {p} at (0,103) size 784x40
+        RenderText {#text} at (0,8) size 113x17
+          text run at (0,8) width 113: &quot;root of a fraction: &quot;
+        RenderMathMLMath {math} at (113,0) size 56x41 [padding: 0 1 0 1]
+          RenderMathMLRoot {msqrt} at (1,0) size 53x41
+            RenderMathMLFraction {mfrac} at (16,2) size 37x34
</ins><span class="cx">               RenderMathMLRow {mrow} at (0,0) size 37x13
</span><span class="cx">                 RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
</span><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
</span><span class="lines">@@ -48,621 +82,559 @@
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                       RenderText {#text} at (0,-46) size 8x106
</span><span class="cx">                         text run at (0,-46) width 8: &quot;1&quot;
</span><del>-      RenderBlock {p} at (0,68) size 784x19
-        RenderText {#text} at (0,2) size 222x17
-          text run at (0,2) width 222: &quot;long square root with implied row: &quot;
-        RenderMathMLMath {math} at (222,0) size 63x19 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 61x19
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x19
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x19
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x18
-                  RenderBlock (anonymous) at (0,0) size 13x18
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 44x17
-              RenderMathMLScripts {msup} at (0,0) size 17x15
-                RenderMathMLToken {mi} at (0,6) size 10x9 [padding: 0 2 0 0]
</del><ins>+              RenderMathMLRow {mrow} at (0,20) size 37x14
+                RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
</ins><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 8x8
</span><span class="cx">                       RenderText {#text} at (0,-50) size 8x106
</span><span class="cx">                         text run at (0,-50) width 8: &quot;x&quot;
</span><del>-                RenderMathMLToken {mn} at (9,0) size 7x9
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 6x9
-                    RenderBlock (anonymous) at (0,0) size 6x9
-                      RenderText {#text} at (0,-35) size 6x80
-                        text run at (0,-35) width 6: &quot;2&quot;
-              RenderMathMLOperator {mo} at (16,4) size 20x12
-                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                  RenderBlock (anonymous) at (0,0) size 12x12
-                    RenderText at (0,-47) size 12x106
-                      text run at (0,-47) width 12: &quot;+&quot;
-              RenderMathMLToken {mn} at (35,3) size 9x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-46) size 8x106
-                      text run at (0,-46) width 8: &quot;1&quot;
-      RenderBlock {p} at (0,103) size 784x40
-        RenderText {#text} at (0,8) size 113x17
-          text run at (0,8) width 113: &quot;root of a fraction: &quot;
-        RenderMathMLMath {math} at (113,0) size 56x41 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 54x41
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x41
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x41
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x40
-                  RenderBlock (anonymous) at (0,0) size 13x40
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 37x39
-              RenderMathMLFraction {mfrac} at (0,0) size 37x34
-                RenderMathMLRow {mrow} at (0,0) size 37x13
-                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
-                      RenderBlock (anonymous) at (0,0) size 8x8
-                        RenderText {#text} at (0,-50) size 8x106
-                          text run at (0,-50) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (9,1) size 20x12
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                      RenderBlock (anonymous) at (0,0) size 12x12
-                        RenderText at (0,-47) size 12x106
-                          text run at (0,-47) width 12: &quot;+&quot;
-                  RenderMathMLToken {mn} at (28,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-46) size 8x106
-                          text run at (0,-46) width 8: &quot;1&quot;
-                RenderMathMLRow {mrow} at (0,20) size 37x14
-                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
-                      RenderBlock (anonymous) at (0,0) size 8x8
-                        RenderText {#text} at (0,-50) size 8x106
-                          text run at (0,-50) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (9,1) size 20x12
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                      RenderBlock (anonymous) at (0,0) size 12x12
-                        RenderText at (0,-47) size 12x106
-                          text run at (0,-47) width 12: &quot;+&quot;
-                  RenderMathMLToken {mn} at (28,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-46) size 8x106
-                          text run at (0,-46) width 8: &quot;2&quot;
</del><ins>+                RenderMathMLOperator {mo} at (9,1) size 20x12
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                    RenderBlock (anonymous) at (0,0) size 12x12
+                      RenderText at (0,-47) size 12x106
+                        text run at (0,-47) width 12: &quot;+&quot;
+                RenderMathMLToken {mn} at (28,0) size 9x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-46) size 8x106
+                        text run at (0,-46) width 8: &quot;2&quot;
</ins><span class="cx">       RenderBlock {p} at (0,159) size 784x18
</span><span class="cx">         RenderText {#text} at (0,0) size 173x17
</span><span class="cx">           text run at (0,0) width 173: &quot;cube root (should be blue): &quot;
</span><span class="cx">         RenderMathMLMath {math} at (173,1) size 28x18 [color=#0000FF] [padding: 0 1 0 1]
</span><del>-          RenderMathMLRoot {mroot} at (1,0) size 26x18
-            RenderMathMLRootWrapper at (4,0) size 6x18
-              RenderMathMLToken {mn} at (0,0) size 5x7
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
-                  RenderBlock (anonymous) at (0,0) size 5x7
-                    RenderText {#text} at (0,-27) size 5x61
-                      text run at (0,-27) width 5: &quot;3&quot;
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 18x18
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                  RenderBlock (anonymous) at (0,0) size 13x17
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 9x16
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-46) size 8x106
-                      text run at (0,-46) width 8: &quot;2&quot;
</del><ins>+          RenderMathMLRoot {mroot} at (1,0) size 22x18
+            RenderMathMLToken {mn} at (13,2) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-46) size 8x106
+                    text run at (0,-46) width 8: &quot;2&quot;
+            RenderMathMLToken {mn} at (4,0) size 6x8
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                RenderBlock (anonymous) at (0,0) size 5x7
+                  RenderText {#text} at (0,-27) size 5x61
+                    text run at (0,-27) width 5: &quot;3&quot;
</ins><span class="cx">       RenderBlock {p} at (0,193) size 784x18
</span><span class="cx">         RenderText {#text} at (0,0) size 75x17
</span><span class="cx">           text run at (0,0) width 75: &quot;long index: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (75,0) size 62x19 [padding: 0 1 0 1]
</span><del>-          RenderMathMLRoot {mroot} at (1,0) size 60x19
-            RenderMathMLRootWrapper at (4,0) size 40x19
-              RenderMathMLRow {mrow} at (0,0) size 39x8
-                RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
-                    RenderBlock (anonymous) at (0,0) size 5x5
-                      RenderText {#text} at (0,-29) size 5x61
-                        text run at (0,-29) width 5: &quot;x&quot;
-                RenderMathMLOperator {mo} at (5,0) size 12x7
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
-                    RenderBlock (anonymous) at (0,0) size 7x7
-                      RenderText at (0,-27) size 7x61
-                        text run at (0,-27) width 7: &quot;+&quot;
-                RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
-                    RenderBlock (anonymous) at (0,0) size 5x6
-                      RenderText {#text} at (0,-29) size 5x61
-                        text run at (0,-29) width 5: &quot;y&quot;
-                RenderMathMLOperator {mo} at (22,0) size 12x7
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
-                    RenderBlock (anonymous) at (0,0) size 7x7
-                      RenderText at (0,-27) size 7x61
-                        text run at (0,-27) width 7: &quot;+&quot;
-                RenderMathMLToken {mi} at (33,2) size 6x5 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-29) size 4x61
-                        text run at (0,-29) width 4: &quot;z&quot;
-            RenderMathMLBlock (anonymous, flex) at (34,0) size 18x19
-              RenderMathMLRadicalOperator (anonymous) at (0,1) size 17x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                  RenderBlock (anonymous) at (0,0) size 13x17
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (51,3) size 9x16
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-46) size 8x106
-                      text run at (0,-46) width 8: &quot;2&quot;
</del><ins>+          RenderMathMLRoot {mroot} at (1,0) size 56x19
+            RenderMathMLToken {mn} at (47,2) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-46) size 8x106
+                    text run at (0,-46) width 8: &quot;2&quot;
+            RenderMathMLRow {mrow} at (4,0) size 40x8
+              RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
+                  RenderBlock (anonymous) at (0,0) size 5x5
+                    RenderText {#text} at (0,-29) size 5x61
+                      text run at (0,-29) width 5: &quot;x&quot;
+              RenderMathMLOperator {mo} at (5,0) size 12x7
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                  RenderBlock (anonymous) at (0,0) size 7x7
+                    RenderText at (0,-27) size 7x61
+                      text run at (0,-27) width 7: &quot;+&quot;
+              RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
+                  RenderBlock (anonymous) at (0,0) size 5x6
+                    RenderText {#text} at (0,-29) size 5x61
+                      text run at (0,-29) width 5: &quot;y&quot;
+              RenderMathMLOperator {mo} at (22,0) size 12x7
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                  RenderBlock (anonymous) at (0,0) size 7x7
+                    RenderText at (0,-27) size 7x61
+                      text run at (0,-27) width 7: &quot;+&quot;
+              RenderMathMLToken {mi} at (33,2) size 6x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-29) size 4x61
+                      text run at (0,-29) width 4: &quot;z&quot;
</ins><span class="cx">       RenderBlock {p} at (0,227) size 784x40
</span><span class="cx">         RenderText {#text} at (0,8) size 185x17
</span><span class="cx">           text run at (0,8) width 185: &quot;long index w/ complex base: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (185,0) size 90x41 [padding: 0 1 0 1]
</span><del>-          RenderMathMLRoot {mroot} at (1,0) size 88x41
-            RenderMathMLRootWrapper at (4,6) size 40x35
-              RenderMathMLRow {mrow} at (0,0) size 39x8
-                RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
</del><ins>+          RenderMathMLRoot {mroot} at (1,0) size 87x41
+            RenderMathMLFraction {mfrac} at (50,2) size 37x34
+              RenderMathMLRow {mrow} at (0,0) size 37x13
+                RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
+                    RenderBlock (anonymous) at (0,0) size 8x8
+                      RenderText {#text} at (0,-50) size 8x106
+                        text run at (0,-50) width 8: &quot;x&quot;
+                RenderMathMLOperator {mo} at (9,1) size 20x12
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                    RenderBlock (anonymous) at (0,0) size 12x12
+                      RenderText at (0,-47) size 12x106
+                        text run at (0,-47) width 12: &quot;+&quot;
+                RenderMathMLToken {mn} at (28,0) size 9x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-46) size 8x106
+                        text run at (0,-46) width 8: &quot;1&quot;
+              RenderMathMLRow {mrow} at (0,20) size 37x14
+                RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
+                    RenderBlock (anonymous) at (0,0) size 8x8
+                      RenderText {#text} at (0,-50) size 8x106
+                        text run at (0,-50) width 8: &quot;x&quot;
+                RenderMathMLOperator {mo} at (9,1) size 20x12
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                    RenderBlock (anonymous) at (0,0) size 12x12
+                      RenderText at (0,-47) size 12x106
+                        text run at (0,-47) width 12: &quot;+&quot;
+                RenderMathMLToken {mn} at (28,0) size 9x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-46) size 8x106
+                        text run at (0,-46) width 8: &quot;2&quot;
+            RenderMathMLRow {mrow} at (4,8) size 40x9
+              RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
+                  RenderBlock (anonymous) at (0,0) size 5x5
+                    RenderText {#text} at (0,-29) size 5x61
+                      text run at (0,-29) width 5: &quot;x&quot;
+              RenderMathMLOperator {mo} at (5,0) size 12x7
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                  RenderBlock (anonymous) at (0,0) size 7x7
+                    RenderText at (0,-27) size 7x61
+                      text run at (0,-27) width 7: &quot;+&quot;
+              RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
+                  RenderBlock (anonymous) at (0,0) size 5x6
+                    RenderText {#text} at (0,-29) size 5x61
+                      text run at (0,-29) width 5: &quot;y&quot;
+              RenderMathMLOperator {mo} at (22,0) size 12x7
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                  RenderBlock (anonymous) at (0,0) size 7x7
+                    RenderText at (0,-27) size 7x61
+                      text run at (0,-27) width 7: &quot;+&quot;
+              RenderMathMLToken {mi} at (33,2) size 6x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-29) size 4x61
+                      text run at (0,-29) width 4: &quot;z&quot;
+      RenderBlock {p} at (0,283) size 784x34
+        RenderText {#text} at (0,16) size 75x17
+          text run at (0,16) width 75: &quot;high index: &quot;
+        RenderMathMLMath {math} at (75,0) size 29x35 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 23x35
+            RenderMathMLToken {mn} at (14,18) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-46) size 8x106
+                    text run at (0,-46) width 8: &quot;2&quot;
+            RenderMathMLFraction {mfrac} at (4,0) size 7x24
+              RenderMathMLFraction {mfrac} at (0,0) size 6x15
+                RenderMathMLToken {mi} at (0,0) size 6x5 [padding: 0 1 0 0]
</ins><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 5x5
</span><span class="cx">                       RenderText {#text} at (0,-29) size 5x61
</span><span class="cx">                         text run at (0,-29) width 5: &quot;x&quot;
</span><del>-                RenderMathMLOperator {mo} at (5,0) size 12x7
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
-                    RenderBlock (anonymous) at (0,0) size 7x7
-                      RenderText at (0,-27) size 7x61
-                        text run at (0,-27) width 7: &quot;+&quot;
-                RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
</del><ins>+                RenderMathMLToken {mi} at (0,8) size 6x7 [padding: 0 1 0 0]
</ins><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 5x6
</span><span class="cx">                       RenderText {#text} at (0,-29) size 5x61
</span><span class="cx">                         text run at (0,-29) width 5: &quot;y&quot;
</span><del>-                RenderMathMLOperator {mo} at (22,0) size 12x7
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
-                    RenderBlock (anonymous) at (0,0) size 7x7
-                      RenderText at (0,-27) size 7x61
-                        text run at (0,-27) width 7: &quot;+&quot;
-                RenderMathMLToken {mi} at (33,2) size 6x5 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-29) size 4x61
-                        text run at (0,-29) width 4: &quot;z&quot;
-            RenderMathMLBlock (anonymous, flex) at (34,0) size 18x41
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x41
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x40
-                  RenderBlock (anonymous) at (0,0) size 13x40
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (51,2) size 37x39
-              RenderMathMLFraction {mfrac} at (0,0) size 37x34
-                RenderMathMLRow {mrow} at (0,0) size 37x13
-                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
-                      RenderBlock (anonymous) at (0,0) size 8x8
-                        RenderText {#text} at (0,-50) size 8x106
-                          text run at (0,-50) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (9,1) size 20x12
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                      RenderBlock (anonymous) at (0,0) size 12x12
-                        RenderText at (0,-47) size 12x106
-                          text run at (0,-47) width 12: &quot;+&quot;
-                  RenderMathMLToken {mn} at (28,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-46) size 8x106
-                          text run at (0,-46) width 8: &quot;1&quot;
-                RenderMathMLRow {mrow} at (0,20) size 37x14
-                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
-                      RenderBlock (anonymous) at (0,0) size 8x8
-                        RenderText {#text} at (0,-50) size 8x106
-                          text run at (0,-50) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (9,1) size 20x12
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                      RenderBlock (anonymous) at (0,0) size 12x12
-                        RenderText at (0,-47) size 12x106
-                          text run at (0,-47) width 12: &quot;+&quot;
-                  RenderMathMLToken {mn} at (28,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-46) size 8x106
-                          text run at (0,-46) width 8: &quot;2&quot;
-      RenderBlock {p} at (0,283) size 784x34
-        RenderText {#text} at (0,16) size 75x17
-          text run at (0,16) width 75: &quot;high index: &quot;
-        RenderMathMLMath {math} at (75,0) size 29x35 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 27x35
-            RenderMathMLRootWrapper at (4,0) size 7x35
-              RenderMathMLFraction {mfrac} at (0,0) size 6x24
-                RenderMathMLFraction {mfrac} at (0,0) size 6x15
-                  RenderMathMLToken {mi} at (0,0) size 6x5 [padding: 0 1 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
-                      RenderBlock (anonymous) at (0,0) size 5x5
-                        RenderText {#text} at (0,-29) size 5x61
-                          text run at (0,-29) width 5: &quot;x&quot;
-                  RenderMathMLToken {mi} at (0,8) size 6x7 [padding: 0 1 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
-                      RenderBlock (anonymous) at (0,0) size 5x6
-                        RenderText {#text} at (0,-29) size 5x61
-                          text run at (0,-29) width 5: &quot;y&quot;
-                RenderMathMLToken {mi} at (0,18) size 6x6 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-29) size 4x61
-                        text run at (0,-29) width 4: &quot;z&quot;
-            RenderMathMLBlock (anonymous, flex) at (1,0) size 18x35
-              RenderMathMLRadicalOperator (anonymous) at (0,17) size 17x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                  RenderBlock (anonymous) at (0,0) size 13x17
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (18,18) size 9x17
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-46) size 8x106
-                      text run at (0,-46) width 8: &quot;2&quot;
</del><ins>+              RenderMathMLToken {mi} at (0,18) size 6x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-29) size 4x61
+                      text run at (0,-29) width 4: &quot;z&quot;
</ins><span class="cx">       RenderBlock {p} at (0,333) size 784x54
</span><span class="cx">         RenderText {#text} at (0,14) size 155x17
</span><span class="cx">           text run at (0,14) width 155: &quot;Imbricated square roots: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (155,0) size 342x55 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,0) size 340x55
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x55
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x55
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x55
-                  RenderBlock (anonymous) at (0,0) size 13x55
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 323x53
-              RenderMathMLToken {mn} at (0,15) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-46) size 8x106
-                      text run at (0,-46) width 8: &quot;1&quot;
-              RenderMathMLOperator {mo} at (8,16) size 20x12
-                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                  RenderBlock (anonymous) at (0,0) size 12x12
-                    RenderText at (0,-47) size 12x106
-                      text run at (0,-47) width 12: &quot;+&quot;
-              RenderMathMLSquareRoot {msqrt} at (27,0) size 296x53
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 17x53
-                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x53
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 13x53
-                      RenderBlock (anonymous) at (0,0) size 13x53
-                        RenderText at (0,-56) size 13x106
-                          text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                RenderMathMLRootWrapper at (17,2) size 279x51
-                  RenderMathMLRow {mrow} at (0,0) size 279x51
-                    RenderMathMLToken {mn} at (0,13) size 8x12
</del><ins>+          RenderMathMLRoot {msqrt} at (1,0) size 332x55
+            RenderMathMLToken {mn} at (17,17) size 8x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-46) size 8x106
+                    text run at (0,-46) width 8: &quot;1&quot;
+            RenderMathMLOperator {mo} at (25,18) size 20x13
+              RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                RenderBlock (anonymous) at (0,0) size 12x12
+                  RenderText at (0,-47) size 12x106
+                    text run at (0,-47) width 12: &quot;+&quot;
+            RenderMathMLRoot {msqrt} at (44,2) size 288x53
+              RenderMathMLRow {mrow} at (17,2) size 271x51
+                RenderMathMLToken {mn} at (0,13) size 8x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-46) size 8x106
+                        text run at (0,-46) width 8: &quot;2&quot;
+                RenderMathMLOperator {mo} at (8,14) size 20x12
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                    RenderBlock (anonymous) at (0,0) size 12x12
+                      RenderText at (0,-47) size 12x106
+                        text run at (0,-47) width 12: &quot;+&quot;
+                RenderMathMLRoot {msqrt} at (27,0) size 244x51
+                  RenderMathMLRow {mrow} at (17,2) size 227x49
+                    RenderMathMLToken {mn} at (0,11) size 8x12
</ins><span class="cx">                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                         RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                           RenderText {#text} at (0,-46) size 8x106
</span><del>-                            text run at (0,-46) width 8: &quot;2&quot;
-                    RenderMathMLOperator {mo} at (8,14) size 20x12
</del><ins>+                            text run at (0,-46) width 8: &quot;3&quot;
+                    RenderMathMLOperator {mo} at (8,12) size 20x12
</ins><span class="cx">                       RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
</span><span class="cx">                         RenderBlock (anonymous) at (0,0) size 12x12
</span><span class="cx">                           RenderText at (0,-47) size 12x106
</span><span class="cx">                             text run at (0,-47) width 12: &quot;+&quot;
</span><del>-                    RenderMathMLSquareRoot {msqrt} at (27,0) size 252x51
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 17x51
-                        RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x51
-                          RenderMathMLBlock (anonymous, flex) at (0,0) size 13x51
-                            RenderBlock (anonymous) at (0,0) size 13x51
-                              RenderText at (0,-56) size 13x106
-                                text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                      RenderMathMLRootWrapper at (17,2) size 235x49
-                        RenderMathMLRow {mrow} at (0,0) size 235x49
-                          RenderMathMLToken {mn} at (0,11) size 8x12
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                              RenderBlock (anonymous) at (0,0) size 8x12
-                                RenderText {#text} at (0,-46) size 8x106
-                                  text run at (0,-46) width 8: &quot;3&quot;
-                          RenderMathMLOperator {mo} at (8,12) size 20x12
-                            RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                              RenderBlock (anonymous) at (0,0) size 12x12
-                                RenderText at (0,-47) size 12x106
-                                  text run at (0,-47) width 12: &quot;+&quot;
-                          RenderMathMLSquareRoot {msqrt} at (27,0) size 208x49
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x49
-                              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x49
-                                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x48
-                                  RenderBlock (anonymous) at (0,0) size 13x48
-                                    RenderText at (0,-56) size 13x106
-                                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                            RenderMathMLRootWrapper at (17,2) size 190x47
-                              RenderMathMLRow {mrow} at (0,0) size 190x41
-                                RenderMathMLToken {mn} at (0,9) size 8x12
</del><ins>+                    RenderMathMLRoot {msqrt} at (27,0) size 200x49
+                      RenderMathMLRow {mrow} at (16,2) size 183x41
+                        RenderMathMLToken {mn} at (0,9) size 8x12
+                          RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                            RenderBlock (anonymous) at (0,0) size 8x12
+                              RenderText {#text} at (0,-46) size 8x106
+                                text run at (0,-46) width 8: &quot;4&quot;
+                        RenderMathMLOperator {mo} at (8,10) size 20x12
+                          RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                            RenderBlock (anonymous) at (0,0) size 12x12
+                              RenderText at (0,-47) size 12x106
+                                text run at (0,-47) width 12: &quot;+&quot;
+                        RenderMathMLRoot {msqrt} at (27,0) size 156x41
+                          RenderMathMLRow {mrow} at (16,2) size 140x31
+                            RenderMathMLToken {mn} at (0,7) size 8x12
+                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                RenderBlock (anonymous) at (0,0) size 8x12
+                                  RenderText {#text} at (0,-46) size 8x106
+                                    text run at (0,-46) width 8: &quot;5&quot;
+                            RenderMathMLOperator {mo} at (8,8) size 20x12
+                              RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                RenderBlock (anonymous) at (0,0) size 12x12
+                                  RenderText at (0,-47) size 12x106
+                                    text run at (0,-47) width 12: &quot;+&quot;
+                            RenderMathMLRoot {msqrt} at (27,0) size 113x31
+                              RenderMathMLRow {mrow} at (16,2) size 97x21
+                                RenderMathMLToken {mn} at (0,5) size 8x12
</ins><span class="cx">                                   RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                                     RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                                       RenderText {#text} at (0,-46) size 8x106
</span><del>-                                        text run at (0,-46) width 8: &quot;4&quot;
-                                RenderMathMLOperator {mo} at (8,10) size 20x12
</del><ins>+                                        text run at (0,-46) width 8: &quot;6&quot;
+                                RenderMathMLOperator {mo} at (8,6) size 20x12
</ins><span class="cx">                                   RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
</span><span class="cx">                                     RenderBlock (anonymous) at (0,0) size 12x12
</span><span class="cx">                                       RenderText at (0,-47) size 12x106
</span><span class="cx">                                         text run at (0,-47) width 12: &quot;+&quot;
</span><del>-                                RenderMathMLSquareRoot {msqrt} at (27,0) size 163x41
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 17x41
-                                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x41
-                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 13x40
-                                        RenderBlock (anonymous) at (0,0) size 13x40
-                                          RenderText at (0,-56) size 13x106
-                                            text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                  RenderMathMLRootWrapper at (17,2) size 146x39
-                                    RenderMathMLRow {mrow} at (0,0) size 146x31
-                                      RenderMathMLToken {mn} at (0,7) size 8x12
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                          RenderBlock (anonymous) at (0,0) size 8x12
-                                            RenderText {#text} at (0,-46) size 8x106
-                                              text run at (0,-46) width 8: &quot;5&quot;
-                                      RenderMathMLOperator {mo} at (8,8) size 20x12
-                                        RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                          RenderBlock (anonymous) at (0,0) size 12x12
-                                            RenderText at (0,-47) size 12x106
-                                              text run at (0,-47) width 12: &quot;+&quot;
-                                      RenderMathMLSquareRoot {msqrt} at (27,0) size 119x31
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 17x31
-                                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x31
-                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 13x30
-                                              RenderBlock (anonymous) at (0,0) size 13x30
-                                                RenderText at (0,-56) size 13x106
-                                                  text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                        RenderMathMLRootWrapper at (17,2) size 102x29
-                                          RenderMathMLRow {mrow} at (0,0) size 102x21
-                                            RenderMathMLToken {mn} at (0,5) size 8x12
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                RenderBlock (anonymous) at (0,0) size 8x12
-                                                  RenderText {#text} at (0,-46) size 8x106
-                                                    text run at (0,-46) width 8: &quot;6&quot;
-                                            RenderMathMLOperator {mo} at (8,6) size 20x12
-                                              RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                                RenderBlock (anonymous) at (0,0) size 12x12
-                                                  RenderText at (0,-47) size 12x106
-                                                    text run at (0,-47) width 12: &quot;+&quot;
-                                            RenderMathMLSquareRoot {msqrt} at (27,0) size 75x21
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 17x21
-                                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x21
-                                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 13x20
-                                                    RenderBlock (anonymous) at (0,0) size 13x20
-                                                      RenderText at (0,-56) size 13x106
-                                                        text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                              RenderMathMLRootWrapper at (17,2) size 58x19
-                                                RenderMathMLRow {mrow} at (0,0) size 58x18
-                                                  RenderMathMLToken {mn} at (0,3) size 8x12
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                      RenderBlock (anonymous) at (0,0) size 8x12
-                                                        RenderText {#text} at (0,-46) size 8x106
-                                                          text run at (0,-46) width 8: &quot;7&quot;
-                                                  RenderMathMLOperator {mo} at (8,4) size 20x12
-                                                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                                      RenderBlock (anonymous) at (0,0) size 12x12
-                                                        RenderText at (0,-47) size 12x106
-                                                          text run at (0,-47) width 12: &quot;+&quot;
-                                                  RenderMathMLSquareRoot {msqrt} at (27,0) size 31x18
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 17x18
-                                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x18
-                                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                                                          RenderBlock (anonymous) at (0,0) size 13x17
-                                                            RenderText at (0,-56) size 13x106
-                                                              text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                                    RenderMathMLRootWrapper at (17,2) size 14x16
-                                                      RenderMathMLToken {mi} at (0,0) size 14x13 [padding: 0 2 0 0]
-                                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 12x13
-                                                          RenderBlock (anonymous) at (0,0) size 12x13
-                                                            RenderText {#text} at (0,-45) size 12x106
-                                                              text run at (0,-45) width 12: &quot;A&quot;
</del><ins>+                                RenderMathMLRoot {msqrt} at (27,0) size 70x21
+                                  RenderMathMLRow {mrow} at (16,2) size 54x18
+                                    RenderMathMLToken {mn} at (0,3) size 8x12
+                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                        RenderBlock (anonymous) at (0,0) size 8x12
+                                          RenderText {#text} at (0,-46) size 8x106
+                                            text run at (0,-46) width 8: &quot;7&quot;
+                                    RenderMathMLOperator {mo} at (8,4) size 20x12
+                                      RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                        RenderBlock (anonymous) at (0,0) size 12x12
+                                          RenderText at (0,-47) size 12x106
+                                            text run at (0,-47) width 12: &quot;+&quot;
+                                    RenderMathMLRoot {msqrt} at (27,0) size 27x18
+                                      RenderMathMLToken {mi} at (13,2) size 14x14 [padding: 0 2 0 0]
+                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 12x13
+                                          RenderBlock (anonymous) at (0,0) size 12x13
+                                            RenderText {#text} at (0,-45) size 12x106
+                                              text run at (0,-45) width 12: &quot;A&quot;
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {p} at (0,403) size 784x56
</span><span class="cx">         RenderText {#text} at (0,24) size 110x17
</span><span class="cx">           text run at (0,24) width 110: &quot;Imbricated roots: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (110,0) size 364x57 [padding: 0 1 0 1]
</span><del>-          RenderMathMLRoot {mroot} at (1,0) size 362x57
-            RenderMathMLRootWrapper at (4,15) size 6x42
-              RenderMathMLToken {mn} at (0,0) size 5x7
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
-                  RenderBlock (anonymous) at (0,0) size 5x7
-                    RenderText {#text} at (0,-27) size 5x61
-                      text run at (0,-27) width 5: &quot;3&quot;
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 18x57
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x57
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x57
-                  RenderBlock (anonymous) at (0,0) size 13x57
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 345x55
-              RenderMathMLRow {mrow} at (0,0) size 344x55
-                RenderMathMLToken {mn} at (0,25) size 8x12
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                    RenderBlock (anonymous) at (0,0) size 8x12
-                      RenderText {#text} at (0,-46) size 8x106
-                        text run at (0,-46) width 8: &quot;1&quot;
-                RenderMathMLOperator {mo} at (8,26) size 20x12
-                  RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                    RenderBlock (anonymous) at (0,0) size 12x12
-                      RenderText at (0,-47) size 12x106
-                        text run at (0,-47) width 12: &quot;+&quot;
-                RenderMathMLRoot {mroot} at (27,0) size 317x55
-                  RenderMathMLRootWrapper at (4,14) size 6x41
-                    RenderMathMLToken {mn} at (0,0) size 5x8
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                        RenderBlock (anonymous) at (0,0) size 5x8
-                          RenderText {#text} at (0,-26) size 5x61
-                            text run at (0,-26) width 5: &quot;4&quot;
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 18x55
-                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x55
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 13x55
-                        RenderBlock (anonymous) at (0,0) size 13x55
-                          RenderText at (0,-56) size 13x106
-                            text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                  RenderMathMLRootWrapper at (17,2) size 300x53
-                    RenderMathMLRow {mrow} at (0,0) size 300x53
-                      RenderMathMLToken {mn} at (0,23) size 8x12
</del><ins>+          RenderMathMLRoot {mroot} at (1,0) size 355x57
+            RenderMathMLRow {mrow} at (17,2) size 338x55
+              RenderMathMLToken {mn} at (0,25) size 8x12
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                  RenderBlock (anonymous) at (0,0) size 8x12
+                    RenderText {#text} at (0,-46) size 8x106
+                      text run at (0,-46) width 8: &quot;1&quot;
+              RenderMathMLOperator {mo} at (8,26) size 20x12
+                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                  RenderBlock (anonymous) at (0,0) size 12x12
+                    RenderText at (0,-47) size 12x106
+                      text run at (0,-47) width 12: &quot;+&quot;
+              RenderMathMLRoot {mroot} at (27,0) size 310x55
+                RenderMathMLRow {mrow} at (17,2) size 293x53
+                  RenderMathMLToken {mn} at (0,23) size 8x12
+                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                      RenderBlock (anonymous) at (0,0) size 8x12
+                        RenderText {#text} at (0,-46) size 8x106
+                          text run at (0,-46) width 8: &quot;2&quot;
+                  RenderMathMLOperator {mo} at (8,24) size 20x12
+                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                      RenderBlock (anonymous) at (0,0) size 12x12
+                        RenderText at (0,-47) size 12x106
+                          text run at (0,-47) width 12: &quot;+&quot;
+                  RenderMathMLRoot {mroot} at (27,0) size 266x53
+                    RenderMathMLRow {mrow} at (17,2) size 249x51
+                      RenderMathMLToken {mn} at (0,21) size 8x12
</ins><span class="cx">                         RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                           RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                             RenderText {#text} at (0,-46) size 8x106
</span><del>-                              text run at (0,-46) width 8: &quot;2&quot;
-                      RenderMathMLOperator {mo} at (8,24) size 20x12
</del><ins>+                              text run at (0,-46) width 8: &quot;3&quot;
+                      RenderMathMLOperator {mo} at (8,22) size 20x12
</ins><span class="cx">                         RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
</span><span class="cx">                           RenderBlock (anonymous) at (0,0) size 12x12
</span><span class="cx">                             RenderText at (0,-47) size 12x106
</span><span class="cx">                               text run at (0,-47) width 12: &quot;+&quot;
</span><del>-                      RenderMathMLRoot {mroot} at (27,0) size 273x53
-                        RenderMathMLRootWrapper at (4,14) size 6x39
-                          RenderMathMLToken {mn} at (0,0) size 5x7
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
-                              RenderBlock (anonymous) at (0,0) size 5x7
-                                RenderText {#text} at (0,-27) size 5x61
-                                  text run at (0,-27) width 5: &quot;5&quot;
-                        RenderMathMLBlock (anonymous, flex) at (0,0) size 18x53
-                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x53
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 13x53
-                              RenderBlock (anonymous) at (0,0) size 13x53
-                                RenderText at (0,-56) size 13x106
-                                  text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                        RenderMathMLRootWrapper at (17,2) size 256x51
-                          RenderMathMLRow {mrow} at (0,0) size 255x51
-                            RenderMathMLToken {mn} at (0,21) size 8x12
-                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                RenderBlock (anonymous) at (0,0) size 8x12
-                                  RenderText {#text} at (0,-46) size 8x106
-                                    text run at (0,-46) width 8: &quot;3&quot;
-                            RenderMathMLOperator {mo} at (8,22) size 20x12
-                              RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                RenderBlock (anonymous) at (0,0) size 12x12
-                                  RenderText at (0,-47) size 12x106
-                                    text run at (0,-47) width 12: &quot;+&quot;
-                            RenderMathMLRoot {mroot} at (27,0) size 228x51
-                              RenderMathMLRootWrapper at (4,13) size 6x38
-                                RenderMathMLToken {mn} at (0,0) size 5x7
</del><ins>+                      RenderMathMLRoot {mroot} at (27,0) size 221x51
+                        RenderMathMLRow {mrow} at (17,2) size 204x49
+                          RenderMathMLToken {mn} at (0,19) size 8x12
+                            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                              RenderBlock (anonymous) at (0,0) size 8x12
+                                RenderText {#text} at (0,-46) size 8x106
+                                  text run at (0,-46) width 8: &quot;4&quot;
+                          RenderMathMLOperator {mo} at (8,20) size 20x12
+                            RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                              RenderBlock (anonymous) at (0,0) size 12x12
+                                RenderText at (0,-47) size 12x106
+                                  text run at (0,-47) width 12: &quot;+&quot;
+                          RenderMathMLRoot {mroot} at (27,0) size 176x49
+                            RenderMathMLRow {mrow} at (16,2) size 160x41
+                              RenderMathMLToken {mn} at (0,17) size 8x12
+                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                  RenderBlock (anonymous) at (0,0) size 8x12
+                                    RenderText {#text} at (0,-46) size 8x106
+                                      text run at (0,-46) width 8: &quot;5&quot;
+                              RenderMathMLOperator {mo} at (8,18) size 20x12
+                                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                  RenderBlock (anonymous) at (0,0) size 12x12
+                                    RenderText at (0,-47) size 12x106
+                                      text run at (0,-47) width 12: &quot;+&quot;
+                              RenderMathMLRoot {mroot} at (27,0) size 133x41
+                                RenderMathMLRow {mrow} at (16,2) size 117x31
+                                  RenderMathMLToken {mn} at (0,15) size 8x12
+                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                      RenderBlock (anonymous) at (0,0) size 8x12
+                                        RenderText {#text} at (0,-46) size 8x106
+                                          text run at (0,-46) width 8: &quot;6&quot;
+                                  RenderMathMLOperator {mo} at (8,16) size 20x12
+                                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                      RenderBlock (anonymous) at (0,0) size 12x12
+                                        RenderText at (0,-47) size 12x106
+                                          text run at (0,-47) width 12: &quot;+&quot;
+                                  RenderMathMLRoot {mroot} at (27,0) size 89x31
+                                    RenderMathMLRow {mrow} at (16,2) size 73x28
+                                      RenderMathMLToken {mn} at (0,13) size 8x12
+                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                          RenderBlock (anonymous) at (0,0) size 8x12
+                                            RenderText {#text} at (0,-46) size 8x106
+                                              text run at (0,-46) width 8: &quot;7&quot;
+                                      RenderMathMLOperator {mo} at (8,14) size 20x12
+                                        RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                          RenderBlock (anonymous) at (0,0) size 12x12
+                                            RenderText at (0,-47) size 12x106
+                                              text run at (0,-47) width 12: &quot;+&quot;
+                                      RenderMathMLRoot {mroot} at (27,0) size 46x28
+                                        RenderMathMLToken {mi} at (31,11) size 14x14 [padding: 0 2 0 0]
+                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 12x13
+                                            RenderBlock (anonymous) at (0,0) size 12x13
+                                              RenderText {#text} at (0,-45) size 12x106
+                                                text run at (0,-45) width 12: &quot;A&quot;
+                                        RenderMathMLFraction {mfrac} at (4,0) size 24x17
+                                          RenderMathMLRow {mrow} at (0,0) size 23x8
+                                            RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
+                                                RenderBlock (anonymous) at (0,0) size 5x5
+                                                  RenderText {#text} at (0,-29) size 5x61
+                                                    text run at (0,-29) width 5: &quot;x&quot;
+                                            RenderMathMLOperator {mo} at (5,0) size 12x7
+                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                                                RenderBlock (anonymous) at (0,0) size 7x7
+                                                  RenderText at (0,-27) size 7x61
+                                                    text run at (0,-27) width 7: &quot;+&quot;
+                                            RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
+                                                RenderBlock (anonymous) at (0,0) size 5x6
+                                                  RenderText {#text} at (0,-29) size 5x61
+                                                    text run at (0,-29) width 5: &quot;y&quot;
+                                          RenderMathMLToken {mi} at (8,11) size 6x6 [padding: 0 1 0 0]
+                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                                              RenderBlock (anonymous) at (0,0) size 4x5
+                                                RenderText {#text} at (0,-29) size 4x61
+                                                  text run at (0,-29) width 4: &quot;z&quot;
+                                    RenderMathMLToken {mn} at (4,5) size 6x8
+                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                                        RenderBlock (anonymous) at (0,0) size 5x7
+                                          RenderText {#text} at (0,-27) size 5x61
+                                            text run at (0,-27) width 5: &quot;9&quot;
+                                RenderMathMLToken {mn} at (4,9) size 6x8
</ins><span class="cx">                                   RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
</span><span class="cx">                                     RenderBlock (anonymous) at (0,0) size 5x7
</span><span class="cx">                                       RenderText {#text} at (0,-27) size 5x61
</span><del>-                                        text run at (0,-27) width 5: &quot;6&quot;
-                              RenderMathMLBlock (anonymous, flex) at (0,0) size 18x51
-                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x51
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 13x51
-                                    RenderBlock (anonymous) at (0,0) size 13x51
-                                      RenderText at (0,-56) size 13x106
-                                        text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                              RenderMathMLRootWrapper at (17,2) size 211x49
-                                RenderMathMLRow {mrow} at (0,0) size 210x49
-                                  RenderMathMLToken {mn} at (0,19) size 8x12
</del><ins>+                                        text run at (0,-27) width 5: &quot;8&quot;
+                            RenderMathMLToken {mn} at (4,11) size 6x9
+                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                                RenderBlock (anonymous) at (0,0) size 5x8
+                                  RenderText {#text} at (0,-26) size 5x61
+                                    text run at (0,-26) width 5: &quot;7&quot;
+                        RenderMathMLToken {mn} at (4,14) size 6x8
+                          RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                            RenderBlock (anonymous) at (0,0) size 5x7
+                              RenderText {#text} at (0,-27) size 5x61
+                                text run at (0,-27) width 5: &quot;6&quot;
+                    RenderMathMLToken {mn} at (4,15) size 6x8
+                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                        RenderBlock (anonymous) at (0,0) size 5x7
+                          RenderText {#text} at (0,-27) size 5x61
+                            text run at (0,-27) width 5: &quot;5&quot;
+                RenderMathMLToken {mn} at (4,15) size 6x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                    RenderBlock (anonymous) at (0,0) size 5x8
+                      RenderText {#text} at (0,-26) size 5x61
+                        text run at (0,-26) width 5: &quot;4&quot;
+            RenderMathMLToken {mn} at (4,16) size 6x8
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                RenderBlock (anonymous) at (0,0) size 5x7
+                  RenderText {#text} at (0,-27) size 5x61
+                    text run at (0,-27) width 5: &quot;3&quot;
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {p} at (0,475) size 784x56
+        RenderText {#text} at (0,24) size 74x17
+          text run at (0,24) width 74: &quot;RTL roots: &quot;
+        RenderMathMLMath {math} at (74,0) size 364x57 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (8,0) size 355x57
+            RenderMathMLRow {mrow} at (0,2) size 337x55
+              RenderMathMLToken {mn} at (328,25) size 9x12
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                  RenderBlock (anonymous) at (0,0) size 8x12
+                    RenderText {#text} at (0,-46) size 8x106
+                      text run at (0,-46) width 8: &quot;1&quot;
+              RenderMathMLOperator {mo} at (309,26) size 20x12
+                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                  RenderBlock (anonymous) at (0,0) size 12x12
+                    RenderText at (0,-47) size 12x106
+                      text run at (0,-47) width 12 RTL: &quot;+&quot;
+              RenderMathMLRoot {mroot} at (0,0) size 310x55
+                RenderMathMLRow {mrow} at (0,2) size 293x53
+                  RenderMathMLToken {mn} at (284,23) size 9x12
+                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                      RenderBlock (anonymous) at (0,0) size 8x12
+                        RenderText {#text} at (0,-46) size 8x106
+                          text run at (0,-46) width 8: &quot;2&quot;
+                  RenderMathMLOperator {mo} at (265,24) size 20x12
+                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                      RenderBlock (anonymous) at (0,0) size 12x12
+                        RenderText at (0,-47) size 12x106
+                          text run at (0,-47) width 12 RTL: &quot;+&quot;
+                  RenderMathMLRoot {mroot} at (0,0) size 266x53
+                    RenderMathMLRow {mrow} at (0,2) size 248x51
+                      RenderMathMLToken {mn} at (239,21) size 9x12
+                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                          RenderBlock (anonymous) at (0,0) size 8x12
+                            RenderText {#text} at (0,-46) size 8x106
+                              text run at (0,-46) width 8: &quot;3&quot;
+                      RenderMathMLOperator {mo} at (220,22) size 20x12
+                        RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                          RenderBlock (anonymous) at (0,0) size 12x12
+                            RenderText at (0,-47) size 12x106
+                              text run at (0,-47) width 12 RTL: &quot;+&quot;
+                      RenderMathMLRoot {mroot} at (0,0) size 221x51
+                        RenderMathMLRow {mrow} at (0,2) size 203x49
+                          RenderMathMLToken {mn} at (194,19) size 9x12
+                            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                              RenderBlock (anonymous) at (0,0) size 8x12
+                                RenderText {#text} at (0,-46) size 8x106
+                                  text run at (0,-46) width 8: &quot;4&quot;
+                          RenderMathMLOperator {mo} at (175,20) size 20x12
+                            RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                              RenderBlock (anonymous) at (0,0) size 12x12
+                                RenderText at (0,-47) size 12x106
+                                  text run at (0,-47) width 12 RTL: &quot;+&quot;
+                          RenderMathMLRoot {mroot} at (0,0) size 176x49
+                            RenderMathMLRow {mrow} at (0,2) size 160x41
+                              RenderMathMLToken {mn} at (151,17) size 9x12
+                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                  RenderBlock (anonymous) at (0,0) size 8x12
+                                    RenderText {#text} at (0,-46) size 8x106
+                                      text run at (0,-46) width 8: &quot;5&quot;
+                              RenderMathMLOperator {mo} at (132,18) size 20x12
+                                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                  RenderBlock (anonymous) at (0,0) size 12x12
+                                    RenderText at (0,-47) size 12x106
+                                      text run at (0,-47) width 12 RTL: &quot;+&quot;
+                              RenderMathMLRoot {mroot} at (0,0) size 133x41
+                                RenderMathMLRow {mrow} at (0,2) size 116x31
+                                  RenderMathMLToken {mn} at (107,15) size 9x12
</ins><span class="cx">                                     RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                                       RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                                         RenderText {#text} at (0,-46) size 8x106
</span><del>-                                          text run at (0,-46) width 8: &quot;4&quot;
-                                  RenderMathMLOperator {mo} at (8,20) size 20x12
</del><ins>+                                          text run at (0,-46) width 8: &quot;6&quot;
+                                  RenderMathMLOperator {mo} at (88,16) size 20x12
</ins><span class="cx">                                     RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
</span><span class="cx">                                       RenderBlock (anonymous) at (0,0) size 12x12
</span><span class="cx">                                         RenderText at (0,-47) size 12x106
</span><del>-                                          text run at (0,-47) width 12: &quot;+&quot;
-                                  RenderMathMLRoot {mroot} at (27,0) size 183x49
-                                    RenderMathMLRootWrapper at (4,9) size 6x40
-                                      RenderMathMLToken {mn} at (0,0) size 5x8
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                                          RenderBlock (anonymous) at (0,0) size 5x8
-                                            RenderText {#text} at (0,-26) size 5x61
-                                              text run at (0,-26) width 5: &quot;7&quot;
-                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 18x49
-                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x49
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 13x48
-                                          RenderBlock (anonymous) at (0,0) size 13x48
-                                            RenderText at (0,-56) size 13x106
-                                              text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                    RenderMathMLRootWrapper at (17,2) size 166x47
-                                      RenderMathMLRow {mrow} at (0,0) size 166x41
-                                        RenderMathMLToken {mn} at (0,17) size 8x12
-                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                            RenderBlock (anonymous) at (0,0) size 8x12
-                                              RenderText {#text} at (0,-46) size 8x106
-                                                text run at (0,-46) width 8: &quot;5&quot;
-                                        RenderMathMLOperator {mo} at (8,18) size 20x12
-                                          RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                            RenderBlock (anonymous) at (0,0) size 12x12
-                                              RenderText at (0,-47) size 12x106
-                                                text run at (0,-47) width 12: &quot;+&quot;
-                                        RenderMathMLRoot {mroot} at (27,0) size 139x41
-                                          RenderMathMLRootWrapper at (4,6) size 6x35
-                                            RenderMathMLToken {mn} at (0,0) size 5x7
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
-                                                RenderBlock (anonymous) at (0,0) size 5x7
-                                                  RenderText {#text} at (0,-27) size 5x61
-                                                    text run at (0,-27) width 5: &quot;8&quot;
-                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 18x41
-                                            RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x41
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 13x40
-                                                RenderBlock (anonymous) at (0,0) size 13x40
-                                                  RenderText at (0,-56) size 13x106
-                                                    text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                          RenderMathMLRootWrapper at (17,2) size 122x39
-                                            RenderMathMLRow {mrow} at (0,0) size 121x31
-                                              RenderMathMLToken {mn} at (0,15) size 8x12
-                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                  RenderBlock (anonymous) at (0,0) size 8x12
-                                                    RenderText {#text} at (0,-46) size 8x106
-                                                      text run at (0,-46) width 8: &quot;6&quot;
-                                              RenderMathMLOperator {mo} at (8,16) size 20x12
-                                                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                                  RenderBlock (anonymous) at (0,0) size 12x12
-                                                    RenderText at (0,-47) size 12x106
-                                                      text run at (0,-47) width 12: &quot;+&quot;
-                                              RenderMathMLRoot {mroot} at (27,0) size 94x31
-                                                RenderMathMLRootWrapper at (4,4) size 6x27
-                                                  RenderMathMLToken {mn} at (0,0) size 5x7
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
-                                                      RenderBlock (anonymous) at (0,0) size 5x7
-                                                        RenderText {#text} at (0,-27) size 5x61
-                                                          text run at (0,-27) width 5: &quot;9&quot;
-                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 18x31
-                                                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x31
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 13x30
-                                                      RenderBlock (anonymous) at (0,0) size 13x30
-                                                        RenderText at (0,-56) size 13x106
-                                                          text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                                RenderMathMLRootWrapper at (17,2) size 77x29
-                                                  RenderMathMLRow {mrow} at (0,0) size 77x28
-                                                    RenderMathMLToken {mn} at (0,13) size 8x12
-                                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                        RenderBlock (anonymous) at (0,0) size 8x12
-                                                          RenderText {#text} at (0,-46) size 8x106
-                                                            text run at (0,-46) width 8: &quot;7&quot;
-                                                    RenderMathMLOperator {mo} at (8,14) size 20x12
-                                                      RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
-                                                        RenderBlock (anonymous) at (0,0) size 12x12
-                                                          RenderText at (0,-47) size 12x106
-                                                            text run at (0,-47) width 12: &quot;+&quot;
-                                                    RenderMathMLRoot {mroot} at (27,0) size 50x28
-                                                      RenderMathMLRootWrapper at (4,0) size 24x28
-                                                        RenderMathMLFraction {mfrac} at (0,0) size 23x17
-                                                          RenderMathMLRow {mrow} at (0,0) size 23x8
-                                                            RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
-                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
-                                                                RenderBlock (anonymous) at (0,0) size 5x5
-                                                                  RenderText {#text} at (0,-29) size 5x61
-                                                                    text run at (0,-29) width 5: &quot;x&quot;
-                                                            RenderMathMLOperator {mo} at (5,0) size 12x7
-                                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
-                                                                RenderBlock (anonymous) at (0,0) size 7x7
-                                                                  RenderText at (0,-27) size 7x61
-                                                                    text run at (0,-27) width 7: &quot;+&quot;
-                                                            RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
-                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
-                                                                RenderBlock (anonymous) at (0,0) size 5x6
-                                                                  RenderText {#text} at (0,-29) size 5x61
-                                                                    text run at (0,-29) width 5: &quot;y&quot;
-                                                          RenderMathMLToken {mi} at (8,11) size 6x6 [padding: 0 1 0 0]
-                                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                                                              RenderBlock (anonymous) at (0,0) size 4x5
-                                                                RenderText {#text} at (0,-29) size 4x61
-                                                                  text run at (0,-29) width 4: &quot;z&quot;
-                                                      RenderMathMLBlock (anonymous, flex) at (18,0) size 18x28
-                                                        RenderMathMLRadicalOperator (anonymous) at (0,10) size 17x18
-                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
-                                                            RenderBlock (anonymous) at (0,0) size 13x17
-                                                              RenderText at (0,-56) size 13x106
-                                                                text run at (0,-56) width 13: &quot;\x{221A}&quot;
-                                                      RenderMathMLRootWrapper at (35,11) size 14x17
-                                                        RenderMathMLToken {mi} at (0,0) size 14x13 [padding: 0 2 0 0]
-                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 12x13
-                                                            RenderBlock (anonymous) at (0,0) size 12x13
-                                                              RenderText {#text} at (0,-45) size 12x106
-                                                                text run at (0,-45) width 12: &quot;A&quot;
</del><ins>+                                          text run at (0,-47) width 12 RTL: &quot;+&quot;
+                                  RenderMathMLRoot {mroot} at (0,0) size 89x31
+                                    RenderMathMLRow {mrow} at (0,2) size 73x28
+                                      RenderMathMLToken {mn} at (64,13) size 9x12
+                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                          RenderBlock (anonymous) at (0,0) size 8x12
+                                            RenderText {#text} at (0,-46) size 8x106
+                                              text run at (0,-46) width 8: &quot;7&quot;
+                                      RenderMathMLOperator {mo} at (44,14) size 21x12
+                                        RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
+                                          RenderBlock (anonymous) at (0,0) size 12x12
+                                            RenderText at (0,-47) size 12x106
+                                              text run at (0,-47) width 12 RTL: &quot;+&quot;
+                                      RenderMathMLRoot {mroot} at (0,0) size 45x28
+                                        RenderMathMLToken {mi} at (0,11) size 14x14 [padding: 0 0 0 2]
+                                          RenderMathMLBlock (anonymous, flex) at (1,0) size 13x13
+                                            RenderBlock (anonymous) at (0,0) size 12x13
+                                              RenderText {#text} at (0,-45) size 12x106
+                                                text run at (0,-45) width 12: &quot;A&quot;
+                                        RenderMathMLFraction {mfrac} at (17,0) size 24x17
+                                          RenderMathMLRow {mrow} at (0,0) size 23x8
+                                            RenderMathMLToken {mi} at (16,2) size 7x5 [padding: 0 0 0 1]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 6x5
+                                                RenderBlock (anonymous) at (0,0) size 5x5
+                                                  RenderText {#text} at (0,-29) size 5x61
+                                                    text run at (0,-29) width 5: &quot;x&quot;
+                                            RenderMathMLOperator {mo} at (5,0) size 12x7
+                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                                                RenderBlock (anonymous) at (0,0) size 7x7
+                                                  RenderText at (0,-27) size 7x61
+                                                    text run at (0,-27) width 7 RTL: &quot;+&quot;
+                                            RenderMathMLToken {mi} at (0,2) size 6x6 [padding: 0 0 0 1]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 6x6
+                                                RenderBlock (anonymous) at (0,0) size 5x6
+                                                  RenderText {#text} at (0,-29) size 5x61
+                                                    text run at (0,-29) width 5: &quot;y&quot;
+                                          RenderMathMLToken {mi} at (8,11) size 6x6 [padding: 0 0 0 1]
+                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
+                                              RenderBlock (anonymous) at (0,0) size 4x5
+                                                RenderText {#text} at (0,-29) size 4x61
+                                                  text run at (0,-29) width 4: &quot;z&quot;
+                                    RenderMathMLToken {mn} at (79,5) size 6x8
+                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                                        RenderBlock (anonymous) at (0,0) size 5x7
+                                          RenderText {#text} at (0,-27) size 5x61
+                                            text run at (0,-27) width 5: &quot;9&quot;
+                                RenderMathMLToken {mn} at (122,9) size 6x8
+                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                                    RenderBlock (anonymous) at (0,0) size 5x7
+                                      RenderText {#text} at (0,-27) size 5x61
+                                        text run at (0,-27) width 5: &quot;8&quot;
+                            RenderMathMLToken {mn} at (166,11) size 6x9
+                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                                RenderBlock (anonymous) at (0,0) size 5x8
+                                  RenderText {#text} at (0,-26) size 5x61
+                                    text run at (0,-26) width 5: &quot;7&quot;
+                        RenderMathMLToken {mn} at (211,14) size 6x8
+                          RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                            RenderBlock (anonymous) at (0,0) size 5x7
+                              RenderText {#text} at (0,-27) size 5x61
+                                text run at (0,-27) width 5: &quot;6&quot;
+                    RenderMathMLToken {mn} at (255,15) size 6x8
+                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                        RenderBlock (anonymous) at (0,0) size 5x7
+                          RenderText {#text} at (0,-27) size 5x61
+                            text run at (0,-27) width 5: &quot;5&quot;
+                RenderMathMLToken {mn} at (300,15) size 6x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                    RenderBlock (anonymous) at (0,0) size 5x8
+                      RenderText {#text} at (0,-26) size 5x61
+                        text run at (0,-26) width 5: &quot;4&quot;
+            RenderMathMLToken {mn} at (344,16) size 6x8
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                RenderBlock (anonymous) at (0,0) size 5x7
+                  RenderText {#text} at (0,-27) size 5x61
+                    text run at (0,-27) width 5: &quot;3&quot;
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkmathmlradicalfallbackexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkmathmlradicalfallbackexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -7,45 +7,17 @@
</span><span class="cx">         RenderText {#text} at (0,70) size 132x17
</span><span class="cx">           text run at (0,70) width 132: &quot;Large LTR radicals: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (132,0) size 28x85 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,2) size 17x83
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x83
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x83
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x82
-                  RenderBlock (anonymous) at (0,0) size 13x82
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (17,2) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
-          RenderMathMLSquareRoot {msqrt} at (18,0) size 9x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,-1) size 9x17
-                      text run at (0,-1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (9,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
</del><ins>+          RenderMathMLRoot {msqrt} at (1,2) size 17x83
+            RenderMathMLSpace {mspace} at (17,2) size 0x81
+          RenderMathMLRoot {msqrt} at (18,0) size 9x84
+            RenderMathMLSpace {mspace} at (9,3) size 0x81
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {P} at (0,103) size 784x87
</span><span class="cx">         RenderText {#text} at (0,70) size 132x17
</span><span class="cx">           text run at (0,70) width 132: &quot;Large RTL radicals: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (132,0) size 28x85 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (10,2) size 17x83
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x83
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x83
-                RenderMathMLBlock (anonymous, flex) at (4,0) size 13x82
-                  RenderBlock (anonymous) at (0,0) size 13x82
-                    RenderText at (0,-56) size 13x106
-                      text run at (0,-56) width 13 RTL: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (0,2) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 9x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,-1) size 9x17
-                      text run at (0,-1) width 9 RTL: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (0,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
</del><ins>+          RenderMathMLRoot {msqrt} at (10,2) size 17x83
+            RenderMathMLSpace {mspace} at (0,2) size 0x81
+          RenderMathMLRoot {msqrt} at (1,0) size 9x84
+            RenderMathMLSpace {mspace} at (0,3) size 0x81
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormathmlpresentationrootsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,37 +1,71 @@
</span><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx">   RenderView at (0,0) size 800x600
</span><del>-layer at (0,0) size 800x492
-  RenderBlock {html} at (0,0) size 800x492
-    RenderBody {body} at (8,16) size 784x460
</del><ins>+layer at (0,0) size 800x561
+  RenderBlock {html} at (0,0) size 800x561
+    RenderBody {body} at (8,16) size 784x529
</ins><span class="cx">       RenderBlock {p} at (0,0) size 784x20
</span><span class="cx">         RenderText {#text} at (0,0) size 181x19
</span><span class="cx">           text run at (0,0) width 181: &quot;square root (should be red): &quot;
</span><del>-        RenderMathMLMath {math} at (180,0) size 20x17 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 17x17 [color=#FF0000]
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x17
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x17
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                  RenderBlock (anonymous) at (0,0) size 9x16
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 9x14
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-1) size 8x17
-                      text run at (0,-1) width 8: &quot;2&quot;
</del><ins>+        RenderMathMLMath {math} at (180,0) size 20x16 [padding: 0 1 0 1]
+          RenderMathMLRoot {msqrt} at (1,0) size 17x16 [color=#FF0000]
+            RenderMathMLToken {mn} at (8,3) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-1) size 8x17
+                    text run at (0,-1) width 8: &quot;2&quot;
</ins><span class="cx">       RenderBlock {p} at (0,36) size 784x20
</span><span class="cx">         RenderText {#text} at (0,0) size 113x19
</span><span class="cx">           text run at (0,0) width 113: &quot;long square root: &quot;
</span><del>-        RenderMathMLMath {math} at (112,0) size 44x17 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 42x17
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x17
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x17
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                  RenderBlock (anonymous) at (0,0) size 9x16
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 34x14
</del><ins>+        RenderMathMLMath {math} at (112,0) size 44x16 [padding: 0 1 0 1]
+          RenderMathMLRoot {msqrt} at (1,0) size 42x16
+            RenderMathMLRow {mrow} at (8,3) size 34x13
+              RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
+                  RenderBlock (anonymous) at (0,0) size 8x9
+                    RenderText {#text} at (0,-4) size 8x17
+                      text run at (0,-4) width 8: &quot;x&quot;
+              RenderMathMLOperator {mo} at (8,3) size 17x9
+                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                  RenderBlock (anonymous) at (0,0) size 9x9
+                    RenderText at (0,-4) size 9x17
+                      text run at (0,-4) width 9: &quot;+&quot;
+              RenderMathMLToken {mn} at (24,0) size 9x12
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                  RenderBlock (anonymous) at (0,0) size 8x12
+                    RenderText {#text} at (0,-1) size 8x17
+                      text run at (0,-1) width 8: &quot;1&quot;
+      RenderBlock {p} at (0,72) size 784x25
+        RenderText {#text} at (0,5) size 227x19
+          text run at (0,5) width 227: &quot;long square root with implied row: &quot;
+        RenderMathMLMath {math} at (226,0) size 54x22 [padding: 0 1 0 1]
+          RenderMathMLRoot {msqrt} at (1,0) size 51x22
+            RenderMathMLScripts {msup} at (8,3) size 19x19
+              RenderMathMLToken {mi} at (0,8) size 9x10 [padding: 0 2 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
+                  RenderBlock (anonymous) at (0,0) size 8x9
+                    RenderText {#text} at (0,-4) size 8x17
+                      text run at (0,-4) width 8: &quot;x&quot;
+              RenderMathMLToken {mn} at (8,0) size 7x10
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 6x10
+                  RenderBlock (anonymous) at (0,0) size 6x10
+                    RenderText {#text} at (0,0) size 6x13
+                      text run at (0,0) width 6: &quot;2&quot;
+            RenderMathMLOperator {mo} at (26,11) size 17x10
+              RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                RenderBlock (anonymous) at (0,0) size 9x9
+                  RenderText at (0,-4) size 9x17
+                    text run at (0,-4) width 9: &quot;+&quot;
+            RenderMathMLToken {mn} at (42,8) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-1) size 8x17
+                    text run at (0,-1) width 8: &quot;1&quot;
+      RenderBlock {p} at (0,113) size 784x34
+        RenderText {#text} at (0,8) size 117x19
+          text run at (0,8) width 117: &quot;root of a fraction: &quot;
+        RenderMathMLMath {math} at (116,0) size 44x35 [padding: 0 1 0 1]
+          RenderMathMLRoot {msqrt} at (1,0) size 42x35
+            RenderMathMLFraction {mfrac} at (8,3) size 34x32
</ins><span class="cx">               RenderMathMLRow {mrow} at (0,0) size 33x12
</span><span class="cx">                 RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
</span><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
</span><span class="lines">@@ -48,621 +82,559 @@
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                       RenderText {#text} at (0,-1) size 8x17
</span><span class="cx">                         text run at (0,-1) width 8: &quot;1&quot;
</span><del>-      RenderBlock {p} at (0,72) size 784x25
-        RenderText {#text} at (0,5) size 227x19
-          text run at (0,5) width 227: &quot;long square root with implied row: &quot;
-        RenderMathMLMath {math} at (226,0) size 54x22 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 51x22
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x22
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x22
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x21
-                  RenderBlock (anonymous) at (0,0) size 9x21
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 43x19
-              RenderMathMLScripts {msup} at (0,0) size 18x18
-                RenderMathMLToken {mi} at (0,8) size 9x10 [padding: 0 2 0 0]
</del><ins>+              RenderMathMLRow {mrow} at (0,19) size 33x13
+                RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
</ins><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 8x9
</span><span class="cx">                       RenderText {#text} at (0,-4) size 8x17
</span><span class="cx">                         text run at (0,-4) width 8: &quot;x&quot;
</span><del>-                RenderMathMLToken {mn} at (8,0) size 7x10
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 6x10
-                    RenderBlock (anonymous) at (0,0) size 6x10
-                      RenderText {#text} at (0,0) size 6x13
-                        text run at (0,0) width 6: &quot;2&quot;
-              RenderMathMLOperator {mo} at (17,8) size 17x9
-                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                  RenderBlock (anonymous) at (0,0) size 9x9
-                    RenderText at (0,-4) size 9x17
-                      text run at (0,-4) width 9: &quot;+&quot;
-              RenderMathMLToken {mn} at (33,5) size 9x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-1) size 8x17
-                      text run at (0,-1) width 8: &quot;1&quot;
-      RenderBlock {p} at (0,113) size 784x34
-        RenderText {#text} at (0,8) size 117x19
-          text run at (0,8) width 117: &quot;root of a fraction: &quot;
-        RenderMathMLMath {math} at (116,0) size 44x35 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 42x35
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x35
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x35
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x35
-                  RenderBlock (anonymous) at (0,0) size 9x35
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 34x32
-              RenderMathMLFraction {mfrac} at (0,0) size 33x32
-                RenderMathMLRow {mrow} at (0,0) size 33x12
-                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
-                      RenderBlock (anonymous) at (0,0) size 8x9
-                        RenderText {#text} at (0,-4) size 8x17
-                          text run at (0,-4) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (8,3) size 17x9
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                      RenderBlock (anonymous) at (0,0) size 9x9
-                        RenderText at (0,-4) size 9x17
-                          text run at (0,-4) width 9: &quot;+&quot;
-                  RenderMathMLToken {mn} at (24,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-1) size 8x17
-                          text run at (0,-1) width 8: &quot;1&quot;
-                RenderMathMLRow {mrow} at (0,19) size 33x13
-                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
-                      RenderBlock (anonymous) at (0,0) size 8x9
-                        RenderText {#text} at (0,-4) size 8x17
-                          text run at (0,-4) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (8,3) size 17x9
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                      RenderBlock (anonymous) at (0,0) size 9x9
-                        RenderText at (0,-4) size 9x17
-                          text run at (0,-4) width 9: &quot;+&quot;
-                  RenderMathMLToken {mn} at (24,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-1) size 8x17
-                          text run at (0,-1) width 8: &quot;2&quot;
-      RenderBlock {p} at (0,163) size 784x21
-        RenderText {#text} at (0,1) size 177x19
-          text run at (0,1) width 177: &quot;cube root (should be blue): &quot;
-        RenderMathMLMath {math} at (176,0) size 20x18 [color=#0000FF] [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 17x18
-            RenderMathMLRootWrapper at (4,0) size 5x18
-              RenderMathMLToken {mn} at (0,0) size 5x8
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                  RenderBlock (anonymous) at (0,0) size 5x8
-                    RenderText {#text} at (0,0) size 5x10
-                      text run at (0,0) width 5: &quot;3&quot;
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-              RenderMathMLRadicalOperator (anonymous) at (0,1) size 9x17
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                  RenderBlock (anonymous) at (0,0) size 9x16
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,4) size 9x14
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-1) size 8x17
-                      text run at (0,-1) width 8: &quot;2&quot;
-      RenderBlock {p} at (0,200) size 784x20
</del><ins>+                RenderMathMLOperator {mo} at (8,3) size 17x9
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                    RenderBlock (anonymous) at (0,0) size 9x9
+                      RenderText at (0,-4) size 9x17
+                        text run at (0,-4) width 9: &quot;+&quot;
+                RenderMathMLToken {mn} at (24,0) size 9x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-1) size 8x17
+                        text run at (0,-1) width 8: &quot;2&quot;
+      RenderBlock {p} at (0,163) size 784x20
+        RenderText {#text} at (0,0) size 177x19
+          text run at (0,0) width 177: &quot;cube root (should be blue): &quot;
+        RenderMathMLMath {math} at (176,0) size 20x16 [color=#0000FF] [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 17x16
+            RenderMathMLToken {mn} at (8,3) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-1) size 8x17
+                    text run at (0,-1) width 8: &quot;2&quot;
+            RenderMathMLToken {mn} at (4,0) size 5x8
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                RenderBlock (anonymous) at (0,0) size 5x8
+                  RenderText {#text} at (0,0) size 5x10
+                    text run at (0,0) width 5: &quot;3&quot;
+      RenderBlock {p} at (0,199) size 784x20
</ins><span class="cx">         RenderText {#text} at (0,0) size 77x19
</span><span class="cx">           text run at (0,0) width 77: &quot;long index: &quot;
</span><del>-        RenderMathMLMath {math} at (76,0) size 47x17 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 45x17
-            RenderMathMLRootWrapper at (4,0) size 33x17
-              RenderMathMLRow {mrow} at (0,0) size 33x7
-                RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-3) size 4x10
-                        text run at (0,-3) width 4: &quot;x&quot;
-                RenderMathMLOperator {mo} at (4,0) size 10x6
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
-                    RenderBlock (anonymous) at (0,0) size 5x6
-                      RenderText at (0,-2) size 5x10
-                        text run at (0,-2) width 5: &quot;+&quot;
-                RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
-                    RenderBlock (anonymous) at (0,0) size 4x6
-                      RenderText {#text} at (0,-3) size 4x10
-                        text run at (0,-3) width 4: &quot;y&quot;
-                RenderMathMLOperator {mo} at (18,0) size 10x6
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
-                    RenderBlock (anonymous) at (0,0) size 5x6
-                      RenderText at (0,-2) size 5x10
-                        text run at (0,-2) width 5: &quot;+&quot;
-                RenderMathMLToken {mi} at (27,1) size 6x5 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-3) size 4x10
-                        text run at (0,-3) width 4: &quot;z&quot;
-            RenderMathMLBlock (anonymous, flex) at (27,0) size 10x17
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x17
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                  RenderBlock (anonymous) at (0,0) size 9x16
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (36,3) size 9x14
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-1) size 8x17
-                      text run at (0,-1) width 8: &quot;2&quot;
-      RenderBlock {p} at (0,236) size 784x34
</del><ins>+        RenderMathMLMath {math} at (76,0) size 47x16 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 45x16
+            RenderMathMLToken {mn} at (36,3) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-1) size 8x17
+                    text run at (0,-1) width 8: &quot;2&quot;
+            RenderMathMLRow {mrow} at (4,0) size 33x8
+              RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;x&quot;
+              RenderMathMLOperator {mo} at (4,0) size 10x6
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
+                  RenderBlock (anonymous) at (0,0) size 5x6
+                    RenderText at (0,-2) size 5x10
+                      text run at (0,-2) width 5: &quot;+&quot;
+              RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
+                  RenderBlock (anonymous) at (0,0) size 4x6
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;y&quot;
+              RenderMathMLOperator {mo} at (18,0) size 10x6
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
+                  RenderBlock (anonymous) at (0,0) size 5x6
+                    RenderText at (0,-2) size 5x10
+                      text run at (0,-2) width 5: &quot;+&quot;
+              RenderMathMLToken {mi} at (27,1) size 6x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;z&quot;
+      RenderBlock {p} at (0,235) size 784x34
</ins><span class="cx">         RenderText {#text} at (0,8) size 188x19
</span><span class="cx">           text run at (0,8) width 188: &quot;long index w/ complex base: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (187,0) size 72x35 [padding: 0 1 0 1]
</span><span class="cx">           RenderMathMLRoot {mroot} at (1,0) size 70x35
</span><del>-            RenderMathMLRootWrapper at (4,7) size 33x28
-              RenderMathMLRow {mrow} at (0,0) size 33x7
-                RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
</del><ins>+            RenderMathMLFraction {mfrac} at (36,3) size 34x32
+              RenderMathMLRow {mrow} at (0,0) size 33x12
+                RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
+                    RenderBlock (anonymous) at (0,0) size 8x9
+                      RenderText {#text} at (0,-4) size 8x17
+                        text run at (0,-4) width 8: &quot;x&quot;
+                RenderMathMLOperator {mo} at (8,3) size 17x9
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                    RenderBlock (anonymous) at (0,0) size 9x9
+                      RenderText at (0,-4) size 9x17
+                        text run at (0,-4) width 9: &quot;+&quot;
+                RenderMathMLToken {mn} at (24,0) size 9x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-1) size 8x17
+                        text run at (0,-1) width 8: &quot;1&quot;
+              RenderMathMLRow {mrow} at (0,19) size 33x13
+                RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
+                    RenderBlock (anonymous) at (0,0) size 8x9
+                      RenderText {#text} at (0,-4) size 8x17
+                        text run at (0,-4) width 8: &quot;x&quot;
+                RenderMathMLOperator {mo} at (8,3) size 17x9
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                    RenderBlock (anonymous) at (0,0) size 9x9
+                      RenderText at (0,-4) size 9x17
+                        text run at (0,-4) width 9: &quot;+&quot;
+                RenderMathMLToken {mn} at (24,0) size 9x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-1) size 8x17
+                        text run at (0,-1) width 8: &quot;2&quot;
+            RenderMathMLRow {mrow} at (4,9) size 33x8
+              RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;x&quot;
+              RenderMathMLOperator {mo} at (4,0) size 10x6
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
+                  RenderBlock (anonymous) at (0,0) size 5x6
+                    RenderText at (0,-2) size 5x10
+                      text run at (0,-2) width 5: &quot;+&quot;
+              RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
+                  RenderBlock (anonymous) at (0,0) size 4x6
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;y&quot;
+              RenderMathMLOperator {mo} at (18,0) size 10x6
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
+                  RenderBlock (anonymous) at (0,0) size 5x6
+                    RenderText at (0,-2) size 5x10
+                      text run at (0,-2) width 5: &quot;+&quot;
+              RenderMathMLToken {mi} at (27,1) size 6x5 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;z&quot;
+      RenderBlock {p} at (0,285) size 784x36
+        RenderText {#text} at (0,16) size 77x19
+          text run at (0,16) width 77: &quot;high index: &quot;
+        RenderMathMLMath {math} at (76,0) size 20x33 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 18x33
+            RenderMathMLToken {mn} at (9,20) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-1) size 8x17
+                    text run at (0,-1) width 8: &quot;2&quot;
+            RenderMathMLFraction {mfrac} at (4,0) size 6x25
+              RenderMathMLFraction {mfrac} at (0,0) size 5x16
+                RenderMathMLToken {mi} at (0,0) size 5x5 [padding: 0 1 0 0]
</ins><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 4x5
</span><span class="cx">                       RenderText {#text} at (0,-3) size 4x10
</span><span class="cx">                         text run at (0,-3) width 4: &quot;x&quot;
</span><del>-                RenderMathMLOperator {mo} at (4,0) size 10x6
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
-                    RenderBlock (anonymous) at (0,0) size 5x6
-                      RenderText at (0,-2) size 5x10
-                        text run at (0,-2) width 5: &quot;+&quot;
-                RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
</del><ins>+                RenderMathMLToken {mi} at (0,9) size 5x7 [padding: 0 1 0 0]
</ins><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
</span><span class="cx">                     RenderBlock (anonymous) at (0,0) size 4x6
</span><span class="cx">                       RenderText {#text} at (0,-3) size 4x10
</span><span class="cx">                         text run at (0,-3) width 4: &quot;y&quot;
</span><del>-                RenderMathMLOperator {mo} at (18,0) size 10x6
-                  RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
-                    RenderBlock (anonymous) at (0,0) size 5x6
-                      RenderText at (0,-2) size 5x10
-                        text run at (0,-2) width 5: &quot;+&quot;
-                RenderMathMLToken {mi} at (27,1) size 6x5 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-3) size 4x10
-                        text run at (0,-3) width 4: &quot;z&quot;
-            RenderMathMLBlock (anonymous, flex) at (27,0) size 10x35
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x35
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x35
-                  RenderBlock (anonymous) at (0,0) size 9x35
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (36,3) size 34x32
-              RenderMathMLFraction {mfrac} at (0,0) size 33x32
-                RenderMathMLRow {mrow} at (0,0) size 33x12
-                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
-                      RenderBlock (anonymous) at (0,0) size 8x9
-                        RenderText {#text} at (0,-4) size 8x17
-                          text run at (0,-4) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (8,3) size 17x9
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                      RenderBlock (anonymous) at (0,0) size 9x9
-                        RenderText at (0,-4) size 9x17
-                          text run at (0,-4) width 9: &quot;+&quot;
-                  RenderMathMLToken {mn} at (24,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-1) size 8x17
-                          text run at (0,-1) width 8: &quot;1&quot;
-                RenderMathMLRow {mrow} at (0,19) size 33x13
-                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
-                      RenderBlock (anonymous) at (0,0) size 8x9
-                        RenderText {#text} at (0,-4) size 8x17
-                          text run at (0,-4) width 8: &quot;x&quot;
-                  RenderMathMLOperator {mo} at (8,3) size 17x9
-                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                      RenderBlock (anonymous) at (0,0) size 9x9
-                        RenderText at (0,-4) size 9x17
-                          text run at (0,-4) width 9: &quot;+&quot;
-                  RenderMathMLToken {mn} at (24,0) size 9x12
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                      RenderBlock (anonymous) at (0,0) size 8x12
-                        RenderText {#text} at (0,-1) size 8x17
-                          text run at (0,-1) width 8: &quot;2&quot;
-      RenderBlock {p} at (0,286) size 784x37
-        RenderText {#text} at (0,17) size 77x19
-          text run at (0,17) width 77: &quot;high index: &quot;
-        RenderMathMLMath {math} at (76,0) size 20x34 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 18x34
-            RenderMathMLRootWrapper at (4,0) size 6x34
-              RenderMathMLFraction {mfrac} at (0,0) size 5x25
-                RenderMathMLFraction {mfrac} at (0,0) size 5x16
-                  RenderMathMLToken {mi} at (0,0) size 5x5 [padding: 0 1 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                      RenderBlock (anonymous) at (0,0) size 4x5
-                        RenderText {#text} at (0,-3) size 4x10
-                          text run at (0,-3) width 4: &quot;x&quot;
-                  RenderMathMLToken {mi} at (0,9) size 5x7 [padding: 0 1 0 0]
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
-                      RenderBlock (anonymous) at (0,0) size 4x6
-                        RenderText {#text} at (0,-3) size 4x10
-                          text run at (0,-3) width 4: &quot;y&quot;
-                RenderMathMLToken {mi} at (0,19) size 5x6 [padding: 0 1 0 0]
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                    RenderBlock (anonymous) at (0,0) size 4x5
-                      RenderText {#text} at (0,-3) size 4x10
-                        text run at (0,-3) width 4: &quot;z&quot;
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x34
-              RenderMathMLRadicalOperator (anonymous) at (0,17) size 9x17
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                  RenderBlock (anonymous) at (0,0) size 9x16
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (9,20) size 9x14
-              RenderMathMLToken {mn} at (0,0) size 8x12
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                  RenderBlock (anonymous) at (0,0) size 8x12
-                    RenderText {#text} at (0,-1) size 8x17
-                      text run at (0,-1) width 8: &quot;2&quot;
-      RenderBlock {p} at (0,339) size 784x48
</del><ins>+              RenderMathMLToken {mi} at (0,19) size 5x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                  RenderBlock (anonymous) at (0,0) size 4x5
+                    RenderText {#text} at (0,-3) size 4x10
+                      text run at (0,-3) width 4: &quot;z&quot;
+      RenderBlock {p} at (0,337) size 784x48
</ins><span class="cx">         RenderText {#text} at (0,28) size 160x19
</span><span class="cx">           text run at (0,28) width 160: &quot;Imbricated square roots: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (159,0) size 252x44 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,0) size 249x44
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x44
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x44
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x43
-                  RenderBlock (anonymous) at (0,0) size 9x43
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 241x41
-              RenderMathMLToken {mn} at (0,28) size 8x12
</del><ins>+          RenderMathMLRoot {msqrt} at (1,0) size 249x44
+            RenderMathMLToken {mn} at (8,31) size 9x13
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                RenderBlock (anonymous) at (0,0) size 8x12
+                  RenderText {#text} at (0,-1) size 8x17
+                    text run at (0,-1) width 8: &quot;1&quot;
+            RenderMathMLOperator {mo} at (16,34) size 17x10
+              RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                RenderBlock (anonymous) at (0,0) size 9x9
+                  RenderText at (0,-4) size 9x17
+                    text run at (0,-4) width 9: &quot;+&quot;
+            RenderMathMLRoot {msqrt} at (32,3) size 217x41
+              RenderMathMLRow {mrow} at (8,3) size 209x37
+                RenderMathMLToken {mn} at (0,24) size 8x12
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                    RenderBlock (anonymous) at (0,0) size 8x12
+                      RenderText {#text} at (0,-1) size 8x17
+                        text run at (0,-1) width 8: &quot;2&quot;
+                RenderMathMLOperator {mo} at (8,27) size 16x9
+                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                    RenderBlock (anonymous) at (0,0) size 9x9
+                      RenderText at (0,-4) size 9x17
+                        text run at (0,-4) width 9: &quot;+&quot;
+                RenderMathMLRoot {msqrt} at (23,0) size 185x36
+                  RenderMathMLRow {mrow} at (8,3) size 176x33
+                    RenderMathMLToken {mn} at (0,20) size 8x12
+                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                        RenderBlock (anonymous) at (0,0) size 8x12
+                          RenderText {#text} at (0,-1) size 8x17
+                            text run at (0,-1) width 8: &quot;3&quot;
+                    RenderMathMLOperator {mo} at (8,23) size 16x9
+                      RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                        RenderBlock (anonymous) at (0,0) size 9x9
+                          RenderText at (0,-4) size 9x17
+                            text run at (0,-4) width 9: &quot;+&quot;
+                    RenderMathMLRoot {msqrt} at (23,0) size 152x32
+                      RenderMathMLRow {mrow} at (8,3) size 143x29
+                        RenderMathMLToken {mn} at (0,16) size 8x12
+                          RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                            RenderBlock (anonymous) at (0,0) size 8x12
+                              RenderText {#text} at (0,-1) size 8x17
+                                text run at (0,-1) width 8: &quot;4&quot;
+                        RenderMathMLOperator {mo} at (8,19) size 16x9
+                          RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                            RenderBlock (anonymous) at (0,0) size 9x9
+                              RenderText at (0,-4) size 9x17
+                                text run at (0,-4) width 9: &quot;+&quot;
+                        RenderMathMLRoot {msqrt} at (23,0) size 119x28
+                          RenderMathMLRow {mrow} at (8,3) size 111x25
+                            RenderMathMLToken {mn} at (0,12) size 8x12
+                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                RenderBlock (anonymous) at (0,0) size 8x12
+                                  RenderText {#text} at (0,-1) size 8x17
+                                    text run at (0,-1) width 8: &quot;5&quot;
+                            RenderMathMLOperator {mo} at (8,15) size 16x9
+                              RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                RenderBlock (anonymous) at (0,0) size 9x9
+                                  RenderText at (0,-4) size 9x17
+                                    text run at (0,-4) width 9: &quot;+&quot;
+                            RenderMathMLRoot {msqrt} at (23,0) size 87x24
+                              RenderMathMLRow {mrow} at (8,3) size 78x21
+                                RenderMathMLToken {mn} at (0,8) size 8x12
+                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                    RenderBlock (anonymous) at (0,0) size 8x12
+                                      RenderText {#text} at (0,-1) size 8x17
+                                        text run at (0,-1) width 8: &quot;6&quot;
+                                RenderMathMLOperator {mo} at (8,11) size 16x9
+                                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                    RenderBlock (anonymous) at (0,0) size 9x9
+                                      RenderText at (0,-4) size 9x17
+                                        text run at (0,-4) width 9: &quot;+&quot;
+                                RenderMathMLRoot {msqrt} at (23,0) size 54x20
+                                  RenderMathMLRow {mrow} at (8,3) size 45x17
+                                    RenderMathMLToken {mn} at (0,4) size 8x12
+                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                        RenderBlock (anonymous) at (0,0) size 8x12
+                                          RenderText {#text} at (0,-1) size 8x17
+                                            text run at (0,-1) width 8: &quot;7&quot;
+                                    RenderMathMLOperator {mo} at (8,7) size 16x9
+                                      RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                        RenderBlock (anonymous) at (0,0) size 9x9
+                                          RenderText at (0,-4) size 9x17
+                                            text run at (0,-4) width 9: &quot;+&quot;
+                                    RenderMathMLRoot {msqrt} at (23,0) size 22x16
+                                      RenderMathMLToken {mi} at (8,3) size 13x13 [padding: 0 2 0 0]
+                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
+                                          RenderBlock (anonymous) at (0,0) size 10x12
+                                            RenderText {#text} at (0,-1) size 10x17
+                                              text run at (0,-1) width 10: &quot;A&quot;
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {p} at (0,401) size 784x56
+        RenderText {#text} at (0,36) size 114x19
+          text run at (0,36) width 114: &quot;Imbricated roots: &quot;
+        RenderMathMLMath {math} at (113,0) size 267x52 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 264x52
+            RenderMathMLRow {mrow} at (8,3) size 256x49
+              RenderMathMLToken {mn} at (0,36) size 8x12
</ins><span class="cx">                 RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                   RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                     RenderText {#text} at (0,-1) size 8x17
</span><span class="cx">                       text run at (0,-1) width 8: &quot;1&quot;
</span><del>-              RenderMathMLOperator {mo} at (8,31) size 16x9
</del><ins>+              RenderMathMLOperator {mo} at (8,39) size 16x9
</ins><span class="cx">                 RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
</span><span class="cx">                   RenderBlock (anonymous) at (0,0) size 9x9
</span><span class="cx">                     RenderText at (0,-4) size 9x17
</span><span class="cx">                       text run at (0,-4) width 9: &quot;+&quot;
</span><del>-              RenderMathMLSquareRoot {msqrt} at (23,0) size 217x40
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x40
-                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x40
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x39
-                      RenderBlock (anonymous) at (0,0) size 9x39
-                        RenderText at (0,1) size 9x17
-                          text run at (0,1) width 9: &quot;\x{221A}&quot;
-                RenderMathMLRootWrapper at (8,3) size 209x37
-                  RenderMathMLRow {mrow} at (0,0) size 208x36
-                    RenderMathMLToken {mn} at (0,24) size 8x12
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                        RenderBlock (anonymous) at (0,0) size 8x12
-                          RenderText {#text} at (0,-1) size 8x17
-                            text run at (0,-1) width 8: &quot;2&quot;
-                    RenderMathMLOperator {mo} at (8,27) size 16x9
-                      RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                        RenderBlock (anonymous) at (0,0) size 9x9
-                          RenderText at (0,-4) size 9x17
-                            text run at (0,-4) width 9: &quot;+&quot;
-                    RenderMathMLSquareRoot {msqrt} at (23,0) size 185x36
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 9x36
-                        RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x36
-                          RenderMathMLBlock (anonymous, flex) at (0,0) size 9x35
-                            RenderBlock (anonymous) at (0,0) size 9x35
-                              RenderText at (0,1) size 9x17
-                                text run at (0,1) width 9: &quot;\x{221A}&quot;
-                      RenderMathMLRootWrapper at (8,3) size 176x33
-                        RenderMathMLRow {mrow} at (0,0) size 175x32
-                          RenderMathMLToken {mn} at (0,20) size 8x12
</del><ins>+              RenderMathMLRoot {mroot} at (23,0) size 232x48
+                RenderMathMLRow {mrow} at (8,3) size 223x45
+                  RenderMathMLToken {mn} at (0,32) size 8x12
+                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                      RenderBlock (anonymous) at (0,0) size 8x12
+                        RenderText {#text} at (0,-1) size 8x17
+                          text run at (0,-1) width 8: &quot;2&quot;
+                  RenderMathMLOperator {mo} at (8,35) size 16x9
+                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                      RenderBlock (anonymous) at (0,0) size 9x9
+                        RenderText at (0,-4) size 9x17
+                          text run at (0,-4) width 9: &quot;+&quot;
+                  RenderMathMLRoot {mroot} at (23,0) size 199x44
+                    RenderMathMLRow {mrow} at (8,3) size 191x41
+                      RenderMathMLToken {mn} at (0,28) size 8x12
+                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                          RenderBlock (anonymous) at (0,0) size 8x12
+                            RenderText {#text} at (0,-1) size 8x17
+                              text run at (0,-1) width 8: &quot;3&quot;
+                      RenderMathMLOperator {mo} at (8,31) size 16x9
+                        RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                          RenderBlock (anonymous) at (0,0) size 9x9
+                            RenderText at (0,-4) size 9x17
+                              text run at (0,-4) width 9: &quot;+&quot;
+                      RenderMathMLRoot {mroot} at (23,0) size 167x40
+                        RenderMathMLRow {mrow} at (8,3) size 158x37
+                          RenderMathMLToken {mn} at (0,24) size 8x12
</ins><span class="cx">                             RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                               RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                                 RenderText {#text} at (0,-1) size 8x17
</span><del>-                                  text run at (0,-1) width 8: &quot;3&quot;
-                          RenderMathMLOperator {mo} at (8,23) size 16x9
</del><ins>+                                  text run at (0,-1) width 8: &quot;4&quot;
+                          RenderMathMLOperator {mo} at (8,27) size 16x9
</ins><span class="cx">                             RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
</span><span class="cx">                               RenderBlock (anonymous) at (0,0) size 9x9
</span><span class="cx">                                 RenderText at (0,-4) size 9x17
</span><span class="cx">                                   text run at (0,-4) width 9: &quot;+&quot;
</span><del>-                          RenderMathMLSquareRoot {msqrt} at (23,0) size 152x32
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x32
-                              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x32
-                                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x32
-                                  RenderBlock (anonymous) at (0,0) size 9x32
-                                    RenderText at (0,1) size 9x17
-                                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-                            RenderMathMLRootWrapper at (8,3) size 143x29
-                              RenderMathMLRow {mrow} at (0,0) size 142x29
-                                RenderMathMLToken {mn} at (0,16) size 8x12
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                    RenderBlock (anonymous) at (0,0) size 8x12
-                                      RenderText {#text} at (0,-1) size 8x17
-                                        text run at (0,-1) width 8: &quot;4&quot;
-                                RenderMathMLOperator {mo} at (8,19) size 16x9
-                                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                    RenderBlock (anonymous) at (0,0) size 9x9
-                                      RenderText at (0,-4) size 9x17
-                                        text run at (0,-4) width 9: &quot;+&quot;
-                                RenderMathMLSquareRoot {msqrt} at (23,0) size 119x29
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x29
-                                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x29
-                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 9x28
-                                        RenderBlock (anonymous) at (0,0) size 9x28
-                                          RenderText at (0,1) size 9x17
-                                            text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                  RenderMathMLRootWrapper at (8,3) size 111x26
-                                    RenderMathMLRow {mrow} at (0,0) size 110x25
</del><ins>+                          RenderMathMLRoot {mroot} at (23,0) size 134x36
+                            RenderMathMLRow {mrow} at (8,3) size 125x33
+                              RenderMathMLToken {mn} at (0,20) size 8x12
+                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                  RenderBlock (anonymous) at (0,0) size 8x12
+                                    RenderText {#text} at (0,-1) size 8x17
+                                      text run at (0,-1) width 8: &quot;5&quot;
+                              RenderMathMLOperator {mo} at (8,23) size 16x9
+                                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                  RenderBlock (anonymous) at (0,0) size 9x9
+                                    RenderText at (0,-4) size 9x17
+                                      text run at (0,-4) width 9: &quot;+&quot;
+                              RenderMathMLRoot {mroot} at (23,0) size 101x32
+                                RenderMathMLRow {mrow} at (8,3) size 92x29
+                                  RenderMathMLToken {mn} at (0,16) size 8x12
+                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                      RenderBlock (anonymous) at (0,0) size 8x12
+                                        RenderText {#text} at (0,-1) size 8x17
+                                          text run at (0,-1) width 8: &quot;6&quot;
+                                  RenderMathMLOperator {mo} at (8,19) size 16x9
+                                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                      RenderBlock (anonymous) at (0,0) size 9x9
+                                        RenderText at (0,-4) size 9x17
+                                          text run at (0,-4) width 9: &quot;+&quot;
+                                  RenderMathMLRoot {mroot} at (23,0) size 69x28
+                                    RenderMathMLRow {mrow} at (8,3) size 60x25
</ins><span class="cx">                                       RenderMathMLToken {mn} at (0,12) size 8x12
</span><span class="cx">                                         RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                                           RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                                             RenderText {#text} at (0,-1) size 8x17
</span><del>-                                              text run at (0,-1) width 8: &quot;5&quot;
</del><ins>+                                              text run at (0,-1) width 8: &quot;7&quot;
</ins><span class="cx">                                       RenderMathMLOperator {mo} at (8,15) size 16x9
</span><span class="cx">                                         RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
</span><span class="cx">                                           RenderBlock (anonymous) at (0,0) size 9x9
</span><span class="cx">                                             RenderText at (0,-4) size 9x17
</span><span class="cx">                                               text run at (0,-4) width 9: &quot;+&quot;
</span><del>-                                      RenderMathMLSquareRoot {msqrt} at (23,0) size 87x25
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x25
-                                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x25
-                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x24
-                                              RenderBlock (anonymous) at (0,0) size 9x24
-                                                RenderText at (0,1) size 9x17
-                                                  text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                        RenderMathMLRootWrapper at (8,3) size 78x22
-                                          RenderMathMLRow {mrow} at (0,0) size 77x21
-                                            RenderMathMLToken {mn} at (0,8) size 8x12
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                RenderBlock (anonymous) at (0,0) size 8x12
-                                                  RenderText {#text} at (0,-1) size 8x17
-                                                    text run at (0,-1) width 8: &quot;6&quot;
-                                            RenderMathMLOperator {mo} at (8,11) size 16x9
-                                              RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                                RenderBlock (anonymous) at (0,0) size 9x9
-                                                  RenderText at (0,-4) size 9x17
-                                                    text run at (0,-4) width 9: &quot;+&quot;
-                                            RenderMathMLSquareRoot {msqrt} at (23,0) size 54x21
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 9x21
-                                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x21
-                                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x20
-                                                    RenderBlock (anonymous) at (0,0) size 9x20
-                                                      RenderText at (0,1) size 9x17
-                                                        text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                              RenderMathMLRootWrapper at (8,3) size 45x18
-                                                RenderMathMLRow {mrow} at (0,0) size 45x17
-                                                  RenderMathMLToken {mn} at (0,4) size 8x12
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                      RenderBlock (anonymous) at (0,0) size 8x12
-                                                        RenderText {#text} at (0,-1) size 8x17
-                                                          text run at (0,-1) width 8: &quot;7&quot;
-                                                  RenderMathMLOperator {mo} at (8,7) size 16x9
-                                                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                                      RenderBlock (anonymous) at (0,0) size 9x9
-                                                        RenderText at (0,-4) size 9x17
-                                                          text run at (0,-4) width 9: &quot;+&quot;
-                                                  RenderMathMLSquareRoot {msqrt} at (23,0) size 22x17
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x17
-                                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x17
-                                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                                                          RenderBlock (anonymous) at (0,0) size 9x16
-                                                            RenderText at (0,1) size 9x17
-                                                              text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                                    RenderMathMLRootWrapper at (8,3) size 13x14
-                                                      RenderMathMLToken {mi} at (0,0) size 12x12 [padding: 0 2 0 0]
-                                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
-                                                          RenderBlock (anonymous) at (0,0) size 10x12
-                                                            RenderText {#text} at (0,-1) size 10x17
-                                                              text run at (0,-1) width 10: &quot;A&quot;
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {p} at (0,403) size 784x57
-        RenderText {#text} at (0,37) size 114x19
-          text run at (0,37) width 114: &quot;Imbricated roots: &quot;
-        RenderMathMLMath {math} at (113,0) size 267x53 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 264x53
-            RenderMathMLRootWrapper at (4,13) size 5x40
-              RenderMathMLToken {mn} at (0,0) size 5x8
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                  RenderBlock (anonymous) at (0,0) size 5x8
-                    RenderText {#text} at (0,0) size 5x10
-                      text run at (0,0) width 5: &quot;3&quot;
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x53
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x53
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x52
-                  RenderBlock (anonymous) at (0,0) size 9x52
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 256x50
-              RenderMathMLRow {mrow} at (0,0) size 255x49
-                RenderMathMLToken {mn} at (0,37) size 8x12
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                    RenderBlock (anonymous) at (0,0) size 8x12
-                      RenderText {#text} at (0,-1) size 8x17
-                        text run at (0,-1) width 8: &quot;1&quot;
-                RenderMathMLOperator {mo} at (8,40) size 16x9
-                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                    RenderBlock (anonymous) at (0,0) size 9x9
-                      RenderText at (0,-4) size 9x17
-                        text run at (0,-4) width 9: &quot;+&quot;
-                RenderMathMLRoot {mroot} at (23,0) size 232x49
-                  RenderMathMLRootWrapper at (4,11) size 5x38
-                    RenderMathMLToken {mn} at (0,0) size 5x8
</del><ins>+                                      RenderMathMLRoot {mroot} at (23,0) size 36x24
+                                        RenderMathMLToken {mi} at (23,12) size 12x12 [padding: 0 2 0 0]
+                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
+                                            RenderBlock (anonymous) at (0,0) size 10x12
+                                              RenderText {#text} at (0,-1) size 10x17
+                                                text run at (0,-1) width 10: &quot;A&quot;
+                                        RenderMathMLFraction {mfrac} at (4,0) size 20x17
+                                          RenderMathMLRow {mrow} at (0,0) size 19x7
+                                            RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                                                RenderBlock (anonymous) at (0,0) size 4x5
+                                                  RenderText {#text} at (0,-3) size 4x10
+                                                    text run at (0,-3) width 4: &quot;x&quot;
+                                            RenderMathMLOperator {mo} at (4,0) size 10x6
+                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
+                                                RenderBlock (anonymous) at (0,0) size 5x6
+                                                  RenderText at (0,-2) size 5x10
+                                                    text run at (0,-2) width 5: &quot;+&quot;
+                                            RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
+                                                RenderBlock (anonymous) at (0,0) size 4x6
+                                                  RenderText {#text} at (0,-3) size 4x10
+                                                    text run at (0,-3) width 4: &quot;y&quot;
+                                          RenderMathMLToken {mi} at (7,11) size 5x6 [padding: 0 1 0 0]
+                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
+                                              RenderBlock (anonymous) at (0,0) size 4x5
+                                                RenderText {#text} at (0,-3) size 4x10
+                                                  text run at (0,-3) width 4: &quot;z&quot;
+                                    RenderMathMLToken {mn} at (4,5) size 5x9
+                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                                        RenderBlock (anonymous) at (0,0) size 5x8
+                                          RenderText {#text} at (0,0) size 5x10
+                                            text run at (0,0) width 5: &quot;9&quot;
+                                RenderMathMLToken {mn} at (4,7) size 5x8
+                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                                    RenderBlock (anonymous) at (0,0) size 5x8
+                                      RenderText {#text} at (0,0) size 5x10
+                                        text run at (0,0) width 5: &quot;8&quot;
+                            RenderMathMLToken {mn} at (4,9) size 5x8
+                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                                RenderBlock (anonymous) at (0,0) size 5x7
+                                  RenderText {#text} at (0,-1) size 5x10
+                                    text run at (0,-1) width 5: &quot;7&quot;
+                        RenderMathMLToken {mn} at (4,10) size 5x9
+                          RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                            RenderBlock (anonymous) at (0,0) size 5x8
+                              RenderText {#text} at (0,0) size 5x10
+                                text run at (0,0) width 5: &quot;6&quot;
+                    RenderMathMLToken {mn} at (4,11) size 5x9
</ins><span class="cx">                       RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
</span><span class="cx">                         RenderBlock (anonymous) at (0,0) size 5x8
</span><span class="cx">                           RenderText {#text} at (0,0) size 5x10
</span><del>-                            text run at (0,0) width 5: &quot;4&quot;
-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x49
-                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x49
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 9x48
-                        RenderBlock (anonymous) at (0,0) size 9x48
-                          RenderText at (0,1) size 9x17
-                            text run at (0,1) width 9: &quot;\x{221A}&quot;
-                  RenderMathMLRootWrapper at (8,3) size 223x46
-                    RenderMathMLRow {mrow} at (0,0) size 222x45
-                      RenderMathMLToken {mn} at (0,33) size 8x12
</del><ins>+                            text run at (0,0) width 5: &quot;5&quot;
+                RenderMathMLToken {mn} at (4,13) size 5x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                    RenderBlock (anonymous) at (0,0) size 5x8
+                      RenderText {#text} at (0,0) size 5x10
+                        text run at (0,0) width 5: &quot;4&quot;
+            RenderMathMLToken {mn} at (4,15) size 5x8
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                RenderBlock (anonymous) at (0,0) size 5x8
+                  RenderText {#text} at (0,0) size 5x10
+                    text run at (0,0) width 5: &quot;3&quot;
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {p} at (0,473) size 784x56
+        RenderText {#text} at (0,36) size 74x19
+          text run at (0,36) width 74: &quot;RTL roots: &quot;
+        RenderMathMLMath {math} at (73,0) size 266x52 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 264x52
+            RenderMathMLRow {mrow} at (0,3) size 255x49
+              RenderMathMLToken {mn} at (246,36) size 9x12
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                  RenderBlock (anonymous) at (0,0) size 8x12
+                    RenderText {#text} at (0,-1) size 8x17
+                      text run at (0,-1) width 8: &quot;1&quot;
+              RenderMathMLOperator {mo} at (230,39) size 17x9
+                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                  RenderBlock (anonymous) at (0,0) size 9x9
+                    RenderText at (0,-4) size 9x17
+                      text run at (0,-4) width 9 RTL: &quot;+&quot;
+              RenderMathMLRoot {mroot} at (0,0) size 231x48
+                RenderMathMLRow {mrow} at (0,3) size 222x45
+                  RenderMathMLToken {mn} at (213,32) size 9x12
+                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                      RenderBlock (anonymous) at (0,0) size 8x12
+                        RenderText {#text} at (0,-1) size 8x17
+                          text run at (0,-1) width 8: &quot;2&quot;
+                  RenderMathMLOperator {mo} at (198,35) size 16x9
+                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                      RenderBlock (anonymous) at (0,0) size 9x9
+                        RenderText at (0,-4) size 9x17
+                          text run at (0,-4) width 9 RTL: &quot;+&quot;
+                  RenderMathMLRoot {mroot} at (0,0) size 199x44
+                    RenderMathMLRow {mrow} at (0,3) size 190x41
+                      RenderMathMLToken {mn} at (181,28) size 9x12
</ins><span class="cx">                         RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                           RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                             RenderText {#text} at (0,-1) size 8x17
</span><del>-                              text run at (0,-1) width 8: &quot;2&quot;
-                      RenderMathMLOperator {mo} at (8,36) size 16x9
</del><ins>+                              text run at (0,-1) width 8: &quot;3&quot;
+                      RenderMathMLOperator {mo} at (165,31) size 17x9
</ins><span class="cx">                         RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
</span><span class="cx">                           RenderBlock (anonymous) at (0,0) size 9x9
</span><span class="cx">                             RenderText at (0,-4) size 9x17
</span><del>-                              text run at (0,-4) width 9: &quot;+&quot;
-                      RenderMathMLRoot {mroot} at (23,0) size 199x45
-                        RenderMathMLRootWrapper at (4,10) size 5x35
-                          RenderMathMLToken {mn} at (0,0) size 5x8
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                              RenderBlock (anonymous) at (0,0) size 5x8
-                                RenderText {#text} at (0,0) size 5x10
-                                  text run at (0,0) width 5: &quot;5&quot;
-                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x45
-                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x45
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x44
-                              RenderBlock (anonymous) at (0,0) size 9x44
-                                RenderText at (0,1) size 9x17
-                                  text run at (0,1) width 9: &quot;\x{221A}&quot;
-                        RenderMathMLRootWrapper at (8,3) size 191x42
-                          RenderMathMLRow {mrow} at (0,0) size 190x41
-                            RenderMathMLToken {mn} at (0,29) size 8x12
-                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                RenderBlock (anonymous) at (0,0) size 8x12
-                                  RenderText {#text} at (0,-1) size 8x17
-                                    text run at (0,-1) width 8: &quot;3&quot;
-                            RenderMathMLOperator {mo} at (8,32) size 16x9
-                              RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                RenderBlock (anonymous) at (0,0) size 9x9
-                                  RenderText at (0,-4) size 9x17
-                                    text run at (0,-4) width 9: &quot;+&quot;
-                            RenderMathMLRoot {mroot} at (23,0) size 167x41
-                              RenderMathMLRootWrapper at (4,8) size 5x33
-                                RenderMathMLToken {mn} at (0,0) size 5x8
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                                    RenderBlock (anonymous) at (0,0) size 5x8
-                                      RenderText {#text} at (0,0) size 5x10
-                                        text run at (0,0) width 5: &quot;6&quot;
-                              RenderMathMLBlock (anonymous, flex) at (0,0) size 9x41
-                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x41
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x40
-                                    RenderBlock (anonymous) at (0,0) size 9x40
-                                      RenderText at (0,1) size 9x17
-                                        text run at (0,1) width 9: &quot;\x{221A}&quot;
-                              RenderMathMLRootWrapper at (8,3) size 158x38
-                                RenderMathMLRow {mrow} at (0,0) size 157x37
-                                  RenderMathMLToken {mn} at (0,25) size 8x12
</del><ins>+                              text run at (0,-4) width 9 RTL: &quot;+&quot;
+                      RenderMathMLRoot {mroot} at (0,0) size 166x40
+                        RenderMathMLRow {mrow} at (0,3) size 157x37
+                          RenderMathMLToken {mn} at (148,24) size 9x12
+                            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                              RenderBlock (anonymous) at (0,0) size 8x12
+                                RenderText {#text} at (0,-1) size 8x17
+                                  text run at (0,-1) width 8: &quot;4&quot;
+                          RenderMathMLOperator {mo} at (132,27) size 17x9
+                            RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                              RenderBlock (anonymous) at (0,0) size 9x9
+                                RenderText at (0,-4) size 9x17
+                                  text run at (0,-4) width 9 RTL: &quot;+&quot;
+                          RenderMathMLRoot {mroot} at (0,0) size 133x36
+                            RenderMathMLRow {mrow} at (0,3) size 124x33
+                              RenderMathMLToken {mn} at (115,20) size 9x12
+                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                  RenderBlock (anonymous) at (0,0) size 8x12
+                                    RenderText {#text} at (0,-1) size 8x17
+                                      text run at (0,-1) width 8: &quot;5&quot;
+                              RenderMathMLOperator {mo} at (99,23) size 17x9
+                                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                  RenderBlock (anonymous) at (0,0) size 9x9
+                                    RenderText at (0,-4) size 9x17
+                                      text run at (0,-4) width 9 RTL: &quot;+&quot;
+                              RenderMathMLRoot {mroot} at (0,0) size 100x32
+                                RenderMathMLRow {mrow} at (0,3) size 92x29
+                                  RenderMathMLToken {mn} at (83,16) size 9x12
</ins><span class="cx">                                     RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
</span><span class="cx">                                       RenderBlock (anonymous) at (0,0) size 8x12
</span><span class="cx">                                         RenderText {#text} at (0,-1) size 8x17
</span><del>-                                          text run at (0,-1) width 8: &quot;4&quot;
-                                  RenderMathMLOperator {mo} at (8,28) size 16x9
</del><ins>+                                          text run at (0,-1) width 8: &quot;6&quot;
+                                  RenderMathMLOperator {mo} at (67,19) size 17x9
</ins><span class="cx">                                     RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
</span><span class="cx">                                       RenderBlock (anonymous) at (0,0) size 9x9
</span><span class="cx">                                         RenderText at (0,-4) size 9x17
</span><del>-                                          text run at (0,-4) width 9: &quot;+&quot;
-                                  RenderMathMLRoot {mroot} at (23,0) size 134x37
-                                    RenderMathMLRootWrapper at (4,7) size 5x30
-                                      RenderMathMLToken {mn} at (0,0) size 5x7
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
-                                          RenderBlock (anonymous) at (0,0) size 5x7
-                                            RenderText {#text} at (0,-1) size 5x10
-                                              text run at (0,-1) width 5: &quot;7&quot;
-                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x37
-                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x37
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x37
-                                          RenderBlock (anonymous) at (0,0) size 9x37
-                                            RenderText at (0,1) size 9x17
-                                              text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                    RenderMathMLRootWrapper at (8,3) size 125x34
-                                      RenderMathMLRow {mrow} at (0,0) size 124x34
-                                        RenderMathMLToken {mn} at (0,21) size 8x12
-                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                            RenderBlock (anonymous) at (0,0) size 8x12
-                                              RenderText {#text} at (0,-1) size 8x17
-                                                text run at (0,-1) width 8: &quot;5&quot;
-                                        RenderMathMLOperator {mo} at (8,24) size 16x9
-                                          RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                            RenderBlock (anonymous) at (0,0) size 9x9
-                                              RenderText at (0,-4) size 9x17
-                                                text run at (0,-4) width 9: &quot;+&quot;
-                                        RenderMathMLRoot {mroot} at (23,0) size 101x34
-                                          RenderMathMLRootWrapper at (4,5) size 5x29
-                                            RenderMathMLToken {mn} at (0,0) size 5x8
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                                                RenderBlock (anonymous) at (0,0) size 5x8
-                                                  RenderText {#text} at (0,0) size 5x10
-                                                    text run at (0,0) width 5: &quot;8&quot;
-                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 9x34
-                                            RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x34
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 9x33
-                                                RenderBlock (anonymous) at (0,0) size 9x33
-                                                  RenderText at (0,1) size 9x17
-                                                    text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                          RenderMathMLRootWrapper at (8,3) size 92x31
-                                            RenderMathMLRow {mrow} at (0,0) size 92x30
-                                              RenderMathMLToken {mn} at (0,17) size 8x12
-                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                  RenderBlock (anonymous) at (0,0) size 8x12
-                                                    RenderText {#text} at (0,-1) size 8x17
-                                                      text run at (0,-1) width 8: &quot;6&quot;
-                                              RenderMathMLOperator {mo} at (8,20) size 16x9
-                                                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                                  RenderBlock (anonymous) at (0,0) size 9x9
-                                                    RenderText at (0,-4) size 9x17
-                                                      text run at (0,-4) width 9: &quot;+&quot;
-                                              RenderMathMLRoot {mroot} at (23,0) size 69x30
-                                                RenderMathMLRootWrapper at (4,3) size 5x27
-                                                  RenderMathMLToken {mn} at (0,0) size 5x8
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
-                                                      RenderBlock (anonymous) at (0,0) size 5x8
-                                                        RenderText {#text} at (0,0) size 5x10
-                                                          text run at (0,0) width 5: &quot;9&quot;
-                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x30
-                                                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x30
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x29
-                                                      RenderBlock (anonymous) at (0,0) size 9x29
-                                                        RenderText at (0,1) size 9x17
-                                                          text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                                RenderMathMLRootWrapper at (8,3) size 60x27
-                                                  RenderMathMLRow {mrow} at (0,0) size 59x26
-                                                    RenderMathMLToken {mn} at (0,13) size 8x12
-                                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
-                                                        RenderBlock (anonymous) at (0,0) size 8x12
-                                                          RenderText {#text} at (0,-1) size 8x17
-                                                            text run at (0,-1) width 8: &quot;7&quot;
-                                                    RenderMathMLOperator {mo} at (8,16) size 16x9
-                                                      RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
-                                                        RenderBlock (anonymous) at (0,0) size 9x9
-                                                          RenderText at (0,-4) size 9x17
-                                                            text run at (0,-4) width 9: &quot;+&quot;
-                                                    RenderMathMLRoot {mroot} at (23,0) size 36x26
-                                                      RenderMathMLRootWrapper at (4,0) size 20x26
-                                                        RenderMathMLFraction {mfrac} at (0,0) size 19x17
-                                                          RenderMathMLRow {mrow} at (0,0) size 19x7
-                                                            RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
-                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                                                                RenderBlock (anonymous) at (0,0) size 4x5
-                                                                  RenderText {#text} at (0,-3) size 4x10
-                                                                    text run at (0,-3) width 4: &quot;x&quot;
-                                                            RenderMathMLOperator {mo} at (4,0) size 10x6
-                                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
-                                                                RenderBlock (anonymous) at (0,0) size 5x6
-                                                                  RenderText at (0,-2) size 5x10
-                                                                    text run at (0,-2) width 5: &quot;+&quot;
-                                                            RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
-                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
-                                                                RenderBlock (anonymous) at (0,0) size 4x6
-                                                                  RenderText {#text} at (0,-3) size 4x10
-                                                                    text run at (0,-3) width 4: &quot;y&quot;
-                                                          RenderMathMLToken {mi} at (7,11) size 5x6 [padding: 0 1 0 0]
-                                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
-                                                              RenderBlock (anonymous) at (0,0) size 4x5
-                                                                RenderText {#text} at (0,-3) size 4x10
-                                                                  text run at (0,-3) width 4: &quot;z&quot;
-                                                      RenderMathMLBlock (anonymous, flex) at (14,0) size 10x26
-                                                        RenderMathMLRadicalOperator (anonymous) at (0,9) size 9x17
-                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 9x16
-                                                            RenderBlock (anonymous) at (0,0) size 9x16
-                                                              RenderText at (0,1) size 9x17
-                                                                text run at (0,1) width 9: &quot;\x{221A}&quot;
-                                                      RenderMathMLRootWrapper at (23,12) size 12x14
-                                                        RenderMathMLToken {mi} at (0,0) size 12x12 [padding: 0 2 0 0]
-                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
-                                                            RenderBlock (anonymous) at (0,0) size 10x12
-                                                              RenderText {#text} at (0,-1) size 10x17
-                                                                text run at (0,-1) width 10: &quot;A&quot;
</del><ins>+                                          text run at (0,-4) width 9 RTL: &quot;+&quot;
+                                  RenderMathMLRoot {mroot} at (0,0) size 68x28
+                                    RenderMathMLRow {mrow} at (0,3) size 59x25
+                                      RenderMathMLToken {mn} at (50,12) size 9x12
+                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
+                                          RenderBlock (anonymous) at (0,0) size 8x12
+                                            RenderText {#text} at (0,-1) size 8x17
+                                              text run at (0,-1) width 8: &quot;7&quot;
+                                      RenderMathMLOperator {mo} at (34,15) size 17x9
+                                        RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
+                                          RenderBlock (anonymous) at (0,0) size 9x9
+                                            RenderText at (0,-4) size 9x17
+                                              text run at (0,-4) width 9 RTL: &quot;+&quot;
+                                      RenderMathMLRoot {mroot} at (0,0) size 35x24
+                                        RenderMathMLToken {mi} at (0,12) size 12x12 [padding: 0 0 0 2]
+                                          RenderMathMLBlock (anonymous, flex) at (1,0) size 11x12
+                                            RenderBlock (anonymous) at (0,0) size 10x12
+                                              RenderText {#text} at (0,-1) size 10x17
+                                                text run at (0,-1) width 10: &quot;A&quot;
+                                        RenderMathMLFraction {mfrac} at (11,0) size 20x17
+                                          RenderMathMLRow {mrow} at (0,0) size 19x7
+                                            RenderMathMLToken {mi} at (13,1) size 6x5 [padding: 0 0 0 1]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
+                                                RenderBlock (anonymous) at (0,0) size 4x5
+                                                  RenderText {#text} at (0,-3) size 4x10
+                                                    text run at (0,-3) width 4: &quot;x&quot;
+                                            RenderMathMLOperator {mo} at (4,0) size 10x6
+                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
+                                                RenderBlock (anonymous) at (0,0) size 5x6
+                                                  RenderText at (0,-2) size 5x10
+                                                    text run at (0,-2) width 5 RTL: &quot;+&quot;
+                                            RenderMathMLToken {mi} at (0,1) size 5x6 [padding: 0 0 0 1]
+                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
+                                                RenderBlock (anonymous) at (0,0) size 4x6
+                                                  RenderText {#text} at (0,-3) size 4x10
+                                                    text run at (0,-3) width 4: &quot;y&quot;
+                                          RenderMathMLToken {mi} at (7,11) size 5x6 [padding: 0 0 0 1]
+                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
+                                              RenderBlock (anonymous) at (0,0) size 4x5
+                                                RenderText {#text} at (0,-3) size 4x10
+                                                  text run at (0,-3) width 4: &quot;z&quot;
+                                    RenderMathMLToken {mn} at (58,5) size 5x9
+                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                                        RenderBlock (anonymous) at (0,0) size 5x8
+                                          RenderText {#text} at (0,0) size 5x10
+                                            text run at (0,0) width 5: &quot;9&quot;
+                                RenderMathMLToken {mn} at (90,7) size 6x8
+                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                                    RenderBlock (anonymous) at (0,0) size 5x8
+                                      RenderText {#text} at (0,0) size 5x10
+                                        text run at (0,0) width 5: &quot;8&quot;
+                            RenderMathMLToken {mn} at (123,9) size 6x8
+                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
+                                RenderBlock (anonymous) at (0,0) size 5x7
+                                  RenderText {#text} at (0,-1) size 5x10
+                                    text run at (0,-1) width 5: &quot;7&quot;
+                        RenderMathMLToken {mn} at (156,10) size 5x9
+                          RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                            RenderBlock (anonymous) at (0,0) size 5x8
+                              RenderText {#text} at (0,0) size 5x10
+                                text run at (0,0) width 5: &quot;6&quot;
+                    RenderMathMLToken {mn} at (189,11) size 5x9
+                      RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                        RenderBlock (anonymous) at (0,0) size 5x8
+                          RenderText {#text} at (0,0) size 5x10
+                            text run at (0,0) width 5: &quot;5&quot;
+                RenderMathMLToken {mn} at (221,13) size 6x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                    RenderBlock (anonymous) at (0,0) size 5x8
+                      RenderText {#text} at (0,0) size 5x10
+                        text run at (0,0) width 5: &quot;4&quot;
+            RenderMathMLToken {mn} at (254,15) size 6x8
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
+                RenderBlock (anonymous) at (0,0) size 5x8
+                  RenderText {#text} at (0,0) size 5x10
+                    text run at (0,0) width 5: &quot;3&quot;
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormathmlradicalfallbackexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformiossimulatormathmlradicalfallbackexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -7,45 +7,17 @@
</span><span class="cx">         RenderText {#text} at (0,69) size 132x19
</span><span class="cx">           text run at (0,69) width 132: &quot;Large LTR radicals: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (131,0) size 21x84 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,0) size 9x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
-          RenderMathMLSquareRoot {msqrt} at (9,0) size 10x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,-1) size 9x20
-                      text run at (0,-1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
</del><ins>+          RenderMathMLRoot {msqrt} at (1,0) size 9x84
+            RenderMathMLSpace {mspace} at (8,3) size 0x81
+          RenderMathMLRoot {msqrt} at (9,0) size 10x84
+            RenderMathMLSpace {mspace} at (8,3) size 0x81
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {P} at (0,105) size 784x89
</span><span class="cx">         RenderText {#text} at (0,69) size 132x19
</span><span class="cx">           text run at (0,69) width 132: &quot;Large RTL radicals: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (131,0) size 21x84 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (9,0) size 10x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,1) size 9x17
-                      text run at (0,1) width 9 RTL: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (0,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 9x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,-1) size 9x20
-                      text run at (0,-1) width 9 RTL: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (0,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
</del><ins>+          RenderMathMLRoot {msqrt} at (9,0) size 10x84
+            RenderMathMLSpace {mspace} at (0,3) size 0x81
+          RenderMathMLRoot {msqrt} at (1,0) size 9x84
+            RenderMathMLSpace {mspace} at (0,3) size 0x81
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmathmlradicalfallbackexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmathmlradicalfallbackexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -7,45 +7,17 @@
</span><span class="cx">         RenderText {#text} at (0,70) size 132x18
</span><span class="cx">           text run at (0,70) width 132: &quot;Large LTR radicals: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (131,0) size 27x84 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (1,0) size 15x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 15x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 15x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 15x83
-                  RenderBlock (anonymous) at (0,0) size 15x83
-                    RenderText at (0,-1) size 15x24
-                      text run at (0,-1) width 15: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (14,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
-          RenderMathMLSquareRoot {msqrt} at (15,0) size 10x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,1) size 9x18
-                      text run at (0,1) width 9: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (8,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
</del><ins>+          RenderMathMLRoot {msqrt} at (1,0) size 15x84
+            RenderMathMLSpace {mspace} at (14,3) size 0x81
+          RenderMathMLRoot {msqrt} at (15,0) size 10x84
+            RenderMathMLSpace {mspace} at (8,3) size 0x81
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {P} at (0,104) size 784x88
</span><span class="cx">         RenderText {#text} at (0,70) size 132x18
</span><span class="cx">           text run at (0,70) width 132: &quot;Large RTL radicals: &quot;
</span><span class="cx">         RenderMathMLMath {math} at (131,0) size 27x84 [padding: 0 1 0 1]
</span><del>-          RenderMathMLSquareRoot {msqrt} at (9,0) size 16x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 15x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 15x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 15x83
-                  RenderBlock (anonymous) at (0,0) size 15x83
-                    RenderText at (0,-1) size 16x24
-                      text run at (0,-1) width 15 RTL: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (0,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 9x84
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x84
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 9x84
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x83
-                  RenderBlock (anonymous) at (0,0) size 9x83
-                    RenderText at (0,1) size 9x18
-                      text run at (0,1) width 9 RTL: &quot;\x{221A}&quot;
-            RenderMathMLRootWrapper at (0,3) size 0x81
-              RenderMathMLSpace {mspace} at (0,0) size 0x80
</del><ins>+          RenderMathMLRoot {msqrt} at (9,0) size 16x84
+            RenderMathMLSpace {mspace} at (0,3) size 0x81
+          RenderMathMLRoot {msqrt} at (1,0) size 9x84
+            RenderMathMLSpace {mspace} at (0,3) size 0x81
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -2530,12 +2530,10 @@
</span><span class="cx">     rendering/mathml/RenderMathMLMath.cpp
</span><span class="cx">     rendering/mathml/RenderMathMLMenclose.cpp
</span><span class="cx">     rendering/mathml/RenderMathMLOperator.cpp
</span><del>-    rendering/mathml/RenderMathMLRadicalOperator.cpp
</del><span class="cx">     rendering/mathml/RenderMathMLRoot.cpp
</span><span class="cx">     rendering/mathml/RenderMathMLRow.cpp
</span><span class="cx">     rendering/mathml/RenderMathMLScripts.cpp
</span><span class="cx">     rendering/mathml/RenderMathMLSpace.cpp
</span><del>-    rendering/mathml/RenderMathMLSquareRoot.cpp
</del><span class="cx">     rendering/mathml/RenderMathMLToken.cpp
</span><span class="cx">     rendering/mathml/RenderMathMLUnderOver.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/ChangeLog        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,3 +1,104 @@
</span><ins>+2016-06-17  Frederic Wang  &lt;fwang@igalia.com&gt;
+
+        Refactor RenderMathMLRoot layout function to avoid using flexbox
+        https://bugs.webkit.org/show_bug.cgi?id=153987
+
+        Reviewed by Brent Fulgham.
+
+        No new tests, already covered by existing tests.
+        A case for RTL root has been added to roots.xhtml.
+
+        We reimplement RenderMathMLRoot without any flexbox or anonymous.
+        The anonymous RenderMathMLRadicalOperator used to draw the radical sign is replaced with
+        the MathOperator class introduced in bug 152244.
+        msqrt (row of children under a square root) is now implemented directly in RenderMathMLRoot,
+        so RenderMathMLSquareRoot is removed and RenderMathMLRoot now inherits from RenderMathMLRow.
+
+        * CMakeLists.txt: Remove files for RenderMathMLRadicalOperator and RenderMathMLSquareRoot.
+        * WebCore.xcodeproj/project.pbxproj: ditto.
+        * accessibility/AccessibilityRenderObject.cpp: Update code now that we do not use any
+        radical wrappers.
+        (WebCore::AccessibilityRenderObject::isMathRow): Now that RenderMathMLRoot inherits from
+        RenderMathMLRow, we must exclude MathRoot or otherwise some accessibility code may treat
+        roots as rows.
+        (WebCore::AccessibilityRenderObject::mathRadicandObject): Return the first child for
+        Root/SquareRoot or nullptr.
+        (WebCore::AccessibilityRenderObject::mathRootIndexObject): Return the second child for
+        Root and nullptr for SquareRoot.
+        * mathml/MathMLInlineContainerElement.cpp:
+        (WebCore::MathMLInlineContainerElement::childrenChanged): We no longer need a special case
+        for msqrt, it is treated as a normal RenderMathMLRow.
+        (WebCore::MathMLInlineContainerElement::createElementRenderer): Make msqrt create a
+        RenderMathMLRoot object.
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isRenderMathMLRadicalOperator): Deleted.
+        * rendering/mathml/RenderMathMLBlock.cpp:
+        (WebCore::RenderMathMLBlock::mirrorIfNeeded): New function to mirror a child horizontal
+        offset according to the parent width.
+        (WebCore::RenderMathMLBlock::renderName):
+        * rendering/mathml/RenderMathMLBlock.h:
+        (WebCore::RenderMathMLBlock::mirrorIfNeeded): Moved from RenderMathMLScripts, just forward
+        call to the other mirrorIfNeeded function.
+        * rendering/mathml/RenderMathMLOperator.cpp: We no longer need this trailingSpaceError hack.
+        (WebCore::RenderMathMLOperator::trailingSpaceError): Deleted.
+        * rendering/mathml/RenderMathMLOperator.h: ditto.
+        * rendering/mathml/RenderMathMLRadicalOperator.cpp: Removed. The radical sign is now drawn
+        with a MathOperator.
+        * rendering/mathml/RenderMathMLRadicalOperator.h: Removed.
+        * rendering/mathml/RenderMathMLRoot.cpp: Complete refactoring to avoid using flexbox and
+        anonymous wrappers.
+        (WebCore::RenderMathMLRoot::RenderMathMLRoot): Set m_kind parameters to distinguish between
+        square root and general root and set the MathOperator member to draw the radical sign.
+        (WebCore::RenderMathMLRoot::isValid): Helper function to verify whether the child list is valid.
+        (WebCore::RenderMathMLRoot::getBase): Get the base of an mroot.
+        (WebCore::RenderMathMLRoot::getIndex): Get the index of an mroot.
+        (WebCore::RenderMathMLRoot::styleDidChange): Be sure to keep the style of the
+        MathOperator in sync with ours ; no need to skip empty roots.
+        (WebCore::RenderMathMLRoot::updateFromElement): Call the function from the new parent class ;
+        no need to skip empty roots.
+        (WebCore::RenderMathMLRoot::updateStyle): Remove the isEmpty ASSERT as it is valid to have
+        empty square root. Set the m_kernBeforeDegree, m_kernBeforeDegree members.
+        No need to set style for anonymous.
+        (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): Implement this function.
+        (WebCore::RenderMathMLRoot::layoutBlock): Implement this function.
+        (WebCore::RenderMathMLRoot::paintChildren): Implement this function.
+        (WebCore::RenderMathMLRoot::paint): Remove the trailingSpaceError hack ;
+        paint the radical sign via MathOperator::paint
+        (WebCore::RenderMathMLRoot::baseWrapper): Deleted.
+        (WebCore::RenderMathMLRoot::radicalWrapper): Deleted.
+        (WebCore::RenderMathMLRoot::indexWrapper): Deleted.
+        (WebCore::RenderMathMLRoot::radicalOperator): Deleted.
+        (WebCore::RenderMathMLRoot::restructureWrappers): Deleted.
+        (WebCore::RenderMathMLRoot::addChild): Deleted.
+        (WebCore::RenderMathMLRoot::firstLineBaseline): Deleted.
+        (WebCore::RenderMathMLRoot::layout): Deleted.
+        (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper): Deleted.
+        (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring): Deleted.
+        (WebCore::RenderMathMLRootWrapper::removeChild): Deleted.
+        * rendering/mathml/RenderMathMLRoot.h: Make RenderMathMLRoot inherit from RenderMathMLRow.
+        Make RenderMathMLRoot support &lt;msqrt&gt;.
+        Remove all the anonymous wrapper stuff and instead use a MathOperator for the radical symbol.
+        Update function declaration to implement layout without flexbox and add some helper functions.
+        * rendering/mathml/RenderMathMLRow.cpp: Allow to get the exact metrics of the chid row,
+        for use in RenderMathMLRoot.
+        (WebCore::RenderMathMLRow::computeLineVerticalStretch): rename parameters.
+        (WebCore::RenderMathMLRow::layoutRowItems): Set parameters to the final ascent, descent and
+        logical width of the chid row. Set the temporary logical width for RenderMathRoot before
+        laying the children out.
+        (WebCore::RenderMathMLRow::layoutBlock): Rename parameters ; add a dummy logicalWidth
+        parameter.
+        * rendering/mathml/RenderMathMLRow.h: Make some functions accessible or overridable by
+        RenderMathMLRoot. Make layoutRowItems return the final ascent, descent and logical width
+        after the chid row is laid out.
+        * rendering/mathml/RenderMathMLScripts.cpp: Move mirrorIfNeeded to RenderMathMLBlock.
+        (WebCore::RenderMathMLScripts::mirrorIfNeeded): Deleted.
+        * rendering/mathml/RenderMathMLScripts.h: Move mirrorIfNeeded to RenderMathMLBlock.
+        * rendering/mathml/RenderMathMLSquareRoot.cpp: Removed.
+        * rendering/mathml/RenderMathMLSquareRoot.h: Removed.
+        * rendering/mathml/MathOperator.cpp:
+        (WebCore::MathOperator::paint): Apply a mirroring scale transform to radical symbol
+        in RTL direction.
+
</ins><span class="cx"> 2016-06-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Drop some unnecessary header includes
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1648,16 +1648,12 @@
</span><span class="cx">                 439046DE12DA25E800AF80A2 /* RenderMathMLMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046CA12DA25E800AF80A2 /* RenderMathMLMath.h */; };
</span><span class="cx">                 439046DF12DA25E17BAF80A2 /* MathMLOperatorDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046CB12DA25E17BAF80A2 /* MathMLOperatorDictionary.cpp */; };
</span><span class="cx">                 439046DF12DA25E800AF80A2 /* RenderMathMLOperator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046CB12DA25E800AF80A2 /* RenderMathMLOperator.cpp */; };
</span><del>-                439046DF12DA25E800BF80A3 /* RenderMathMLRadicalOperator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046CB12DA25E800BF80A3 /* RenderMathMLRadicalOperator.cpp */; };
</del><span class="cx">                 439046E012DA25E17BAF80A2 /* MathMLOperatorDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046CC12DA25E17BAF80A2 /* MathMLOperatorDictionary.h */; };
</span><span class="cx">                 439046E012DA25E800AF80A2 /* RenderMathMLOperator.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046CC12DA25E800AF80A2 /* RenderMathMLOperator.h */; };
</span><del>-                439046E012DA25E800BF80A3 /* RenderMathMLRadicalOperator.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046CC12DA25E800BF80A3 /* RenderMathMLRadicalOperator.h */; };
</del><span class="cx">                 439046E112DA25E800AF80A2 /* RenderMathMLRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046CD12DA25E800AF80A2 /* RenderMathMLRoot.cpp */; };
</span><span class="cx">                 439046E212DA25E800AF80A2 /* RenderMathMLRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046CE12DA25E800AF80A2 /* RenderMathMLRoot.h */; };
</span><span class="cx">                 439046E312DA25E800AF80A2 /* RenderMathMLRow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046CF12DA25E800AF80A2 /* RenderMathMLRow.cpp */; };
</span><span class="cx">                 439046E412DA25E800AF80A2 /* RenderMathMLRow.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D012DA25E800AF80A2 /* RenderMathMLRow.h */; };
</span><del>-                439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */; };
-                439046E612DA25E800AF80A2 /* RenderMathMLSquareRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */; };
</del><span class="cx">                 439046E712DA25E800AF80A2 /* RenderMathMLScripts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D312DA25E800AF80A2 /* RenderMathMLScripts.cpp */; };
</span><span class="cx">                 439046E812DA25E800AF80A2 /* RenderMathMLScripts.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */; };
</span><span class="cx">                 439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */; };
</span><span class="lines">@@ -9204,16 +9200,12 @@
</span><span class="cx">                 439046CA12DA25E800AF80A2 /* RenderMathMLMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLMath.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046CB12DA25E17BAF80A2 /* MathMLOperatorDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLOperatorDictionary.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046CB12DA25E800AF80A2 /* RenderMathMLOperator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLOperator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                439046CB12DA25E800BF80A3 /* RenderMathMLRadicalOperator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLRadicalOperator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 439046CC12DA25E17BAF80A2 /* MathMLOperatorDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLOperatorDictionary.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046CC12DA25E800AF80A2 /* RenderMathMLOperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLOperator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                439046CC12DA25E800BF80A3 /* RenderMathMLRadicalOperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLRadicalOperator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 439046CD12DA25E800AF80A2 /* RenderMathMLRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLRoot.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046CE12DA25E800AF80A2 /* RenderMathMLRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLRoot.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046CF12DA25E800AF80A2 /* RenderMathMLRow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLRow.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046D012DA25E800AF80A2 /* RenderMathMLRow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLRow.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLSquareRoot.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLSquareRoot.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 439046D312DA25E800AF80A2 /* RenderMathMLScripts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLScripts.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMathMLScripts.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLUnderOver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16945,8 +16937,6 @@
</span><span class="cx">                                 A208E222A56A0C7575F2A72E /* RenderMathMLMenclose.h */,
</span><span class="cx">                                 439046CB12DA25E800AF80A2 /* RenderMathMLOperator.cpp */,
</span><span class="cx">                                 439046CC12DA25E800AF80A2 /* RenderMathMLOperator.h */,
</span><del>-                                439046CB12DA25E800BF80A3 /* RenderMathMLRadicalOperator.cpp */,
-                                439046CC12DA25E800BF80A3 /* RenderMathMLRadicalOperator.h */,
</del><span class="cx">                                 439046CD12DA25E800AF80A2 /* RenderMathMLRoot.cpp */,
</span><span class="cx">                                 439046CE12DA25E800AF80A2 /* RenderMathMLRoot.h */,
</span><span class="cx">                                 439046CF12DA25E800AF80A2 /* RenderMathMLRow.cpp */,
</span><span class="lines">@@ -16955,8 +16945,6 @@
</span><span class="cx">                                 439046D412DA25E800AF80A2 /* RenderMathMLScripts.h */,
</span><span class="cx">                                 DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */,
</span><span class="cx">                                 331FF67DE197B57393C46AA7 /* RenderMathMLSpace.h */,
</span><del>-                                439046D112DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp */,
-                                439046D212DA25E800AF80A2 /* RenderMathMLSquareRoot.h */,
</del><span class="cx">                                 439046D712DA25E800AF80A9 /* RenderMathMLToken.cpp */,
</span><span class="cx">                                 439046D812DA25E800AF80A9 /* RenderMathMLToken.h */,
</span><span class="cx">                                 439046D512DA25E800AF80A2 /* RenderMathMLUnderOver.cpp */,
</span><span class="lines">@@ -27680,11 +27668,9 @@
</span><span class="cx">                                 439046DC12DA25E800AF80A2 /* RenderMathMLFraction.h in Headers */,
</span><span class="cx">                                 439046DE12DA25E800AF80A2 /* RenderMathMLMath.h in Headers */,
</span><span class="cx">                                 439046E012DA25E800AF80A2 /* RenderMathMLOperator.h in Headers */,
</span><del>-                                439046E012DA25E800BF80A3 /* RenderMathMLRadicalOperator.h in Headers */,
</del><span class="cx">                                 439046E212DA25E800AF80A2 /* RenderMathMLRoot.h in Headers */,
</span><span class="cx">                                 439046E412DA25E800AF80A2 /* RenderMathMLRow.h in Headers */,
</span><span class="cx">                                 439046E812DA25E800AF80A2 /* RenderMathMLScripts.h in Headers */,
</span><del>-                                439046E612DA25E800AF80A2 /* RenderMathMLSquareRoot.h in Headers */,
</del><span class="cx">                                 439046EC12DA25E800AF80A9 /* RenderMathMLToken.h in Headers */,
</span><span class="cx">                                 439046EA12DA25E800AF80A2 /* RenderMathMLUnderOver.h in Headers */,
</span><span class="cx">                                 439046EA12DA25E812AF80AC /* MathOperator.h in Headers */,
</span><span class="lines">@@ -31360,12 +31346,10 @@
</span><span class="cx">                                 439046DD12DA25E800AF80A2 /* RenderMathMLMath.cpp in Sources */,
</span><span class="cx">                                 3571883EEF618793751E4089 /* RenderMathMLMenclose.cpp in Sources */,
</span><span class="cx">                                 439046DF12DA25E800AF80A2 /* RenderMathMLOperator.cpp in Sources */,
</span><del>-                                439046DF12DA25E800BF80A3 /* RenderMathMLRadicalOperator.cpp in Sources */,
</del><span class="cx">                                 439046E112DA25E800AF80A2 /* RenderMathMLRoot.cpp in Sources */,
</span><span class="cx">                                 439046E312DA25E800AF80A2 /* RenderMathMLRow.cpp in Sources */,
</span><span class="cx">                                 439046E712DA25E800AF80A2 /* RenderMathMLScripts.cpp in Sources */,
</span><span class="cx">                                 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */,
</span><del>-                                439046E512DA25E800AF80A2 /* RenderMathMLSquareRoot.cpp in Sources */,
</del><span class="cx">                                 439046EB12DA25E800AF80A9 /* RenderMathMLToken.cpp in Sources */,
</span><span class="cx">                                 439046E912DA25E800AF80A2 /* RenderMathMLUnderOver.cpp in Sources */,
</span><span class="cx">                                 439046E912DA25E812AF80AC /* MathOperator.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -3629,7 +3629,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityRenderObject::isMathRow() const
</span><span class="cx"> {
</span><del>-    return m_renderer &amp;&amp; m_renderer-&gt;isRenderMathMLRow();
</del><ins>+    return m_renderer &amp;&amp; m_renderer-&gt;isRenderMathMLRow() &amp;&amp; !isMathRoot();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityRenderObject::isMathUnderOver() const
</span><span class="lines">@@ -3781,26 +3781,26 @@
</span><span class="cx"> {
</span><span class="cx">     if (!isMathRoot())
</span><span class="cx">         return nullptr;
</span><del>-    RenderMathMLRoot* root = &amp;downcast&lt;RenderMathMLRoot&gt;(*m_renderer);
-    AccessibilityObject* rootRadicandWrapper = axObjectCache()-&gt;getOrCreate(root-&gt;baseWrapper());
-    if (!rootRadicandWrapper)
</del><ins>+
+    // For MathSquareRoot, we actually return the first child of the base.
+    // See also https://webkit.org/b/146452
+    const auto&amp; children = this-&gt;children();
+    if (children.size() &lt; 1)
</ins><span class="cx">         return nullptr;
</span><del>-    AccessibilityObject* rootRadicand = rootRadicandWrapper-&gt;children().first().get();
-    ASSERT(rootRadicand &amp;&amp; children().contains(rootRadicand));
-    return rootRadicand;
</del><ins>+
+    return children[0].get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityObject* AccessibilityRenderObject::mathRootIndexObject()
</span><span class="cx"> {
</span><del>-    if (!isMathRoot())
</del><ins>+    if (!isMathRoot() || isMathSquareRoot())
</ins><span class="cx">         return nullptr;
</span><del>-    RenderMathMLRoot* root = &amp;downcast&lt;RenderMathMLRoot&gt;(*m_renderer);
-    AccessibilityObject* rootIndexWrapper = axObjectCache()-&gt;getOrCreate(root-&gt;indexWrapper());
-    if (!rootIndexWrapper)
</del><ins>+
+    const auto&amp; children = this-&gt;children();
+    if (children.size() &lt; 2)
</ins><span class="cx">         return nullptr;
</span><del>-    AccessibilityObject* rootIndex = rootIndexWrapper-&gt;children().first().get();
-    ASSERT(rootIndex &amp;&amp; children().contains(rootIndex));
-    return rootIndex;
</del><ins>+
+    return children[1].get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityObject* AccessibilityRenderObject::mathNumeratorObject()
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLInlineContainerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #include &quot;RenderMathMLRoot.h&quot;
</span><span class="cx"> #include &quot;RenderMathMLRow.h&quot;
</span><span class="cx"> #include &quot;RenderMathMLScripts.h&quot;
</span><del>-#include &quot;RenderMathMLSquareRoot.h&quot;
</del><span class="cx"> #include &quot;RenderMathMLUnderOver.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -57,20 +56,10 @@
</span><span class="cx"> 
</span><span class="cx"> void MathMLInlineContainerElement::childrenChanged(const ChildChange&amp; change)
</span><span class="cx"> {
</span><del>-    if (renderer()) {
-        // FIXME: Parsing of operator properties should be done in the element classes rather than in the renderer classes.
-        // See http://webkit.org/b/156537
-        if (is&lt;RenderMathMLRow&gt;(*renderer()))
-            downcast&lt;RenderMathMLRow&gt;(*renderer()).updateOperatorProperties();
-        else if (hasTagName(msqrtTag)) {
-            // Update operator properties for the base wrapper.
-            // FIXME: This won't be necessary when RenderMathMLSquareRoot derives from RenderMathMLRow and does not use anonymous wrappers.
-            // See http://webkit.org/b/153987
-            auto* childRenderer = renderer()-&gt;lastChild();
-            if (is&lt;RenderMathMLRow&gt;(childRenderer))
-                downcast&lt;RenderMathMLRow&gt;(*childRenderer).updateOperatorProperties();
-        }
-    }
</del><ins>+    // FIXME: Parsing of operator properties should be done in the element classes rather than in the renderer classes.
+    // See https://webkit.org/b/156537
+    if (renderer() &amp;&amp; is&lt;RenderMathMLRow&gt;(*renderer()))
+        downcast&lt;RenderMathMLRow&gt;(*renderer()).updateOperatorProperties();
</ins><span class="cx">     MathMLElement::childrenChanged(change);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -96,9 +85,7 @@
</span><span class="cx">         return createRenderer&lt;RenderMathMLUnderOver&gt;(*this, WTFMove(style));
</span><span class="cx">     if (hasTagName(mfracTag))
</span><span class="cx">         return createRenderer&lt;RenderMathMLFraction&gt;(*this, WTFMove(style));
</span><del>-    if (hasTagName(msqrtTag))
-        return createRenderer&lt;RenderMathMLSquareRoot&gt;(*this, WTFMove(style));
-    if (hasTagName(mrootTag))
</del><ins>+    if (hasTagName(msqrtTag) || hasTagName(mrootTag))
</ins><span class="cx">         return createRenderer&lt;RenderMathMLRoot&gt;(*this, WTFMove(style));
</span><span class="cx">     if (hasTagName(mfencedTag))
</span><span class="cx">         return createRenderer&lt;RenderMathMLFenced&gt;(*this, WTFMove(style));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -337,7 +337,6 @@
</span><span class="cx">     virtual bool isRenderMathMLBlock() const { return false; }
</span><span class="cx">     virtual bool isRenderMathMLTable() const { return false; }
</span><span class="cx">     virtual bool isRenderMathMLOperator() const { return false; }
</span><del>-    virtual bool isRenderMathMLRadicalOperator() const { return false; }
</del><span class="cx">     virtual bool isRenderMathMLRow() const { return false; }
</span><span class="cx">     virtual bool isRenderMathMLMath() const { return false; }
</span><span class="cx">     virtual bool isRenderMathMLMenclose() const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -74,6 +74,14 @@
</span><span class="cx">     return style().fontMetrics().xHeight() / 2;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+LayoutUnit RenderMathMLBlock::mirrorIfNeeded(LayoutUnit horizontalOffset, LayoutUnit boxWidth) const
+{
+    if (style().direction() == RTL)
+        return logicalWidth() - boxWidth - horizontalOffset;
+
+    return horizontalOffset;
+}
+
</ins><span class="cx"> int RenderMathMLBlock::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
</span><span class="cx"> {
</span><span class="cx">     // mathml.css sets math { -webkit-line-box-contain: glyphs replaced; line-height: 0; }, so when linePositionMode == PositionOfInteriorLineBoxes we want to
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -65,6 +65,8 @@
</span><span class="cx">     RenderPtr&lt;RenderMathMLBlock&gt; createAnonymousMathMLBlock();
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit mathAxisHeight() const;
</span><ins>+    LayoutUnit mirrorIfNeeded(LayoutUnit horizontalOffset, LayoutUnit boxWidth = 0) const;
+    LayoutUnit mirrorIfNeeded(LayoutUnit horizontalOffset, const RenderBox&amp; child) const { return mirrorIfNeeded(horizontalOffset, child.logicalWidth()); }
</ins><span class="cx">     
</span><span class="cx"> protected:
</span><span class="cx">     static LayoutUnit ascentForChild(const RenderBox&amp; child)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -384,13 +384,6 @@
</span><span class="cx">     RenderMathMLToken::paintChildren(paintInfo, paintOffset, paintInfoForChild, usePrintRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderMathMLOperator::trailingSpaceError()
-{
-    // For OpenType MATH font, the layout is based on RenderMathOperator for which the preferred width is sometimes overestimated (bug https://bugs.webkit.org/show_bug.cgi?id=130326).
-    // Hence we determine the error in the logical width with respect to the actual width of the glyph(s) used to paint the operator.
-    return m_mathOperator.maxPreferredWidth() - m_mathOperator.width();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -63,7 +63,6 @@
</span><span class="cx">     void updateTokenContent() final;
</span><span class="cx">     void updateOperatorProperties();
</span><span class="cx">     void updateFromElement() final;
</span><del>-    LayoutUnit trailingSpaceError();
</del><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual void setOperatorProperties();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Frédéric Wang (fred.wang@free.fr). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#if ENABLE(MATHML)
-#include &quot;RenderMathMLRadicalOperator.h&quot;
-
-namespace WebCore {
-
-using namespace MathMLNames;
-
-static const UChar gRadicalCharacter = 0x221A;
-
-// This class relies on the RenderMathMLOperator class to draw a radical symbol.
-
-RenderMathMLRadicalOperator::RenderMathMLRadicalOperator(Document&amp; document, RenderStyle&amp;&amp; style)
-    : RenderMathMLOperator(document, WTFMove(style), String(&amp;gRadicalCharacter, 1), MathMLOperatorDictionary::Prefix)
-{
-}
-
-void RenderMathMLRadicalOperator::setOperatorProperties()
-{
-    RenderMathMLOperator::setOperatorProperties();
-    // We remove spacing around the radical symbol.
-    setLeadingSpace(0);
-    setTrailingSpace(0);
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Frédéric Wang (fred.wang@free.fr). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RenderMathMLOperator_h
-#define RenderMathMLRadicalOperator_h
-
-#if ENABLE(MATHML)
-
-#include &quot;PaintInfo.h&quot;
-#include &quot;RenderMathMLOperator.h&quot;
-
-namespace WebCore {
-
-class RenderMathMLRadicalOperator final : public RenderMathMLOperator {
-public:
-    RenderMathMLRadicalOperator(Document&amp;, RenderStyle&amp;&amp;);
-
-private:
-    bool isRenderMathMLRadicalOperator() const override { return true; }
-    const char* renderName() const override { return isAnonymous() ? &quot;RenderMathMLRadicalOperator (anonymous)&quot; : &quot;RenderMathMLRadicalOperator&quot;; }
-    void setOperatorProperties() override;
-};
-
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLRadicalOperator, isRenderMathMLRadicalOperator())
-
-#endif // ENABLE(MATHML)
-#endif // RenderMathMLRadicalOperator_h
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
</span><span class="cx">  * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved.
</span><ins>+ * Copyright (C) 2016 Igalia S.L.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -32,166 +33,73 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FontCache.h&quot;
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><ins>+#include &quot;MathMLNames.h&quot;
</ins><span class="cx"> #include &quot;PaintInfo.h&quot;
</span><span class="cx"> #include &quot;RenderIterator.h&quot;
</span><del>-#include &quot;RenderMathMLRadicalOperator.h&quot;
-#include &quot;RenderMathMLSquareRoot.h&quot;
</del><ins>+#include &quot;RenderMathMLMenclose.h&quot;
+#include &quot;RenderMathMLOperator.h&quot;
</ins><span class="cx"> 
</span><ins>+static const UChar gRadicalCharacter = 0x221A;
+
</ins><span class="cx"> namespace WebCore {
</span><del>-    
-// RenderMathMLRoot implements drawing of radicals via the &lt;mroot&gt; and &lt;msqrt&gt; elements. For valid MathML elements, the DOM is
-//
-// &lt;mroot&gt; Base Index &lt;/mroot&gt;
-// &lt;msqrt&gt; Child1 Child2 ... ChildN &lt;/msqrt&gt;
-//
-// and the structure of the render tree will be
-//
-// IndexWrapper RadicalWrapper BaseWrapper
-//
-// where RadicalWrapper contains an &lt;mo&gt;&amp;#x221A;&lt;/mo&gt;.
-// For &lt;mroot&gt;, the IndexWrapper and BaseWrapper should contain exactly one child (Index and Base respectively).
-// For &lt;msqrt&gt;, the IndexWrapper should be empty and the BaseWrapper can contain any number of children (Child1, ... ChildN).
-//
-// In order to accept invalid markup and to handle &lt;mroot&gt; and &lt;msqrt&gt; consistently, we will allow any number of children in the BaseWrapper of &lt;mroot&gt; too.
-// We will allow the IndexWrapper to be empty and it will always contain the last child of the &lt;mroot&gt; if there are at least 2 elements.
</del><span class="cx"> 
</span><span class="cx"> RenderMathMLRoot::RenderMathMLRoot(Element&amp; element, RenderStyle&amp;&amp; style)
</span><del>-    : RenderMathMLBlock(element, WTFMove(style))
</del><ins>+    : RenderMathMLRow(element, WTFMove(style))
</ins><span class="cx"> {
</span><del>-}
</del><ins>+    // Determine what kind of expression we have by element name
+    if (element.hasTagName(MathMLNames::msqrtTag))
+        m_kind = SquareRoot;
+    else if (element.hasTagName(MathMLNames::mrootTag))
+        m_kind = RootWithIndex;
</ins><span class="cx"> 
</span><del>-RenderMathMLRootWrapper* RenderMathMLRoot::baseWrapper() const
-{
-    ASSERT(!isEmpty());
-    return downcast&lt;RenderMathMLRootWrapper&gt;(lastChild());
</del><ins>+    m_radicalOperator.setOperator(RenderMathMLRoot::style(), gRadicalCharacter, MathOperator::Type::VerticalOperator);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderMathMLBlock* RenderMathMLRoot::radicalWrapper() const
</del><ins>+bool RenderMathMLRoot::isValid() const
</ins><span class="cx"> {
</span><del>-    ASSERT(!isEmpty());
-    return downcast&lt;RenderMathMLBlock&gt;(lastChild()-&gt;previousSibling());
-}
</del><ins>+    // Verify whether the list of children is valid:
+    // &lt;msqrt&gt; child1 child2 ... childN &lt;/msqrt&gt;
+    // &lt;mroot&gt; base index &lt;/mroot&gt;
+    if (m_kind == SquareRoot)
+        return true;
</ins><span class="cx"> 
</span><del>-RenderMathMLRootWrapper* RenderMathMLRoot::indexWrapper() const
-{
-    ASSERT(!isEmpty());
-    return is&lt;RenderMathMLSquareRoot&gt;(*this) ? nullptr : downcast&lt;RenderMathMLRootWrapper&gt;(firstChild());
</del><ins>+    ASSERT(m_kind == RootWithIndex);
+    RenderBox* child = firstChildBox();
+    if (!child)
+        return false;
+    child = child-&gt;nextSiblingBox();
+    return child &amp;&amp; !child-&gt;nextSiblingBox();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderMathMLRadicalOperator* RenderMathMLRoot::radicalOperator() const
</del><ins>+RenderBox&amp; RenderMathMLRoot::getBase() const
</ins><span class="cx"> {
</span><del>-    ASSERT(!isEmpty());
-    return downcast&lt;RenderMathMLRadicalOperator&gt;(radicalWrapper()-&gt;firstChild());
</del><ins>+    ASSERT(isValid());
+    ASSERT(m_kind == RootWithIndex);
+    return *firstChildBox();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRoot::restructureWrappers()
</del><ins>+RenderBox&amp; RenderMathMLRoot::getIndex() const
</ins><span class="cx"> {
</span><del>-    ASSERT(!isEmpty());
-
-    auto base = baseWrapper();
-    auto index = indexWrapper();
-    auto radical = radicalWrapper();
-
-    // For visual consistency with the initial state, we remove the radical when the base/index wrappers become empty.
-    if (base-&gt;isEmpty() &amp;&amp; (!index || index-&gt;isEmpty())) {
-        if (!radical-&gt;isEmpty()) {
-            auto child = radicalOperator();
-            radical-&gt;removeChild(*child);
-            child-&gt;destroy();
-        }
-        // FIXME: early return!!!
-    }
-
-    if (radical-&gt;isEmpty()) {
-        // We create the radical operator.
-        RenderPtr&lt;RenderMathMLRadicalOperator&gt; radicalOperator = createRenderer&lt;RenderMathMLRadicalOperator&gt;(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX));
-        radicalOperator-&gt;initializeStyle();
-        radical-&gt;addChild(radicalOperator.leakPtr());
-    }
-
-    if (isRenderMathMLSquareRoot())
-        return;
-
-    if (auto childToMove = base-&gt;lastChild()) {
-        // We move the last child of the base wrapper into the index wrapper if the index wrapper is empty and the base wrapper has at least two children.
-        if (childToMove-&gt;previousSibling() &amp;&amp; index-&gt;isEmpty()) {
-            base-&gt;removeChildWithoutRestructuring(*childToMove);
-            index-&gt;addChild(childToMove);
-        }
-    }
-
-    if (auto childToMove = index-&gt;firstChild()) {
-        // We move the first child of the index wrapper into the base wrapper if:
-        // - either the index wrapper has at least two children.
-        // - or the base wrapper is empty but the index wrapper is not.
-        if (childToMove-&gt;nextSibling() || base-&gt;isEmpty()) {
-            index-&gt;removeChildWithoutRestructuring(*childToMove);
-            base-&gt;addChild(childToMove);
-        }
-    }
</del><ins>+    ASSERT(isValid());
+    ASSERT(m_kind == RootWithIndex);
+    return *firstChildBox()-&gt;nextSiblingBox();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRoot::addChild(RenderObject* newChild, RenderObject* beforeChild)
-{
-    if (isEmpty()) {
-        if (!isRenderMathMLSquareRoot()) {
-            // We add the IndexWrapper.
-            RenderMathMLBlock::addChild(RenderMathMLRootWrapper::createAnonymousWrapper(this).leakPtr());
-        }
-
-        // We create the radicalWrapper
-        RenderMathMLBlock::addChild(RenderMathMLBlock::createAnonymousMathMLBlock().leakPtr());
-
-        // We create the BaseWrapper.
-        RenderMathMLBlock::addChild(RenderMathMLRootWrapper::createAnonymousWrapper(this).leakPtr());
-
-        updateStyle();
-    }
-
-    // We insert the child.
-    auto base = baseWrapper();
-    auto index = indexWrapper();
-    RenderElement* actualParent;
-    RenderElement* actualBeforeChild;
-    if (is&lt;RenderMathMLSquareRoot&gt;(*this)) {
-        // For square root, we always insert the child into the base wrapper.
-        actualParent = base;
-        if (beforeChild &amp;&amp; beforeChild-&gt;parent() == base)
-            actualBeforeChild = downcast&lt;RenderElement&gt;(beforeChild);
-        else
-            actualBeforeChild = nullptr;
-    } else {
-        // For mroot, we insert the child into the parent of beforeChild, or at the end of the index. The wrapper structure is reorganize below.
-        actualParent = beforeChild ? beforeChild-&gt;parent() : nullptr;
-        if (actualParent == base || actualParent == index)
-            actualBeforeChild = downcast&lt;RenderElement&gt;(beforeChild);
-        else {
-            actualParent = index;
-            actualBeforeChild = nullptr;
-        }
-    }
-    actualParent-&gt;addChild(newChild, actualBeforeChild);
-    restructureWrappers();
-}
-
</del><span class="cx"> void RenderMathMLRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
</span><span class="cx"> {
</span><del>-    RenderMathMLBlock::styleDidChange(diff, oldStyle);
-    if (!isEmpty())
-        updateStyle();
</del><ins>+    RenderMathMLRow::styleDidChange(diff, oldStyle);
+    m_radicalOperator.reset(style());
+    updateStyle();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLRoot::updateFromElement()
</span><span class="cx"> {
</span><del>-    RenderMathMLBlock::updateFromElement();
-    if (!isEmpty())
-        updateStyle();
</del><ins>+    RenderMathMLRow::updateFromElement();
+    updateStyle();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLRoot::updateStyle()
</span><span class="cx"> {
</span><del>-    ASSERT(!isEmpty());
-
</del><span class="cx">     // We set some constants to draw the radical, as defined in the OpenType MATH tables.
</span><span class="cx"> 
</span><span class="cx">     m_ruleThickness = 0.05f * style().fontCascade().size();
</span><span class="lines">@@ -199,8 +107,8 @@
</span><span class="cx">     // FIXME: The recommended default for m_verticalGap in displaystyle is rule thickness + 1/4 x-height (https://bugs.webkit.org/show_bug.cgi?id=118737).
</span><span class="cx">     m_verticalGap = 11 * m_ruleThickness / 4;
</span><span class="cx">     m_extraAscender = m_ruleThickness;
</span><del>-    LayoutUnit kernBeforeDegree = 5 * style().fontCascade().size() / 18;
-    LayoutUnit kernAfterDegree = -10 * style().fontCascade().size() / 18;
</del><ins>+    m_kernBeforeDegree = 5 * style().fontCascade().size() / 18;
+    m_kernAfterDegree = -10 * style().fontCascade().size() / 18;
</ins><span class="cx">     m_degreeBottomRaisePercent = 0.6f;
</span><span class="cx"> 
</span><span class="cx">     const auto&amp; primaryFont = style().fontCascade().primaryFont();
</span><span class="lines">@@ -210,151 +118,166 @@
</span><span class="cx">         m_ruleThickness = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalRuleThickness);
</span><span class="cx">         m_extraAscender = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalExtraAscender);
</span><span class="cx"> 
</span><del>-        if (!isRenderMathMLSquareRoot()) {
-            kernBeforeDegree = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalKernBeforeDegree);
-            kernAfterDegree = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalKernAfterDegree);
</del><ins>+        if (m_kind == RootWithIndex) {
+            m_kernBeforeDegree = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalKernBeforeDegree);
+            m_kernAfterDegree = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalKernAfterDegree);
</ins><span class="cx">             m_degreeBottomRaisePercent = mathData-&gt;getMathConstant(primaryFont, OpenTypeMathData::RadicalDegreeBottomRaisePercent);
</span><span class="cx">         }
</span><span class="cx">     }
</span><ins>+}
</ins><span class="cx"> 
</span><del>-    // We set the style of the anonymous wrappers.
</del><ins>+void RenderMathMLRoot::computePreferredLogicalWidths()
+{
+    ASSERT(preferredLogicalWidthsDirty());
</ins><span class="cx"> 
</span><del>-    auto radical = radicalWrapper();
-    auto radicalStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX);
-    radicalStyle.setMarginTop(Length(0, Fixed)); // This will be updated in RenderMathMLRoot::layout().
-    radical-&gt;setStyle(WTFMove(radicalStyle));
-    radical-&gt;setNeedsLayoutAndPrefWidthsRecalc();
</del><ins>+    updateStyle();
</ins><span class="cx"> 
</span><del>-    auto base = baseWrapper();
-    auto baseStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX);
-    baseStyle.setMarginTop(Length(0, Fixed)); // This will be updated in RenderMathMLRoot::layout().
-    baseStyle.setAlignItemsPosition(ItemPositionBaseline);
-    base-&gt;setStyle(WTFMove(baseStyle));
-    base-&gt;setNeedsLayoutAndPrefWidthsRecalc();
-
-    if (!isRenderMathMLSquareRoot()) {
-        // For mroot, we also set the style of the index wrapper.
-        auto index = indexWrapper();
-        auto indexStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX);
-        indexStyle.setMarginTop(Length(0, Fixed)); // This will be updated in RenderMathMLRoot::layout().
-        indexStyle.setMarginStart(Length(kernBeforeDegree, Fixed));
-        indexStyle.setMarginEnd(Length(kernAfterDegree, Fixed));
-        indexStyle.setAlignItemsPosition(ItemPositionBaseline);
-        index-&gt;setStyle(WTFMove(indexStyle));
-        index-&gt;setNeedsLayoutAndPrefWidthsRecalc();
</del><ins>+    if (!isValid()) {
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
+        setPreferredLogicalWidthsDirty(false);
+        return;
</ins><span class="cx">     }
</span><del>-}
</del><span class="cx"> 
</span><del>-Optional&lt;int&gt; RenderMathMLRoot::firstLineBaseline() const
-{
-    if (!isEmpty()) {
-        auto base = baseWrapper();
-        return static_cast&lt;int&gt;(lroundf(base-&gt;firstLineBaseline().valueOr(-1) + base-&gt;marginTop()));
</del><ins>+    LayoutUnit preferredWidth = 0;
+    if (m_kind == SquareRoot) {
+        preferredWidth += m_radicalOperator.maxPreferredWidth();
+        setPreferredLogicalWidthsDirty(true);
+        RenderMathMLRow::computePreferredLogicalWidths();
+        preferredWidth += m_maxPreferredLogicalWidth;
+    } else {
+        ASSERT(m_kind == RootWithIndex);
+        preferredWidth += m_kernBeforeDegree;
+        preferredWidth += getIndex().maxPreferredLogicalWidth();
+        preferredWidth += m_kernAfterDegree;
+        preferredWidth += m_radicalOperator.maxPreferredWidth();
+        preferredWidth += getBase().maxPreferredLogicalWidth();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return RenderMathMLBlock::firstLineBaseline();
</del><ins>+    m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = preferredWidth;
+    setPreferredLogicalWidthsDirty(false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRoot::layout()
</del><ins>+void RenderMathMLRoot::layoutBlock(bool relayoutChildren, LayoutUnit)
</ins><span class="cx"> {
</span><del>-    if (isEmpty()) {
-        RenderMathMLBlock::layout();
</del><ins>+    ASSERT(needsLayout());
+
+    if (!relayoutChildren &amp;&amp; simplifiedLayout())
</ins><span class="cx">         return;
</span><del>-    }
</del><span class="cx"> 
</span><del>-    // FIXME: It seems that changing the top margin of the base below modifies its logical height and leads to reftest failures.
-    // For now, we workaround that by avoiding to recompute the child margins if they were not reset in updateStyle().
-    auto base = baseWrapper();
-    if (base-&gt;marginTop() &gt; 0) {
-        RenderMathMLBlock::layout();
</del><ins>+    updateStyle();
+    m_radicalOperatorTop = 0;
+    m_baseWidth = 0;
+
+    if (!isValid()) {
+        setLogicalWidth(0);
+        setLogicalHeight(0);
+        clearNeedsLayout();
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // We layout the children.
-    for (RenderObject* child = firstChild(); child; child = child-&gt;nextSibling()) {
-        if (child-&gt;needsLayout())
-            downcast&lt;RenderElement&gt;(*child).layout();
</del><ins>+    // We layout the children, determine the vertical metrics of the base and set the logical width.
+    // Note: Per the MathML specification, the children of &lt;msqrt&gt; are wrapped in an inferred &lt;mrow&gt;, which is the desired base.
+    LayoutUnit baseAscent, baseDescent;
+    recomputeLogicalWidth();
+    if (m_kind == SquareRoot) {
+        baseAscent = baseDescent;
+        RenderMathMLRow::computeLineVerticalStretch(baseAscent, baseDescent);
+        RenderMathMLRow::layoutRowItems(baseAscent, baseDescent);
+        m_baseWidth = logicalWidth();
+    } else {
+        getBase().layoutIfNeeded();
+        m_baseWidth = getBase().logicalWidth();
+        baseAscent = ascentForChild(getBase());
+        baseDescent = getBase().logicalHeight() - baseAscent;
+        getIndex().layoutIfNeeded();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto radical = radicalOperator();
-    if (radical) {
-        // We stretch the radical sign to cover the height of the base wrapper.
-        float baseHeight = base-&gt;logicalHeight();
-        float baseHeightAboveBaseline = base-&gt;firstLineBaseline().valueOr(baseHeight);
-        float baseDepthBelowBaseline = baseHeight - baseHeightAboveBaseline;
-        baseHeightAboveBaseline += m_verticalGap;
-        radical-&gt;stretchTo(baseHeightAboveBaseline, baseDepthBelowBaseline);
</del><ins>+    // Stretch the radical operator to cover the base height.
+    // We can then determine the metrics of the radical operator + the base.
+    m_radicalOperator.stretchTo(style(), baseAscent, baseDescent);
+    LayoutUnit radicalOperatorHeight = m_radicalOperator.ascent() + m_radicalOperator.descent();
+    LayoutUnit indexBottomRaise = m_degreeBottomRaisePercent * radicalOperatorHeight;
+    LayoutUnit radicalAscent = baseAscent + m_verticalGap + m_ruleThickness + m_extraAscender;
+    LayoutUnit radicalDescent = std::max&lt;LayoutUnit&gt;(baseDescent, radicalOperatorHeight + m_extraAscender - radicalAscent);
+    LayoutUnit descent = radicalDescent;
+    LayoutUnit ascent = radicalAscent;
</ins><span class="cx"> 
</span><del>-        // We modify the top margins to adjust the vertical positions of wrappers.
-        float radicalTopMargin = m_extraAscender;
-        float baseTopMargin = m_verticalGap + m_ruleThickness + m_extraAscender;
-        if (!isRenderMathMLSquareRoot()) {
-            // For mroot, we try to place the index so the space below its baseline is m_degreeBottomRaisePercent times the height of the radical.
-            auto index = indexWrapper();
-            float indexHeight = 0;
-            if (!index-&gt;isEmpty())
-                indexHeight = downcast&lt;RenderBlock&gt;(*index-&gt;firstChild()).logicalHeight();
-            float indexTopMargin = (1.0 - m_degreeBottomRaisePercent) * radical-&gt;stretchSize() + radicalTopMargin - indexHeight;
-            if (indexTopMargin &lt; 0) {
-                // If the index is too tall, we must add space at the top of renderer.
-                radicalTopMargin -= indexTopMargin;
-                baseTopMargin -= indexTopMargin;
-                indexTopMargin = 0;
-            }
-            index-&gt;mutableStyle().setMarginTop(Length(indexTopMargin, Fixed));
-        }
-        radical-&gt;mutableStyle().setMarginTop(Length(radicalTopMargin, Fixed));
-        base-&gt;mutableStyle().setMarginTop(Length(baseTopMargin, Fixed));
</del><ins>+    // We set the logical width.
+    if (m_kind == SquareRoot)
+        setLogicalWidth(m_radicalOperator.width() + m_baseWidth);
+    else {
+        ASSERT(m_kind == RootWithIndex);
+        setLogicalWidth(m_kernBeforeDegree + getIndex().logicalWidth() + m_kernAfterDegree + m_radicalOperator.width() + m_baseWidth);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RenderMathMLBlock::layout();
</del><ins>+    // For &lt;mroot&gt;, we update the metrics to take into account the index.
+    LayoutUnit indexAscent, indexDescent;
+    if (m_kind == RootWithIndex) {
+        indexAscent = ascentForChild(getIndex());
+        indexDescent = getIndex().logicalHeight() - indexAscent;
+        ascent = std::max&lt;LayoutUnit&gt;(radicalAscent, indexBottomRaise + indexDescent + indexAscent - descent);
+    }
+
+    // We set the final position of children.
+    m_radicalOperatorTop = ascent - radicalAscent + m_extraAscender;
+    LayoutUnit horizontalOffset = m_radicalOperator.width();
+    if (m_kind == RootWithIndex)
+        horizontalOffset += m_kernBeforeDegree + getIndex().logicalWidth() + m_kernAfterDegree;
+    LayoutPoint baseLocation(mirrorIfNeeded(horizontalOffset, m_baseWidth), ascent - baseAscent);
+    if (m_kind == SquareRoot) {
+        for (auto* child = firstChildBox(); child; child = child-&gt;nextSiblingBox())
+            child-&gt;setLocation(child-&gt;location() + baseLocation);
+    } else {
+        ASSERT(m_kind == RootWithIndex);
+        getBase().setLocation(baseLocation);
+        LayoutPoint indexLocation(mirrorIfNeeded(m_kernBeforeDegree, getIndex()), ascent + descent - indexBottomRaise - indexDescent - indexAscent);
+        getIndex().setLocation(indexLocation);
+    }
+
+    setLogicalHeight(ascent + descent);
+    clearNeedsLayout();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderMathMLRoot::paintChildren(PaintInfo&amp; paintInfo, const LayoutPoint&amp; paintOffset, PaintInfo&amp; paintInfoForChild, bool usePrintRect)
+{
+    for (auto* child = firstChildBox(); child; child = child-&gt;nextSiblingBox()) {
+        if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))
+            return;
+    }
+}
+
</ins><span class="cx"> void RenderMathMLRoot::paint(PaintInfo&amp; info, const LayoutPoint&amp; paintOffset)
</span><span class="cx"> {
</span><del>-    RenderMathMLBlock::paint(info, paintOffset);
</del><ins>+    RenderMathMLRow::paint(info, paintOffset);
</ins><span class="cx">     
</span><del>-    if (isEmpty() || info.context().paintingDisabled() || style().visibility() != VISIBLE)
</del><ins>+    if (isEmpty() || info.context().paintingDisabled() || style().visibility() != VISIBLE || !isValid())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto base = baseWrapper();
-    auto radical = radicalOperator();
-    if (!base || !radical || !m_ruleThickness)
-        return;
</del><ins>+    // We draw the radical operator.
+    LayoutPoint radicalOperatorTopLeft = paintOffset + location();
+    LayoutUnit horizontalOffset = 0;
+    if (m_kind == RootWithIndex)
+        horizontalOffset = m_kernBeforeDegree + getIndex().logicalWidth() + m_kernAfterDegree;
+    radicalOperatorTopLeft.move(mirrorIfNeeded(horizontalOffset, m_radicalOperator.width()), m_radicalOperatorTop);
+    m_radicalOperator.paint(style(), info, radicalOperatorTopLeft);
</ins><span class="cx"> 
</span><span class="cx">     // We draw the radical line.
</span><ins>+    if (!m_ruleThickness)
+        return;
</ins><span class="cx">     GraphicsContextStateSaver stateSaver(info.context());
</span><span class="cx"> 
</span><span class="cx">     info.context().setStrokeThickness(m_ruleThickness);
</span><span class="cx">     info.context().setStrokeStyle(SolidStroke);
</span><span class="cx">     info.context().setStrokeColor(style().visitedDependentColor(CSSPropertyColor));
</span><del>-
-    // The preferred width of the radical is sometimes incorrect, so we draw a slightly longer line to ensure it touches the radical symbol (https://bugs.webkit.org/show_bug.cgi?id=130326).
-    LayoutUnit sizeError = radical-&gt;trailingSpaceError();
-    IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset + location() + base-&gt;location() + LayoutPoint(-sizeError, -(m_verticalGap + m_ruleThickness / 2)));
-    info.context().drawLine(adjustedPaintOffset, roundedIntPoint(LayoutPoint(adjustedPaintOffset.x() + base-&gt;offsetWidth() + sizeError, adjustedPaintOffset.y())));
</del><ins>+    LayoutPoint ruleOffsetFrom = paintOffset + location() + LayoutPoint(0, m_radicalOperatorTop + m_ruleThickness / 2);
+    LayoutPoint ruleOffsetTo = ruleOffsetFrom;
+    horizontalOffset += m_radicalOperator.width();
+    ruleOffsetFrom.move(mirrorIfNeeded(horizontalOffset), 0);
+    horizontalOffset += m_baseWidth;
+    ruleOffsetTo.move(mirrorIfNeeded(horizontalOffset), 0);
+    info.context().drawLine(ruleOffsetFrom, ruleOffsetTo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderPtr&lt;RenderMathMLRootWrapper&gt; RenderMathMLRootWrapper::createAnonymousWrapper(RenderMathMLRoot* renderObject)
-{
-    RenderPtr&lt;RenderMathMLRootWrapper&gt; newBlock = createRenderer&lt;RenderMathMLRootWrapper&gt;(renderObject-&gt;document(), RenderStyle::createAnonymousStyleWithDisplay(renderObject-&gt;style(), FLEX));
-    newBlock-&gt;initializeStyle();
-    return newBlock;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRootWrapper::removeChildWithoutRestructuring(RenderObject&amp; child)
-{
-    RenderMathMLBlock::removeChild(child);
-}
-
-void RenderMathMLRootWrapper::removeChild(RenderObject&amp; child)
-{
-    RenderMathMLBlock::removeChild(child);
-
-    if (!(beingDestroyed() || documentBeingDestroyed()))
-        downcast&lt;RenderMathMLRoot&gt;(*parent()).restructureWrappers();
-}
-
-}
-
</del><span class="cx"> #endif // ENABLE(MATHML)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRooth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
</span><ins>+ * Copyright (C) 2016 Igalia S.L.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,71 +29,57 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx"> 
</span><ins>+#include &quot;MathOperator.h&quot;
</ins><span class="cx"> #include &quot;RenderMathMLBlock.h&quot;
</span><span class="cx"> #include &quot;RenderMathMLRow.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class RenderMathMLRadicalOperator;
-class RenderMathMLRootWrapper;
-    
-// Render base^(1/index), or sqrt(base) via the derived class RenderMathMLSquareRoot, using radical notation.
-class RenderMathMLRoot : public RenderMathMLBlock {
</del><ins>+class RenderMathMLMenclose;
</ins><span class="cx"> 
</span><ins>+// Render base^(1/index), or sqrt(base) using radical notation.
+class RenderMathMLRoot : public RenderMathMLRow {
+
</ins><span class="cx"> friend class RenderMathMLRootWrapper;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="cx">     RenderMathMLRoot(Element&amp;, RenderStyle&amp;&amp;);
</span><ins>+    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
+    void updateFromElement() final;
</ins><span class="cx"> 
</span><del>-    void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
-    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
-    void updateFromElement() override;
-    
-    RenderMathMLRootWrapper* baseWrapper() const;
-    RenderMathMLRootWrapper* indexWrapper() const;
</del><ins>+    void computePreferredLogicalWidths() final;
+    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
+    void paintChildren(PaintInfo&amp; forSelf, const LayoutPoint&amp;, PaintInfo&amp; forChild, bool usePrintRect) final;
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    void layout() override;
-    
-    void paint(PaintInfo&amp;, const LayoutPoint&amp;) override;
</del><ins>+    void paint(PaintInfo&amp;, const LayoutPoint&amp;) final;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    bool isValid() const;
+    RenderBox&amp; getBase() const;
+    RenderBox&amp; getIndex() const;
</ins><span class="cx">     bool isRenderMathMLRoot() const final { return true; }
</span><del>-    const char* renderName() const override { return &quot;RenderMathMLRoot&quot;; }
-    Optional&lt;int&gt; firstLineBaseline() const override;
</del><ins>+    const char* renderName() const final { return &quot;RenderMathMLRoot&quot;; }
</ins><span class="cx">     void updateStyle();
</span><del>-    void restructureWrappers();
</del><span class="cx"> 
</span><del>-    RenderMathMLBlock* radicalWrapper() const;
-    RenderMathMLRadicalOperator* radicalOperator() const;
-
</del><ins>+    MathOperator m_radicalOperator;
</ins><span class="cx">     LayoutUnit m_verticalGap;
</span><span class="cx">     LayoutUnit m_ruleThickness;
</span><span class="cx">     LayoutUnit m_extraAscender;
</span><ins>+    LayoutUnit m_kernBeforeDegree;
+    LayoutUnit m_kernAfterDegree;
</ins><span class="cx">     float m_degreeBottomRaisePercent;
</span><del>-};
</del><ins>+    LayoutUnit m_radicalOperatorTop;
+    LayoutUnit m_baseWidth;
</ins><span class="cx"> 
</span><del>-// These are specific wrappers for the index and base, that ask the parent to restructure the renderers after child removal.
-class RenderMathMLRootWrapper final : public RenderMathMLRow {
-
-friend class RenderMathMLRoot;
-
-public:
-    RenderMathMLRootWrapper(Document&amp; document, RenderStyle&amp;&amp; style)
-        : RenderMathMLRow(document, WTFMove(style)) { }
-
-private:
-    void removeChildWithoutRestructuring(RenderObject&amp;);
-    void removeChild(RenderObject&amp;) override;
-    static RenderPtr&lt;RenderMathMLRootWrapper&gt; createAnonymousWrapper(RenderMathMLRoot* renderObject);
-    bool isRenderMathMLRootWrapper() const override { return true; }
-    const char* renderName() const override { return &quot;RenderMathMLRootWrapper&quot;; }
</del><ins>+    enum RootType { SquareRoot, RootWithIndex };
+    RootType m_kind;
+    bool isRenderMathMLSquareRoot() const final { return m_kind == SquareRoot; }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLRoot, isRenderMathMLRoot())
</span><del>-SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLRootWrapper, isRenderMathMLRootWrapper())
</del><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(MATHML)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -131,9 +131,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     width += borderEnd() + paddingEnd();
</span><del>-    // FIXME: RenderMathMLRoot classes should also recalculate the exact logical width instead of using the preferred width.
-    // See http://webkit.org/b/153987
-    if ((!isRenderMathMLMath() || style().display() == INLINE) &amp;&amp; !isRenderMathMLRoot())
</del><ins>+    if ((!isRenderMathMLMath() || style().display() == INLINE))
</ins><span class="cx">         setLogicalWidth(width);
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit verticalOffset = borderTop() + paddingTop();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -303,14 +303,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderMathMLScripts::mirrorIfNeeded(LayoutUnit horizontalOffset, const RenderBox&amp; child)
-{
-    if (style().direction() == RTL)
-        return logicalWidth() - child.logicalWidth() - horizontalOffset;
-
-    return horizontalOffset;
-}
-
</del><span class="cx"> void RenderMathMLScripts::layoutBlock(bool relayoutChildren, LayoutUnit)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(needsLayout());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -51,7 +51,6 @@
</span><span class="cx">     LayoutUnit italicCorrection(RenderBox* base);
</span><span class="cx">     void computePreferredLogicalWidths() override;
</span><span class="cx">     void getScriptMetricsAndLayoutIfNeeded(RenderBox* base, RenderBox* script, LayoutUnit&amp; minSubScriptShift, LayoutUnit&amp; minSupScriptShift, LayoutUnit&amp; maxScriptDescent, LayoutUnit&amp; maxScriptAscent);
</span><del>-    LayoutUnit mirrorIfNeeded(LayoutUnit horizontalOffset, const RenderBox&amp; child);
</del><span class="cx"> 
</span><span class="cx">     enum ScriptsType { Sub, Super, SubSup, Multiscripts };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLSquareRootcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
- * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#if ENABLE(MATHML)
-
-#include &quot;RenderMathMLSquareRoot.h&quot;
-
-#include &quot;RenderMathMLMenclose.h&quot;
-
-namespace WebCore {
-    
-RenderMathMLSquareRoot::RenderMathMLSquareRoot(Element&amp; element, RenderStyle&amp;&amp; style)
-    : RenderMathMLRoot(element, WTFMove(style))
-{
-}
-
-}
-#endif // ENABLE(MATHML)
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLSquareRooth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h (202167 => 202168)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h        2016-06-17 15:43:14 UTC (rev 202167)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.h        2016-06-17 16:30:03 UTC (rev 202168)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */

-#ifndef RenderMathMLSquareRoot_h
-#define RenderMathMLSquareRoot_h
-
-#if ENABLE(MATHML)
-
-#include &quot;RenderMathMLRoot.h&quot;
-
-
-namespace WebCore {
-
-class RenderMathMLMenclose;
-
-// Render sqrt(base), using radical notation.
-class RenderMathMLSquareRoot final : public RenderMathMLRoot {
-public:
-    RenderMathMLSquareRoot(Element&amp;, RenderStyle&amp;&amp;);
-    
-private:
-    bool isRenderMathMLSquareRoot() const override { return true; }
-    const char* renderName() const override { return &quot;RenderMathMLSquareRoot&quot;; }
-};
-    
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLSquareRoot, isRenderMathMLSquareRoot())
-
-#endif // ENABLE(MATHML)
-
-#endif // RenderMathMLSquareRoot_h
</del></span></pre>
</div>
</div>

</body>
</html>