<!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>[165436] 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/165436">165436</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2014-03-11 00:51:27 -0700 (Tue, 11 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Improve renderer classes for MathML Token elements.
https://bugs.webkit.org/show_bug.cgi?id=124838

Reviewed by Chris Fleizach.

Source/WebCore:

This patch continues the refactoring of token elements that has been
started in bug 44208. The &lt;mo&gt; element now derives from the
RenderMathMLToken class, which was already used for the &lt;mi&gt; element.
The behavior of anonymous &lt;mo&gt; elements created by the &lt;mfenced&gt; element
is now more consistent with the one of &quot;standard&quot; &lt;mo&gt; elements and the
spacing around them is now handled in RenderMathMLOperator. This is a
first step towards fixing bugs 115787 and 118843. The only visible
rendering change is how &lt;mfenced&gt; open/close attributes handle
whitespace and multiple characters and some tests are added for that.
Other features are already covered by other tests. Finally, this also
removes some code from AccessibilityRenderObject that was used to
workaround issues with &lt;mo&gt; elements.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::isMathOperator):
(WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::didAttachRenderers):
(WebCore::MathMLTextElement::childrenChanged):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::RenderMathMLFenced):
(WebCore::RenderMathMLFenced::updateFromElement):
(WebCore::RenderMathMLFenced::createMathMLOperator):
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::addChild):
* rendering/mathml/RenderMathMLFenced.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
(WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
(WebCore::RenderMathMLOperator::SetOperatorProperties):
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
(WebCore::RenderMathMLOperator::rebuildTokenContent):
(WebCore::RenderMathMLOperator::updateTokenContent):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::firstLineBaseline):
(WebCore::RenderMathMLOperator::paint):
(WebCore::RenderMathMLOperator::paintChildren):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::createWrapperIfNeeded):

LayoutTests:

Two tests are added to fenced-mi in order to verify that the open/close
attributes of the mfenced element collapse whitespace and accept values
with multiple characters.

* mathml/presentation/fenced-mi-expected.html:
* mathml/presentation/fenced-mi.html:
* platform/mac/accessibility/mathml-elements.html: fix bad closing tag and disable the test for now.
* platform/mac/mathml/presentation/mo-stretch-expected.txt: update text reference.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationfencedmiexpectedhtml">trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationfencedmihtml">trunk/LayoutTests/mathml/presentation/fenced-mi.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitymathmlelementshtml">trunk/LayoutTests/platform/mac/accessibility/mathml-elements.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacmathmlpresentationmostretchexpectedtxt">trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLTextElementcpp">trunk/Source/WebCore/mathml/MathMLTextElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLBlockcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLBlockh">trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLFencedcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLFencedh">trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLTokencpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/LayoutTests/ChangeLog        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-03-10  Frédéric Wang  &lt;fred.wang@free.fr&gt;
+
+        Improve renderer classes for MathML Token elements.
+        https://bugs.webkit.org/show_bug.cgi?id=124838
+
+        Reviewed by Chris Fleizach.
+
+        Two tests are added to fenced-mi in order to verify that the open/close
+        attributes of the mfenced element collapse whitespace and accept values
+        with multiple characters.
+
+        * mathml/presentation/fenced-mi-expected.html:
+        * mathml/presentation/fenced-mi.html:
+        * platform/mac/accessibility/mathml-elements.html: fix bad closing tag and disable the test for now.
+        * platform/mac/mathml/presentation/mo-stretch-expected.txt: update text reference.
+
</ins><span class="cx"> 2014-03-10  James Craig  &lt;jcraig@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationfencedmiexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -68,5 +68,23 @@
</span><span class="cx">       &lt;/math&gt;
</span><span class="cx">     &lt;/p&gt;
</span><span class="cx"> 
</span><ins>+    &lt;p&gt;
+      &lt;math&gt;
+        &lt;mrow&gt;
+          &lt;mo&gt;ABC&lt;/mo&gt;
+          &lt;mrow&gt;
+            &lt;mi&gt;x&lt;/mi&gt;
+          &lt;/mrow&gt;
+          &lt;mo&gt;DEF&lt;/mo&gt;
+        &lt;/mrow&gt;
+      &lt;/math&gt;
+    &lt;/p&gt;
+
+    &lt;p&gt;
+      &lt;math&gt;
+        &lt;mfenced open=&quot;[&quot; close=&quot;]&quot; separators=&quot;12&quot;&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;/mfenced&gt;
+      &lt;/math&gt;
+    &lt;/p&gt;
+
</ins><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationfencedmihtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/fenced-mi.html (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/fenced-mi.html        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/LayoutTests/mathml/presentation/fenced-mi.html        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -33,5 +33,21 @@
</span><span class="cx">       &lt;/math&gt;
</span><span class="cx">     &lt;/p&gt;
</span><span class="cx"> 
</span><ins>+    &lt;!-- Test for open/close operators with multiple characters --&gt;
+    &lt;p&gt;
+      &lt;math&gt;
+        &lt;mfenced open=&quot;ABC&quot; close=&quot;DEF&quot;&gt;
+          &lt;mi&gt;x&lt;/mi&gt;
+        &lt;/mfenced&gt;
+      &lt;/math&gt;
+    &lt;/p&gt;
+
+    &lt;!-- Test that whitespace is ignored. --&gt;
+    &lt;p&gt;
+      &lt;math&gt;
+        &lt;mfenced open=&quot;&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;[&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;&quot; close=&quot;&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;]&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;&quot; separators=&quot;&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;1&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;2&amp;#x20;&amp;#x9;&amp;#xD;&amp;#xA;&quot;&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;/mfenced&gt;
+      &lt;/math&gt;
+    &lt;/p&gt;
+
</ins><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -1328,3 +1328,6 @@
</span><span class="cx"> webkit.org/b/129180 svg/clip-path/clip-path-on-svg-002.svg [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/129758 js/dom/create-lots-of-workers.html [ Skip ]
</span><ins>+
+# This test fails because the structure of mfenced/mo operators was changed in bug 124838.
+webkit.org/b/124836 platform/mac/accessibility/mathml-elements.html [ Failure ]
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitymathmlelementshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/mathml-elements.html (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/mathml-elements.html        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/LayoutTests/platform/mac/accessibility/mathml-elements.html        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> &lt;/math&gt;&lt;br&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;math id=&quot;fenced&quot;&gt;
</span><del>-&lt;mfenced open=&quot;{&quot; close=&quot;}&quot; separators=&quot;,,&quot;&gt;&lt;mi&gt;2&lt;/mi&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;/mroot&gt;
</del><ins>+&lt;mfenced open=&quot;{&quot; close=&quot;}&quot; separators=&quot;,,&quot;&gt;&lt;mi&gt;2&lt;/mi&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;/mfenced&gt;
</ins><span class="cx"> &lt;/math&gt;&lt;br&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;math id=&quot;sub&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmathmlpresentationmostretchexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -6,72 +6,72 @@
</span><span class="cx">       RenderMathMLMath {math} at (0,0) size 195x25 [padding: 0 1 0 1]
</span><span class="cx">         RenderMathMLRow {mrow} at (1,0) size 193x25
</span><span class="cx">           RenderMathMLOperator {mo} at (1,5) size 8x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;(&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (13,5) size 8x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;)&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (26,5) size 11x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;{&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (43,5) size 11x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (59,5) size 8x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;[&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (72,5) size 8x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;]&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (86,4) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2308}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (100,4) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2309}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (115,4) size 8x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230A}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (129,4) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (143,2) size 12x20
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx">                 RenderText at (0,-3) size 7x24
</span><span class="cx">                   text run at (0,-3) width 7: &quot;\x{222B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (161,0) size 4x25
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx">                 RenderText at (0,-6) size 3x24
</span><span class="cx">                   text run at (0,-6) width 3: &quot;|&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (170,4) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2016}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (183,4) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2225}&quot;
</span><span class="lines">@@ -81,72 +81,72 @@
</span><span class="cx">       RenderMathMLMath {math} at (0,24) size 199x143 [padding: 0 1 0 1]
</span><span class="cx">         RenderMathMLRow {mrow} at (1,0) size 197x143
</span><span class="cx">           RenderMathMLOperator {mo} at (1,0) size 8x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;(&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (13,0) size 8x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;)&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (26,0) size 11x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;{&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (43,0) size 11x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (59,0) size 8x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;[&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (72,0) size 8x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;]&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (86,0) size 9x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2308}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (100,0) size 9x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2309}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (115,0) size 8x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230A}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (129,0) size 9x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (143,0) size 12x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx">                 RenderText at (0,-3) size 7x24
</span><span class="cx">                   text run at (0,-3) width 7: &quot;\x{222B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (161,0) size 4x143
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx">                 RenderText at (0,-6) size 3x24
</span><span class="cx">                   text run at (0,-6) width 3: &quot;|&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (170,0) size 9x76
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2016}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (184,0) size 9x76
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2225}&quot;
</span><span class="lines">@@ -156,72 +156,72 @@
</span><span class="cx">       RenderMathMLMath {math} at (202,49) size 199x93 [padding: 0 1 0 1]
</span><span class="cx">         RenderMathMLRow {mrow} at (1,0) size 197x93
</span><span class="cx">           RenderMathMLOperator {mo} at (1,0) size 8x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;(&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (13,0) size 8x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;)&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (26,0) size 11x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;{&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (43,0) size 11x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (59,0) size 8x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;[&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (72,0) size 8x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;]&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (86,0) size 9x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2308}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (100,0) size 9x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2309}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (115,0) size 8x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230A}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (129,0) size 9x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (143,0) size 12x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx">                 RenderText at (0,-3) size 7x24
</span><span class="cx">                   text run at (0,-3) width 7: &quot;\x{222B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (161,0) size 4x93
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx">                 RenderText at (0,-6) size 3x24
</span><span class="cx">                   text run at (0,-6) width 3: &quot;|&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (170,0) size 9x51
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2016}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (184,0) size 9x51
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2225}&quot;
</span><span class="lines">@@ -231,72 +231,72 @@
</span><span class="cx">       RenderMathMLMath {math} at (404,79) size 199x33 [padding: 0 1 0 1]
</span><span class="cx">         RenderMathMLRow {mrow} at (1,0) size 197x33
</span><span class="cx">           RenderMathMLOperator {mo} at (1,0) size 8x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;(&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (13,0) size 8x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;)&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (26,9) size 11x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;{&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (43,9) size 11x14
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                 RenderText at (0,-6) size 8x24
</span><span class="cx">                   text run at (0,-6) width 8: &quot;}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (59,0) size 8x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;[&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (72,0) size 8x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                 RenderText at (0,-6) size 5x24
</span><span class="cx">                   text run at (0,-6) width 5: &quot;]&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (86,0) size 9x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2308}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (100,0) size 9x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2309}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (115,0) size 8x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230A}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (129,0) size 9x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{230B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (143,6) size 12x20
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx">                 RenderText at (0,-3) size 7x24
</span><span class="cx">                   text run at (0,-3) width 7: &quot;\x{222B}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (161,0) size 4x33
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx">                 RenderText at (0,-6) size 3x24
</span><span class="cx">                   text run at (0,-6) width 3: &quot;|&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (170,8) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2016}&quot;
</span><span class="cx">           RenderMathMLOperator {mo} at (184,8) size 9x16
</span><del>-            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+            RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">               RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                 RenderText at (0,-5) size 8x24
</span><span class="cx">                   text run at (0,-5) width 8: &quot;\x{2225}&quot;
</span><span class="lines">@@ -308,72 +308,72 @@
</span><span class="cx">         RenderMathMLSquareRoot {msqrt} at (1,0) size 209x79 [intrinsic padding: 3 0 3 12]
</span><span class="cx">           RenderMathMLRow (anonymous) at (12,3) size 197x73
</span><span class="cx">             RenderMathMLOperator {mo} at (1,0) size 8x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                   RenderText at (0,-6) size 5x24
</span><span class="cx">                     text run at (0,-6) width 5: &quot;(&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (13,0) size 8x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                   RenderText at (0,-6) size 5x24
</span><span class="cx">                     text run at (0,-6) width 5: &quot;)&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (26,0) size 11x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                   RenderText at (0,-6) size 8x24
</span><span class="cx">                     text run at (0,-6) width 8: &quot;{&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (43,0) size 11x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx">                   RenderText at (0,-6) size 8x24
</span><span class="cx">                     text run at (0,-6) width 8: &quot;}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (59,0) size 8x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                   RenderText at (0,-6) size 5x24
</span><span class="cx">                     text run at (0,-6) width 5: &quot;[&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (72,0) size 8x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx">                   RenderText at (0,-6) size 5x24
</span><span class="cx">                     text run at (0,-6) width 5: &quot;]&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (86,0) size 9x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                   RenderText at (0,-5) size 8x24
</span><span class="cx">                     text run at (0,-5) width 8: &quot;\x{2308}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (100,0) size 9x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                   RenderText at (0,-5) size 8x24
</span><span class="cx">                     text run at (0,-5) width 8: &quot;\x{2309}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (115,0) size 8x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                   RenderText at (0,-5) size 8x24
</span><span class="cx">                     text run at (0,-5) width 8: &quot;\x{230A}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (129,0) size 9x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                   RenderText at (0,-5) size 8x24
</span><span class="cx">                     text run at (0,-5) width 8: &quot;\x{230B}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (143,0) size 12x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx">                   RenderText at (0,-3) size 7x24
</span><span class="cx">                     text run at (0,-3) width 7: &quot;\x{222B}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (161,0) size 4x73
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx">                   RenderText at (0,-6) size 3x24
</span><span class="cx">                     text run at (0,-6) width 3: &quot;|&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (170,0) size 9x41
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                   RenderText at (0,-5) size 8x24
</span><span class="cx">                     text run at (0,-5) width 8: &quot;\x{2016}&quot;
</span><span class="cx">             RenderMathMLOperator {mo} at (184,0) size 9x41
</span><del>-              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
</del><ins>+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</ins><span class="cx">                 RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx">                   RenderText at (0,-5) size 8x24
</span><span class="cx">                     text run at (0,-5) width 8: &quot;\x{2225}&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/ChangeLog        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2014-03-10  Frédéric Wang  &lt;fred.wang@free.fr&gt;
+
+        Improve renderer classes for MathML Token elements.
+        https://bugs.webkit.org/show_bug.cgi?id=124838
+
+        Reviewed by Chris Fleizach.
+
+        This patch continues the refactoring of token elements that has been
+        started in bug 44208. The &lt;mo&gt; element now derives from the
+        RenderMathMLToken class, which was already used for the &lt;mi&gt; element.
+        The behavior of anonymous &lt;mo&gt; elements created by the &lt;mfenced&gt; element
+        is now more consistent with the one of &quot;standard&quot; &lt;mo&gt; elements and the
+        spacing around them is now handled in RenderMathMLOperator. This is a
+        first step towards fixing bugs 115787 and 118843. The only visible
+        rendering change is how &lt;mfenced&gt; open/close attributes handle
+        whitespace and multiple characters and some tests are added for that.
+        Other features are already covered by other tests. Finally, this also
+        removes some code from AccessibilityRenderObject that was used to
+        workaround issues with &lt;mo&gt; elements.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::startOfContinuations):
+        (WebCore::AccessibilityRenderObject::textUnderElement):
+        (WebCore::AccessibilityRenderObject::isMathOperator):
+        (WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
+        * mathml/MathMLTextElement.cpp:
+        (WebCore::MathMLTextElement::didAttachRenderers):
+        (WebCore::MathMLTextElement::childrenChanged):
+        * rendering/mathml/RenderMathMLBlock.cpp:
+        (WebCore::RenderMathMLBlock::RenderMathMLBlock):
+        * rendering/mathml/RenderMathMLBlock.h:
+        * rendering/mathml/RenderMathMLFenced.cpp:
+        (WebCore::RenderMathMLFenced::RenderMathMLFenced):
+        (WebCore::RenderMathMLFenced::updateFromElement):
+        (WebCore::RenderMathMLFenced::createMathMLOperator):
+        (WebCore::RenderMathMLFenced::makeFences):
+        (WebCore::RenderMathMLFenced::addChild):
+        * rendering/mathml/RenderMathMLFenced.h:
+        * rendering/mathml/RenderMathMLOperator.cpp:
+        (WebCore::RenderMathMLOperator::RenderMathMLOperator):
+        (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
+        (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
+        (WebCore::RenderMathMLOperator::SetOperatorProperties):
+        (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
+        (WebCore::RenderMathMLOperator::rebuildTokenContent):
+        (WebCore::RenderMathMLOperator::updateTokenContent):
+        (WebCore::RenderMathMLOperator::updateStyle):
+        (WebCore::RenderMathMLOperator::firstLineBaseline):
+        (WebCore::RenderMathMLOperator::paint):
+        (WebCore::RenderMathMLOperator::paintChildren):
+        * rendering/mathml/RenderMathMLOperator.h:
+        * rendering/mathml/RenderMathMLToken.cpp:
+        (WebCore::RenderMathMLToken::createWrapperIfNeeded):
+
</ins><span class="cx"> 2014-03-10  James Craig  &lt;jcraig@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -253,17 +253,8 @@
</span><span class="cx"> 
</span><span class="cx"> static inline RenderInline* startOfContinuations(RenderObject* r)
</span><span class="cx"> {
</span><del>-    if (r-&gt;isInlineElementContinuation()) {
-#if ENABLE(MATHML)
-        // MathML elements make anonymous RenderObjects, then set their node to the parent's node.
-        // This makes it so that the renderer() != renderer()-&gt;node()-&gt;renderer()
-        // (which is what isInlineElementContinuation() uses as a determinant).
-        if (r-&gt;node()-&gt;isMathMLElement())
-            return nullptr;
-#endif
-        
</del><ins>+    if (r-&gt;isInlineElementContinuation())
</ins><span class="cx">         return toRenderInline(r-&gt;node()-&gt;renderer());
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     // Blocks with a previous continuation always have a next continuation
</span><span class="cx">     if (r-&gt;isRenderBlock() &amp;&amp; toRenderBlock(r)-&gt;inlineElementContinuation())
</span><span class="lines">@@ -654,10 +645,8 @@
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     // Math operators create RenderText nodes on the fly that are not tied into the DOM in a reasonable way,
</span><span class="cx">     // so rangeOfContents does not work for them (nor does regular text selection).
</span><del>-    if (m_renderer-&gt;isText() &amp;&amp; isMathElement()) {
-        if (ancestorsOfType&lt;RenderMathMLOperator&gt;(*m_renderer).first())
-            return toRenderText(*m_renderer).text();
-    }
</del><ins>+    if (m_renderer-&gt;isText() &amp;&amp; m_renderer-&gt;isAnonymous() &amp;&amp; ancestorsOfType&lt;RenderMathMLOperator&gt;(*m_renderer).first())
+        return toRenderText(*m_renderer).text();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // We use a text iterator for text objects AND for those cases where we are
</span><span class="lines">@@ -3502,10 +3491,7 @@
</span><span class="cx">     if (!m_renderer || !m_renderer-&gt;isRenderMathMLOperator())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    // Ensure that this is actually a render MathML operator because
-    // MathML will create MathMLBlocks and use the original node as the node
-    // of this new block that is not tied to the DOM.
-    return isMathElement() &amp;&amp; node()-&gt;hasTagName(MathMLNames::moTag);
</del><ins>+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityRenderObject::isMathFenceOperator() const
</span><span class="lines">@@ -3564,15 +3550,14 @@
</span><span class="cx">     if (!m_renderer)
</span><span class="cx">         return true;
</span><span class="cx">     
</span><del>-    // Ignore items that were created for layout purposes only.
-    if (m_renderer-&gt;isRenderMathMLBlock() &amp;&amp; toRenderMathMLBlock(m_renderer)-&gt;ignoreInAccessibilityTree())
-        return true;
-
-    // Ignore anonymous renderers inside math blocks.
</del><ins>+    // We ignore anonymous renderers inside math blocks.
+    // However, we do not exclude anonymous RenderMathMLOperator nodes created by the mfenced element nor RenderText nodes created by math operators so that the text can be exposed by AccessibilityRenderObject::textUnderElement.
</ins><span class="cx">     if (m_renderer-&gt;isAnonymous()) {
</span><ins>+        if (m_renderer-&gt;isRenderMathMLOperator())
+            return false;
</ins><span class="cx">         for (AccessibilityObject* parent = parentObject(); parent; parent = parent-&gt;parentObject()) {
</span><span class="cx">             if (parent-&gt;isMathElement())
</span><del>-                return true;
</del><ins>+                return !(m_renderer-&gt;isText() &amp;&amp; ancestorsOfType&lt;RenderMathMLOperator&gt;(*m_renderer).first());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLTextElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLTextElement.cpp (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLTextElement.cpp        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/mathml/MathMLTextElement.cpp        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -53,23 +53,15 @@
</span><span class="cx"> void MathMLTextElement::didAttachRenderers()
</span><span class="cx"> {
</span><span class="cx">     MathMLElement::didAttachRenderers();
</span><del>-    if (renderer()) {
-        if (renderer()-&gt;isRenderMathMLToken())
-            toRenderMathMLToken(renderer())-&gt;updateTokenContent();
-        else
-            renderer()-&gt;updateFromElement();
-    }
</del><ins>+    if (renderer() &amp;&amp; renderer()-&gt;isRenderMathMLToken())
+        toRenderMathMLToken(renderer())-&gt;updateTokenContent();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MathMLTextElement::childrenChanged(const ChildChange&amp; change)
</span><span class="cx"> {
</span><span class="cx">     MathMLElement::childrenChanged(change);
</span><del>-    if (renderer()) {
-        if (renderer()-&gt;isRenderMathMLToken())
-            toRenderMathMLToken(renderer())-&gt;updateTokenContent();
-        else
-            renderer()-&gt;updateFromElement();
-    }
</del><ins>+    if (renderer() &amp;&amp; renderer()-&gt;isRenderMathMLToken())
+        toRenderMathMLToken(renderer())-&gt;updateTokenContent();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderPtr&lt;RenderElement&gt; MathMLTextElement::createElementRenderer(PassRef&lt;RenderStyle&gt; style)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -45,13 +45,11 @@
</span><span class="cx">     
</span><span class="cx"> RenderMathMLBlock::RenderMathMLBlock(Element&amp; container, PassRef&lt;RenderStyle&gt; style)
</span><span class="cx">     : RenderFlexibleBox(container, std::move(style))
</span><del>-    , m_ignoreInAccessibilityTree(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderMathMLBlock::RenderMathMLBlock(Document&amp; document, PassRef&lt;RenderStyle&gt; style)
</span><span class="cx">     : RenderFlexibleBox(document, std::move(style))
</span><del>-    , m_ignoreInAccessibilityTree(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -64,14 +64,9 @@
</span><span class="cx">     // Create a new RenderMathMLBlock, with a new style inheriting from this-&gt;style().
</span><span class="cx">     RenderPtr&lt;RenderMathMLBlock&gt; createAnonymousMathMLBlock();
</span><span class="cx">     
</span><del>-    void setIgnoreInAccessibilityTree(bool flag) { m_ignoreInAccessibilityTree = flag; }
-    bool ignoreInAccessibilityTree() const { return m_ignoreInAccessibilityTree; }
-    
</del><span class="cx"> private:
</span><span class="cx">     virtual bool isRenderMathMLBlock() const override final { return true; }
</span><span class="cx">     virtual const char* renderName() const override;
</span><del>-
-    bool m_ignoreInAccessibilityTree;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> RENDER_OBJECT_TYPE_CASTS(RenderMathMLBlock, isRenderMathMLBlock())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLFencedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -40,15 +40,11 @@
</span><span class="cx">     
</span><span class="cx"> using namespace MathMLNames;
</span><span class="cx">     
</span><del>-enum Braces { OpeningBraceChar = 0x28, ClosingBraceChar = 0x29 };
-    
-static const float gSeparatorMarginEndEms = 0.25f;
-static const float gFenceMarginEms = 0.1f;
</del><ins>+static const char* gOpeningBraceChar = &quot;(&quot;;
+static const char* gClosingBraceChar = &quot;)&quot;;
</ins><span class="cx"> 
</span><span class="cx"> RenderMathMLFenced::RenderMathMLFenced(MathMLInlineContainerElement&amp; element, PassRef&lt;RenderStyle&gt; style)
</span><span class="cx">     : RenderMathMLRow(element, std::move(style))
</span><del>-    , m_open(OpeningBraceChar)
-    , m_close(ClosingBraceChar)
</del><span class="cx">     , m_closeFenceRenderer(nullptr)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -57,15 +53,15 @@
</span><span class="cx"> {
</span><span class="cx">     const auto&amp; fenced = element();
</span><span class="cx">  
</span><del>-    // FIXME: Handle open/close values with more than one character (they should be treated like text).
-    AtomicString openValue = fenced.getAttribute(MathMLNames::openAttr);
-    if (openValue.length() &gt; 0)
-        m_open = openValue[0];
-    AtomicString closeValue = fenced.getAttribute(MathMLNames::closeAttr);
-    if (closeValue.length() &gt; 0)
-        m_close = closeValue[0];
-    
-    AtomicString separators = fenced.getAttribute(MathMLNames::separatorsAttr);
</del><ins>+    // The open operator defaults to a left parenthesis.
+    AtomicString open = fenced.fastGetAttribute(MathMLNames::openAttr);
+    m_open = open.isNull() ? gOpeningBraceChar : open;
+
+    // The close operator defaults to a right parenthesis.
+    AtomicString close = fenced.fastGetAttribute(MathMLNames::closeAttr);
+    m_close = close.isNull() ? gClosingBraceChar : close;
+
+    AtomicString separators = fenced.fastGetAttribute(MathMLNames::separatorsAttr);
</ins><span class="cx">     if (!separators.isNull()) {
</span><span class="cx">         StringBuilder characters;
</span><span class="cx">         for (unsigned int i = 0; i &lt; separators.length(); i++) {
</span><span class="lines">@@ -80,16 +76,16 @@
</span><span class="cx">     
</span><span class="cx">     if (isEmpty())
</span><span class="cx">         makeFences();
</span><ins>+    else {
+        // FIXME: The mfenced element fails to update dynamically when its open, close and separators attributes are changed (https://bugs.webkit.org/show_bug.cgi?id=57696).
+        toRenderMathMLOperator(firstChild())-&gt;updateTokenContent(m_open);
+        m_closeFenceRenderer-&gt;updateTokenContent(m_close);
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderPtr&lt;RenderMathMLOperator&gt; RenderMathMLFenced::createMathMLOperator(UChar uChar, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
</del><ins>+RenderPtr&lt;RenderMathMLOperator&gt; RenderMathMLFenced::createMathMLOperator(const String&amp; operatorString, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
</ins><span class="cx"> {
</span><del>-    auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), FLEX);
-    newStyle.get().setFlexDirection(FlowColumn);
-    newStyle.get().setMarginEnd(Length((flag == MathMLOperatorDictionary::Fence ? gFenceMarginEms : gSeparatorMarginEndEms) * style().fontSize(), Fixed));
-    if (flag == MathMLOperatorDictionary::Fence)
-        newStyle.get().setMarginStart(Length(gFenceMarginEms * style().fontSize(), Fixed));
-    RenderPtr&lt;RenderMathMLOperator&gt; newOperator = createRenderer&lt;RenderMathMLOperator&gt;(element(), std::move(newStyle), uChar, form, flag);
</del><ins>+    RenderPtr&lt;RenderMathMLOperator&gt; newOperator = createRenderer&lt;RenderMathMLOperator&gt;(document(), RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), FLEX), operatorString, form, flag);
</ins><span class="cx">     newOperator-&gt;initializeStyle();
</span><span class="cx">     return newOperator;
</span><span class="cx"> }
</span><span class="lines">@@ -97,15 +93,11 @@
</span><span class="cx"> void RenderMathMLFenced::makeFences()
</span><span class="cx"> {
</span><span class="cx">     RenderPtr&lt;RenderMathMLOperator&gt; openFence = createMathMLOperator(m_open, MathMLOperatorDictionary::Prefix, MathMLOperatorDictionary::Fence);
</span><del>-    RenderMathMLOperator* openFencePtr = openFence.get();
</del><span class="cx">     RenderMathMLRow::addChild(openFence.leakPtr(), firstChild());
</span><span class="cx"> 
</span><span class="cx">     RenderPtr&lt;RenderMathMLOperator&gt; closeFence = createMathMLOperator(m_close, MathMLOperatorDictionary::Postfix, MathMLOperatorDictionary::Fence);
</span><span class="cx">     m_closeFenceRenderer = closeFence.get();
</span><span class="cx">     RenderMathMLRow::addChild(closeFence.leakPtr());
</span><del>-
-    openFencePtr-&gt;updateFromElement();
-    m_closeFenceRenderer-&gt;updateFromElement();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLFenced::addChild(RenderObject* child, RenderObject* beforeChild)
</span><span class="lines">@@ -114,8 +106,7 @@
</span><span class="cx">     if (isEmpty())
</span><span class="cx">         updateFromElement();
</span><span class="cx">     
</span><del>-    // FIXME: Adding or removing a child should possibly cause all later separators to shift places if they're different,
-    // as later child positions change by +1 or -1.
</del><ins>+    // FIXME: Adding or removing a child should possibly cause all later separators to shift places if they're different, as later child positions change by +1 or -1. This should also handle surrogate pairs. See https://bugs.webkit.org/show_bug.cgi?id=125938.
</ins><span class="cx">     
</span><span class="cx">     RenderPtr&lt;RenderMathMLOperator&gt; separatorRenderer;
</span><span class="cx">     if (m_separators.get()) {
</span><span class="lines">@@ -139,7 +130,9 @@
</span><span class="cx">             else
</span><span class="cx">                 separator = (*m_separators.get())[count - 1];
</span><span class="cx">                 
</span><del>-            separatorRenderer = createMathMLOperator(separator, MathMLOperatorDictionary::Infix, MathMLOperatorDictionary::Separator);
</del><ins>+            StringBuilder builder;
+            builder.append(separator);
+            separatorRenderer = createMathMLOperator(builder.toString(), MathMLOperatorDictionary::Infix, MathMLOperatorDictionary::Separator);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -156,26 +149,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// FIXME: Change createMathMLOperator() above to create an isAnonymous() operator, and remove this styleDidChange() function.
-void RenderMathMLFenced::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
-{
-    RenderMathMLBlock::styleDidChange(diff, oldStyle);
-    
-    for (RenderObject* child = firstChild(); child; child = child-&gt;nextSibling()) {
-        if (child-&gt;node() == &amp;element()) {
-            ASSERT(child-&gt;style().refCount() == 1);
-            child-&gt;style().inheritFrom(&amp;style());
-            bool isFence = child == firstChild() || child == lastChild();
-            child-&gt;style().setMarginEnd(Length((isFence ? gFenceMarginEms : gSeparatorMarginEndEms) * style().fontSize(), Fixed));
-            if (isFence) {
-                RenderMathMLBlock* block = toRenderMathMLBlock(child);
-                toRenderMathMLOperator(block)-&gt;updateFromElement();
-                child-&gt;style().setMarginStart(Length(gFenceMarginEms * style().fontSize(), Fixed));
-            }
-        }
-    }
-}
-
</del><span class="cx"> }    
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLFencedh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -43,15 +43,13 @@
</span><span class="cx">     virtual bool isRenderMathMLFenced() const override { return true; }
</span><span class="cx">     virtual const char* renderName() const override { return &quot;RenderMathMLFenced&quot;; }
</span><span class="cx">     virtual void addChild(RenderObject* child, RenderObject* beforeChild) override;
</span><del>-    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
-
</del><span class="cx">     virtual void updateFromElement() override;
</span><span class="cx"> 
</span><del>-    RenderPtr&lt;RenderMathMLOperator&gt; createMathMLOperator(UChar, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
</del><ins>+    RenderPtr&lt;RenderMathMLOperator&gt; createMathMLOperator(const String&amp; operatorString, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
</ins><span class="cx">     void makeFences();
</span><span class="cx"> 
</span><del>-    UChar m_open;
-    UChar m_close;
</del><ins>+    String m_open;
+    String m_close;
</ins><span class="cx">     RefPtr&lt;StringImpl&gt; m_separators;
</span><span class="cx">     
</span><span class="cx">     RenderMathMLOperator* m_closeFenceRenderer;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -1119,31 +1119,30 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderMathMLOperator::RenderMathMLOperator(MathMLElement&amp; element, PassRef&lt;RenderStyle&gt; style)
</span><del>-    : RenderMathMLBlock(element, std::move(style))
</del><ins>+    : RenderMathMLToken(element, std::move(style))
</ins><span class="cx">     , m_stretchHeightAboveBaseline(0)
</span><span class="cx">     , m_stretchDepthBelowBaseline(0)
</span><span class="cx">     , m_operator(0)
</span><span class="cx">     , m_stretchyCharacter(nullptr)
</span><del>-    , m_isFencedOperator(false)
</del><span class="cx"> {
</span><del>-    SetOperatorProperties();
</del><ins>+    updateTokenContent();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderMathMLOperator::RenderMathMLOperator(MathMLElement&amp; element, PassRef&lt;RenderStyle&gt; style, UChar operatorChar, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
-    : RenderMathMLBlock(element, std::move(style))
</del><ins>+RenderMathMLOperator::RenderMathMLOperator(Document&amp; document, PassRef&lt;RenderStyle&gt; style, const String&amp; operatorString, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
+    : RenderMathMLToken(document, std::move(style))
</ins><span class="cx">     , m_stretchHeightAboveBaseline(0)
</span><span class="cx">     , m_stretchDepthBelowBaseline(0)
</span><del>-    , m_operator(operatorChar == hyphenMinus ? minusSign : operatorChar)
</del><ins>+    , m_operator(0)
</ins><span class="cx">     , m_stretchyCharacter(nullptr)
</span><del>-    , m_isFencedOperator(true)
</del><span class="cx">     , m_operatorForm(form)
</span><span class="cx">     , m_operatorFlags(flag)
</span><span class="cx"> {
</span><del>-    SetOperatorProperties();
</del><ins>+    updateTokenContent(operatorString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLOperator::setOperatorFlagFromAttribute(MathMLOperatorDictionary::Flag flag, const QualifiedName&amp; name)
</span><span class="cx"> {
</span><ins>+    ASSERT(!isFencedOperator());
</ins><span class="cx">     const AtomicString&amp; attributeValue = element().fastGetAttribute(name);
</span><span class="cx">     if (attributeValue == &quot;true&quot;)
</span><span class="cx">         m_operatorFlags |= flag;
</span><span class="lines">@@ -1155,7 +1154,7 @@
</span><span class="cx"> void RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry(const MathMLOperatorDictionary::Entry* entry)
</span><span class="cx"> {
</span><span class="cx">     // If this operator has been created by RenderMathMLFenced, we preserve the Fence and Separator properties.
</span><del>-    if (m_isFencedOperator)
</del><ins>+    if (isFencedOperator())
</ins><span class="cx">         m_operatorFlags = (m_operatorFlags &amp; (MathMLOperatorDictionary::Fence | MathMLOperatorDictionary::Separator)) | entry-&gt;flags;
</span><span class="cx">     else
</span><span class="cx">         m_operatorFlags = entry-&gt;flags;
</span><span class="lines">@@ -1167,18 +1166,9 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLOperator::SetOperatorProperties()
</span><span class="cx"> {
</span><del>-    // We verify whether the operator text can be represented by a single UChar.
-    if (!m_isFencedOperator) {
-        // FIXME: This does not handle surrogate pairs (https://bugs.webkit.org/show_bug.cgi?id=122296).
-        // FIXME: This does not handle &lt;mo&gt; operators with multiple characters (https://bugs.webkit.org/show_bug.cgi?id=124828).
-        String opText = element().textContent().stripWhiteSpace().simplifyWhiteSpace().replace(hyphenMinus, minusSign).impl();
-        if (opText.length() == 1)
-            m_operator = opText[0];
-    }
-
</del><span class="cx">     // We determine the form of the operator.
</span><span class="cx">     bool explicitForm = true;
</span><del>-    if (!m_isFencedOperator) {
</del><ins>+    if (!isFencedOperator()) {
</ins><span class="cx">         const AtomicString&amp; form = element().fastGetAttribute(MathMLNames::formAttr);
</span><span class="cx">         if (form == &quot;prefix&quot;)
</span><span class="cx">             m_operatorForm = MathMLOperatorDictionary::Prefix;
</span><span class="lines">@@ -1201,7 +1191,10 @@
</span><span class="cx">     // We determine the default values of the operator properties.
</span><span class="cx"> 
</span><span class="cx">     // First we initialize with the default values for unknown operators.
</span><del>-    m_operatorFlags = 0; // This sets all the properties to &quot;false&quot;.
</del><ins>+    if (isFencedOperator())
+        m_operatorFlags &amp;= MathMLOperatorDictionary::Fence | MathMLOperatorDictionary::Separator; // This resets all but the Fence and Separator properties.
+    else
+        m_operatorFlags = 0; // This resets all the operator properties.
</ins><span class="cx">     m_leadingSpace = 5 * style().fontSize() / 18; // This sets leading space to &quot;thickmathspace&quot;.
</span><span class="cx">     m_trailingSpace = 5 * style().fontSize() / 18; // This sets trailing space to &quot;thickmathspace&quot;.
</span><span class="cx">     m_minSize = style().fontSize(); // This sets minsize to &quot;1em&quot;.
</span><span class="lines">@@ -1225,7 +1218,7 @@
</span><span class="cx">     }
</span><span class="cx"> #undef MATHML_OPDICT_SIZE
</span><span class="cx"> 
</span><del>-    if (!m_isFencedOperator) {
</del><ins>+    if (!isFencedOperator()) {
</ins><span class="cx">         // Finally, we make the attribute values override the default.
</span><span class="cx"> 
</span><span class="cx">         setOperatorFlagFromAttribute(MathMLOperatorDictionary::Fence, MathMLNames::fenceAttr);
</span><span class="lines">@@ -1244,6 +1237,20 @@
</span><span class="cx">         if (maxsize != &quot;infinity&quot;)
</span><span class="cx">             parseMathMLLength(maxsize, m_maxSize, &amp;style(), false);
</span><span class="cx">     }
</span><ins>+
+    // FIXME: this should be removed when operator spacing is implemented (https://bugs.webkit.org/show_bug.cgi?id=115787). At the moment spacing for normal &lt;mo&gt; elements is handled in mathml.css and mfenced uses the arbitrary constants below.
+    if (isFencedOperator()) {
+        if (hasOperatorFlag(MathMLOperatorDictionary::Fence)) {
+            m_leadingSpace = 0.1f * style().fontSize();
+            m_trailingSpace = 0.1f * style().fontSize();
+        } else if (hasOperatorFlag(MathMLOperatorDictionary::Separator)) {
+            m_leadingSpace = 0;
+            m_trailingSpace = 0.25f * style().fontSize();
+        }
+    } else {
+        m_leadingSpace = 0;
+        m_trailingSpace = 0;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderMathMLOperator::isChildAllowed(const RenderObject&amp;, const RenderStyle&amp;) const
</span><span class="lines">@@ -1283,12 +1290,6 @@
</span><span class="cx">     updateStyle();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLOperator::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
-{
-    RenderMathMLBlock::styleDidChange(diff, oldStyle);
-    updateFromElement();
-}
-
</del><span class="cx"> FloatRect RenderMathMLOperator::glyphBoundsForCharacter(UChar character)
</span><span class="cx"> {
</span><span class="cx">     GlyphData data = style().font().glyphDataForCharacter(character, false);
</span><span class="lines">@@ -1314,7 +1315,7 @@
</span><span class="cx">     UChar stretchedCharacter;
</span><span class="cx">     bool allowStretching = shouldAllowStretching(stretchedCharacter);
</span><span class="cx">     if (!allowStretching) {
</span><del>-        RenderMathMLBlock::computePreferredLogicalWidths();
</del><ins>+        RenderMathMLToken::computePreferredLogicalWidths();
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1332,47 +1333,47 @@
</span><span class="cx">             maximumGlyphWidth = std::max(maximumGlyphWidth, advanceForCharacter(character.bottomGlyph));
</span><span class="cx">         if (character.middleGlyph)
</span><span class="cx">             maximumGlyphWidth = std::max(maximumGlyphWidth, advanceForCharacter(character.middleGlyph));
</span><del>-        m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth = maximumGlyphWidth;
</del><ins>+        m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth = m_leadingSpace + maximumGlyphWidth + m_trailingSpace;
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth = maximumGlyphWidth;
</del><ins>+    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth = m_leadingSpace + maximumGlyphWidth + m_trailingSpace;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-// FIXME: It's cleaner to only call updateFromElement when an attribute has changed. The body of
-// this method should probably be moved to a private stretchHeightChanged or checkStretchHeight
-// method. Probably at the same time, addChild/removeChild methods should be made to work for
-// dynamic DOM changes.
-void RenderMathMLOperator::updateFromElement()
</del><ins>+void RenderMathMLOperator::rebuildTokenContent(const String&amp; operatorString)
</ins><span class="cx"> {
</span><del>-    RenderElement* savedRenderer = element().renderer();
</del><ins>+    // We collapse the whitespace and replace the hyphens by minus signs.
+    AtomicString textContent = operatorString.stripWhiteSpace().simplifyWhiteSpace().replace(hyphenMinus, minusSign).impl();
</ins><span class="cx"> 
</span><del>-    // Destroy our current children
-    destroyLeftoverChildren();
</del><ins>+    // We destroy the wrapper and rebuild it.
+    // FIXME: Using this RenderText make the text inaccessible to the dumpAsText/selection code (https://bugs.webkit.org/show_bug.cgi?id=125597).
+    if (firstChild())
+        toRenderElement(firstChild())-&gt;destroy();
+    createWrapperIfNeeded();
+    RenderPtr&lt;RenderText&gt; text = createRenderer&lt;RenderText&gt;(document(), textContent);
+    toRenderElement(firstChild())-&gt;addChild(text.leakPtr());
</ins><span class="cx"> 
</span><del>-    // Since we share a node with our children, destroying our children may set our node's
-    // renderer to 0, so we need to restore it.
-    element().setRenderer(savedRenderer);
-
-    RenderPtr&lt;RenderMathMLBlock&gt; container = createRenderer&lt;RenderMathMLBlock&gt;(element(), RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), FLEX));
-    // This container doesn't offer any useful information to accessibility.
-    container-&gt;setIgnoreInAccessibilityTree(true);
-    container-&gt;initializeStyle();
-
-    RenderPtr&lt;RenderText&gt; text;
-    if (m_isFencedOperator)
-        text = createRenderer&lt;RenderText&gt;(document(), String(&amp;m_operator, 1));
-    else
-        text = createRenderer&lt;RenderText&gt;(document(), element().textContent().replace(hyphenMinus, minusSign).impl());
-
-    container-&gt;addChild(text.leakPtr());
-    addChild(container.leakPtr());
-
</del><ins>+    // We verify whether the operator text can be represented by a single UChar.
+    // FIXME: This does not handle surrogate pairs (https://bugs.webkit.org/show_bug.cgi?id=122296).
+    // FIXME: This does not handle &lt;mo&gt; operators with multiple characters (https://bugs.webkit.org/show_bug.cgi?id=124828).
+    m_operator = textContent.length() == 1 ? textContent[0] : 0;
</ins><span class="cx">     SetOperatorProperties();
</span><span class="cx">     updateStyle();
</span><span class="cx">     setNeedsLayoutAndPrefWidthsRecalc();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderMathMLOperator::updateTokenContent(const String&amp; operatorString)
+{
+    ASSERT(isFencedOperator());
+    rebuildTokenContent(operatorString);
+}
+
+void RenderMathMLOperator::updateTokenContent()
+{
+    ASSERT(!isFencedOperator());
+    rebuildTokenContent(element().textContent());
+}
+
</ins><span class="cx"> bool RenderMathMLOperator::shouldAllowStretching(UChar&amp; stretchedCharacter)
</span><span class="cx"> {
</span><span class="cx">     if (!hasOperatorFlag(MathMLOperatorDictionary::Stretchy))
</span><span class="lines">@@ -1424,13 +1425,21 @@
</span><span class="cx">     m_stretchyCharacter = m_isStretched ? findAcceptableStretchyCharacter(stretchedCharacter) : 0;
</span><span class="cx">     if (!m_stretchyCharacter)
</span><span class="cx">         m_isStretched = false;
</span><ins>+
+    // We add spacing around the operator.
+    const auto&amp; wrapper = toRenderElement(firstChild());
+    auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(&amp;style(), FLEX);
+    newStyle.get().setMarginStart(Length(m_leadingSpace, Fixed));
+    newStyle.get().setMarginEnd(Length(m_trailingSpace, Fixed));
+    wrapper-&gt;setStyle(std::move(newStyle));
+    wrapper-&gt;setNeedsLayoutAndPrefWidthsRecalc();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int RenderMathMLOperator::firstLineBaseline() const
</span><span class="cx"> {
</span><span class="cx">     if (m_isStretched)
</span><span class="cx">         return m_stretchHeightAboveBaseline;
</span><del>-    return RenderMathMLBlock::firstLineBaseline();
</del><ins>+    return RenderMathMLToken::firstLineBaseline();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLOperator::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&amp; computedValues) const
</span><span class="lines">@@ -1518,16 +1527,16 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLOperator::paint(PaintInfo&amp; info, const LayoutPoint&amp; paintOffset)
</span><span class="cx"> {
</span><del>-    RenderMathMLBlock::paint(info, paintOffset);
-
</del><span class="cx">     if (info.context-&gt;paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!m_isStretched &amp;&amp; !m_stretchyCharacter) {
</span><del>-        RenderMathMLBlock::paint(info, paintOffset);
</del><ins>+        RenderMathMLToken::paint(info, paintOffset);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // FIXME: This painting should work in RTL mode too (https://bugs.webkit.org/show_bug.cgi?id=123018).
+
</ins><span class="cx">     GraphicsContextStateSaver stateSaver(*info.context);
</span><span class="cx">     info.context-&gt;setFillColor(style().visitedDependentColor(CSSPropertyColor), style().colorSpace());
</span><span class="cx"> 
</span><span class="lines">@@ -1535,7 +1544,9 @@
</span><span class="cx">     ASSERT(m_stretchyCharacter-&gt;bottomGlyph);
</span><span class="cx"> 
</span><span class="cx">     // We are positioning the glyphs so that the edge of the tight glyph bounds line up exactly with the edges of our paint box.
</span><del>-    LayoutPoint operatorTopLeft = ceiledIntPoint(paintOffset + location());
</del><ins>+    LayoutPoint operatorTopLeft = paintOffset + location();
+    operatorTopLeft.move(m_leadingSpace, 0);
+    operatorTopLeft = ceiledIntPoint(operatorTopLeft);
</ins><span class="cx">     FloatRect topGlyphBounds = glyphBoundsForCharacter(m_stretchyCharacter-&gt;topGlyph);
</span><span class="cx">     LayoutPoint topGlyphOrigin(operatorTopLeft.x(), operatorTopLeft.y() - topGlyphBounds.y());
</span><span class="cx">     LayoutRect topGlyphPaintRect = paintCharacter(info, m_stretchyCharacter-&gt;topGlyph, topGlyphOrigin, TrimBottom);
</span><span class="lines">@@ -1562,7 +1573,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_isStretched)
</span><span class="cx">         return;
</span><del>-    RenderMathMLBlock::paintChildren(paintInfo, paintOffset, paintInfoForChild, usePrintRect);
</del><ins>+    RenderMathMLToken::paintChildren(paintInfo, paintOffset, paintInfoForChild, usePrintRect);
</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 (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;MathMLElement.h&quot;
</span><del>-#include &quot;RenderMathMLBlock.h&quot;
</del><ins>+#include &quot;RenderMathMLToken.h&quot;
</ins><span class="cx"> #include &lt;wtf/unicode/CharacterNames.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -57,19 +57,17 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-class RenderMathMLOperator final : public RenderMathMLBlock {
</del><ins>+class RenderMathMLOperator final : public RenderMathMLToken {
</ins><span class="cx"> public:
</span><span class="cx">     RenderMathMLOperator(MathMLElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><del>-    RenderMathMLOperator(MathMLElement&amp;, PassRef&lt;RenderStyle&gt;, UChar operatorChar, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
</del><ins>+    RenderMathMLOperator(Document&amp;, PassRef&lt;RenderStyle&gt;, const String&amp; operatorString, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
</ins><span class="cx"> 
</span><del>-    MathMLElement&amp; element() { return toMathMLElement(nodeForNonAnonymous()); }
-
</del><span class="cx">     void stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline);
</span><span class="cx">     LayoutUnit stretchSize() const { return m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline; }
</span><span class="cx">     
</span><span class="cx">     bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const { return m_operatorFlags &amp; flag; }
</span><span class="cx"> 
</span><del>-    void updateStyle();
</del><ins>+    void updateStyle() override final;
</ins><span class="cx"> 
</span><span class="cx">     void paint(PaintInfo&amp;, const LayoutPoint&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -81,18 +79,20 @@
</span><span class="cx">         UChar middleGlyph;
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    virtual void updateFromElement() override;
</del><ins>+    void updateTokenContent(const String&amp; operatorString);
+    void updateTokenContent() override final;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     virtual const char* renderName() const override { return isAnonymous() ? &quot;RenderMathMLOperator (anonymous)&quot; : &quot;RenderMathMLOperator&quot;; }
</span><del>-    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
</del><span class="cx">     virtual void paintChildren(PaintInfo&amp; forSelf, const LayoutPoint&amp;, PaintInfo&amp; forChild, bool usePrintRect) override;
</span><span class="cx">     virtual bool isRenderMathMLOperator() const override { return true; }
</span><ins>+    bool isFencedOperator() { return isAnonymous(); }
</ins><span class="cx">     virtual bool isChildAllowed(const RenderObject&amp;, const RenderStyle&amp;) const override;
</span><span class="cx">     virtual void computePreferredLogicalWidths() override;
</span><span class="cx">     virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&amp;) const override;
</span><span class="cx">     virtual int firstLineBaseline() const override;
</span><span class="cx">     virtual RenderMathMLOperator* unembellishedOperator() override { return this; }
</span><ins>+    void rebuildTokenContent(const String&amp; operatorString);
</ins><span class="cx"> 
</span><span class="cx">     bool shouldAllowStretching(UChar&amp; characterForStretching);
</span><span class="cx">     StretchyCharacter* findAcceptableStretchyCharacter(UChar);
</span><span class="lines">@@ -116,7 +116,6 @@
</span><span class="cx"> 
</span><span class="cx">     UChar m_operator;
</span><span class="cx">     StretchyCharacter* m_stretchyCharacter;
</span><del>-    bool m_isFencedOperator;
</del><span class="cx">     MathMLOperatorDictionary::Form m_operatorForm;
</span><span class="cx">     unsigned short m_operatorFlags;
</span><span class="cx">     LayoutUnit m_leadingSpace;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLTokencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (165435 => 165436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp        2014-03-11 06:57:43 UTC (rev 165435)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp        2014-03-11 07:51:27 UTC (rev 165436)
</span><span class="lines">@@ -54,8 +54,6 @@
</span><span class="cx"> {
</span><span class="cx">     if (!firstChild()) {
</span><span class="cx">         RenderPtr&lt;RenderMathMLBlock&gt; wrapper = createAnonymousMathMLBlock();
</span><del>-        // This container doesn't offer any useful information to accessibility.
-        wrapper-&gt;setIgnoreInAccessibilityTree(true);
</del><span class="cx">         RenderMathMLBlock::addChild(wrapper.leakPtr());
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>