<!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>[202161] 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/202161">202161</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-06-17 02:24:49 -0700 (Fri, 17 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>MathOperator: Add fallback mechanisms for stretching and mirroring radical symbols
https://bugs.webkit.org/show_bug.cgi?id=156836

Source/WebCore:

Patch by Frederic Wang &lt;fwang@igalia.com&gt; on 2016-06-17
Reviewed by Sergio Villar Senin.

Some platforms do not have OpenType MATH fonts pre-installed and thus can not draw stretchy
operators using size variants or glyph assembly. This is especially problematic for the
radical symbol which is used to write roots. Currently, we have some fallback code to draw
that symbol using graphical primitives but it is a bit complex and makes the style of radical
inconsistent with the font used. We solve these issues by just scaling the base glyph via a
scale transform. Such scale transform is also used to mirror the radical symbol so that we
have some support for right-to-left roots until we can do glyph-level mirroring
via the OpenType rtlm feature.

Test: mathml/radical-fallback.html

* rendering/mathml/MathOperator.cpp: Add a constant for the code point U+221A of the radical.
(WebCore::MathOperator::reset): In general, we don't need any vertical scaling for radical
symbols so m_radicalVerticalScale is initialized to 1.
(WebCore::MathOperator::calculateStretchyData): If we don't have a font with a MATH table and we
try streching a radical, then we update the vertical metrics to match the target size and
set m_radicalVerticalScale to the value necessary to make the base glyph scaled to that size.
(WebCore::MathOperator::paint): For a radical operator, we may apply a scale transform of
parameters (radicalHorizontalScale, m_radicalVerticalScale) in order to support RTL
mirroring or vertical stretching.
* rendering/mathml/MathOperator.h: We add a m_radicalVerticalScale member to indicate the
scaling to apply to the base radical glyph when the stretchy fallback is necessary.
(WebCore::MathOperator::isStretched): The operator is also considered stretched when the
m_radicalVerticalScale is applied to the base size.
* rendering/mathml/RenderMathMLRadicalOperator.cpp: Remove code specific to the old fallback mechanism.
* rendering/mathml/RenderMathMLRadicalOperator.h: Ditto.

LayoutTests:

Reviewed by Sergio Villar Senin.

We add a pixel test to verify the result of stretching a radical operator.
We test RTL/LTR direction as well as default/sans-serif font in order to check the fallback code.

* mathml/radical-fallback.html: Added.
* platform/gtk/mathml/radical-fallback-expected.png: Added.
* platform/gtk/mathml/radical-fallback-expected.txt: Added.
* platform/ios-simulator/mathml/radical-fallback-expected.txt: Added.
* platform/mac/mathml/radical-fallback-expected.png: Added.
* platform/mac/mathml/radical-fallback-expected.txt: Added.
* platform/ios-simulator/mathml/presentation/roots.txt: Updated.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormathmlpresentationrootsexpectedtxt">trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlMathOperatorcpp">trunk/Source/WebCore/rendering/mathml/MathOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlMathOperatorh">trunk/Source/WebCore/rendering/mathml/MathOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
<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>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmathmlradicalfallbackhtml">trunk/LayoutTests/mathml/radical-fallback.html</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="#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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/LayoutTests/ChangeLog        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-06-17  Frederic Wang  &lt;fred.wang@free.fr&gt;
+
+        MathOperator: Add fallback mechanisms for stretching and mirroring radical symbols
+        https://bugs.webkit.org/show_bug.cgi?id=156836
+
+        Reviewed by Sergio Villar Senin.
+
+        We add a pixel test to verify the result of stretching a radical operator.
+        We test RTL/LTR direction as well as default/sans-serif font in order to check the fallback code.
+
+        * mathml/radical-fallback.html: Added.
+        * platform/gtk/mathml/radical-fallback-expected.png: Added.
+        * platform/gtk/mathml/radical-fallback-expected.txt: Added.
+        * platform/ios-simulator/mathml/radical-fallback-expected.txt: Added.
+        * platform/mac/mathml/radical-fallback-expected.png: Added.
+        * platform/mac/mathml/radical-fallback-expected.txt: Added.
+        * platform/ios-simulator/mathml/presentation/roots.txt: Updated.
+
</ins><span class="cx"> 2016-06-16  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r202147.
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlradicalfallbackhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/radical-fallback.html (0 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/radical-fallback.html                                (rev 0)
+++ trunk/LayoutTests/mathml/radical-fallback.html        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;Radical fallback&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- This pixel test verifies stretching of radical operators with either
+         the default MathML font or a sans-serif font. The latter is likely
+         to require a fallback mechanism ascsans-serif are generally not math
+         fonts and so can not stretch radicals. --&gt;
+
+    &lt;p&gt;Large LTR radicals:
+      &lt;math&gt;
+        &lt;msqrt&gt;&lt;mspace height=&quot;5em&quot;/&gt;&lt;/msqrt&gt;
+        &lt;msqrt style=&quot;font-family: sans-serif&quot;&gt;&lt;mspace height=&quot;5em&quot;/&gt;&lt;/msqrt&gt;
+      &lt;/math&gt;
+    &lt;/p&gt;
+
+    &lt;p&gt;Large RTL radicals:
+      &lt;math dir=&quot;rtl&quot;&gt;
+        &lt;msqrt&gt;&lt;mspace height=&quot;5em&quot;/&gt;&lt;/msqrt&gt;
+        &lt;msqrt style=&quot;font-family: sans-serif&quot;&gt;&lt;mspace height=&quot;5em&quot;/&gt;&lt;/msqrt&gt;
+      &lt;/math&gt;
+    &lt;/p&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/radical-fallback.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsplatformgtkmathmlradicalfallbackexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/gtk/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/gtk/mathml/radical-fallback-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformgtkmathmlradicalfallbackexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt (0 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x222
+  RenderBlock {HTML} at (0,0) size 800x222
+    RenderBody {BODY} at (8,16) size 784x190
+      RenderBlock {P} at (0,0) size 784x87
+        RenderText {#text} at (0,70) size 132x17
+          text run at (0,70) width 132: &quot;Large LTR radicals: &quot;
+        RenderMathMLMath {math} at (132,0) size 28x85 [padding: 0 1 0 1]
+          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
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,103) size 784x87
+        RenderText {#text} at (0,70) size 132x17
+          text run at (0,70) width 132: &quot;Large RTL radicals: &quot;
+        RenderMathMLMath {math} at (132,0) size 28x85 [padding: 0 1 0 1]
+          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
+        RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/gtk/mathml/radical-fallback-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsplatformiossimulatormathmlpresentationrootsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -1,20 +1,20 @@
</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 800x518
-  RenderBlock {html} at (0,0) size 800x518
-    RenderBody {body} at (8,16) size 784x486
</del><ins>+layer at (0,0) size 800x492
+  RenderBlock {html} at (0,0) size 800x492
+    RenderBody {body} at (8,16) size 784x460
</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 23x18 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 20x18 [color=#FF0000]
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x18
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                  RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+        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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,3) size 8x15
</del><ins>+            RenderMathMLRootWrapper at (8,3) size 9x14
</ins><span class="cx">               RenderMathMLToken {mn} at (0,0) 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="lines">@@ -23,15 +23,15 @@
</span><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 47x18 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 45x18
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x18
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                  RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+        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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,3) size 33x15
</del><ins>+            RenderMathMLRootWrapper at (8,3) size 34x14
</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">@@ -51,15 +51,15 @@
</span><span class="cx">       RenderBlock {p} at (0,72) size 784x25
</span><span class="cx">         RenderText {#text} at (0,5) size 227x19
</span><span class="cx">           text run at (0,5) width 227: &quot;long square root with implied row: &quot;
</span><del>-        RenderMathMLMath {math} at (226,0) size 57x24 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 54x24
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x24
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x24
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x23
-                  RenderBlock (anonymous) at (0,0) size 9x23
</del><ins>+        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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,3) size 42x21
</del><ins>+            RenderMathMLRootWrapper at (8,3) size 43x19
</ins><span class="cx">               RenderMathMLScripts {msup} at (0,0) size 18x18
</span><span class="cx">                 RenderMathMLToken {mi} at (0,8) size 9x10 [padding: 0 2 0 0]
</span><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
</span><span class="lines">@@ -81,18 +81,18 @@
</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,113) size 784x37
</del><ins>+      RenderBlock {p} at (0,113) size 784x34
</ins><span class="cx">         RenderText {#text} at (0,8) size 117x19
</span><span class="cx">           text run at (0,8) width 117: &quot;root of a fraction: &quot;
</span><del>-        RenderMathMLMath {math} at (116,0) size 47x38 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 45x38
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x38
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x38
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x37
-                  RenderBlock (anonymous) at (0,0) size 9x37
</del><ins>+        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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,3) size 33x35
</del><ins>+            RenderMathMLRootWrapper at (8,3) size 34x32
</ins><span class="cx">               RenderMathMLFraction {mfrac} at (0,0) size 33x32
</span><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="lines">@@ -126,35 +126,35 @@
</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;2&quot;
</span><del>-      RenderBlock {p} at (0,166) 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 23x19 [color=#0000FF] [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 21x19
-            RenderMathMLRootWrapper at (4,0) size 5x19
</del><ins>+      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
</ins><span class="cx">               RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                       text run at (0,0) width 5: &quot;3&quot;
</span><del>-            RenderMathMLBlock (anonymous, flex) at (0,0) size 13x19
-              RenderMathMLRadicalOperator (anonymous) at (0,1) size 12x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                  RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+            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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,4) size 9x15
</del><ins>+            RenderMathMLRootWrapper at (8,4) size 9x14
</ins><span class="cx">               RenderMathMLToken {mn} at (0,0) 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><span class="cx">                       text run at (0,-1) width 8: &quot;2&quot;
</span><del>-      RenderBlock {p} at (0,202) size 784x20
</del><ins>+      RenderBlock {p} at (0,200) 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 51x18 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 48x18
-            RenderMathMLRootWrapper at (4,0) size 33x18
</del><ins>+        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
</ins><span class="cx">               RenderMathMLRow {mrow} at (0,0) size 33x7
</span><span class="cx">                 RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
</span><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
</span><span class="lines">@@ -181,24 +181,24 @@
</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;z&quot;
</span><del>-            RenderMathMLBlock (anonymous, flex) at (27,0) size 13x18
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                  RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+            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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (39,3) size 9x15
</del><ins>+            RenderMathMLRootWrapper at (36,3) size 9x14
</ins><span class="cx">               RenderMathMLToken {mn} at (0,0) 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><span class="cx">                       text run at (0,-1) width 8: &quot;2&quot;
</span><del>-      RenderBlock {p} at (0,238) size 784x37
</del><ins>+      RenderBlock {p} at (0,236) 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><del>-        RenderMathMLMath {math} at (187,0) size 76x38 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 73x38
-            RenderMathMLRootWrapper at (4,8) size 33x30
</del><ins>+        RenderMathMLMath {math} at (187,0) size 72x35 [padding: 0 1 0 1]
+          RenderMathMLRoot {mroot} at (1,0) size 70x35
+            RenderMathMLRootWrapper at (4,7) size 33x28
</ins><span class="cx">               RenderMathMLRow {mrow} at (0,0) size 33x7
</span><span class="cx">                 RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
</span><span class="cx">                   RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
</span><span class="lines">@@ -225,13 +225,13 @@
</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;z&quot;
</span><del>-            RenderMathMLBlock (anonymous, flex) at (27,0) size 13x38
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x38
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x37
-                  RenderBlock (anonymous) at (0,0) size 9x37
</del><ins>+            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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (39,3) size 34x35
</del><ins>+            RenderMathMLRootWrapper at (36,3) size 34x32
</ins><span class="cx">               RenderMathMLFraction {mfrac} at (0,0) size 33x32
</span><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="lines">@@ -265,12 +265,12 @@
</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;2&quot;
</span><del>-      RenderBlock {p} at (0,291) 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 23x35 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 21x35
-            RenderMathMLRootWrapper at (4,0) size 6x35
</del><ins>+      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
</ins><span class="cx">               RenderMathMLFraction {mfrac} at (0,0) size 5x25
</span><span class="cx">                 RenderMathMLFraction {mfrac} at (0,0) size 5x16
</span><span class="cx">                   RenderMathMLToken {mi} at (0,0) size 5x5 [padding: 0 1 0 0]
</span><span class="lines">@@ -288,30 +288,30 @@
</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;z&quot;
</span><del>-            RenderMathMLBlock (anonymous, flex) at (0,0) size 13x35
-              RenderMathMLRadicalOperator (anonymous) at (0,17) size 12x18
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                  RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+            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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,20) size 9x15
</del><ins>+            RenderMathMLRootWrapper at (9,20) size 9x14
</ins><span class="cx">               RenderMathMLToken {mn} at (0,0) 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><span class="cx">                       text run at (0,-1) width 8: &quot;2&quot;
</span><del>-      RenderBlock {p} at (0,343) size 784x59
</del><ins>+      RenderBlock {p} at (0,339) 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><del>-        RenderMathMLMath {math} at (159,0) size 277x60 [padding: 0 1 0 1]
-          RenderMathMLSquareRoot {msqrt} at (1,0) size 275x60
-            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x60
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x60
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x60
-                  RenderBlock (anonymous) at (0,0) size 9x60
</del><ins>+        RenderMathMLMath {math} at (159,0) size 252x44 [padding: 0 1 0 1]
+          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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,3) size 263x57
</del><ins>+            RenderMathMLRootWrapper at (8,3) size 241x41
</ins><span class="cx">               RenderMathMLToken {mn} at (0,28) 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="lines">@@ -322,15 +322,15 @@
</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 240x54
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 12x54
-                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x54
-                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x54
-                      RenderBlock (anonymous) at (0,0) size 9x54
</del><ins>+              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
</ins><span class="cx">                         RenderText at (0,1) size 9x17
</span><span class="cx">                           text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                RenderMathMLRootWrapper at (12,3) size 227x51
-                  RenderMathMLRow {mrow} at (0,0) size 227x48
</del><ins>+                RenderMathMLRootWrapper at (8,3) size 209x37
+                  RenderMathMLRow {mrow} at (0,0) size 208x36
</ins><span class="cx">                     RenderMathMLToken {mn} at (0,24) 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="lines">@@ -341,15 +341,15 @@
</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 204x48
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 12x48
-                        RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x48
-                          RenderMathMLBlock (anonymous, flex) at (0,0) size 9x48
-                            RenderBlock (anonymous) at (0,0) size 9x48
</del><ins>+                    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
</ins><span class="cx">                               RenderText at (0,1) size 9x17
</span><span class="cx">                                 text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                      RenderMathMLRootWrapper at (12,3) size 191x45
-                        RenderMathMLRow {mrow} at (0,0) size 191x42
</del><ins>+                      RenderMathMLRootWrapper at (8,3) size 176x33
+                        RenderMathMLRow {mrow} at (0,0) size 175x32
</ins><span class="cx">                           RenderMathMLToken {mn} at (0,20) 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="lines">@@ -360,15 +360,15 @@
</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 168x42
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x42
-                              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x42
-                                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x42
-                                  RenderBlock (anonymous) at (0,0) size 9x42
</del><ins>+                          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
</ins><span class="cx">                                     RenderText at (0,1) size 9x17
</span><span class="cx">                                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                            RenderMathMLRootWrapper at (12,3) size 155x39
-                              RenderMathMLRow {mrow} at (0,0) size 155x36
</del><ins>+                            RenderMathMLRootWrapper at (8,3) size 143x29
+                              RenderMathMLRow {mrow} at (0,0) size 142x29
</ins><span class="cx">                                 RenderMathMLToken {mn} at (0,16) 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="lines">@@ -379,15 +379,15 @@
</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 132x36
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 12x36
-                                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x36
-                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 9x36
-                                        RenderBlock (anonymous) at (0,0) size 9x36
</del><ins>+                                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
</ins><span class="cx">                                           RenderText at (0,1) size 9x17
</span><span class="cx">                                             text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                  RenderMathMLRootWrapper at (12,3) size 119x33
-                                    RenderMathMLRow {mrow} at (0,0) size 119x30
</del><ins>+                                  RenderMathMLRootWrapper at (8,3) size 111x26
+                                    RenderMathMLRow {mrow} at (0,0) size 110x25
</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="lines">@@ -398,15 +398,15 @@
</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 96x30
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 12x30
-                                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x30
-                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x30
-                                              RenderBlock (anonymous) at (0,0) size 9x30
</del><ins>+                                      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
</ins><span class="cx">                                                 RenderText at (0,1) size 9x17
</span><span class="cx">                                                   text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                        RenderMathMLRootWrapper at (12,3) size 84x27
-                                          RenderMathMLRow {mrow} at (0,0) size 84x24
</del><ins>+                                        RenderMathMLRootWrapper at (8,3) size 78x22
+                                          RenderMathMLRow {mrow} at (0,0) size 77x21
</ins><span class="cx">                                             RenderMathMLToken {mn} at (0,8) 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="lines">@@ -417,15 +417,15 @@
</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 61x24
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 12x24
-                                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x24
-                                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x24
-                                                    RenderBlock (anonymous) at (0,0) size 9x24
</del><ins>+                                            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
</ins><span class="cx">                                                       RenderText at (0,1) size 9x17
</span><span class="cx">                                                         text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                              RenderMathMLRootWrapper at (12,3) size 48x21
-                                                RenderMathMLRow {mrow} at (0,0) size 48x18
</del><ins>+                                              RenderMathMLRootWrapper at (8,3) size 45x18
+                                                RenderMathMLRow {mrow} at (0,0) size 45x17
</ins><span class="cx">                                                   RenderMathMLToken {mn} at (0,4) 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="lines">@@ -436,201 +436,201 @@
</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 25x18
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 12x18
-                                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x18
-                                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                                                          RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+                                                  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
</ins><span class="cx">                                                             RenderText at (0,1) size 9x17
</span><span class="cx">                                                               text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                                    RenderMathMLRootWrapper at (12,3) size 12x15
</del><ins>+                                                    RenderMathMLRootWrapper at (8,3) size 13x14
</ins><span class="cx">                                                       RenderMathMLToken {mi} at (0,0) size 12x12 [padding: 0 2 0 0]
</span><span class="cx">                                                         RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
</span><span class="cx">                                                           RenderBlock (anonymous) at (0,0) size 10x12
</span><span class="cx">                                                             RenderText {#text} at (0,-1) size 10x17
</span><span class="cx">                                                               text run at (0,-1) width 10: &quot;A&quot;
</span><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><del>-      RenderBlock {p} at (0,418) size 784x68
-        RenderText {#text} at (0,36) size 114x19
-          text run at (0,36) width 114: &quot;Imbricated roots: &quot;
-        RenderMathMLMath {math} at (113,0) size 292x69 [padding: 0 1 0 1]
-          RenderMathMLRoot {mroot} at (1,0) size 290x69
-            RenderMathMLRootWrapper at (4,19) size 5x50
</del><ins>+      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
</ins><span class="cx">               RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                       text run at (0,0) width 5: &quot;3&quot;
</span><del>-            RenderMathMLBlock (anonymous, flex) at (0,0) size 13x69
-              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x69
-                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x68
-                  RenderBlock (anonymous) at (0,0) size 9x68
</del><ins>+            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
</ins><span class="cx">                     RenderText at (0,1) size 9x17
</span><span class="cx">                       text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-            RenderMathMLRootWrapper at (12,3) size 278x66
-              RenderMathMLRow {mrow} at (0,0) size 278x63
-                RenderMathMLToken {mn} at (0,36) size 8x12
</del><ins>+            RenderMathMLRootWrapper at (8,3) size 256x50
+              RenderMathMLRow {mrow} at (0,0) size 255x49
+                RenderMathMLToken {mn} at (0,37) 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,39) size 16x9
</del><ins>+                RenderMathMLOperator {mo} at (8,40) 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>-                RenderMathMLRoot {mroot} at (23,0) size 255x63
-                  RenderMathMLRootWrapper at (4,17) size 5x46
</del><ins>+                RenderMathMLRoot {mroot} at (23,0) size 232x49
+                  RenderMathMLRootWrapper at (4,11) size 5x38
</ins><span class="cx">                     RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                             text run at (0,0) width 5: &quot;4&quot;
</span><del>-                  RenderMathMLBlock (anonymous, flex) at (0,0) size 13x63
-                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x63
-                      RenderMathMLBlock (anonymous, flex) at (0,0) size 9x62
-                        RenderBlock (anonymous) at (0,0) size 9x62
</del><ins>+                  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
</ins><span class="cx">                           RenderText at (0,1) size 9x17
</span><span class="cx">                             text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                  RenderMathMLRootWrapper at (12,3) size 242x60
-                    RenderMathMLRow {mrow} at (0,0) size 242x57
-                      RenderMathMLToken {mn} at (0,32) size 8x12
</del><ins>+                  RenderMathMLRootWrapper at (8,3) size 223x46
+                    RenderMathMLRow {mrow} at (0,0) size 222x45
+                      RenderMathMLToken {mn} at (0,33) 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;2&quot;
</span><del>-                      RenderMathMLOperator {mo} at (8,35) size 16x9
</del><ins>+                      RenderMathMLOperator {mo} at (8,36) 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>-                      RenderMathMLRoot {mroot} at (23,0) size 219x57
-                        RenderMathMLRootWrapper at (4,14) size 5x43
</del><ins>+                      RenderMathMLRoot {mroot} at (23,0) size 199x45
+                        RenderMathMLRootWrapper at (4,10) size 5x35
</ins><span class="cx">                           RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                                   text run at (0,0) width 5: &quot;5&quot;
</span><del>-                        RenderMathMLBlock (anonymous, flex) at (0,0) size 13x57
-                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x57
-                            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x56
-                              RenderBlock (anonymous) at (0,0) size 9x56
</del><ins>+                        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
</ins><span class="cx">                                 RenderText at (0,1) size 9x17
</span><span class="cx">                                   text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                        RenderMathMLRootWrapper at (12,3) size 206x54
-                          RenderMathMLRow {mrow} at (0,0) size 206x51
-                            RenderMathMLToken {mn} at (0,28) size 8x12
</del><ins>+                        RenderMathMLRootWrapper at (8,3) size 191x42
+                          RenderMathMLRow {mrow} at (0,0) size 190x41
+                            RenderMathMLToken {mn} at (0,29) 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;3&quot;
</span><del>-                            RenderMathMLOperator {mo} at (8,31) size 16x9
</del><ins>+                            RenderMathMLOperator {mo} at (8,32) 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>-                            RenderMathMLRoot {mroot} at (23,0) size 183x51
-                              RenderMathMLRootWrapper at (4,12) size 5x39
</del><ins>+                            RenderMathMLRoot {mroot} at (23,0) size 167x41
+                              RenderMathMLRootWrapper at (4,8) size 5x33
</ins><span class="cx">                                 RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                                         text run at (0,0) width 5: &quot;6&quot;
</span><del>-                              RenderMathMLBlock (anonymous, flex) at (0,0) size 13x51
-                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x51
-                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x50
-                                    RenderBlock (anonymous) at (0,0) size 9x50
</del><ins>+                              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
</ins><span class="cx">                                       RenderText at (0,1) size 9x17
</span><span class="cx">                                         text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                              RenderMathMLRootWrapper at (12,3) size 170x48
-                                RenderMathMLRow {mrow} at (0,0) size 170x45
-                                  RenderMathMLToken {mn} at (0,24) size 8x12
</del><ins>+                              RenderMathMLRootWrapper at (8,3) size 158x38
+                                RenderMathMLRow {mrow} at (0,0) size 157x37
+                                  RenderMathMLToken {mn} at (0,25) 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;4&quot;
</span><del>-                                  RenderMathMLOperator {mo} at (8,27) size 16x9
</del><ins>+                                  RenderMathMLOperator {mo} at (8,28) 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>-                                  RenderMathMLRoot {mroot} at (23,0) size 147x45
-                                    RenderMathMLRootWrapper at (4,11) size 5x34
</del><ins>+                                  RenderMathMLRoot {mroot} at (23,0) size 134x37
+                                    RenderMathMLRootWrapper at (4,7) size 5x30
</ins><span class="cx">                                       RenderMathMLToken {mn} at (0,0) size 5x7
</span><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,-1) size 5x10
</span><span class="cx">                                               text run at (0,-1) width 5: &quot;7&quot;
</span><del>-                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 13x45
-                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x45
-                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x44
-                                          RenderBlock (anonymous) at (0,0) size 9x44
</del><ins>+                                    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
</ins><span class="cx">                                             RenderText at (0,1) size 9x17
</span><span class="cx">                                               text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                    RenderMathMLRootWrapper at (12,3) size 134x42
-                                      RenderMathMLRow {mrow} at (0,0) size 134x39
-                                        RenderMathMLToken {mn} at (0,20) size 8x12
</del><ins>+                                    RenderMathMLRootWrapper at (8,3) size 125x34
+                                      RenderMathMLRow {mrow} at (0,0) size 124x34
+                                        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,-1) size 8x17
</span><span class="cx">                                                 text run at (0,-1) width 8: &quot;5&quot;
</span><del>-                                        RenderMathMLOperator {mo} at (8,23) size 16x9
</del><ins>+                                        RenderMathMLOperator {mo} at (8,24) 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>-                                        RenderMathMLRoot {mroot} at (23,0) size 111x39
-                                          RenderMathMLRootWrapper at (4,7) size 5x32
</del><ins>+                                        RenderMathMLRoot {mroot} at (23,0) size 101x34
+                                          RenderMathMLRootWrapper at (4,5) size 5x29
</ins><span class="cx">                                             RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                                                     text run at (0,0) width 5: &quot;8&quot;
</span><del>-                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 13x39
-                                            RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x39
-                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 9x38
-                                                RenderBlock (anonymous) at (0,0) size 9x38
</del><ins>+                                          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
</ins><span class="cx">                                                   RenderText at (0,1) size 9x17
</span><span class="cx">                                                     text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                          RenderMathMLRootWrapper at (12,3) size 98x36
-                                            RenderMathMLRow {mrow} at (0,0) size 98x33
-                                              RenderMathMLToken {mn} at (0,16) size 8x12
</del><ins>+                                          RenderMathMLRootWrapper at (8,3) size 92x31
+                                            RenderMathMLRow {mrow} at (0,0) size 92x30
+                                              RenderMathMLToken {mn} at (0,17) 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;6&quot;
</span><del>-                                              RenderMathMLOperator {mo} at (8,19) size 16x9
</del><ins>+                                              RenderMathMLOperator {mo} at (8,20) 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>-                                              RenderMathMLRoot {mroot} at (23,0) size 75x33
-                                                RenderMathMLRootWrapper at (4,5) size 5x28
</del><ins>+                                              RenderMathMLRoot {mroot} at (23,0) size 69x30
+                                                RenderMathMLRootWrapper at (4,3) size 5x27
</ins><span class="cx">                                                   RenderMathMLToken {mn} at (0,0) size 5x8
</span><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><span class="cx">                                                           text run at (0,0) width 5: &quot;9&quot;
</span><del>-                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x33
-                                                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x33
-                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x32
-                                                      RenderBlock (anonymous) at (0,0) size 9x32
</del><ins>+                                                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
</ins><span class="cx">                                                         RenderText at (0,1) size 9x17
</span><span class="cx">                                                           text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                                RenderMathMLRootWrapper at (12,3) size 62x30
-                                                  RenderMathMLRow {mrow} at (0,0) size 62x27
-                                                    RenderMathMLToken {mn} at (0,12) size 8x12
</del><ins>+                                                RenderMathMLRootWrapper at (8,3) size 60x27
+                                                  RenderMathMLRow {mrow} at (0,0) size 59x26
+                                                    RenderMathMLToken {mn} at (0,13) 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;7&quot;
</span><del>-                                                    RenderMathMLOperator {mo} at (8,15) size 16x9
</del><ins>+                                                    RenderMathMLOperator {mo} at (8,16) 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>-                                                    RenderMathMLRoot {mroot} at (23,0) size 39x27
-                                                      RenderMathMLRootWrapper at (4,0) size 20x27
</del><ins>+                                                    RenderMathMLRoot {mroot} at (23,0) size 36x26
+                                                      RenderMathMLRootWrapper at (4,0) size 20x26
</ins><span class="cx">                                                         RenderMathMLFraction {mfrac} at (0,0) size 19x17
</span><span class="cx">                                                           RenderMathMLRow {mrow} at (0,0) size 19x7
</span><span class="cx">                                                             RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
</span><span class="lines">@@ -653,13 +653,13 @@
</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;z&quot;
</span><del>-                                                      RenderMathMLBlock (anonymous, flex) at (14,0) size 13x27
-                                                        RenderMathMLRadicalOperator (anonymous) at (0,9) size 12x18
-                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
-                                                            RenderBlock (anonymous) at (0,0) size 9x18
</del><ins>+                                                      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
</ins><span class="cx">                                                               RenderText at (0,1) size 9x17
</span><span class="cx">                                                                 text run at (0,1) width 9: &quot;\x{221A}&quot;
</span><del>-                                                      RenderMathMLRootWrapper at (26,12) size 12x15
</del><ins>+                                                      RenderMathMLRootWrapper at (23,12) size 12x14
</ins><span class="cx">                                                         RenderMathMLToken {mi} at (0,0) size 12x12 [padding: 0 2 0 0]
</span><span class="cx">                                                           RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
</span><span class="cx">                                                             RenderBlock (anonymous) at (0,0) size 10x12
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormathmlradicalfallbackexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt (0 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x226
+  RenderBlock {HTML} at (0,0) size 800x226
+    RenderBody {BODY} at (8,16) size 784x194
+      RenderBlock {P} at (0,0) size 784x89
+        RenderText {#text} at (0,69) size 132x19
+          text run at (0,69) width 132: &quot;Large LTR radicals: &quot;
+        RenderMathMLMath {math} at (131,0) size 21x84 [padding: 0 1 0 1]
+          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
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,105) size 784x89
+        RenderText {#text} at (0,69) size 132x19
+          text run at (0,69) width 132: &quot;Large RTL radicals: &quot;
+        RenderMathMLMath {math} at (131,0) size 21x84 [padding: 0 1 0 1]
+          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
+        RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/ios-simulator/mathml/radical-fallback-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsplatformmacmathmlradicalfallbackexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/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/mac/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="trunkLayoutTestsplatformmacmathmlradicalfallbackexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt (0 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x224
+  RenderBlock {HTML} at (0,0) size 800x224
+    RenderBody {BODY} at (8,16) size 784x192
+      RenderBlock {P} at (0,0) size 784x88
+        RenderText {#text} at (0,70) size 132x18
+          text run at (0,70) width 132: &quot;Large LTR radicals: &quot;
+        RenderMathMLMath {math} at (131,0) size 27x84 [padding: 0 1 0 1]
+          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
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,104) size 784x88
+        RenderText {#text} at (0,70) size 132x18
+          text run at (0,70) width 132: &quot;Large RTL radicals: &quot;
+        RenderMathMLMath {math} at (131,0) size 27x84 [padding: 0 1 0 1]
+          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
+        RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/mac/mathml/radical-fallback-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/Source/WebCore/ChangeLog        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2016-06-17  Frederic Wang  &lt;fwang@igalia.com&gt;
+
+        MathOperator: Add fallback mechanisms for stretching and mirroring radical symbols
+        https://bugs.webkit.org/show_bug.cgi?id=156836
+
+        Reviewed by Sergio Villar Senin.
+
+        Some platforms do not have OpenType MATH fonts pre-installed and thus can not draw stretchy
+        operators using size variants or glyph assembly. This is especially problematic for the
+        radical symbol which is used to write roots. Currently, we have some fallback code to draw
+        that symbol using graphical primitives but it is a bit complex and makes the style of radical
+        inconsistent with the font used. We solve these issues by just scaling the base glyph via a
+        scale transform. Such scale transform is also used to mirror the radical symbol so that we
+        have some support for right-to-left roots until we can do glyph-level mirroring
+        via the OpenType rtlm feature.
+
+        Test: mathml/radical-fallback.html
+
+        * rendering/mathml/MathOperator.cpp: Add a constant for the code point U+221A of the radical.
+        (WebCore::MathOperator::reset): In general, we don't need any vertical scaling for radical
+        symbols so m_radicalVerticalScale is initialized to 1.
+        (WebCore::MathOperator::calculateStretchyData): If we don't have a font with a MATH table and we
+        try streching a radical, then we update the vertical metrics to match the target size and
+        set m_radicalVerticalScale to the value necessary to make the base glyph scaled to that size.
+        (WebCore::MathOperator::paint): For a radical operator, we may apply a scale transform of
+        parameters (radicalHorizontalScale, m_radicalVerticalScale) in order to support RTL
+        mirroring or vertical stretching.
+        * rendering/mathml/MathOperator.h: We add a m_radicalVerticalScale member to indicate the
+        scaling to apply to the base radical glyph when the stretchy fallback is necessary.
+        (WebCore::MathOperator::isStretched): The operator is also considered stretched when the
+        m_radicalVerticalScale is applied to the base size.
+        * rendering/mathml/RenderMathMLRadicalOperator.cpp: Remove code specific to the old fallback mechanism.
+        * rendering/mathml/RenderMathMLRadicalOperator.h: Ditto.
+
</ins><span class="cx"> 2016-06-16  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r202147.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlMathOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/MathOperator.cpp (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/MathOperator.cpp        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/Source/WebCore/rendering/mathml/MathOperator.cpp        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -31,6 +31,8 @@
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><span class="cx"> 
</span><ins>+static const unsigned kRadicalOperator = 0x221A;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static inline FloatRect boundsForGlyph(const GlyphData&amp; data)
</span><span class="lines">@@ -97,6 +99,7 @@
</span><span class="cx">     m_ascent = 0;
</span><span class="cx">     m_descent = 0;
</span><span class="cx">     m_italicCorrection = 0;
</span><ins>+    m_radicalVerticalScale = 1;
</ins><span class="cx"> 
</span><span class="cx">     // We use the base size for the calculation of the preferred width.
</span><span class="cx">     GlyphData baseGlyph;
</span><span class="lines">@@ -347,6 +350,19 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        // Unicode contains U+23B7 RADICAL SYMBOL BOTTOM but it is generally not provided by fonts without a MATH table.
+        // Moreover, it's not clear what the proper vertical extender or top hook would be.
+        // Hence we fallback to scaling the base glyph vertically.
+        if (!calculateMaxPreferredWidth &amp;&amp; m_baseCharacter == kRadicalOperator) {
+            LayoutUnit height = m_ascent + m_descent;
+            if (height &gt; 0 &amp;&amp; height &lt; targetSize) {
+                m_radicalVerticalScale = targetSize.toFloat() / height;
+                m_ascent *= m_radicalVerticalScale;
+                m_descent *= m_radicalVerticalScale;
+            }
+            return;
+        }
+
</ins><span class="cx">         // If we didn't find a stretchy character set for this character, we don't know how to stretch it.
</span><span class="cx">         if (!stretchyCharacter)
</span><span class="cx">             return;
</span><span class="lines">@@ -593,6 +609,16 @@
</span><span class="cx">     GraphicsContextStateSaver stateSaver(info.context());
</span><span class="cx">     info.context().setFillColor(style.visitedDependentColor(CSSPropertyColor));
</span><span class="cx"> 
</span><ins>+    // For a radical character, we may need some scale transform to stretch it vertically or mirror it.
+    if (m_baseCharacter == kRadicalOperator) {
+        float radicalHorizontalScale = style.isLeftToRightDirection() ? 1 : -1;
+        if (radicalHorizontalScale == -1 || m_radicalVerticalScale &gt; 1) {
+            LayoutPoint scaleOrigin = paintOffset;
+            scaleOrigin.move(m_width / 2, 0);
+            info.applyTransform(AffineTransform().translate(scaleOrigin).scale(radicalHorizontalScale, m_radicalVerticalScale).translate(-scaleOrigin));
+        }
+    }
+
</ins><span class="cx">     if (m_stretchType == StretchType::GlyphAssembly) {
</span><span class="cx">         if (m_operatorType == Type::VerticalOperator)
</span><span class="cx">             paintVerticalGlyphAssembly(style, info, paintOffset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlMathOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/MathOperator.h (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/MathOperator.h        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/Source/WebCore/rendering/mathml/MathOperator.h        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx">     void stretchTo(const RenderStyle&amp;, LayoutUnit ascent, LayoutUnit descent);
</span><span class="cx">     void stretchTo(const RenderStyle&amp;, LayoutUnit width);
</span><del>-    bool isStretched() const { return m_stretchType != StretchType::Unstretched; }
</del><ins>+    bool isStretched() const { return m_stretchType != StretchType::Unstretched || m_radicalVerticalScale &gt; 1; }
</ins><span class="cx">     void unstretch() { m_stretchType = StretchType::Unstretched; }
</span><span class="cx"> 
</span><span class="cx">     void paint(const RenderStyle&amp;, PaintInfo&amp;, const LayoutPoint&amp;);
</span><span class="lines">@@ -100,6 +100,7 @@
</span><span class="cx">     LayoutUnit m_ascent { 0 };
</span><span class="cx">     LayoutUnit m_descent { 0 };
</span><span class="cx">     LayoutUnit m_italicCorrection { 0 };
</span><ins>+    float m_radicalVerticalScale { 1 };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     RenderMathMLOperator(MathMLElement&amp;, RenderStyle&amp;&amp;);
</span><span class="cx">     RenderMathMLOperator(Document&amp;, RenderStyle&amp;&amp;, const String&amp; operatorString, MathMLOperatorDictionary::Form, unsigned short flags = 0);
</span><span class="cx"> 
</span><del>-    virtual void stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline);
</del><ins>+    void stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline);
</ins><span class="cx">     void stretchTo(LayoutUnit width);
</span><span class="cx">     LayoutUnit stretchSize() const { return m_isVertical ? m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline : m_stretchWidth; }
</span><span class="cx">     void resetStretchSize();
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
</span><span class="cx">     void updateStyle() final;
</span><span class="cx"> 
</span><del>-    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">     void updateTokenContent(const String&amp; operatorString);
</span><span class="cx">     void updateTokenContent() final;
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual void setOperatorProperties();
</span><del>-    void computePreferredLogicalWidths() override;
-    void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&amp;) const override;
</del><ins>+    void computePreferredLogicalWidths() final;
+    void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&amp;) const final;
</ins><span class="cx">     void setLeadingSpace(LayoutUnit leadingSpace) { m_leadingSpace = leadingSpace; }
</span><span class="cx">     void setTrailingSpace(LayoutUnit trailingSpace) { m_trailingSpace = trailingSpace; }
</span><span class="cx">     UChar textContent() const { return m_textContent; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -35,42 +35,12 @@
</span><span class="cx"> static const UChar gRadicalCharacter = 0x221A;
</span><span class="cx"> 
</span><span class="cx"> // This class relies on the RenderMathMLOperator class to draw a radical symbol.
</span><del>-// This does not work well when an OpenType MATH font is not available.
-// In that case, we fallback to the old implementation of RenderMathMLRoot.cpp with graphic primitives.
</del><span class="cx"> 
</span><del>-// Normal width of the front of the radical sign, before the base &amp; overbar (em)
-const float gFrontWidthEms = 0.75f;
-// Horizontal position of the bottom point of the radical (* frontWidth)
-const float gRadicalBottomPointXFront = 0.5f;
-// Lower the radical sign's bottom point (px)
-const int gRadicalBottomPointLower = 3;
-// Horizontal position of the top left point of the radical &quot;dip&quot; (* frontWidth)
-const float gRadicalDipLeftPointXFront = 0.8f;
-// Vertical position of the top left point of a sqrt radical &quot;dip&quot; (* baseHeight)
-const float gSqrtRadicalDipLeftPointYPos = 0.5f;
-// Vertical shift of the left end point of the radical (em)
-const float gRadicalLeftEndYShiftEms = 0.05f;
-
-// Radical line thickness (em)
-const float gRadicalLineThicknessEms = 0.02f;
-// Radical thick line thickness (em)
-const float gRadicalThickLineThicknessEms = 0.1f;
-
</del><span class="cx"> RenderMathMLRadicalOperator::RenderMathMLRadicalOperator(Document&amp; document, RenderStyle&amp;&amp; style)
</span><span class="cx">     : RenderMathMLOperator(document, WTFMove(style), String(&amp;gRadicalCharacter, 1), MathMLOperatorDictionary::Prefix)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRadicalOperator::stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline)
-{
-    if (!style().fontCascade().primaryFont().mathData()) {
-        // If we do not have an OpenType MATH font, we always make the radical depth a bit larger than the target.
-        depthBelowBaseline += gRadicalBottomPointLower;
-    }
-
-    RenderMathMLOperator::stretchTo(heightAboveBaseline, depthBelowBaseline);
-}
-
</del><span class="cx"> void RenderMathMLRadicalOperator::setOperatorProperties()
</span><span class="cx"> {
</span><span class="cx">     RenderMathMLOperator::setOperatorProperties();
</span><span class="lines">@@ -79,99 +49,6 @@
</span><span class="cx">     setTrailingSpace(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRadicalOperator::computePreferredLogicalWidths()
-{
-    ASSERT(preferredLogicalWidthsDirty());
-
-    if (style().fontCascade().primaryFont().mathData()) {
-        RenderMathMLOperator::computePreferredLogicalWidths();
-        return;
-    }
-
-    // If we do not have an OpenType MATH font, the front width is just given by the gFrontWidthEms constant.
-    int frontWidth = lroundf(gFrontWidthEms * style().fontSize());
-    m_minPreferredLogicalWidth = frontWidth;
-    m_maxPreferredLogicalWidth = frontWidth;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLRadicalOperator::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&amp; computedValues) const
-{
-    if (style().fontCascade().primaryFont().mathData()) {
-        RenderMathMLOperator::computeLogicalHeight(logicalHeight, logicalTop, computedValues);
-        return;
-    }
-
-    // If we do not have an OpenType MATH font, the logical height is always the stretch size.
-    logicalHeight = stretchSize();
-    RenderBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues);
-}
-
-void RenderMathMLRadicalOperator::paint(PaintInfo&amp; info, const LayoutPoint&amp; paintOffset)
-{
-    if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE)
-        return;
-
-    if (style().fontCascade().primaryFont().mathData()) {
-        RenderMathMLOperator::paint(info, paintOffset);
-        return;
-    }
-
-    // If we do not have an OpenType MATH font, we paint the radical sign with graphic primitives.
-    IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset + location() + contentBoxRect().location());
-    int frontWidth = lroundf(gFrontWidthEms * style().fontSize());
-    int startX = adjustedPaintOffset.x() + frontWidth;
-    int baseHeight = stretchSize() - gRadicalBottomPointLower;
-
-    float radicalDipLeftPointYPos = gSqrtRadicalDipLeftPointYPos * baseHeight;
-
-    FloatPoint overbarLeftPoint(startX, adjustedPaintOffset.y());
-    FloatPoint bottomPoint(startX - gRadicalBottomPointXFront * frontWidth, adjustedPaintOffset.y() + baseHeight + gRadicalBottomPointLower);
-    FloatPoint dipLeftPoint(startX - gRadicalDipLeftPointXFront * frontWidth, adjustedPaintOffset.y() + radicalDipLeftPointYPos);
-    FloatPoint leftEnd(startX - frontWidth, dipLeftPoint.y() + gRadicalLeftEndYShiftEms * style().fontSize());
-
-    GraphicsContextStateSaver stateSaver(info.context());
-
-    info.context().setStrokeThickness(gRadicalLineThicknessEms * style().fontSize());
-    info.context().setStrokeStyle(SolidStroke);
-    info.context().setStrokeColor(style().visitedDependentColor(CSSPropertyColor));
-    info.context().setLineJoin(MiterJoin);
-    info.context().setMiterLimit(style().fontSize());
-
-    Path root;
-
-    root.moveTo(FloatPoint(overbarLeftPoint.x(), adjustedPaintOffset.y()));
-    // draw from top left corner to bottom point of radical
-    root.addLineTo(bottomPoint);
-    // draw from bottom point to top of left part of radical base &quot;dip&quot;
-    root.addLineTo(dipLeftPoint);
-    // draw to end
-    root.addLineTo(leftEnd);
-
-    info.context().strokePath(root);
-
-    GraphicsContextStateSaver maskStateSaver(info.context());
-
-    // Build a mask to draw the thick part of the root.
-    Path maskPath;
-
-    maskPath.moveTo(overbarLeftPoint);
-    maskPath.addLineTo(bottomPoint);
-    maskPath.addLineTo(dipLeftPoint);
-    maskPath.addLineTo(FloatPoint(2 * dipLeftPoint.x() - leftEnd.x(), 2 * dipLeftPoint.y() - leftEnd.y()));
-
-    info.context().clipPath(maskPath);
-
-    // Draw the thick part of the root.
-    info.context().setStrokeThickness(gRadicalThickLineThicknessEms * style().fontSize());
-    info.context().setLineCap(SquareCap);
-
-    Path line;
-    line.moveTo(bottomPoint);
-    line.addLineTo(dipLeftPoint);
-
-    info.context().strokePath(line);
-}
-
-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h (202160 => 202161)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h        2016-06-17 06:23:26 UTC (rev 202160)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.h        2016-06-17 09:24:49 UTC (rev 202161)
</span><span class="lines">@@ -36,10 +36,6 @@
</span><span class="cx"> class RenderMathMLRadicalOperator final : public RenderMathMLOperator {
</span><span class="cx"> public:
</span><span class="cx">     RenderMathMLRadicalOperator(Document&amp;, RenderStyle&amp;&amp;);
</span><del>-    void stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline) override;
-    void computePreferredLogicalWidths() override;
-    void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&amp;) const override;
-    void paint(PaintInfo&amp;, const LayoutPoint&amp; paintOffset) override;
</del><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     bool isRenderMathMLRadicalOperator() const override { return true; }
</span></span></pre>
</div>
</div>

</body>
</html>