<!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>[202970] 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/202970">202970</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-07-08 00:15:24 -0700 (Fri, 08 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for movablelimits.
https://bugs.webkit.org/show_bug.cgi?id=155542

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

Source/WebCore:

Tests: mathml/presentation/displaystyle-1.html
       mathml/presentation/displaystyle-2.html
       mathml/presentation/displaystyle-3.html
       mathml/presentation/mo-movablelimits-default.html
       mathml/presentation/mo-movablelimits-dynamic.html
       mathml/presentation/mo-movablelimits.html

* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::parseAttribute): Take into account change of movablelimits.
* rendering/mathml/MathMLOperatorDictionary.h: Remove FIXME comment.
* rendering/mathml/MathMLStyle.cpp:
(WebCore::MathMLStyle::updateStyleIfNeeded): Force relayout and width computation when a
displaystyle value change.
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::shouldMoveLimits): Helper function to test if the operator
should have his limits moved when used as a base of munder/mover/munderover.
* rendering/mathml/RenderMathMLScripts.cpp: Allow munderover/munder/mover elements to use
this class and take the same behavior as the corresponding msubsup/msub/sup except for
the *scriptshift attributes.
(WebCore::RenderMathMLScripts::RenderMathMLScripts):
(WebCore::RenderMathMLScripts::getBaseAndScripts):
(WebCore::RenderMathMLScripts::computePreferredLogicalWidths):
(WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
(WebCore::RenderMathMLScripts::layoutBlock):
* rendering/mathml/RenderMathMLScripts.h: Allow some members to be accessible/overridden
by RenderMathMLUnderOver and add munderover/munder/mover in the kind.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): We use the code from
RenderMathMLScripts to initialize m_kind.
(WebCore::RenderMathMLUnderOver::shouldMoveLimits): New function to determine if the base
should move its limits.
(WebCore::RenderMathMLUnderOver::computePreferredLogicalWidths): We use the code from
RenderMathMLScripts when the base should move its limits.
(WebCore::RenderMathMLUnderOver::layoutBlock): We use the code from RenderMathMLScripts when
the base should move its limits. Also improve the early return for invalid markup.
(WebCore::RenderMathMLUnderOver::unembellishedOperator): Deleted. We use the code from RenderMathMLScripts.
(WebCore::RenderMathMLUnderOver::firstLineBaseline): Deleted. We use the code from RenderMathMLScripts.
* rendering/mathml/RenderMathMLUnderOver.h: We now inherit from RenderMathMLScripts and can
just remove members that exist in the parent. We define shouldMoveLimits() to determine
when the layout should be done the same as RenderMathMLScripts. For now, we try and be
safe with the rest of the code by continuing to claim that we are not a RenderMathMLScripts.

LayoutTests:

We import some reftests from Mozilla and write more tests in order to verify the effect of
movablelimits. We also adjust one existing test due to change in how munderover handles
invalid markup.

* mathml/presentation/displaystyle-1.html: Added. Imported from Mozilla. This verifies the
inheritance of displaystyle via its effect on movablelimits.
* mathml/presentation/displaystyle-1-expected.html: Added.
* mathml/presentation/displaystyle-2.html: Added. Imported from Mozilla. Test the effect of
displaystyle on munder, mover and munderover with a movablelimits base.
* mathml/presentation/displaystyle-2-expected.html: Added.
* mathml/presentation/displaystyle-3.html: Added. Imported from Mozilla. Test dynamic change
of displaystyle via its effect on movablelimits.
* mathml/presentation/displaystyle-3-expected.html: Added.
* mathml/presentation/mo-movablelimits-default.html: Added. Test that the default
movablelimits value from the operator dictionary is correctly read.
* mathml/presentation/mo-movablelimits-default-expected.html: Added.
* mathml/presentation/mo-movablelimits-dynamic.html: Added. Imported from Mozilla.
Test dynamic change of movablelimits.
* mathml/presentation/mo-movablelimits-dynamic-expected.html: Added.
* mathml/presentation/mo-movablelimits.html: Added. Basic test to check the effect of
movablelimits on munder.
* mathml/presentation/mo-movablelimits-expected.html: Added.
* mathml/presentation/underover-scriptshifts.html: Added. This verifies that script shifts
do not have any effect on munderover/mover/munder elements when their limits are rendered
as postscripts.
* mathml/presentation/underover-scriptshifts-expected.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLTextElementcpp">trunk/Source/WebCore/mathml/MathMLTextElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlMathMLOperatorDictionaryh">trunk/Source/WebCore/rendering/mathml/MathMLOperatorDictionary.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlMathMLStylecpp">trunk/Source/WebCore/rendering/mathml/MathMLStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLScriptsh">trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLUnderOvercpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLUnderOverh">trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmathmlpresentationdisplaystyle1expectedhtml">trunk/LayoutTests/mathml/presentation/displaystyle-1-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationdisplaystyle1html">trunk/LayoutTests/mathml/presentation/displaystyle-1.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationdisplaystyle2expectedhtml">trunk/LayoutTests/mathml/presentation/displaystyle-2-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationdisplaystyle2html">trunk/LayoutTests/mathml/presentation/displaystyle-2.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationdisplaystyle3expectedhtml">trunk/LayoutTests/mathml/presentation/displaystyle-3-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationdisplaystyle3html">trunk/LayoutTests/mathml/presentation/displaystyle-3.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmomovablelimitsdefaultexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-movablelimits-default-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmomovablelimitsdefaulthtml">trunk/LayoutTests/mathml/presentation/mo-movablelimits-default.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmomovablelimitsdynamicexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmomovablelimitsdynamichtml">trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmomovablelimitsexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-movablelimits-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmomovablelimitshtml">trunk/LayoutTests/mathml/presentation/mo-movablelimits.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationunderoverscriptshiftsexpectedhtml">trunk/LayoutTests/mathml/presentation/underover-scriptshifts-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationunderoverscriptshiftshtml">trunk/LayoutTests/mathml/presentation/underover-scriptshifts.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/LayoutTests/ChangeLog        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2016-07-08  Frederic Wang  &lt;fwang@igalia.com&gt;
+
+        Add support for movablelimits.
+        https://bugs.webkit.org/show_bug.cgi?id=155542
+
+        Reviewed by Brent Fulgham.
+
+        We import some reftests from Mozilla and write more tests in order to verify the effect of
+        movablelimits. We also adjust one existing test due to change in how munderover handles
+        invalid markup.
+
+        * mathml/presentation/displaystyle-1.html: Added. Imported from Mozilla. This verifies the
+        inheritance of displaystyle via its effect on movablelimits.
+        * mathml/presentation/displaystyle-1-expected.html: Added.
+        * mathml/presentation/displaystyle-2.html: Added. Imported from Mozilla. Test the effect of
+        displaystyle on munder, mover and munderover with a movablelimits base.
+        * mathml/presentation/displaystyle-2-expected.html: Added.
+        * mathml/presentation/displaystyle-3.html: Added. Imported from Mozilla. Test dynamic change
+        of displaystyle via its effect on movablelimits.
+        * mathml/presentation/displaystyle-3-expected.html: Added.
+        * mathml/presentation/mo-movablelimits-default.html: Added. Test that the default
+        movablelimits value from the operator dictionary is correctly read.
+        * mathml/presentation/mo-movablelimits-default-expected.html: Added.
+        * mathml/presentation/mo-movablelimits-dynamic.html: Added. Imported from Mozilla.
+        Test dynamic change of movablelimits.
+        * mathml/presentation/mo-movablelimits-dynamic-expected.html: Added.
+        * mathml/presentation/mo-movablelimits.html: Added. Basic test to check the effect of
+        movablelimits on munder.
+        * mathml/presentation/mo-movablelimits-expected.html: Added.
+        * mathml/presentation/underover-scriptshifts.html: Added. This verifies that script shifts
+        do not have any effect on munderover/mover/munder elements when their limits are rendered
+        as postscripts.
+        * mathml/presentation/underover-scriptshifts-expected.html: Added.
+
</ins><span class="cx"> 2016-07-07  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         padStart/padEnd with Infinity produces unexpected result
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationdisplaystyle1expectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/displaystyle-1-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/displaystyle-1-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/displaystyle-1-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;displaystyle&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- Test displaystyle on mstyle --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;/mstyle&gt;
+      &lt;mstyle displaystyle=&quot;false&quot;&gt;
+        &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+    &lt;!-- The mfrac element sets displaystyle to &quot;false&quot;, or if it was already
+         false increments scriptlevel by 1, within numerator and denominator.
+      --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;mfrac&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/mfrac&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+    &lt;!--    The mroot element increments scriptlevel by 2, and sets
+            displaystyle to &quot;false&quot;, within index, but leaves both attributes
+            unchanged within base.
+            The msqrt element leaves both attributes unchanged within its
+            argument. --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;mroot&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/mroot&gt;
+        &lt;msqrt&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/msqrt&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+&lt;!--
+    The msub element [...] increments scriptlevel by 1, and sets displaystyle to
+   &quot;false&quot;, within subscript, but leaves both attributes unchanged within base.
+
+   The msup element [...] increments scriptlevel by 1, and sets displaystyle to
+   &quot;false&quot;, within superscript, but leaves both attributes unchanged within
+   base.
+
+   The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
+   to &quot;false&quot;, within subscript and superscript, but leaves both attributes
+   unchanged within base.
+
+   The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
+   to &quot;false&quot;, within each of its arguments except base, but leaves both
+   attributes unchanged within base.
+   --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;msub&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/msub&gt;
+        &lt;msup&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/msup&gt;
+        &lt;msubsup&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/msubsup&gt;
+        &lt;mmultiscripts&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+          &lt;mprescripts/&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/mmultiscripts&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+&lt;!--
+   The munder element [...] always sets displaystyle to &quot;false&quot; within the
+   underscript, but increments scriptlevel by 1 only when accentunder is
+   &quot;false&quot;. Within base, it always leaves both attributes unchanged.
+
+   The mover element [...] always sets displaystyle to &quot;false&quot; within
+   overscript, but increments scriptlevel by 1 only when accent is &quot;false&quot;.
+   Within base, it always leaves both attributes unchanged.
+
+   The munderover [..] always sets displaystyle to &quot;false&quot; within underscript
+   and overscript, but increments scriptlevel by 1 only when accentunder or
+   accent, respectively, are &quot;false&quot;. Within base, it always leaves both
+   attributes unchanged.
+--&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/munder&gt;
+        &lt;mover&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/mover&gt;
+        &lt;munderover&gt;
+          &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+          &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;/munderover&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+&lt;!--
+   The displaystyle attribute is allowed on the mtable element to set the
+   inherited value of the attribute. If the attribute is not present, the
+   mtable element sets displaystyle to &quot;false&quot; within the table elements.
+--&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;false&quot;&gt;
+        &lt;mtable displaystyle=&quot;true&quot;&gt;
+          &lt;mtr&gt;
+            &lt;mtd&gt;
+              &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+            &lt;/mtd&gt;
+          &lt;/mtr&gt;
+        &lt;/mtable&gt;
+      &lt;/mstyle&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;mtable&gt;
+          &lt;mtr&gt;
+            &lt;mtd&gt;
+              &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+            &lt;/mtd&gt;
+          &lt;/mtr&gt;
+        &lt;/mtable&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/displaystyle-1-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationdisplaystyle1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/displaystyle-1.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/displaystyle-1.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/displaystyle-1.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;displaystyle&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- Test displaystyle on mstyle --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;/mstyle&gt;
+      &lt;mstyle displaystyle=&quot;false&quot;&gt;
+        &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+    &lt;!-- The mfrac element sets displaystyle to &quot;false&quot;, or if it was already
+         false increments scriptlevel by 1, within numerator and denominator.
+      --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;mfrac&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/mfrac&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+    &lt;!--    The mroot element increments scriptlevel by 2, and sets
+            displaystyle to &quot;false&quot;, within index, but leaves both attributes
+            unchanged within base.
+            The msqrt element leaves both attributes unchanged within its
+            argument. --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;mroot&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/mroot&gt;
+        &lt;msqrt&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/msqrt&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+&lt;!--
+    The msub element [...] increments scriptlevel by 1, and sets displaystyle to
+   &quot;false&quot;, within subscript, but leaves both attributes unchanged within base.
+
+   The msup element [...] increments scriptlevel by 1, and sets displaystyle to
+   &quot;false&quot;, within superscript, but leaves both attributes unchanged within
+   base.
+
+   The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
+   to &quot;false&quot;, within subscript and superscript, but leaves both attributes
+   unchanged within base.
+
+   The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
+   to &quot;false&quot;, within each of its arguments except base, but leaves both
+   attributes unchanged within base.
+   --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;msub&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/msub&gt;
+        &lt;msup&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/msup&gt;
+        &lt;msubsup&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/msubsup&gt;
+        &lt;mmultiscripts&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;mprescripts/&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/mmultiscripts&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+&lt;!--
+   The munder element [...] always sets displaystyle to &quot;false&quot; within the
+   underscript, but increments scriptlevel by 1 only when accentunder is
+   &quot;false&quot;. Within base, it always leaves both attributes unchanged.
+
+   The mover element [...] always sets displaystyle to &quot;false&quot; within
+   overscript, but increments scriptlevel by 1 only when accent is &quot;false&quot;.
+   Within base, it always leaves both attributes unchanged.
+
+   The munderover [..] always sets displaystyle to &quot;false&quot; within underscript
+   and overscript, but increments scriptlevel by 1 only when accentunder or
+   accent, respectively, are &quot;false&quot;. Within base, it always leaves both
+   attributes unchanged.
+--&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/munder&gt;
+        &lt;mover&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/mover&gt;
+        &lt;munderover&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+          &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;/munderover&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+&lt;!--
+   The displaystyle attribute is allowed on the mtable element to set the
+   inherited value of the attribute. If the attribute is not present, the
+   mtable element sets displaystyle to &quot;false&quot; within the table elements.
+--&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;false&quot;&gt;
+        &lt;mtable displaystyle=&quot;true&quot;&gt;
+          &lt;mtr&gt;
+            &lt;mtd&gt;
+              &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+            &lt;/mtd&gt;
+          &lt;/mtr&gt;
+        &lt;/mtable&gt;
+      &lt;/mstyle&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;mtable&gt;
+          &lt;mtr&gt;
+            &lt;mtd&gt;
+              &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+            &lt;/mtd&gt;
+          &lt;/mtr&gt;
+        &lt;/mtable&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/displaystyle-1.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationdisplaystyle2expectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/displaystyle-2-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/displaystyle-2-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/displaystyle-2-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;displaystyle&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- Test the effect of displaystyle on munder, mover and munderover --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;mover&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/mover&gt;
+        &lt;munderover&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munderover&gt;
+      &lt;/mstyle&gt;
+      &lt;mstyle displaystyle=&quot;false&quot;&gt;
+        &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;msup&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msup&gt;
+        &lt;msubsup&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msubsup&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/displaystyle-2-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationdisplaystyle2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/displaystyle-2.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/displaystyle-2.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/displaystyle-2.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;displaystyle&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- Test the effect of displaystyle on munder, mover and munderover --&gt;
+    &lt;math&gt;
+      &lt;mstyle displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;mover&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/mover&gt;
+        &lt;munderover&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munderover&gt;
+      &lt;/mstyle&gt;
+      &lt;mstyle displaystyle=&quot;false&quot;&gt;
+        &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;mover&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/mover&gt;
+        &lt;munderover&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munderover&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/displaystyle-2.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationdisplaystyle3expectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/displaystyle-3-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/displaystyle-3-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/displaystyle-3-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;displaystyle&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- Test dynamic change of displaystyle --&gt;
+    &lt;math id=&quot;m1&quot; displaystyle=&quot;true&quot;&gt;
+      &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mstyle id=&quot;m2&quot; displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mtable id=&quot;m3&quot; displaystyle=&quot;true&quot;&gt;
+        &lt;mtr&gt;
+          &lt;mtd&gt;
+            &lt;munder&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+            &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+          &lt;/mtd&gt;
+        &lt;/mtr&gt;
+      &lt;/mtable&gt;
+    &lt;/math&gt;
+    &lt;math id=&quot;m4&quot; displaystyle=&quot;false&quot;&gt;
+      &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+      &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mstyle id=&quot;m5&quot; displaystyle=&quot;false&quot;&gt;
+        &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+        &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mtable id=&quot;m6&quot; displaystyle=&quot;false&quot;&gt;
+        &lt;mtr&gt;
+          &lt;mtd&gt;
+            &lt;msub&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/msub&gt;
+            &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+          &lt;/mtd&gt;
+        &lt;/mtr&gt;
+      &lt;/mtable&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/displaystyle-3-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationdisplaystyle3html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/displaystyle-3.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/displaystyle-3.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/displaystyle-3.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html class=&quot;reftest-wait&quot;&gt;
+  &lt;head&gt;
+    &lt;title&gt;displaystyle&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+    &lt;script type=&quot;text/javascript&quot;&gt;
+      function doTest() {
+        document.getElementById(&quot;m1&quot;).setAttribute(&quot;displaystyle&quot;, &quot;true&quot;);
+        document.getElementById(&quot;m2&quot;).setAttribute(&quot;displaystyle&quot;, &quot;true&quot;);
+        document.getElementById(&quot;m3&quot;).setAttribute(&quot;displaystyle&quot;, &quot;true&quot;);
+        document.getElementById(&quot;m4&quot;).removeAttribute(&quot;displaystyle&quot;);
+        document.getElementById(&quot;m5&quot;).removeAttribute(&quot;displaystyle&quot;);
+        document.getElementById(&quot;m6&quot;).removeAttribute(&quot;displaystyle&quot;);
+        document.documentElement.removeAttribute(&quot;class&quot;);
+      }
+      window.addEventListener(&quot;load&quot;, doTest, false);
+    &lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- Test dynamic change of displaystyle --&gt;
+    &lt;math id=&quot;m1&quot;&gt;
+      &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mstyle id=&quot;m2&quot;&gt;
+        &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mtable id=&quot;m3&quot;&gt;
+        &lt;mtr&gt;
+          &lt;mtd&gt;
+            &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+            &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+          &lt;/mtd&gt;
+        &lt;/mtr&gt;
+      &lt;/mtable&gt;
+    &lt;/math&gt;
+    &lt;math id=&quot;m4&quot; displaystyle=&quot;true&quot;&gt;
+      &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+      &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mstyle id=&quot;m5&quot; displaystyle=&quot;true&quot;&gt;
+        &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+        &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+      &lt;/mstyle&gt;
+    &lt;/math&gt;
+    &lt;math&gt;
+      &lt;mtable id=&quot;m6&quot; displaystyle=&quot;true&quot;&gt;
+        &lt;mtr&gt;
+          &lt;mtd&gt;
+            &lt;munder&gt;&lt;mo movablelimits=&quot;true&quot;&gt;O&lt;/mo&gt;&lt;mo&gt;O&lt;/mo&gt;&lt;/munder&gt;
+            &lt;mfrac&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;
+          &lt;/mtd&gt;
+        &lt;/mtr&gt;
+      &lt;/mtable&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/displaystyle-3.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationmomovablelimitsdefaultexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-movablelimits-default-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-movablelimits-default-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-movablelimits-default-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;mo movablelimits default value&lt;/title&gt;
+  &lt;meta charset=&quot;utf-8&quot;/&gt;&lt;/head&gt;
+&lt;body&gt;
+  &lt;math&gt;
+    &lt;munder&gt;
+      &lt;mo movablelimits=&quot;true&quot;&gt;∑&lt;/mo&gt;
+      &lt;mi&gt;x&lt;/mi&gt;
+    &lt;/munder&gt;
+    &lt;munder&gt;
+      &lt;mo movablelimits=&quot;false&quot;&gt;∫&lt;/mo&gt;
+      &lt;mi&gt;x&lt;/mi&gt;
+    &lt;/munder&gt;
+  &lt;/math&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/mo-movablelimits-default-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationmomovablelimitsdefaulthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-movablelimits-default.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-movablelimits-default.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-movablelimits-default.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;mo movablelimits default value&lt;/title&gt;
+  &lt;meta charset=&quot;utf-8&quot;/&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;math&gt;
+    &lt;munder&gt;
+      &lt;mo&gt;∑&lt;/mo&gt; &lt;!-- This has movablelimits=&quot;true&quot; in the operator dictionary --&gt;
+      &lt;mi&gt;x&lt;/mi&gt;
+    &lt;/munder&gt;
+    &lt;munder&gt;
+      &lt;mo&gt;∫&lt;/mo&gt; &lt;!-- This has movablelimits=&quot;false&quot; in the operator dictionary --&gt;
+      &lt;mi&gt;x&lt;/mi&gt;
+    &lt;/munder&gt;
+  &lt;/math&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/mo-movablelimits-default.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationmomovablelimitsdynamicexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+   &lt;head&gt;
+     &lt;title&gt;mo@movablelimits&lt;/title&gt;
+     &lt;meta charset=&quot;utf-8&quot;/&gt;
+   &lt;/head&gt;
+   &lt;body&gt;
+    &lt;math&gt;
+      &lt;munder&gt;
+          &lt;mo&gt;∑&lt;/mo&gt;
+          &lt;mi&gt;x&lt;/mi&gt;
+      &lt;/munder&gt;
+    &lt;/math&gt;
+   &lt;/body&gt;
+ &lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationmomovablelimitsdynamichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html class=&quot;reftest-wait&quot;&gt;
+   &lt;head&gt;
+     &lt;title&gt;mo@movablelimits&lt;/title&gt;
+     &lt;meta charset=&quot;utf-8&quot;/&gt;
+     &lt;script type=&quot;text/javascript&quot;&gt;
+       function doTest() {
+         document.getElementById('a').removeAttribute('movablelimits');
+         document.documentElement.removeAttribute(&quot;class&quot;);
+       }
+       window.addEventListener(&quot;load&quot;,doTest, false);
+     &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+    &lt;math&gt;
+      &lt;munder&gt;
+          &lt;mo id=&quot;a&quot; movablelimits=&quot;false&quot;&gt;∑&lt;/mo&gt;
+          &lt;mi&gt;x&lt;/mi&gt;
+      &lt;/munder&gt;
+    &lt;/math&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/mo-movablelimits-dynamic.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationmomovablelimitsexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-movablelimits-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-movablelimits-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-movablelimits-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;mo movablelimits&lt;/title&gt;
+  &lt;meta charset=&quot;utf-8&quot;/&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;math&gt;
+    &lt;msub&gt;
+      &lt;mtext&gt;A&lt;/mtext&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/msub&gt;
+    &lt;munder&gt;
+      &lt;mtext&gt;A&lt;/mtext&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+  &lt;/math&gt;
+  &lt;math displaystyle=&quot;true&quot;&gt;
+    &lt;munder&gt;
+      &lt;mtext&gt;A&lt;/mtext&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+    &lt;munder&gt;
+      &lt;mtext&gt;A&lt;/mtext&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+  &lt;/math&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/mo-movablelimits-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationmomovablelimitshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-movablelimits.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-movablelimits.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-movablelimits.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;mo movablelimits&lt;/title&gt;
+  &lt;meta charset=&quot;utf-8&quot;/&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;math&gt;
+    &lt;munder&gt;
+      &lt;mo lspace=&quot;0px&quot; rspace=&quot;0px&quot; movablelimits=&quot;true&quot;&gt;A&lt;/mo&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+    &lt;munder&gt;
+      &lt;mo lspace=&quot;0px&quot; rspace=&quot;0px&quot; movablelimits=&quot;false&quot;&gt;A&lt;/mo&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+  &lt;/math&gt;
+  &lt;math displaystyle=&quot;true&quot;&gt;
+    &lt;munder&gt;
+      &lt;mo lspace=&quot;0px&quot; rspace=&quot;0px&quot; movablelimits=&quot;true&quot;&gt;A&lt;/mo&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+    &lt;munder&gt;
+      &lt;mo lspace=&quot;0px&quot; rspace=&quot;0px&quot; movablelimits=&quot;false&quot;&gt;A&lt;/mo&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/munder&gt;
+  &lt;/math&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/mo-movablelimits.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationunderoverscriptshiftsexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/underover-scriptshifts-expected.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/underover-scriptshifts-expected.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/underover-scriptshifts-expected.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;subscriptshift/superscriptshift underover&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;math&gt;
+      &lt;munder&gt;
+        &lt;mo&gt;&amp;sum;&lt;/mo&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+      &lt;/munder&gt;
+      &lt;mover&gt;
+        &lt;mo&gt;&amp;sum;&lt;/mo&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+      &lt;/mover&gt;
+      &lt;munderover&gt;
+        &lt;mo&gt;&amp;sum;&lt;/mo&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+      &lt;/munderover&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/underover-scriptshifts-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationunderoverscriptshiftshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/underover-scriptshifts.html (0 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/underover-scriptshifts.html                                (rev 0)
+++ trunk/LayoutTests/mathml/presentation/underover-scriptshifts.html        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;subscriptshift/superscriptshift underover&lt;/title&gt;
+    &lt;meta charset=&quot;utf-8&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+
+    &lt;!-- This test passes if the subscriptshift and superscriptshift attributes are ignored --&gt;
+    &lt;math&gt;
+      &lt;munder subscriptshift=&quot;100px&quot;&gt;
+        &lt;mo&gt;&amp;sum;&lt;/mo&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+      &lt;/munder&gt;
+      &lt;mover superscriptshift=&quot;100px&quot;&gt;
+        &lt;mo&gt;&amp;sum;&lt;/mo&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+      &lt;/mover&gt;
+      &lt;munderover subscriptshift=&quot;100px&quot; superscriptshift=&quot;100px&quot;&gt;
+        &lt;mo&gt;&amp;sum;&lt;/mo&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+        &lt;mspace width=&quot;10px&quot; height=&quot;10px&quot; mathbackground=&quot;red&quot;/&gt;
+      &lt;/munderover&gt;
+    &lt;/math&gt;
+
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/underover-scriptshifts.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/ChangeLog        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2016-07-08  Frederic Wang  &lt;fwang@igalia.com&gt;
+
+        Add support for movablelimits.
+        https://bugs.webkit.org/show_bug.cgi?id=155542
+
+        Reviewed by Brent Fulgham.
+
+        Tests: mathml/presentation/displaystyle-1.html
+               mathml/presentation/displaystyle-2.html
+               mathml/presentation/displaystyle-3.html
+               mathml/presentation/mo-movablelimits-default.html
+               mathml/presentation/mo-movablelimits-dynamic.html
+               mathml/presentation/mo-movablelimits.html
+
+        * mathml/MathMLTextElement.cpp:
+        (WebCore::MathMLTextElement::parseAttribute): Take into account change of movablelimits.
+        * rendering/mathml/MathMLOperatorDictionary.h: Remove FIXME comment.
+        * rendering/mathml/MathMLStyle.cpp:
+        (WebCore::MathMLStyle::updateStyleIfNeeded): Force relayout and width computation when a
+        displaystyle value change.
+        * rendering/mathml/RenderMathMLOperator.h:
+        (WebCore::RenderMathMLOperator::shouldMoveLimits): Helper function to test if the operator
+        should have his limits moved when used as a base of munder/mover/munderover.
+        * rendering/mathml/RenderMathMLScripts.cpp: Allow munderover/munder/mover elements to use
+        this class and take the same behavior as the corresponding msubsup/msub/sup except for
+        the *scriptshift attributes.
+        (WebCore::RenderMathMLScripts::RenderMathMLScripts):
+        (WebCore::RenderMathMLScripts::getBaseAndScripts):
+        (WebCore::RenderMathMLScripts::computePreferredLogicalWidths):
+        (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
+        (WebCore::RenderMathMLScripts::layoutBlock):
+        * rendering/mathml/RenderMathMLScripts.h: Allow some members to be accessible/overridden
+        by RenderMathMLUnderOver and add munderover/munder/mover in the kind.
+        * rendering/mathml/RenderMathMLUnderOver.cpp:
+        (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): We use the code from
+        RenderMathMLScripts to initialize m_kind.
+        (WebCore::RenderMathMLUnderOver::shouldMoveLimits): New function to determine if the base
+        should move its limits.
+        (WebCore::RenderMathMLUnderOver::computePreferredLogicalWidths): We use the code from
+        RenderMathMLScripts when the base should move its limits.
+        (WebCore::RenderMathMLUnderOver::layoutBlock): We use the code from RenderMathMLScripts when
+        the base should move its limits. Also improve the early return for invalid markup.
+        (WebCore::RenderMathMLUnderOver::unembellishedOperator): Deleted. We use the code from RenderMathMLScripts.
+        (WebCore::RenderMathMLUnderOver::firstLineBaseline): Deleted. We use the code from RenderMathMLScripts.
+        * rendering/mathml/RenderMathMLUnderOver.h: We now inherit from RenderMathMLScripts and can
+        just remove members that exist in the parent. We define shouldMoveLimits() to determine
+        when the layout should be done the same as RenderMathMLScripts. For now, we try and be
+        safe with the rest of the code by continuing to claim that we are not a RenderMathMLScripts.
+
</ins><span class="cx"> 2016-07-07  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Clean up PassRefPtr in Modules/webaudio
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLTextElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLTextElement.cpp (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLTextElement.cpp        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/mathml/MathMLTextElement.cpp        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MathMLTextElement::parseAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span><span class="cx"> {
</span><del>-    if (name == stretchyAttr || name == lspaceAttr || name == rspaceAttr) {
</del><ins>+    if (name == stretchyAttr || name == lspaceAttr || name == rspaceAttr || name == movablelimitsAttr) {
</ins><span class="cx">         if (is&lt;RenderMathMLOperator&gt;(renderer()))
</span><span class="cx">             downcast&lt;RenderMathMLOperator&gt;(*renderer()).updateFromElement();
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlMathMLOperatorDictionaryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/MathMLOperatorDictionary.h (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/MathMLOperatorDictionary.h        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/MathMLOperatorDictionary.h        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     Accent = 0x1, // FIXME: This must be used to implement accentunder/accent on munderover (https://bugs.webkit.org/show_bug.cgi?id=124826).
</span><span class="cx">     Fence = 0x2, // This has no visual effect but allows to expose semantic information via the accessibility tree.
</span><span class="cx">     LargeOp = 0x4,
</span><del>-    MovableLimits = 0x8, // FIXME: This must be used to implement displaystyle  (https://bugs.webkit.org/show_bug.cgi?id=118737).
</del><ins>+    MovableLimits = 0x8,
</ins><span class="cx">     Separator = 0x10, // This has no visual effect but allows to expose semantic information via the accessibility tree.
</span><span class="cx">     Stretchy = 0x20,
</span><span class="cx">     Symmetric = 0x40
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlMathMLStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/MathMLStyle.cpp (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/MathMLStyle.cpp        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/MathMLStyle.cpp        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> void MathMLStyle::updateStyleIfNeeded(RenderObject* renderer, bool oldDisplayStyle)
</span><span class="cx"> {
</span><span class="cx">     if (oldDisplayStyle != m_displayStyle) {
</span><ins>+        renderer-&gt;setPreferredLogicalWidthsDirty(true);
</ins><span class="cx">         if (is&lt;RenderMathMLToken&gt;(renderer))
</span><span class="cx">             downcast&lt;RenderMathMLToken&gt;(renderer)-&gt;updateTokenContent();
</span><span class="cx">         else if (is&lt;RenderMathMLRoot&gt;(renderer))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const { return m_operatorFlags &amp; flag; }
</span><span class="cx">     bool isLargeOperatorInDisplayStyle() const { return !hasOperatorFlag(MathMLOperatorDictionary::Stretchy) &amp;&amp; hasOperatorFlag(MathMLOperatorDictionary::LargeOp) &amp;&amp; mathMLStyle()-&gt;displayStyle(); }
</span><ins>+    bool shouldMoveLimits() const { return hasOperatorFlag(MathMLOperatorDictionary::MovableLimits) &amp;&amp; !mathMLStyle()-&gt;displayStyle(); }
</ins><span class="cx">     bool isVertical() const { return m_isVertical; }
</span><span class="cx">     LayoutUnit italicCorrection() const { return m_mathOperator.italicCorrection(); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -53,6 +53,12 @@
</span><span class="cx">         m_scriptType = Super;
</span><span class="cx">     else if (element.hasTagName(MathMLNames::msubsupTag))
</span><span class="cx">         m_scriptType = SubSup;
</span><ins>+    else if (element.hasTagName(MathMLNames::munderTag))
+        m_scriptType = Under;
+    else if (element.hasTagName(MathMLNames::moverTag))
+        m_scriptType = Over;
+    else if (element.hasTagName(MathMLNames::munderoverTag))
+        m_scriptType = UnderOver;
</ins><span class="cx">     else {
</span><span class="cx">         ASSERT(element.hasTagName(MathMLNames::mmultiscriptsTag));
</span><span class="cx">         m_scriptType = Multiscripts;
</span><span class="lines">@@ -80,16 +86,22 @@
</span><span class="cx">     switch (m_scriptType) {
</span><span class="cx">     case Sub:
</span><span class="cx">     case Super:
</span><ins>+    case Under:
+    case Over:
</ins><span class="cx">         // These elements must have exactly two children.
</span><span class="cx">         // The second child is a postscript and there are no prescripts.
</span><span class="cx">         // &lt;msub&gt; base subscript &lt;/msub&gt;
</span><span class="cx">         // &lt;msup&gt; base superscript &lt;/msup&gt;
</span><ins>+        // &lt;munder&gt; base underscript &lt;/munder&gt;
+        // &lt;mover&gt; base overscript &lt;/mover&gt;
</ins><span class="cx">         firstPostScript = base-&gt;nextSiblingBox();
</span><span class="cx">         return firstPostScript &amp;&amp; !isPrescriptDelimiter(*firstPostScript) &amp;&amp; !firstPostScript-&gt;nextSiblingBox();
</span><del>-    case SubSup: {
-        // This element must have exactly three children.
</del><ins>+    case SubSup:
+    case UnderOver: {
+        // These elements must have exactly three children.
</ins><span class="cx">         // The second and third children are postscripts and there are no prescripts.
</span><span class="cx">         // &lt;msubsup&gt; base subscript superscript &lt;/msubsup&gt;
</span><ins>+        // &lt;munderover&gt; base subscript superscript &lt;/munderover&gt;
</ins><span class="cx">         firstPostScript = base-&gt;nextSiblingBox();
</span><span class="cx">         if (!firstPostScript || isPrescriptDelimiter(*firstPostScript))
</span><span class="cx">             return false;
</span><span class="lines">@@ -169,14 +181,17 @@
</span><span class="cx"> 
</span><span class="cx">     switch (m_scriptType) {
</span><span class="cx">     case Sub:
</span><ins>+    case Under:
</ins><span class="cx">         m_maxPreferredLogicalWidth += base-&gt;maxPreferredLogicalWidth();
</span><span class="cx">         m_maxPreferredLogicalWidth += std::max(LayoutUnit(0), firstPostScript-&gt;maxPreferredLogicalWidth() - baseItalicCorrection + space);
</span><span class="cx">         break;
</span><span class="cx">     case Super:
</span><ins>+    case Over:
</ins><span class="cx">         m_maxPreferredLogicalWidth += base-&gt;maxPreferredLogicalWidth();
</span><span class="cx">         m_maxPreferredLogicalWidth += std::max(LayoutUnit(0), firstPostScript-&gt;maxPreferredLogicalWidth() + space);
</span><span class="cx">         break;
</span><span class="cx">     case SubSup:
</span><ins>+    case UnderOver:
</ins><span class="cx">     case Multiscripts: {
</span><span class="cx">         RenderBox* supScript;
</span><span class="cx">         for (auto* subScript = firstPreScript; subScript; subScript = supScript-&gt;nextSiblingBox()) {
</span><span class="lines">@@ -233,21 +248,26 @@
</span><span class="cx">         superscriptBottomMaxWithSubscript = 4 * style().fontMetrics().xHeight() / 5;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_scriptType == Sub || m_scriptType == SubSup || m_scriptType == Multiscripts) {
-        LayoutUnit specifiedMinSubShift = 0;
-        parseMathMLLength(element()-&gt;fastGetAttribute(MathMLNames::subscriptshiftAttr), specifiedMinSubShift, &amp;style(), false);
</del><ins>+    if (m_scriptType == Sub || m_scriptType == SubSup || m_scriptType == Multiscripts || m_scriptType == Under || m_scriptType == UnderOver) {
</ins><span class="cx">         minSubScriptShift = std::max(subscriptShiftDown, baseDescent + subscriptBaselineDropMin);
</span><del>-        minSubScriptShift = std::max(minSubScriptShift, specifiedMinSubShift);
</del><ins>+        if (!isRenderMathMLUnderOver()) {
+            LayoutUnit specifiedMinSubShift = 0;
+            parseMathMLLength(element()-&gt;fastGetAttribute(MathMLNames::subscriptshiftAttr), specifiedMinSubShift, &amp;style(), false);
+            minSubScriptShift = std::max(minSubScriptShift, specifiedMinSubShift);
+        }
</ins><span class="cx">     }
</span><del>-    if (m_scriptType == Super || m_scriptType == SubSup || m_scriptType == Multiscripts) {
-        LayoutUnit specifiedMinSupShift = 0;
-        parseMathMLLength(element()-&gt;fastGetAttribute(MathMLNames::superscriptshiftAttr), specifiedMinSupShift, &amp;style(), false);
</del><ins>+    if (m_scriptType == Super || m_scriptType == SubSup || m_scriptType == Multiscripts  || m_scriptType == Over || m_scriptType == UnderOver) {
</ins><span class="cx">         minSupScriptShift = std::max(superscriptShiftUp, baseAscent - superScriptBaselineDropMax);
</span><del>-        minSupScriptShift = std::max(minSupScriptShift, specifiedMinSupShift);
</del><ins>+        if (!isRenderMathMLUnderOver()) {
+            LayoutUnit specifiedMinSupShift = 0;
+            parseMathMLLength(element()-&gt;fastGetAttribute(MathMLNames::superscriptshiftAttr), specifiedMinSupShift, &amp;style(), false);
+            minSupScriptShift = std::max(minSupScriptShift, specifiedMinSupShift);
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     switch (m_scriptType) {
</span><del>-    case Sub: {
</del><ins>+    case Sub:
+    case Under: {
</ins><span class="cx">         script-&gt;layoutIfNeeded();
</span><span class="cx">         LayoutUnit subAscent = ascentForChild(*script);
</span><span class="cx">         LayoutUnit subDescent = script-&gt;logicalHeight() - subAscent;
</span><span class="lines">@@ -255,7 +275,8 @@
</span><span class="cx">         minSubScriptShift = std::max(minSubScriptShift, subAscent - subscriptTopMax);
</span><span class="cx">     }
</span><span class="cx">         break;
</span><del>-    case Super: {
</del><ins>+    case Super:
+    case Over: {
</ins><span class="cx">         script-&gt;layoutIfNeeded();
</span><span class="cx">         LayoutUnit supAscent = ascentForChild(*script);
</span><span class="cx">         LayoutUnit supDescent = script-&gt;logicalHeight() - supAscent;
</span><span class="lines">@@ -264,6 +285,7 @@
</span><span class="cx">     }
</span><span class="cx">         break;
</span><span class="cx">     case SubSup:
</span><ins>+    case UnderOver:
</ins><span class="cx">     case Multiscripts: {
</span><span class="cx">         RenderBox* supScript;
</span><span class="cx">         for (auto* subScript = script; subScript &amp;&amp; !isPrescriptDelimiter(*subScript); subScript = supScript-&gt;nextSiblingBox()) {
</span><span class="lines">@@ -342,7 +364,8 @@
</span><span class="cx">     setLogicalHeight(ascent + descent);
</span><span class="cx"> 
</span><span class="cx">     switch (m_scriptType) {
</span><del>-    case Sub: {
</del><ins>+    case Sub:
+    case Under: {
</ins><span class="cx">         setLogicalWidth(base-&gt;logicalWidth() + std::max(LayoutUnit(0), firstPostScript-&gt;logicalWidth() - baseItalicCorrection + space));
</span><span class="cx">         LayoutPoint baseLocation(mirrorIfNeeded(horizontalOffset, *base), ascent - baseAscent);
</span><span class="cx">         base-&gt;setLocation(baseLocation);
</span><span class="lines">@@ -352,7 +375,8 @@
</span><span class="cx">         firstPostScript-&gt;setLocation(scriptLocation);
</span><span class="cx">     }
</span><span class="cx">         break;
</span><del>-    case Super: {
</del><ins>+    case Super:
+    case Over: {
</ins><span class="cx">         setLogicalWidth(base-&gt;logicalWidth() + std::max(LayoutUnit(0), firstPostScript-&gt;logicalWidth() + space));
</span><span class="cx">         LayoutPoint baseLocation(mirrorIfNeeded(horizontalOffset, *base), ascent - baseAscent);
</span><span class="cx">         base-&gt;setLocation(baseLocation);
</span><span class="lines">@@ -363,6 +387,7 @@
</span><span class="cx">     }
</span><span class="cx">         break;
</span><span class="cx">     case SubSup:
</span><ins>+    case UnderOver:
</ins><span class="cx">     case Multiscripts: {
</span><span class="cx">         RenderBox* supScript;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -34,26 +34,26 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> // Render a base with scripts.
</span><del>-class RenderMathMLScripts final : public RenderMathMLBlock {
</del><ins>+class RenderMathMLScripts : public RenderMathMLBlock {
</ins><span class="cx"> public:
</span><span class="cx">     RenderMathMLScripts(Element&amp;, RenderStyle&amp;&amp;);
</span><span class="cx">     RenderMathMLOperator* unembellishedOperator() final;
</span><span class="cx">     Optional&lt;int&gt; firstLineBaseline() const final;
</span><del>-    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
</del><ins>+    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
</ins><span class="cx"> 
</span><ins>+protected:
+    bool isRenderMathMLScripts() const override { return true; }
+    const char* renderName() const override { return &quot;RenderMathMLScripts&quot;; }
+    void computePreferredLogicalWidths() override;
+
+    enum ScriptsType { Sub, Super, SubSup, Multiscripts, Under, Over, UnderOver };
+    ScriptsType m_scriptType;
+
</ins><span class="cx"> private:
</span><del>-    bool isRenderMathMLScripts() const final { return true; }
-    const char* renderName() const final { return &quot;RenderMathMLScripts&quot;; }
-
</del><span class="cx">     bool getBaseAndScripts(RenderBox*&amp; base, RenderBox*&amp; firstPostScript, RenderBox*&amp; firstPreScript);
</span><span class="cx">     LayoutUnit spaceAfterScript();
</span><span class="cx">     LayoutUnit italicCorrection(RenderBox* base);
</span><del>-    void computePreferredLogicalWidths() override;
</del><span class="cx">     void getScriptMetricsAndLayoutIfNeeded(RenderBox* base, RenderBox* script, LayoutUnit&amp; minSubScriptShift, LayoutUnit&amp; minSupScriptShift, LayoutUnit&amp; maxScriptDescent, LayoutUnit&amp; maxScriptAscent);
</span><del>-
-    enum ScriptsType { Sub, Super, SubSup, Multiscripts };
-
-    ScriptsType m_scriptType;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLUnderOvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -40,36 +40,10 @@
</span><span class="cx"> using namespace MathMLNames;
</span><span class="cx"> 
</span><span class="cx"> RenderMathMLUnderOver::RenderMathMLUnderOver(Element&amp; element, RenderStyle&amp;&amp; style)
</span><del>-    : RenderMathMLBlock(element, WTFMove(style))
</del><ins>+    : RenderMathMLScripts(element, WTFMove(style))
</ins><span class="cx"> {
</span><del>-    // Determine what kind of under/over expression we have by element name
-    if (element.hasTagName(MathMLNames::munderTag))
-        m_scriptType = Under;
-    else if (element.hasTagName(MathMLNames::moverTag))
-        m_scriptType = Over;
-    else {
-        ASSERT(element.hasTagName(MathMLNames::munderoverTag));
-        m_scriptType = UnderOver;
-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderMathMLOperator* RenderMathMLUnderOver::unembellishedOperator()
-{
-    auto* base = firstChildBox();
-    if (!is&lt;RenderMathMLBlock&gt;(base))
-        return nullptr;
-    return downcast&lt;RenderMathMLBlock&gt;(*base).unembellishedOperator();
-}
-
-Optional&lt;int&gt; RenderMathMLUnderOver::firstLineBaseline() const
-{
-    auto* base = firstChildBox();
-    if (!base)
-        return Optional&lt;int&gt;();
-
-    return Optional&lt;int&gt;(static_cast&lt;int&gt;(lroundf(ascentForChild(*base) + base-&gt;logicalTop())));
-}
-
</del><span class="cx"> void RenderMathMLUnderOver::computeOperatorsHorizontalStretch()
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit stretchWidth = 0;
</span><span class="lines">@@ -124,6 +98,13 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool RenderMathMLUnderOver::shouldMoveLimits()
+{
+    if (auto* renderOperator = unembellishedOperator())
+        return renderOperator-&gt;shouldMoveLimits();
+    return false;
+}
+
</ins><span class="cx"> RenderBox&amp; RenderMathMLUnderOver::base() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isValid());
</span><span class="lines">@@ -156,6 +137,11 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (shouldMoveLimits()) {
+        RenderMathMLScripts::computePreferredLogicalWidths();
+        return;
+    }
+
</ins><span class="cx">     LayoutUnit preferredWidth = base().maxPreferredLogicalWidth();
</span><span class="cx"> 
</span><span class="cx">     if (m_scriptType == Under || m_scriptType == UnderOver)
</span><span class="lines">@@ -174,7 +160,7 @@
</span><span class="cx">     return (logicalWidth() - child.logicalWidth()) / 2;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderMathMLUnderOver::layoutBlock(bool relayoutChildren, LayoutUnit)
</del><ins>+void RenderMathMLUnderOver::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(needsLayout());
</span><span class="cx"> 
</span><span class="lines">@@ -188,6 +174,11 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (shouldMoveLimits()) {
+        RenderMathMLScripts::layoutBlock(relayoutChildren, pageLogicalHeight);
+        return;
+    }
+
</ins><span class="cx">     recomputeLogicalWidth();
</span><span class="cx"> 
</span><span class="cx">     computeOperatorsHorizontalStretch();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLUnderOverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h (202969 => 202970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h        2016-07-08 07:05:07 UTC (rev 202969)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h        2016-07-08 07:15:24 UTC (rev 202970)
</span><span class="lines">@@ -29,34 +29,28 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx"> 
</span><del>-#include &quot;RenderMathMLBlock.h&quot;
</del><ins>+#include &quot;RenderMathMLScripts.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class RenderMathMLUnderOver final : public RenderMathMLBlock {
</del><ins>+class RenderMathMLUnderOver final : public RenderMathMLScripts {
</ins><span class="cx"> public:
</span><span class="cx">     RenderMathMLUnderOver(Element&amp;, RenderStyle&amp;&amp;);
</span><del>-
-    RenderMathMLOperator* unembellishedOperator() override;
-
-    Optional&lt;int&gt; firstLineBaseline() const override;
-
</del><span class="cx">     void computePreferredLogicalWidths() final;
</span><span class="cx">     void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    bool isRenderMathMLScripts() const final { return false; }
</ins><span class="cx">     bool isRenderMathMLUnderOver() const override { return true; }
</span><span class="cx">     const char* renderName() const override { return &quot;RenderMathMLUnderOver&quot;; }
</span><span class="cx"> 
</span><span class="cx">     void computeOperatorsHorizontalStretch();
</span><span class="cx">     bool isValid() const;
</span><ins>+    bool shouldMoveLimits();
</ins><span class="cx">     RenderBox&amp; base() const;
</span><span class="cx">     RenderBox&amp; under() const;
</span><span class="cx">     RenderBox&amp; over() const;
</span><span class="cx">     LayoutUnit horizontalOffset(const RenderBox&amp;) const;
</span><del>-
-    enum UnderOverType { Under, Over, UnderOver };
-    UnderOverType m_scriptType;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>